aboutsummaryrefslogtreecommitdiff
path: root/lang/python36
diff options
context:
space:
mode:
authorTobias Kortkamp <tobik@FreeBSD.org>2018-07-26 08:58:50 +0000
committerTobias Kortkamp <tobik@FreeBSD.org>2018-07-26 08:58:50 +0000
commitdcbb4afe98800e66121ec3060755d9f87bbcbfa8 (patch)
treeb73be3af53a2244a4be87d809b59da15f62991cf /lang/python36
parent2bd5dbae1f9f5bf02ef48f82ff46b1e8a60b0676 (diff)
downloadports-dcbb4afe98800e66121ec3060755d9f87bbcbfa8.tar.gz
ports-dcbb4afe98800e66121ec3060755d9f87bbcbfa8.zip
lang/python3?: Fix python3.?-config behavior when symlinked
When python3.?-config is symlinked to another location it starts outputting bogus paths. For example $ pwd /home/tobias $ python3.6-config --includes -I/usr/local/include/python3.6m -I/usr/local/include/python3.6m $ ln -s /usr/local/bin/python3.6-config python3-config $ ./python3-config --includes -I/home/include/python3.6m -I/home/include/python3.6m This breaks ports trying to use BINARY_ALIAS together with python3.?-config. Apply a patch to resolve the symlink first before trying to find the install prefix. PR: 229749 Submitted by: tobik Reviewed by: antoine, miwi Approved by: python (miwi)
Notes
Notes: svn path=/head/; revision=475350
Diffstat (limited to 'lang/python36')
-rw-r--r--lang/python36/Makefile1
-rw-r--r--lang/python36/files/patch-Misc__python-config.sh.in11
2 files changed, 12 insertions, 0 deletions
diff --git a/lang/python36/Makefile b/lang/python36/Makefile
index 666e7ade777f..024ddd3e2834 100644
--- a/lang/python36/Makefile
+++ b/lang/python36/Makefile
@@ -3,6 +3,7 @@
PORTNAME= python
PORTVERSION= ${PYTHON_PORTVERSION}
+PORTREVISION= 1
CATEGORIES= lang python ipv6
MASTER_SITES= PYTHON/ftp/python/${PORTVERSION}
PKGNAMESUFFIX= ${PYTHON_SUFFIX}
diff --git a/lang/python36/files/patch-Misc__python-config.sh.in b/lang/python36/files/patch-Misc__python-config.sh.in
new file mode 100644
index 000000000000..ebb0c6a51f6d
--- /dev/null
+++ b/lang/python36/files/patch-Misc__python-config.sh.in
@@ -0,0 +1,11 @@
+--- Misc/python-config.sh.in.orig 2018-07-13 21:07:16 UTC
++++ Misc/python-config.sh.in
+@@ -15,7 +15,7 @@ fi
+ # Returns the actual prefix where this script was installed to.
+ installed_prefix ()
+ {
+- RESULT=$(dirname $(cd $(dirname "$1") && pwd -P))
++ RESULT=$(dirname $(cd $(dirname $(realpath "$1")) && pwd -P))
+ if which readlink >/dev/null 2>&1 ; then
+ if readlink -f "$RESULT" >/dev/null 2>&1; then
+ RESULT=$(readlink -f "$RESULT")