Ticket #55361: octave-symbolic-fix-issue-55361.diff

File octave-symbolic-fix-issue-55361.diff, 3.3 KB (added by maehne (Torsten Maehne), 7 years ago)
  • ports/math/octave-symbolic/Portfile

    From 96a5465a9cdbadb40f67b361348abd7ab6d4b1d6 Mon Sep 17 00:00:00 2001
    From: Torsten Maehne <Torsten.Maehne@gmx.de>
    Date: Mon, 20 Nov 2017 10:52:54 +0100
    Subject: [PATCH] Apply patch for issue #55361 by @MarcusCalhoun-Lopez and
     revbump.
    
    ---
     ports/math/octave-symbolic/Portfile                | 25 +++++++++++-----------
     ports/math/octave-symbolic/files/patch-python.diff | 11 ++++++++++
     2 files changed, 24 insertions(+), 12 deletions(-)
     create mode 100644 ports/math/octave-symbolic/files/patch-python.diff
    
    diff --git a/ports/math/octave-symbolic/Portfile b/ports/math/octave-symbolic/Portfile
    index 0993d5c..a339759 100644
    a b PortSystem 1.0 
    44PortGroup           octave 1.0
    55
    66octave.setup        symbolic 2.6.0
     7revision            1
    78platforms           darwin
    89license             GPL-3
    910maintainers         {mps @Schamschula} openmaintainer
    supported_archs noarch 
    1920variant python27 description "Use Python 2.7 SymPy" conflicts python34 python35 python36 {
    2021    depends_lib-append  port:python27 \
    2122                        port:py27-sympy
    22    
    23     configure.env-append \
    24         PYTHON=${prefix}/bin/python2.7
     23    configure.python    ${prefix}/bin/python2.7
    2524}
    2625
    2726variant python34 description "Use Python 3.4 SymPy" conflicts python27 python35 python36 {
    2827    depends_lib-append  port:python34 \
    2928                        port:py34-sympy
    30    
    31     configure.env-append \
    32         PYTHON=${prefix}/bin/python3.4
     29    configure.python    ${prefix}/bin/python3.4
    3330}
    3431
    3532variant python35 description "Use Python 3.5 SymPy" conflicts python27 python34 python36 {
    3633    depends_lib-append  port:python35 \
    3734        port:py35-sympy
    38 
    39     configure.env-append \
    40         PYTHON=${prefix}/bin/python3.5
     35    configure.python    ${prefix}/bin/python3.5
    4136}
    4237
    4338variant python36 description "Use Python 3.6 SymPy" conflicts python27 python34 python35 {
    4439    depends_lib-append  port:python36 \
    4540        port:py36-sympy
    46 
    47     configure.env-append \
    48         PYTHON=${prefix}/bin/python3.6
     41    configure.python    ${prefix}/bin/python3.6
    4942}
    5043
    5144if {![variant_isset python27] && ![variant_isset python34] && ![variant_isset python35] && ![variant_isset python36]} {
    if {![variant_isset python27] && ![variant_isset python34] && ![variant_isset py 
    6053    return -code error "Invalid variant selection"
    6154
    6255}
     56
     57# see https://trac.macports.org/ticket/55361
     58patchfiles-append patch-python.diff
     59post-patch {
     60    reinplace \
     61        "s|__MACPORTS_PYTHON__|${configure.python}|g" \
     62        ${worksrcpath}/inst/sympref.m
     63}
  • new file ports/math/octave-symbolic/files/patch-python.diff

    diff --git a/ports/math/octave-symbolic/files/patch-python.diff b/ports/math/octave-symbolic/files/patch-python.diff
    new file mode 100644
    index 0000000..3a9a4e5
    - +  
     1--- inst/sympref.m.orig 2017-07-27 11:56:40.000000000 -0700
     2+++ inst/sympref.m      2017-11-19 11:14:17.000000000 -0700
     3@@ -261,7 +261,7 @@
     4       if (nargin ~= 1)
     5         error('old syntax ''sympref python'' removed; use ''setenv PYTHON'' instead')
     6       end
     7-      DEFAULTPYTHON = 'python';
     8+      DEFAULTPYTHON = '__MACPORTS_PYTHON__';
     9       pyexec = getenv('PYTHON');
     10       if (isempty(pyexec))
     11         pyexec = DEFAULTPYTHON;