From dcbb4afe98800e66121ec3060755d9f87bbcbfa8 Mon Sep 17 00:00:00 2001 From: Tobias Kortkamp Date: Thu, 26 Jul 2018 08:58:50 +0000 Subject: 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) --- lang/python37/files/patch-Misc__python-config.sh.in | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 lang/python37/files/patch-Misc__python-config.sh.in (limited to 'lang/python37/files/patch-Misc__python-config.sh.in') 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") -- cgit v1.2.3