pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/python27 python27: patch unixccompiler.py instead...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c5cbff69fb42
branches:  trunk
changeset: 379267:c5cbff69fb42
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Fri May 13 18:42:05 2022 +0000

description:
python27: patch unixccompiler.py instead and use SUBST for OSX_SDK_PATH

(-isysroot probably not wrapper safe)

diffstat:

 lang/python27/Makefile                                     |   8 +++-
 lang/python27/distinfo                                     |   4 +-
 lang/python27/patches/patch-Lib_distutils_unixccompiler.py |  23 ++++++++++++-
 3 files changed, 28 insertions(+), 7 deletions(-)

diffs (84 lines):

diff -r b418541cbbb2 -r c5cbff69fb42 lang/python27/Makefile
--- a/lang/python27/Makefile    Fri May 13 18:19:07 2022 +0000
+++ b/lang/python27/Makefile    Fri May 13 18:42:05 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.100 2022/05/13 17:32:37 tnn Exp $
+# $NetBSD: Makefile,v 1.101 2022/05/13 18:42:05 tnn Exp $
 
 .include "dist.mk"
 
@@ -104,7 +104,11 @@
 # modules will not be built.
 .if ${OPSYS} == "Darwin"
 .  if exists(${OSX_SDK_PATH}/usr/include)
-CFLAGS+=       -isysroot ${OSX_SDK_PATH:Q}
+CFLAGS+=               -I${OSX_SDK_PATH:Q}
+SUBST_CLASSES+=                sdkpath
+SUBST_STAGE.sdkpath=   pre-configure
+SUBST_FILES.sdkpath=   Lib/distutils/unixccompiler.py
+SUBST_VARS.sdkpath=    OSX_SDK_PATH
 .  endif
 .  if exists(${OSX_SDK_PATH}/System/Library/Frameworks/QuickTime.framework)
 PLIST.qt=      yes
diff -r b418541cbbb2 -r c5cbff69fb42 lang/python27/distinfo
--- a/lang/python27/distinfo    Fri May 13 18:19:07 2022 +0000
+++ b/lang/python27/distinfo    Fri May 13 18:42:05 2022 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.89 2022/02/25 22:41:32 gutteridge Exp $
+$NetBSD: distinfo,v 1.90 2022/05/13 18:42:05 tnn Exp $
 
 BLAKE2s (Python-2.7.18.tar.xz) = 1b673ec8c9362a178e044691392bc4f67ad13457d7fddd84a88de346f23f9812
 SHA512 (Python-2.7.18.tar.xz) = a7bb62b51f48ff0b6df0b18f5b0312a523e3110f49c3237936bfe56ed0e26838c0274ff5401bda6fc21bf24337477ccac49e8026c5d651e4b4cafb5eb5086f6c
@@ -17,7 +17,7 @@
 SHA1 (patch-Lib_distutils_command_build__ext.py) = ea4feba4e93dbcff07050c82a00d591bb650e934
 SHA1 (patch-Lib_distutils_command_install__egg__info.py) = ec7f9e0cd04489b1f6497c44d75bff6864ad1047
 SHA1 (patch-Lib_distutils_tests_test__build__ext.py) = 6b3c8c8d1d351836b239c049d34d132953bd4786
-SHA1 (patch-Lib_distutils_unixccompiler.py) = db16c9aca2f29730945f28247b88b18828739bbb
+SHA1 (patch-Lib_distutils_unixccompiler.py) = 4e2425ae15d9f0383f83779e77d8b6ebce374967
 SHA1 (patch-Lib_distutils_util.py) = 5bcfad96f8e490351160f1a7c1f4ece7706a33fa
 SHA1 (patch-Lib_ftplib.py) = 6679c4ea109dcb5d56d86a55343954e0368b9138
 SHA1 (patch-Lib_httplib.py) = b8eeaa203e2a86ece94148d192b2a7e0c078602a
diff -r b418541cbbb2 -r c5cbff69fb42 lang/python27/patches/patch-Lib_distutils_unixccompiler.py
--- a/lang/python27/patches/patch-Lib_distutils_unixccompiler.py        Fri May 13 18:19:07 2022 +0000
+++ b/lang/python27/patches/patch-Lib_distutils_unixccompiler.py        Fri May 13 18:42:05 2022 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-Lib_distutils_unixccompiler.py,v 1.4 2016/07/02 15:05:43 adam Exp $
+$NetBSD: patch-Lib_distutils_unixccompiler.py,v 1.5 2022/05/13 18:42:05 tnn Exp $
 
 * from cygport 2.7.3-dylib.patch
 
---- Lib/distutils/unixccompiler.py.orig        2016-06-25 21:49:30.000000000 +0000
+--- Lib/distutils/unixccompiler.py.orig        2020-04-19 21:13:39.000000000 +0000
 +++ Lib/distutils/unixccompiler.py
 @@ -84,6 +84,7 @@ class UnixCCompiler(CCompiler):
      xcode_stub_lib_format = dylib_lib_format
@@ -12,7 +12,7 @@
  
      def preprocess(self, source,
                     output_file=None, macros=None, include_dirs=None,
-@@ -236,10 +237,8 @@ class UnixCCompiler(CCompiler):
+@@ -238,10 +239,8 @@ class UnixCCompiler(CCompiler):
              return ["+s", "-L" + dir]
          elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5":
              return ["-rpath", dir]
@@ -24,3 +24,20 @@
  
      def library_option(self, lib):
          return "-l" + lib
+@@ -271,13 +270,10 @@ class UnixCCompiler(CCompiler):
+             #       usr/lib/libedit.tbd
+             # vs
+             #   /usr/lib/libedit.dylib
+-            cflags = sysconfig.get_config_var('CFLAGS')
+-            m = re.search(r'-isysroot\s+(\S+)', cflags)
+-            if m is None:
+-                sysroot = '/'
++            if os.path.exists('@OSX_SDK_PATH@/usr/lib'):
++                sysroot = '@OSX_SDK_PATH@'
+             else:
+-                sysroot = m.group(1)
+-
++                sysroot = '/'
+ 
+ 
+         for dir in dirs:



Home | Main Index | Thread Index | Old Index