From owner-svn-ports-head@freebsd.org Thu Jul 26 08:58:53 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2AAB8104830A; Thu, 26 Jul 2018 08:58:53 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C609085CB3; Thu, 26 Jul 2018 08:58:52 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9AD6726D56; Thu, 26 Jul 2018 08:58:52 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6Q8wqxg081595; Thu, 26 Jul 2018 08:58:52 GMT (envelope-from tobik@FreeBSD.org) Received: (from tobik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6Q8woXC081588; Thu, 26 Jul 2018 08:58:50 GMT (envelope-from tobik@FreeBSD.org) Message-Id: <201807260858.w6Q8woXC081588@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tobik set sender to tobik@FreeBSD.org using -f From: Tobias Kortkamp Date: Thu, 26 Jul 2018 08:58:50 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r475350 - in head/lang: python34 python34/files python35 python35/files python36 python36/files python37 python37/files X-SVN-Group: ports-head X-SVN-Commit-Author: tobik X-SVN-Commit-Paths: in head/lang: python34 python34/files python35 python35/files python36 python36/files python37 python37/files X-SVN-Commit-Revision: 475350 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jul 2018 08:58:53 -0000 Author: tobik Date: Thu Jul 26 08:58:50 2018 New Revision: 475350 URL: https://svnweb.freebsd.org/changeset/ports/475350 Log: 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) Added: head/lang/python34/files/patch-Misc__python-config.sh.in (contents, props changed) head/lang/python35/files/patch-Misc__python-config.sh.in (contents, props changed) head/lang/python36/files/patch-Misc__python-config.sh.in (contents, props changed) head/lang/python37/files/patch-Misc__python-config.sh.in (contents, props changed) Modified: head/lang/python34/Makefile head/lang/python35/Makefile head/lang/python36/Makefile head/lang/python37/Makefile Modified: head/lang/python34/Makefile ============================================================================== --- head/lang/python34/Makefile Thu Jul 26 08:11:33 2018 (r475349) +++ head/lang/python34/Makefile Thu Jul 26 08:58:50 2018 (r475350) @@ -3,6 +3,7 @@ PORTNAME= python PORTVERSION= ${PYTHON_PORTVERSION} +PORTREVISION= 1 CATEGORIES= lang python ipv6 MASTER_SITES= PYTHON/ftp/python/${PORTVERSION} PKGNAMESUFFIX= ${PYTHON_SUFFIX} Added: head/lang/python34/files/patch-Misc__python-config.sh.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/python34/files/patch-Misc__python-config.sh.in Thu Jul 26 08:58:50 2018 (r475350) @@ -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") Modified: head/lang/python35/Makefile ============================================================================== --- head/lang/python35/Makefile Thu Jul 26 08:11:33 2018 (r475349) +++ head/lang/python35/Makefile Thu Jul 26 08:58:50 2018 (r475350) @@ -3,6 +3,7 @@ PORTNAME= python PORTVERSION= ${PYTHON_PORTVERSION} +PORTREVISION= 1 CATEGORIES= lang python ipv6 MASTER_SITES= PYTHON/ftp/python/${PORTVERSION} PKGNAMESUFFIX= ${PYTHON_SUFFIX} Added: head/lang/python35/files/patch-Misc__python-config.sh.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/python35/files/patch-Misc__python-config.sh.in Thu Jul 26 08:58:50 2018 (r475350) @@ -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") Modified: head/lang/python36/Makefile ============================================================================== --- head/lang/python36/Makefile Thu Jul 26 08:11:33 2018 (r475349) +++ head/lang/python36/Makefile Thu Jul 26 08:58:50 2018 (r475350) @@ -3,6 +3,7 @@ PORTNAME= python PORTVERSION= ${PYTHON_PORTVERSION} +PORTREVISION= 1 CATEGORIES= lang python ipv6 MASTER_SITES= PYTHON/ftp/python/${PORTVERSION} PKGNAMESUFFIX= ${PYTHON_SUFFIX} Added: head/lang/python36/files/patch-Misc__python-config.sh.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/python36/files/patch-Misc__python-config.sh.in Thu Jul 26 08:58:50 2018 (r475350) @@ -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") Modified: head/lang/python37/Makefile ============================================================================== --- head/lang/python37/Makefile Thu Jul 26 08:11:33 2018 (r475349) +++ head/lang/python37/Makefile Thu Jul 26 08:58:50 2018 (r475350) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= python -PORTREVISION= 1 +PORTREVISION= 2 PORTVERSION= ${PYTHON_PORTVERSION} CATEGORIES= lang python ipv6 MASTER_SITES= PYTHON/ftp/python/${PORTVERSION} Added: head/lang/python37/files/patch-Misc__python-config.sh.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/python37/files/patch-Misc__python-config.sh.in Thu Jul 26 08:58:50 2018 (r475350) @@ -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")