Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jul 2018 08:58:50 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
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
Message-ID:  <201807260858.w6Q8woXC081588@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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")



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807260858.w6Q8woXC081588>