pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/lang
Module Name: pkgsrc
Committed By: adam
Date: Sat Mar 2 13:23:36 UTC 2019
Modified Files:
pkgsrc/lang/python34: Makefile distinfo
pkgsrc/lang/python34/patches: patch-configure
pkgsrc/lang/python35: Makefile distinfo options.mk
pkgsrc/lang/python35/patches: patch-Lib_ctypes_util.py patch-configure
pkgsrc/lang/python36: Makefile distinfo options.mk
pkgsrc/lang/python36/patches: patch-Lib_ctypes_util.py patch-configure
pkgsrc/lang/python37: Makefile distinfo options.mk
pkgsrc/lang/python37/patches: patch-configure
Added Files:
pkgsrc/lang/python37/patches: patch-Lib_ctypes_util.py
Log Message:
python3[4567]: find_library() fixes; remove -stack_size from LDFLAGS on Darwin.
PkgSrc changes:
* Make find_library() consitant for all Python versions:
- Fallback to clang, when gcc is not installed.
- Find libraries in PkgSrc prefix.
* Do not use -stack_size; it ends up in 'pythonNN-config --ldflags', and some
modules fail to build.
To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 pkgsrc/lang/python34/Makefile
cvs rdiff -u -r1.32 -r1.33 pkgsrc/lang/python34/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/python34/patches/patch-configure
cvs rdiff -u -r1.15 -r1.16 pkgsrc/lang/python35/Makefile
cvs rdiff -u -r1.17 -r1.18 pkgsrc/lang/python35/distinfo
cvs rdiff -u -r1.2 -r1.3 pkgsrc/lang/python35/options.mk
cvs rdiff -u -r1.1 -r1.2 \
pkgsrc/lang/python35/patches/patch-Lib_ctypes_util.py
cvs rdiff -u -r1.3 -r1.4 pkgsrc/lang/python35/patches/patch-configure
cvs rdiff -u -r1.15 -r1.16 pkgsrc/lang/python36/Makefile
cvs rdiff -u -r1.23 -r1.24 pkgsrc/lang/python36/distinfo
cvs rdiff -u -r1.2 -r1.3 pkgsrc/lang/python36/options.mk
cvs rdiff -u -r1.1 -r1.2 \
pkgsrc/lang/python36/patches/patch-Lib_ctypes_util.py
cvs rdiff -u -r1.11 -r1.12 pkgsrc/lang/python36/patches/patch-configure
cvs rdiff -u -r1.3 -r1.4 pkgsrc/lang/python37/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/lang/python37/distinfo
cvs rdiff -u -r1.2 -r1.3 pkgsrc/lang/python37/options.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/python37/patches/patch-Lib_ctypes_util.py
cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/python37/patches/patch-configure
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/lang/python34/Makefile
diff -u pkgsrc/lang/python34/Makefile:1.28 pkgsrc/lang/python34/Makefile:1.29
--- pkgsrc/lang/python34/Makefile:1.28 Tue Aug 7 08:44:41 2018
+++ pkgsrc/lang/python34/Makefile Sat Mar 2 13:23:35 2019
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.28 2018/08/07 08:44:41 adam Exp $
+# $NetBSD: Makefile,v 1.29 2019/03/02 13:23:35 adam Exp $
.include "dist.mk"
PKGNAME= python34-${PY_DISTVERSION}
+PKGREVISION= 1
CATEGORIES= lang python
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
@@ -12,7 +13,7 @@ LICENSE= python-software-foundation
CONFLICTS+= python-[0-9]*
-PLIST_AWK+= -f ${PKGSRCDIR}/lang/python/plist-python.awk
+PLIST_AWK= -f ${PKGSRCDIR}/lang/python/plist-python.awk
PLIST_AWK_ENV+= PYVERS=34
PRINT_PLIST_AWK+= /^[^@]/ && /[^\/]+\.py[co]$$/ {
PRINT_PLIST_AWK+= gsub(/__pycache__\//, "")
@@ -148,25 +149,16 @@ REPLACE_FILES.python+= Lib/turtledemo/yi
REPLACE_FILES.python+= Lib/uu.py
REPLACE_FILES.python+= Lib/webbrowser.py
+# XXX: It might be needed to add manually more paths like ${PREFIX}/qt5/lib
+# Test: python -c 'from ctypes.util import find_library; print(find_library("ffi"));'
SUBST_CLASSES+= findlib
-SUBST_MESSAGE.findlib= Fixing find_library_file on Darwin.
+SUBST_MESSAGE.findlib= Fixing find_library().
SUBST_STAGE.findlib= pre-configure
SUBST_FILES.findlib= Lib/ctypes/macholib/dyld.py
SUBST_FILES.findlib+= Lib/ctypes/util.py
SUBST_FILES.findlib+= Lib/distutils/unixccompiler.py
SUBST_SED.findlib= -e 's,/usr/local,${PREFIX},'
-
-# XXX: It might be needed to add manually more paths like ${PREFIX}/qt5/lib
-# Testing:
-# >>> from ctypes.util import find_library
-# >>> find_library("m")
-# 'libm.so.0'
-
-SUBST_CLASSES+= pfindlib
-SUBST_MESSAGE.pfindlib= Fixing find_library() on POSIX-like (excluding Darwin) systems.
-SUBST_STAGE.pfindlib= pre-configure
-SUBST_FILES.pfindlib= Lib/ctypes/util.py
-SUBST_SED.pfindlib= -e 's!\(-Wl,-t -o\)!${COMPILER_RPATH_FLAG}${PREFIX}/lib -L${PREFIX}/lib \1!'
+SUBST_SED.findlib+= -e 's!\(-Wl,-t -o\)!${COMPILER_RPATH_FLAG}${PREFIX}/lib -L${PREFIX}/lib \1!'
.include "options.mk"
Index: pkgsrc/lang/python34/distinfo
diff -u pkgsrc/lang/python34/distinfo:1.32 pkgsrc/lang/python34/distinfo:1.33
--- pkgsrc/lang/python34/distinfo:1.32 Tue Aug 7 08:44:41 2018
+++ pkgsrc/lang/python34/distinfo Sat Mar 2 13:23:35 2019
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.32 2018/08/07 08:44:41 adam Exp $
+$NetBSD: distinfo,v 1.33 2019/03/02 13:23:35 adam Exp $
SHA1 (Python-3.4.9.tar.xz) = 83ea4018f6e5f1db87c4e54c8a48ba6a8350abd4
RMD160 (Python-3.4.9.tar.xz) = 941536bcadacd7c42c3f3fa94aa42186443ea673
@@ -14,6 +14,6 @@ SHA1 (patch-Modules_nismodule.c) = bd290
SHA1 (patch-Modules_socketmodule.c) = 3b091755d7c104b5d1fc696a0d4a679ed3565ef4
SHA1 (patch-Modules_socketmodule.h) = ed334a97c2a6662c5b44b4e50c1b8efcc220fa1f
SHA1 (patch-Python_thread__pthread.h) = fb81eaa604b4ed7c1b64c3f4731d58a8aee257be
-SHA1 (patch-configure) = 5cf4d44d24020a9b6fe41deeb916edbe87a937cb
+SHA1 (patch-configure) = a98c9527e654fcd581d564a71f0258be7986f4dc
SHA1 (patch-pyconfig.h.in) = 1fbd8b94a6317e31a3b9db683db0c2c9c4334713
SHA1 (patch-setup.py) = 42c81cb89b2568124b40d1bc2134d3221b4bca1e
Index: pkgsrc/lang/python34/patches/patch-configure
diff -u pkgsrc/lang/python34/patches/patch-configure:1.1 pkgsrc/lang/python34/patches/patch-configure:1.2
--- pkgsrc/lang/python34/patches/patch-configure:1.1 Sun Jun 17 19:21:21 2018
+++ pkgsrc/lang/python34/patches/patch-configure Sat Mar 2 13:23:35 2019
@@ -1,17 +1,17 @@
-$NetBSD: patch-configure,v 1.1 2018/06/17 19:21:21 adam Exp $
+$NetBSD: patch-configure,v 1.2 2019/03/02 13:23:35 adam Exp $
MirBSD support
http://bugs.python.org/issue21458
Changes for consistency across pkgsrc platforms.
-XXX: Not sure what the BLDSHARED changes are about.
+Fix linking on Darwin; don't use -stack_size.
detect netcan/can.h on NetBSD
---- configure.orig 2017-01-17 08:57:47.000000000 +0100
-+++ configure 2017-05-30 15:49:43.508649775 +0200
-@@ -3369,7 +3369,7 @@
+--- configure.orig 2018-08-02 09:18:47.000000000 +0000
++++ configure
+@@ -3369,7 +3369,7 @@ case $ac_sys_system/$ac_sys_release in
# Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
# In addition, Stefan Krah confirms that issue #1244610 exists through
# OpenBSD 4.6, but is fixed in 4.7.
@@ -20,7 +20,7 @@ detect netcan/can.h on NetBSD
define_xopen_source=no
# OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
# also defined. This can be overridden by defining _BSD_SOURCE
-@@ -5650,15 +5650,10 @@
+@@ -5650,15 +5650,10 @@ $as_echo "#define Py_ENABLE_SHARED 1" >>
PY3LIBRARY=libpython3.so
fi
;;
@@ -37,7 +37,7 @@ detect netcan/can.h on NetBSD
INSTSONAME="$LDLIBRARY".$SOVERSION
if test "$with_pydebug" != yes
then
-@@ -7283,7 +7278,7 @@
+@@ -7283,7 +7278,7 @@ done
# On Linux, can.h and can/raw.h require sys/socket.h
@@ -46,7 +46,7 @@ detect netcan/can.h on NetBSD
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
-@@ -8561,8 +8556,8 @@
+@@ -8561,8 +8556,8 @@ then
LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
else
# No framework, use the Python app as bundle-loader
@@ -57,7 +57,7 @@ detect netcan/can.h on NetBSD
LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
fi ;;
Darwin/*)
-@@ -8586,9 +8581,9 @@
+@@ -8586,9 +8581,9 @@ then
LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
else
# No framework, use the Python app as bundle-loader
@@ -70,7 +70,7 @@ detect netcan/can.h on NetBSD
fi
else
# building for OS X 10.3 and later
-@@ -8627,6 +8622,9 @@
+@@ -8627,6 +8622,9 @@ then
;;
esac
fi;;
@@ -80,7 +80,7 @@ detect netcan/can.h on NetBSD
NetBSD*|DragonFly*)
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared';;
-@@ -8670,7 +8668,7 @@
+@@ -8670,7 +8668,7 @@ then
fi;;
Linux*|GNU*) CCSHARED="-fPIC";;
BSD/OS*/4*) CCSHARED="-fpic";;
@@ -89,7 +89,15 @@ detect netcan/can.h on NetBSD
OpenUNIX*|UnixWare*)
if test "$GCC" = "yes"
then CCSHARED="-fPIC"
-@@ -8719,7 +8717,7 @@
+@@ -8709,7 +8707,6 @@ then
+ # Issue #18075: the default maximum stack size (8MBytes) is too
+ # small for the default recursion limit. Increase the stack size
+ # to ensure that tests don't crash
+- LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
+
+ if test "$enable_framework"
+ then
+@@ -8719,7 +8716,7 @@ then
OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
@@ -98,7 +106,7 @@ detect netcan/can.h on NetBSD
if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
then
LINKFORSHARED="-Wl,--export-dynamic"
-@@ -14017,8 +14015,6 @@
+@@ -14017,8 +14014,6 @@ $as_echo "$SOABI" >&6; }
case $ac_sys_system in
Index: pkgsrc/lang/python35/Makefile
diff -u pkgsrc/lang/python35/Makefile:1.15 pkgsrc/lang/python35/Makefile:1.16
--- pkgsrc/lang/python35/Makefile:1.15 Tue Aug 7 08:44:02 2018
+++ pkgsrc/lang/python35/Makefile Sat Mar 2 13:23:36 2019
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.15 2018/08/07 08:44:02 adam Exp $
+# $NetBSD: Makefile,v 1.16 2019/03/02 13:23:36 adam Exp $
.include "dist.mk"
PKGNAME= python35-${PY_DISTVERSION}
+PKGREVISION= 1
CATEGORIES= lang python
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
@@ -12,7 +13,7 @@ LICENSE= python-software-foundation
CONFLICTS+= python-[0-9]*
-PLIST_AWK+= -f ${PKGSRCDIR}/lang/python/plist-python.awk
+PLIST_AWK= -f ${PKGSRCDIR}/lang/python/plist-python.awk
PLIST_AWK_ENV+= PYVERS=35
PRINT_PLIST_AWK+= /^[^@]/ && /[^\/]+\.pyc$$/ {
PRINT_PLIST_AWK+= sub(/__pycache__\//, "")
@@ -152,24 +153,15 @@ REPLACE_FILES.python+= Lib/turtledemo/yi
REPLACE_FILES.python+= Lib/uu.py
REPLACE_FILES.python+= Lib/webbrowser.py
+# XXX: It might be needed to add manually more paths like ${PREFIX}/qt5/lib
+# Test: python -c 'from ctypes.util import find_library; print(find_library("ffi"));'
SUBST_CLASSES+= findlib
-SUBST_MESSAGE.findlib= Fixing find_library_file on Darwin.
+SUBST_MESSAGE.findlib= Fixing find_library().
SUBST_STAGE.findlib= pre-configure
SUBST_FILES.findlib= Lib/ctypes/macholib/dyld.py
SUBST_FILES.findlib+= Lib/ctypes/util.py
SUBST_SED.findlib= -e 's,/usr/local,${PREFIX},'
-
-# XXX: It might be needed to add manually more paths like ${PREFIX}/qt5/lib
-# Testing:
-# >>> from ctypes.util import find_library
-# >>> find_library("m")
-# 'libm.so.0'
-
-SUBST_CLASSES+= pfindlib
-SUBST_MESSAGE.pfindlib= Fixing find_library() on POSIX-like (excluding Darwin) systems.
-SUBST_STAGE.pfindlib= pre-configure
-SUBST_FILES.pfindlib= Lib/ctypes/util.py
-SUBST_SED.pfindlib= -e "s!\('-Wl,-t', \)!'${COMPILER_RPATH_FLAG}${PREFIX}/lib', '-L${PREFIX}/lib', \1!"
+SUBST_SED.findlib+= -e "s!\('-Wl,-t'\)!'${COMPILER_RPATH_FLAG}${PREFIX}/lib', '-L${PREFIX}/lib', \1!"
.include "options.mk"
Index: pkgsrc/lang/python35/distinfo
diff -u pkgsrc/lang/python35/distinfo:1.17 pkgsrc/lang/python35/distinfo:1.18
--- pkgsrc/lang/python35/distinfo:1.17 Tue Aug 7 08:44:02 2018
+++ pkgsrc/lang/python35/distinfo Sat Mar 2 13:23:36 2019
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.17 2018/08/07 08:44:02 adam Exp $
+$NetBSD: distinfo,v 1.18 2019/03/02 13:23:36 adam Exp $
SHA1 (Python-3.5.6.tar.xz) = 05548da58ec75a7af316c4a4cb8fc667ac6ac8f9
RMD160 (Python-3.5.6.tar.xz) = 5a02cb3664ad98d1767c79dfdd88a850b866241f
SHA512 (Python-3.5.6.tar.xz) = 1ccf287dbe8594eb577c1197c19d882fbe235c72f4c01cda23258f2add8a93e639b41ebaf556508b867cbe1b4c1fc4e1cf457d70b98cf7a1502013660a7e0ac1
Size (Python-3.5.6.tar.xz) = 15412832 bytes
-SHA1 (patch-Lib_ctypes_util.py) = 24ee6d33e39edc2168adabb2065941ff4efb977c
+SHA1 (patch-Lib_ctypes_util.py) = 23985965e248eaefd84e21f12b070d5f5e6107c2
SHA1 (patch-Lib_distutils_command_install.py) = 9b44f339f65f029b7f17dbc654739a7ae3c12780
SHA1 (patch-Lib_distutils_unixccompiler.py) = 7d0b70a64b79ee6084c41d8fbb01c8e8e4553419
SHA1 (patch-Makefile.pre.in) = 213f57b7130507e541ee23d6b8da097fd6168fb7
@@ -14,6 +14,6 @@ SHA1 (patch-Modules_nismodule.c) = bd290
SHA1 (patch-Modules_socketmodule.c) = 63d583340b071b07ff3e31cf332fcc2ca9ab50e3
SHA1 (patch-Modules_socketmodule.h) = 13a3290eb72078067060d3e71b7baa08f3eb591c
SHA1 (patch-Python_thread__pthread.h) = fb81eaa604b4ed7c1b64c3f4731d58a8aee257be
-SHA1 (patch-configure) = bce1b2f7dfedb23c561e1d8f32959cd043cdd0df
+SHA1 (patch-configure) = 3da9bebda139361ead9dec6c350d0e26454ef58b
SHA1 (patch-pyconfig.h.in) = e0aa80eb1ed3677da77fcd0a93f72b61ce148d0d
SHA1 (patch-setup.py) = 26ea130352cf73a49110d86bbccf1803795211e5
Index: pkgsrc/lang/python35/options.mk
diff -u pkgsrc/lang/python35/options.mk:1.2 pkgsrc/lang/python35/options.mk:1.3
--- pkgsrc/lang/python35/options.mk:1.2 Sun Jan 1 15:06:24 2017
+++ pkgsrc/lang/python35/options.mk Sat Mar 2 13:23:36 2019
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.2 2017/01/01 15:06:24 adam Exp $
+# $NetBSD: options.mk,v 1.3 2019/03/02 13:23:36 adam Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.python35
PKG_SUPPORTED_OPTIONS+= x11
@@ -10,11 +10,11 @@ PKG_SUGGESTED_OPTIONS= x11
.if !empty(PKG_OPTIONS:Mx11)
# Support for native X11 paths as an option
# This code is no-op for modular X11, however for simplicity don't make it conditional.
-SUBST_CLASSES+= x11findlib
-SUBST_MESSAGE.x11findlib= Fixing find_library() for native X11.
-SUBST_STAGE.x11findlib= pre-configure
-SUBST_FILES.x11findlib= Lib/ctypes/util.py
-SUBST_SED.x11findlib= -e 's!\(-Wl,-t -o\)!${COMPILER_RPATH_FLAG}${X11BASE}/lib -L${X11BASE}/lib \1!'
+SUBST_CLASSES+= xfindlib
+SUBST_MESSAGE.xfindlib= Fixing find_library() for native X11.
+SUBST_STAGE.xfindlib= pre-configure
+SUBST_FILES.xfindlib= Lib/ctypes/util.py
+SUBST_SED.xfindlib= -e "s!\('-Wl,-t'\)!'${COMPILER_RPATH_FLAG}${X11BASE}/lib', '-L${X11BASE}/lib', \1!"
# Required to get definition of X11BASE and retain X11 rpath paths for linker
# We need to pass rpath to _ctypes.so to get functional dlopen(3) for X11 libs
Index: pkgsrc/lang/python35/patches/patch-Lib_ctypes_util.py
diff -u pkgsrc/lang/python35/patches/patch-Lib_ctypes_util.py:1.1 pkgsrc/lang/python35/patches/patch-Lib_ctypes_util.py:1.2
--- pkgsrc/lang/python35/patches/patch-Lib_ctypes_util.py:1.1 Sun Jun 17 19:21:22 2018
+++ pkgsrc/lang/python35/patches/patch-Lib_ctypes_util.py Sat Mar 2 13:23:36 2019
@@ -1,11 +1,22 @@
-$NetBSD: patch-Lib_ctypes_util.py,v 1.1 2018/06/17 19:21:22 adam Exp $
+$NetBSD: patch-Lib_ctypes_util.py,v 1.2 2019/03/02 13:23:36 adam Exp $
+
+Fallback to clang.
Find libraries using 'ld' (taken from Python 3.7).
Note: /usr/local will get replaced by SUBST.
---- Lib/ctypes/util.py.orig 2018-05-14 15:07:31.000000000 +0000
+--- Lib/ctypes/util.py.orig 2018-08-02 09:19:12.000000000 +0000
+++ Lib/ctypes/util.py
-@@ -285,8 +285,32 @@ elif os.name == "posix":
+@@ -103,6 +103,8 @@ elif os.name == "posix":
+
+ c_compiler = shutil.which('gcc')
+ if not c_compiler:
++ c_compiler = shutil.which('clang')
++ if not c_compiler:
+ c_compiler = shutil.which('cc')
+ if not c_compiler:
+ # No C compiler available, give up
+@@ -285,8 +287,32 @@ elif os.name == "posix":
except OSError:
pass
Index: pkgsrc/lang/python35/patches/patch-configure
diff -u pkgsrc/lang/python35/patches/patch-configure:1.3 pkgsrc/lang/python35/patches/patch-configure:1.4
--- pkgsrc/lang/python35/patches/patch-configure:1.3 Sun Jun 17 19:21:22 2018
+++ pkgsrc/lang/python35/patches/patch-configure Sat Mar 2 13:23:36 2019
@@ -1,11 +1,13 @@
-$NetBSD: patch-configure,v 1.3 2018/06/17 19:21:22 adam Exp $
+$NetBSD: patch-configure,v 1.4 2019/03/02 13:23:36 adam Exp $
MirBSD support: http://bugs.python.org/issue21458
Changes for consistency across pkgsrc platforms.
Detect is_pad() (taken from Python 3.7).
Detect netcan/can.h on NetBSD
---- configure.orig 2018-02-04 23:40:56.000000000 +0000
+Fix linking on Darwin; don't use -stack_size.
+
+--- configure.orig 2018-08-02 09:19:12.000000000 +0000
+++ configure
@@ -3441,7 +3441,7 @@ case $ac_sys_system/$ac_sys_release in
# Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
@@ -77,7 +79,15 @@ Detect netcan/can.h on NetBSD
OpenUNIX*|UnixWare*)
if test "$GCC" = "yes"
then CCSHARED="-fPIC"
-@@ -9426,7 +9429,7 @@ then
+@@ -9416,7 +9419,6 @@ then
+ # Issue #18075: the default maximum stack size (8MBytes) is too
+ # small for the default recursion limit. Increase the stack size
+ # to ensure that tests don't crash
+- LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
+
+ if test "$enable_framework"
+ then
+@@ -9426,7 +9428,7 @@ then
OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
@@ -86,7 +96,7 @@ Detect netcan/can.h on NetBSD
if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
then
LINKFORSHARED="-Wl,--export-dynamic"
-@@ -14757,8 +14760,6 @@ $as_echo "$SOABI" >&6; }
+@@ -14757,8 +14759,6 @@ $as_echo "$SOABI" >&6; }
case $ac_sys_system in
@@ -95,7 +105,7 @@ Detect netcan/can.h on NetBSD
*)
EXT_SUFFIX=${SHLIB_SUFFIX};;
esac
-@@ -15694,6 +15695,36 @@ $as_echo "#define WINDOW_HAS_FLAGS 1" >>
+@@ -15694,6 +15694,36 @@ $as_echo "#define WINDOW_HAS_FLAGS 1" >>
fi
Index: pkgsrc/lang/python36/Makefile
diff -u pkgsrc/lang/python36/Makefile:1.15 pkgsrc/lang/python36/Makefile:1.16
--- pkgsrc/lang/python36/Makefile:1.15 Tue Jul 3 03:52:41 2018
+++ pkgsrc/lang/python36/Makefile Sat Mar 2 13:23:36 2019
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.15 2018/07/03 03:52:41 adam Exp $
+# $NetBSD: Makefile,v 1.16 2019/03/02 13:23:36 adam Exp $
.include "dist.mk"
PKGNAME= python36-${PY_DISTVERSION}
+PKGREVISION= 1
CATEGORIES= lang python
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
@@ -12,7 +13,7 @@ LICENSE= python-software-foundation
CONFLICTS+= python-[0-9]*
-PLIST_AWK+= -f ${PKGSRCDIR}/lang/python/plist-python.awk
+PLIST_AWK= -f ${PKGSRCDIR}/lang/python/plist-python.awk
PLIST_AWK_ENV+= PYVERS=36
PRINT_PLIST_AWK+= /^[^@]/ && /[^\/]+\.pyc$$/ {
PRINT_PLIST_AWK+= sub(/__pycache__\//, "")
@@ -152,25 +153,16 @@ REPLACE_FILES.python+= Lib/turtledemo/yi
REPLACE_FILES.python+= Lib/uu.py
REPLACE_FILES.python+= Lib/webbrowser.py
+# XXX: It might be needed to add manually more paths like ${PREFIX}/qt5/lib
+# Test: python -c 'from ctypes.util import find_library; print(find_library("ffi"));'
SUBST_CLASSES+= findlib
-SUBST_MESSAGE.findlib= Fixing find_library_file on Darwin.
+SUBST_MESSAGE.findlib= Fixing find_library().
SUBST_STAGE.findlib= pre-configure
SUBST_FILES.findlib= Lib/ctypes/macholib/dyld.py
SUBST_FILES.findlib+= Lib/ctypes/util.py
SUBST_FILES.findlib+= Lib/distutils/unixccompiler.py
SUBST_SED.findlib= -e 's,/usr/local,${PREFIX},'
-
-# XXX: It might be needed to add manually more paths like ${PREFIX}/qt5/lib
-# Testing:
-# >>> from ctypes.util import find_library
-# >>> find_library("m")
-# 'libm.so.0'
-
-SUBST_CLASSES+= pfindlib
-SUBST_MESSAGE.pfindlib= Fixing find_library() on POSIX-like (excluding Darwin) systems.
-SUBST_STAGE.pfindlib= pre-configure
-SUBST_FILES.pfindlib= Lib/ctypes/util.py
-SUBST_SED.pfindlib= -e "s!\('-Wl,-t', \)!'${COMPILER_RPATH_FLAG}${PREFIX}/lib', '-L${PREFIX}/lib', \1!"
+SUBST_SED.findlib+= -e "s!\('-Wl,-t'\)!'${COMPILER_RPATH_FLAG}${PREFIX}/lib', '-L${PREFIX}/lib', \1!"
.include "options.mk"
Index: pkgsrc/lang/python36/distinfo
diff -u pkgsrc/lang/python36/distinfo:1.23 pkgsrc/lang/python36/distinfo:1.24
--- pkgsrc/lang/python36/distinfo:1.23 Mon Dec 31 10:06:45 2018
+++ pkgsrc/lang/python36/distinfo Sat Mar 2 13:23:36 2019
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.23 2018/12/31 10:06:45 adam Exp $
+$NetBSD: distinfo,v 1.24 2019/03/02 13:23:36 adam Exp $
SHA1 (Python-3.6.8.tar.xz) = ee55acedef049268307633cbc9c7ff0610d1244f
RMD160 (Python-3.6.8.tar.xz) = 478ffd42f188414cd6c114740f90b147363b9b10
SHA512 (Python-3.6.8.tar.xz) = b17867e451ebe662f50df83ed112d3656c089e7d750651ea640052b01b713b58e66aac9e082f71fd16f5b5510bc9b797f5ccd30f5399581e9aa406197f02938a
Size (Python-3.6.8.tar.xz) = 17212420 bytes
-SHA1 (patch-Lib_ctypes_util.py) = 9f8b674e06eea11e723a34c8af762436a5e3f52e
+SHA1 (patch-Lib_ctypes_util.py) = 3b7aecb2879cce70c76bd4bc60f2ec577a5bed61
SHA1 (patch-Lib_distutils_command_install.py) = 29204f34296f36ab2b21c745f915ba73caf2b71c
SHA1 (patch-Lib_distutils_sysconfig.py) = 6822eafb4dfded86d7f7353831816aeb8119e6cf
SHA1 (patch-Lib_distutils_unixccompiler.py) = e7aa684fa186de7a01486c3d8bfa177afdd22ef9
@@ -15,6 +15,6 @@ SHA1 (patch-Modules_nismodule.c) = 1bafe
SHA1 (patch-Modules_socketmodule.c) = e6bdb8990cd9b8cf0b0ff48e6ae7b664681a9924
SHA1 (patch-Modules_socketmodule.h) = 13a3290eb72078067060d3e71b7baa08f3eb591c
SHA1 (patch-Python_thread__pthread.h) = fb81eaa604b4ed7c1b64c3f4731d58a8aee257be
-SHA1 (patch-configure) = ab2fb05bb25ba11baecfeb58918f436d3717b2ae
+SHA1 (patch-configure) = 2c2f3e4bb0da0232f7c0c7eeae1eee782b06dd01
SHA1 (patch-pyconfig.h.in) = 58e2c03489f9b6e4d88f144d8c09773f92eacd61
SHA1 (patch-setup.py) = 56851b30c8a1538012e7c78e7d33af25da5f7db4
Index: pkgsrc/lang/python36/options.mk
diff -u pkgsrc/lang/python36/options.mk:1.2 pkgsrc/lang/python36/options.mk:1.3
--- pkgsrc/lang/python36/options.mk:1.2 Tue May 23 10:53:56 2017
+++ pkgsrc/lang/python36/options.mk Sat Mar 2 13:23:36 2019
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.2 2017/05/23 10:53:56 jperkin Exp $
+# $NetBSD: options.mk,v 1.3 2019/03/02 13:23:36 adam Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.python36
PKG_SUPPORTED_OPTIONS= dtrace x11
@@ -8,6 +8,7 @@ PKG_SUGGESTED_OPTIONS= x11
.include "../../mk/bsd.options.mk"
PLIST_VARS+= dtrace
+
.if !empty(PKG_OPTIONS:Mdtrace)
CONFIGURE_ARGS+= --with-dtrace
PLIST.dtrace= yes
@@ -16,11 +17,11 @@ PLIST.dtrace= yes
.if !empty(PKG_OPTIONS:Mx11)
# Support for native X11 paths as an option
# This code is no-op for modular X11, however for simplicity don't make it conditional.
-SUBST_CLASSES+= x11findlib
-SUBST_MESSAGE.x11findlib= Fixing find_library() for native X11.
-SUBST_STAGE.x11findlib= pre-configure
-SUBST_FILES.x11findlib= Lib/ctypes/util.py
-SUBST_SED.x11findlib= -e 's!\(-Wl,-t -o\)!${COMPILER_RPATH_FLAG}${X11BASE}/lib -L${X11BASE}/lib \1!'
+SUBST_CLASSES+= xfindlib
+SUBST_MESSAGE.xfindlib= Fixing find_library() for native X11.
+SUBST_STAGE.xfindlib= pre-configure
+SUBST_FILES.xfindlib= Lib/ctypes/util.py
+SUBST_SED.xfindlib= -e "s!\('-Wl,-t'\)!'${COMPILER_RPATH_FLAG}${X11BASE}/lib', '-L${X11BASE}/lib', \1!"
# Required to get definition of X11BASE and retain X11 rpath paths for linker
# We need to pass rpath to _ctypes.so to get functional dlopen(3) for X11 libs
Index: pkgsrc/lang/python36/patches/patch-Lib_ctypes_util.py
diff -u pkgsrc/lang/python36/patches/patch-Lib_ctypes_util.py:1.1 pkgsrc/lang/python36/patches/patch-Lib_ctypes_util.py:1.2
--- pkgsrc/lang/python36/patches/patch-Lib_ctypes_util.py:1.1 Sun Jun 17 19:21:22 2018
+++ pkgsrc/lang/python36/patches/patch-Lib_ctypes_util.py Sat Mar 2 13:23:36 2019
@@ -1,11 +1,22 @@
-$NetBSD: patch-Lib_ctypes_util.py,v 1.1 2018/06/17 19:21:22 adam Exp $
+$NetBSD: patch-Lib_ctypes_util.py,v 1.2 2019/03/02 13:23:36 adam Exp $
+
+Fallback to clang.
Look for shared libraries in PkgSrc prefix.
Note: /usr/local will get replaced by SUBST.
---- Lib/ctypes/util.py.orig 2018-03-28 09:19:31.000000000 +0000
+--- Lib/ctypes/util.py.orig 2018-12-23 21:37:14.000000000 +0000
+++ Lib/ctypes/util.py
-@@ -278,7 +278,7 @@ elif os.name == "posix":
+@@ -93,6 +93,8 @@ elif os.name == "posix":
+
+ c_compiler = shutil.which('gcc')
+ if not c_compiler:
++ c_compiler = shutil.which('clang')
++ if not c_compiler:
+ c_compiler = shutil.which('cc')
+ if not c_compiler:
+ # No C compiler available, give up
+@@ -278,7 +280,7 @@ elif os.name == "posix":
def _findLib_ld(name):
# See issue #9998 for why this is needed
expr = r'[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name)
Index: pkgsrc/lang/python36/patches/patch-configure
diff -u pkgsrc/lang/python36/patches/patch-configure:1.11 pkgsrc/lang/python36/patches/patch-configure:1.12
--- pkgsrc/lang/python36/patches/patch-configure:1.11 Sat Jun 2 23:31:48 2018
+++ pkgsrc/lang/python36/patches/patch-configure Sat Mar 2 13:23:36 2019
@@ -1,4 +1,4 @@
-$NetBSD: patch-configure,v 1.11 2018/06/02 23:31:48 youri Exp $
+$NetBSD: patch-configure,v 1.12 2019/03/02 13:23:36 adam Exp $
Simplify _sysconfigdata to include only platform name.
@@ -7,15 +7,15 @@ http://bugs.python.org/issue21458
Changes for consistency across pkgsrc platforms.
-Fix linking on Darwin. -stack_size is not yet supported.
+Fix linking on Darwin; don't use -stack_size.
Use gnu99 instead of c99 to avoid "alloca() undefined" problems on macppc.
detect netcan/can.h on NetBSD
---- configure.orig 2018-03-28 09:19:31.000000000 +0000
+--- configure.orig 2018-12-23 21:37:14.000000000 +0000
+++ configure
-@@ -2926,7 +2926,7 @@ $as_echo_n "checking for python interpre
+@@ -2932,7 +2932,7 @@ $as_echo_n "checking for python interpre
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
$as_echo "$interp" >&6; }
@@ -24,7 +24,7 @@ detect netcan/can.h on NetBSD
fi
elif test "$cross_compiling" = maybe; then
as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
-@@ -3318,7 +3318,7 @@ case $ac_sys_system/$ac_sys_release in
+@@ -3324,7 +3324,7 @@ case $ac_sys_system/$ac_sys_release in
# Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
# In addition, Stefan Krah confirms that issue #1244610 exists through
# OpenBSD 4.6, but is fixed in 4.7.
@@ -33,7 +33,7 @@ detect netcan/can.h on NetBSD
define_xopen_source=no
# OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
# also defined. This can be overridden by defining _BSD_SOURCE
-@@ -5963,7 +5963,7 @@ $as_echo "#define Py_ENABLE_SHARED 1" >>
+@@ -5969,7 +5969,7 @@ $as_echo "#define Py_ENABLE_SHARED 1" >>
PY3LIBRARY=libpython3.so
fi
;;
@@ -42,7 +42,7 @@ detect netcan/can.h on NetBSD
LDLIBRARY='libpython$(LDVERSION).so'
BLDLIBRARY='-L. -lpython$(LDVERSION)'
RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
-@@ -6938,7 +6938,7 @@ UNIVERSAL_ARCH_FLAGS=
+@@ -6977,7 +6977,7 @@ UNIVERSAL_ARCH_FLAGS=
# tweak BASECFLAGS based on compiler and platform
case $GCC in
yes)
@@ -51,7 +51,7 @@ detect netcan/can.h on NetBSD
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
$as_echo_n "checking for -Wextra... " >&6; }
-@@ -8121,7 +8121,7 @@ done
+@@ -8242,7 +8242,7 @@ done
# On Linux, can.h and can/raw.h require sys/socket.h
@@ -60,7 +60,7 @@ detect netcan/can.h on NetBSD
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
-@@ -9237,8 +9237,8 @@ then
+@@ -9358,8 +9358,8 @@ then
LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
else
# No framework, use the Python app as bundle-loader
@@ -71,7 +71,7 @@ detect netcan/can.h on NetBSD
LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
fi ;;
Darwin/*)
-@@ -9262,9 +9262,9 @@ then
+@@ -9383,9 +9383,9 @@ then
LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
else
# No framework, use the Python app as bundle-loader
@@ -84,7 +84,7 @@ detect netcan/can.h on NetBSD
fi
else
# building for OS X 10.3 and later
-@@ -9303,6 +9303,9 @@ then
+@@ -9424,6 +9424,9 @@ then
;;
esac
fi;;
@@ -94,7 +94,7 @@ detect netcan/can.h on NetBSD
NetBSD*|DragonFly*)
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared';;
-@@ -9347,7 +9350,7 @@ then
+@@ -9468,7 +9471,7 @@ then
Linux-android*) ;;
Linux*|GNU*) CCSHARED="-fPIC";;
BSD/OS*/4*) CCSHARED="-fpic";;
@@ -103,16 +103,15 @@ detect netcan/can.h on NetBSD
OpenUNIX*|UnixWare*)
if test "$GCC" = "yes"
then CCSHARED="-fPIC"
-@@ -9387,7 +9390,7 @@ then
+@@ -9508,7 +9511,6 @@ then
# Issue #18075: the default maximum stack size (8MBytes) is too
# small for the default recursion limit. Increase the stack size
# to ensure that tests don't crash
- LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
-+ #LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
if test "$enable_framework"
then
-@@ -9397,7 +9400,7 @@ then
+@@ -9518,7 +9520,7 @@ then
OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
@@ -121,7 +120,7 @@ detect netcan/can.h on NetBSD
if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
then
LINKFORSHARED="-Wl,--export-dynamic"
-@@ -11174,7 +11177,7 @@ if ${ac_cv_dtrace_link+:} false; then :
+@@ -11333,7 +11335,7 @@ if ${ac_cv_dtrace_link+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_cv_dtrace_link=no
@@ -130,7 +129,7 @@ detect netcan/can.h on NetBSD
"$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
ac_cv_dtrace_link=yes
-@@ -15001,8 +15004,6 @@ $as_echo "$SOABI" >&6; }
+@@ -15177,8 +15179,6 @@ $as_echo "$SOABI" >&6; }
case $ac_sys_system in
@@ -139,7 +138,7 @@ detect netcan/can.h on NetBSD
*)
EXT_SUFFIX=${SHLIB_SUFFIX};;
esac
-@@ -15014,11 +15015,7 @@ LDVERSION='$(VERSION)$(ABIFLAGS)'
+@@ -15190,11 +15190,7 @@ LDVERSION='$(VERSION)$(ABIFLAGS)'
$as_echo "$LDVERSION" >&6; }
Index: pkgsrc/lang/python37/Makefile
diff -u pkgsrc/lang/python37/Makefile:1.3 pkgsrc/lang/python37/Makefile:1.4
--- pkgsrc/lang/python37/Makefile:1.3 Tue Nov 13 11:54:06 2018
+++ pkgsrc/lang/python37/Makefile Sat Mar 2 13:23:36 2019
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.3 2018/11/13 11:54:06 markd Exp $
+# $NetBSD: Makefile,v 1.4 2019/03/02 13:23:36 adam Exp $
.include "dist.mk"
PKGNAME= python37-${PY_DISTVERSION}
+PKGREVISION= 1
CATEGORIES= lang python
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
@@ -12,7 +13,7 @@ LICENSE= python-software-foundation
CONFLICTS+= python-[0-9]*
-PLIST_AWK+= -f ${PKGSRCDIR}/lang/python/plist-python.awk
+PLIST_AWK= -f ${PKGSRCDIR}/lang/python/plist-python.awk
PLIST_AWK_ENV+= PYVERS=37
PRINT_PLIST_AWK+= /^[^@]/ && /[^\/]+\.pyc$$/ {
PRINT_PLIST_AWK+= sub(/__pycache__\//, "")
@@ -151,23 +152,16 @@ REPLACE_FILES.py37+= Lib/turtledemo/yiny
REPLACE_FILES.py37+= Lib/uu.py
REPLACE_FILES.py37+= Lib/webbrowser.py
+# XXX: It might be needed to add manually more paths like ${PREFIX}/qt5/lib
+# Test: python -c 'from ctypes.util import find_library; print(find_library("ffi"));'
SUBST_CLASSES+= findlib
-SUBST_MESSAGE.findlib= Fixing find_library_file on Darwin.
+SUBST_MESSAGE.findlib= Fixing find_library().
SUBST_STAGE.findlib= pre-configure
-SUBST_FILES.findlib= Lib/distutils/unixccompiler.py
+SUBST_FILES.findlib= Lib/ctypes/macholib/dyld.py
+SUBST_FILES.findlib+= Lib/ctypes/util.py
+SUBST_FILES.findlib+= Lib/distutils/unixccompiler.py
SUBST_SED.findlib= -e 's,/usr/local,${PREFIX},'
-
-# XXX: It might be needed to add manually more paths like ${PREFIX}/qt5/lib
-# Testing:
-# >>> from ctypes.util import find_library
-# >>> find_library("m")
-# 'libm.so.0'
-
-SUBST_CLASSES+= pfindlib
-SUBST_MESSAGE.pfindlib= Fixing find_library() on POSIX-like (excluding Darwin) systems.
-SUBST_STAGE.pfindlib= pre-configure
-SUBST_FILES.pfindlib= Lib/ctypes/util.py
-SUBST_SED.pfindlib= -e 's!\(-Wl,-t -o\)!${COMPILER_RPATH_FLAG}${PREFIX}/lib -L${PREFIX}/lib \1!'
+SUBST_SED.findlib+= -e "s!\('-Wl,-t'\)!'${COMPILER_RPATH_FLAG}${PREFIX}/lib', '-L${PREFIX}/lib', \1!"
.include "options.mk"
Index: pkgsrc/lang/python37/distinfo
diff -u pkgsrc/lang/python37/distinfo:1.4 pkgsrc/lang/python37/distinfo:1.5
--- pkgsrc/lang/python37/distinfo:1.4 Mon Dec 31 10:07:59 2018
+++ pkgsrc/lang/python37/distinfo Sat Mar 2 13:23:36 2019
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.4 2018/12/31 10:07:59 adam Exp $
+$NetBSD: distinfo,v 1.5 2019/03/02 13:23:36 adam Exp $
SHA1 (Python-3.7.2.tar.xz) = c3dc6928516bcb934cf4740461044c79c7c35494
RMD160 (Python-3.7.2.tar.xz) = 4117feee6360078efea9a09c154b753570154445
SHA512 (Python-3.7.2.tar.xz) = 6cd2d6d8455558783b99d55985cd7b22d67b98f41a09b4fdd96f680a630a4e035220d2b903f8c59ed513aa5ffe6730fa947ddb55bb72ce36f0e945ef8af5d971
Size (Python-3.7.2.tar.xz) = 17042320 bytes
+SHA1 (patch-Lib_ctypes_util.py) = 6bef0b219f210045b73ebe66b7ca87570981dbed
SHA1 (patch-Lib_distutils_command_install.py) = 6fc6f5d918b7581fc62cd0fe55857ee932c3a341
SHA1 (patch-Lib_distutils_sysconfig.py) = 6822eafb4dfded86d7f7353831816aeb8119e6cf
SHA1 (patch-Lib_distutils_unixccompiler.py) = 2e65a8dd5dd3fe25957206c062106fa7a6fc4e69
@@ -15,6 +16,6 @@ SHA1 (patch-Modules_nismodule.c) = 1bafe
SHA1 (patch-Modules_socketmodule.c) = c0bdb256bccc176c2406feec4080cd91fcb693b2
SHA1 (patch-Modules_socketmodule.h) = 13a3290eb72078067060d3e71b7baa08f3eb591c
SHA1 (patch-Python_thread__pthread.h) = fb81eaa604b4ed7c1b64c3f4731d58a8aee257be
-SHA1 (patch-configure) = f807fdef84500f2c0fd2d0069936b31167966077
+SHA1 (patch-configure) = a96f9e82523a8a02642ad293668d7111cf9e2a99
SHA1 (patch-pyconfig.h.in) = 58e2c03489f9b6e4d88f144d8c09773f92eacd61
SHA1 (patch-setup.py) = 3edd2ab894f453be19dc4af06f3e78f49e5e2c34
Index: pkgsrc/lang/python37/options.mk
diff -u pkgsrc/lang/python37/options.mk:1.2 pkgsrc/lang/python37/options.mk:1.3
--- pkgsrc/lang/python37/options.mk:1.2 Tue Nov 13 11:54:06 2018
+++ pkgsrc/lang/python37/options.mk Sat Mar 2 13:23:36 2019
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.2 2018/11/13 11:54:06 markd Exp $
+# $NetBSD: options.mk,v 1.3 2019/03/02 13:23:36 adam Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.python37
PKG_SUPPORTED_OPTIONS= dtrace pymalloc x11
@@ -7,7 +7,8 @@ PKG_SUGGESTED_OPTIONS= x11
.include "../../mk/bsd.prefs.mk"
.include "../../mk/bsd.options.mk"
-PLIST_VARS+= dtrace
+PLIST_VARS+= dtrace pymalloc
+
.if !empty(PKG_OPTIONS:Mdtrace)
CONFIGURE_ARGS+= --with-dtrace
PLIST.dtrace= yes
@@ -16,11 +17,11 @@ PLIST.dtrace= yes
.if !empty(PKG_OPTIONS:Mx11)
# Support for native X11 paths as an option
# This code is no-op for modular X11, however for simplicity don't make it conditional.
-SUBST_CLASSES+= x11findlib
-SUBST_MESSAGE.x11findlib= Fixing find_library() for native X11.
-SUBST_STAGE.x11findlib= pre-configure
-SUBST_FILES.x11findlib= Lib/ctypes/util.py
-SUBST_SED.x11findlib= -e 's!\(-Wl,-t -o\)!${COMPILER_RPATH_FLAG}${X11BASE}/lib -L${X11BASE}/lib \1!'
+SUBST_CLASSES+= xfindlib
+SUBST_MESSAGE.xfindlib= Fixing find_library() for native X11.
+SUBST_STAGE.xfindlib= pre-configure
+SUBST_FILES.xfindlib= Lib/ctypes/util.py
+SUBST_SED.xfindlib= -e "s!\('-Wl,-t'\)!'${COMPILER_RPATH_FLAG}${X11BASE}/lib', '-L${X11BASE}/lib', \1!"
# Required to get definition of X11BASE and retain X11 rpath paths for linker
# We need to pass rpath to _ctypes.so to get functional dlopen(3) for X11 libs
@@ -33,13 +34,12 @@ SUBST_FILES.cdlopen= setup.py
SUBST_SED.cdlopen= -e "s!\(libraries=\[\],\)!\1 runtime_library_dirs=\['${X11BASE}/lib'\],!"
.endif
-PLIST_VARS+= pymalloc
.if !empty(PKG_OPTIONS:Mpymalloc)
PLIST_SUBST+= M=m
PLIST.pymalloc= yes
PRINT_PLIST_AWK+= { gsub(/PY_VER_SUFFIX}m/, "PY_VER_SUFFIX}$${M}") }
PRINT_PLIST_AWK+= { gsub(/config-${PY_VER_SUFFIX}m/, "config-$${PY_VER_SUFFIX}$${M}") }
.else
-CONFIGURE_ARGS+= --without-pymalloc
+CONFIGURE_ARGS+= --without-pymalloc
PLIST_SUBST+= M=
.endif
Index: pkgsrc/lang/python37/patches/patch-configure
diff -u pkgsrc/lang/python37/patches/patch-configure:1.1 pkgsrc/lang/python37/patches/patch-configure:1.2
--- pkgsrc/lang/python37/patches/patch-configure:1.1 Tue Jul 3 03:55:40 2018
+++ pkgsrc/lang/python37/patches/patch-configure Sat Mar 2 13:23:36 2019
@@ -1,4 +1,4 @@
-$NetBSD: patch-configure,v 1.1 2018/07/03 03:55:40 adam Exp $
+$NetBSD: patch-configure,v 1.2 2019/03/02 13:23:36 adam Exp $
Simplify _sysconfigdata to include only platform name.
@@ -7,15 +7,15 @@ http://bugs.python.org/issue21458
Changes for consistency across pkgsrc platforms.
-Fix linking on Darwin.
+Fix linking on Darwin; don't use -stack_size.
Use gnu99 instead of c99 to avoid "alloca() undefined" problems on macppc.
detect netcan/can.h on NetBSD
---- configure.orig 2018-03-29 11:57:55.000000000 +0000
+--- configure.orig 2018-12-23 21:37:36.000000000 +0000
+++ configure
-@@ -2933,7 +2933,7 @@ $as_echo_n "checking for python interpre
+@@ -2937,7 +2937,7 @@ $as_echo_n "checking for python interpre
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
$as_echo "$interp" >&6; }
@@ -24,7 +24,7 @@ detect netcan/can.h on NetBSD
fi
elif test "$cross_compiling" = maybe; then
as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
-@@ -3324,7 +3324,7 @@ case $ac_sys_system/$ac_sys_release in
+@@ -3328,7 +3328,7 @@ case $ac_sys_system/$ac_sys_release in
# Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
# In addition, Stefan Krah confirms that issue #1244610 exists through
# OpenBSD 4.6, but is fixed in 4.7.
@@ -33,7 +33,7 @@ detect netcan/can.h on NetBSD
define_xopen_source=no
# OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
# also defined. This can be overridden by defining _BSD_SOURCE
-@@ -5892,7 +5892,7 @@ $as_echo "#define Py_ENABLE_SHARED 1" >>
+@@ -5924,7 +5924,7 @@ $as_echo "#define Py_ENABLE_SHARED 1" >>
PY3LIBRARY=libpython3.so
fi
;;
@@ -42,7 +42,7 @@ detect netcan/can.h on NetBSD
LDLIBRARY='libpython$(LDVERSION).so'
BLDLIBRARY='-L. -lpython$(LDVERSION)'
RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
-@@ -6776,7 +6776,7 @@ UNIVERSAL_ARCH_FLAGS=
+@@ -6932,7 +6932,7 @@ UNIVERSAL_ARCH_FLAGS=
# tweak BASECFLAGS based on compiler and platform
case $GCC in
yes)
@@ -51,7 +51,7 @@ detect netcan/can.h on NetBSD
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
$as_echo_n "checking for -Wextra... " >&6; }
-@@ -8018,7 +8018,7 @@ done
+@@ -8256,7 +8256,7 @@ done
# On Linux, can.h and can/raw.h require sys/socket.h
@@ -60,7 +60,7 @@ detect netcan/can.h on NetBSD
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
-@@ -9166,8 +9166,8 @@ then
+@@ -9404,8 +9404,8 @@ then
LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
else
# No framework, use the Python app as bundle-loader
@@ -71,7 +71,7 @@ detect netcan/can.h on NetBSD
LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
fi ;;
Darwin/*)
-@@ -9191,9 +9191,9 @@ then
+@@ -9429,9 +9429,9 @@ then
LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
else
# No framework, use the Python app as bundle-loader
@@ -84,7 +84,7 @@ detect netcan/can.h on NetBSD
fi
else
# building for OS X 10.3 and later
-@@ -9229,6 +9229,9 @@ then
+@@ -9467,6 +9467,9 @@ then
;;
esac
fi;;
@@ -94,7 +94,7 @@ detect netcan/can.h on NetBSD
NetBSD*|DragonFly*)
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared';;
-@@ -9272,7 +9275,7 @@ then
+@@ -9510,7 +9513,7 @@ then
fi;;
Linux-android*) ;;
Linux*|GNU*) CCSHARED="-fPIC";;
@@ -103,7 +103,15 @@ detect netcan/can.h on NetBSD
OpenUNIX*|UnixWare*)
if test "$GCC" = "yes"
then CCSHARED="-fPIC"
-@@ -9317,7 +9320,7 @@ then
+@@ -9545,7 +9548,6 @@ then
+ # Issue #18075: the default maximum stack size (8MBytes) is too
+ # small for the default recursion limit. Increase the stack size
+ # to ensure that tests don't crash
+- LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
+
+ if test "$enable_framework"
+ then
+@@ -9555,7 +9557,7 @@ then
OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
@@ -112,7 +120,7 @@ detect netcan/can.h on NetBSD
if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
then
LINKFORSHARED="-Wl,--export-dynamic"
-@@ -11118,7 +11121,7 @@ if ${ac_cv_dtrace_link+:} false; then :
+@@ -11403,7 +11405,7 @@ if ${ac_cv_dtrace_link+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_cv_dtrace_link=no
@@ -121,7 +129,7 @@ detect netcan/can.h on NetBSD
"$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
ac_cv_dtrace_link=yes
-@@ -14831,8 +14834,6 @@ $as_echo "$SOABI" >&6; }
+@@ -15135,8 +15137,6 @@ $as_echo "$SOABI" >&6; }
case $ac_sys_system in
@@ -130,7 +138,7 @@ detect netcan/can.h on NetBSD
*)
EXT_SUFFIX=${SHLIB_SUFFIX};;
esac
-@@ -14844,11 +14845,7 @@ LDVERSION='$(VERSION)$(ABIFLAGS)'
+@@ -15148,11 +15148,7 @@ LDVERSION='$(VERSION)$(ABIFLAGS)'
$as_echo "$LDVERSION" >&6; }
Added files:
Index: pkgsrc/lang/python37/patches/patch-Lib_ctypes_util.py
diff -u /dev/null pkgsrc/lang/python37/patches/patch-Lib_ctypes_util.py:1.1
--- /dev/null Sat Mar 2 13:23:36 2019
+++ pkgsrc/lang/python37/patches/patch-Lib_ctypes_util.py Sat Mar 2 13:23:36 2019
@@ -0,0 +1,27 @@
+$NetBSD: patch-Lib_ctypes_util.py,v 1.1 2019/03/02 13:23:36 adam Exp $
+
+Fallback to clang.
+
+Look for shared libraries in PkgSrc prefix.
+Note: /usr/local will get replaced by SUBST.
+
+--- Lib/ctypes/util.py.orig 2018-12-23 21:37:36.000000000 +0000
++++ Lib/ctypes/util.py
+@@ -102,6 +102,8 @@ elif os.name == "posix":
+
+ c_compiler = shutil.which('gcc')
+ if not c_compiler:
++ c_compiler = shutil.which('clang')
++ if not c_compiler:
+ c_compiler = shutil.which('cc')
+ if not c_compiler:
+ # No C compiler available, give up
+@@ -287,7 +289,7 @@ elif os.name == "posix":
+ def _findLib_ld(name):
+ # See issue #9998 for why this is needed
+ expr = r'[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name)
+- cmd = ['ld', '-t']
++ cmd = ['ld', '-t', '-L', '/usr/local/lib']
+ libpath = os.environ.get('LD_LIBRARY_PATH')
+ if libpath:
+ for d in libpath.split(':'):
Home |
Main Index |
Thread Index |
Old Index