summaryrefslogtreecommitdiff
path: root/lang/python37/files/patch-Misc__python-config.sh.in
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/python37/files/patch-Misc__python-config.sh.in
parentscience/libghemical: Fix C++11 errors on 12 (diff)
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)
Diffstat (limited to 'lang/python37/files/patch-Misc__python-config.sh.in')
-rw-r--r--lang/python37/files/patch-Misc__python-config.sh.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/lang/python37/files/patch-Misc__python-config.sh.in b/lang/python37/files/patch-Misc__python-config.sh.in
new file mode 100644
index 000000000000..ebb0c6a51f6d
--- /dev/null
+++ b/lang/python37/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")