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 |
4 | 4 | PortGroup octave 1.0 |
5 | 5 | |
6 | 6 | octave.setup symbolic 2.6.0 |
| 7 | revision 1 |
7 | 8 | platforms darwin |
8 | 9 | license GPL-3 |
9 | 10 | maintainers {mps @Schamschula} openmaintainer |
… |
… |
supported_archs noarch |
19 | 20 | variant python27 description "Use Python 2.7 SymPy" conflicts python34 python35 python36 { |
20 | 21 | depends_lib-append port:python27 \ |
21 | 22 | port:py27-sympy |
22 | | |
23 | | configure.env-append \ |
24 | | PYTHON=${prefix}/bin/python2.7 |
| 23 | configure.python ${prefix}/bin/python2.7 |
25 | 24 | } |
26 | 25 | |
27 | 26 | variant python34 description "Use Python 3.4 SymPy" conflicts python27 python35 python36 { |
28 | 27 | depends_lib-append port:python34 \ |
29 | 28 | port:py34-sympy |
30 | | |
31 | | configure.env-append \ |
32 | | PYTHON=${prefix}/bin/python3.4 |
| 29 | configure.python ${prefix}/bin/python3.4 |
33 | 30 | } |
34 | 31 | |
35 | 32 | variant python35 description "Use Python 3.5 SymPy" conflicts python27 python34 python36 { |
36 | 33 | depends_lib-append port:python35 \ |
37 | 34 | port:py35-sympy |
38 | | |
39 | | configure.env-append \ |
40 | | PYTHON=${prefix}/bin/python3.5 |
| 35 | configure.python ${prefix}/bin/python3.5 |
41 | 36 | } |
42 | 37 | |
43 | 38 | variant python36 description "Use Python 3.6 SymPy" conflicts python27 python34 python35 { |
44 | 39 | depends_lib-append port:python36 \ |
45 | 40 | port:py36-sympy |
46 | | |
47 | | configure.env-append \ |
48 | | PYTHON=${prefix}/bin/python3.6 |
| 41 | configure.python ${prefix}/bin/python3.6 |
49 | 42 | } |
50 | 43 | |
51 | 44 | if {![variant_isset python27] && ![variant_isset python34] && ![variant_isset python35] && ![variant_isset python36]} { |
… |
… |
if {![variant_isset python27] && ![variant_isset python34] && ![variant_isset py |
60 | 53 | return -code error "Invalid variant selection" |
61 | 54 | |
62 | 55 | } |
| 56 | |
| 57 | # see https://trac.macports.org/ticket/55361 |
| 58 | patchfiles-append patch-python.diff |
| 59 | post-patch { |
| 60 | reinplace \ |
| 61 | "s|__MACPORTS_PYTHON__|${configure.python}|g" \ |
| 62 | ${worksrcpath}/inst/sympref.m |
| 63 | } |
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; |