summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
Diffstat (limited to 'lang')
-rw-r--r--lang/python27/Makefile61
-rw-r--r--lang/python27/PLIST (renamed from lang/python27/PLIST.common)6
-rw-r--r--lang/python27/PLIST.Linux3
-rw-r--r--lang/python27/PLIST.common_end2
-rw-r--r--lang/python27/distinfo27
-rw-r--r--lang/python27/patches/patch-Lib_ctypes_util.py41
-rw-r--r--lang/python27/patches/patch-Lib_distutils_command_build__ext.py (renamed from lang/python27/patches/patch-ab)2
-rw-r--r--lang/python27/patches/patch-Lib_distutils_command_install.py (renamed from lang/python27/patches/patch-av)2
-rw-r--r--lang/python27/patches/patch-Lib_distutils_util.py (renamed from lang/python27/patches/patch-ao)2
-rw-r--r--lang/python27/patches/patch-Lib_plistlib.py (renamed from lang/python27/patches/patch-ad)2
-rw-r--r--lang/python27/patches/patch-Lib_sysconfig.py (renamed from lang/python27/patches/patch-ax)2
-rw-r--r--lang/python27/patches/patch-Modules_makesetup (renamed from lang/python27/patches/patch-an)2
-rw-r--r--lang/python27/patches/patch-Modules_nismodule.c (renamed from lang/python27/patches/patch-aw)4
-rw-r--r--lang/python27/patches/patch-Modules_selectmodule.c (renamed from lang/python27/patches/patch-az)2
-rw-r--r--lang/python27/patches/patch-Modules_sunaudiodev.c (renamed from lang/python27/patches/patch-ae)2
-rw-r--r--lang/python27/patches/patch-Python_thread__pthread.h (renamed from lang/python27/patches/patch-xa)2
-rw-r--r--lang/python27/patches/patch-configure (renamed from lang/python27/patches/patch-al)2
-rw-r--r--lang/python27/patches/patch-setup.py (renamed from lang/python27/patches/patch-am)67
-rw-r--r--lang/python34/Makefile72
-rw-r--r--lang/python34/PLIST.Linux3
-rw-r--r--lang/python34/distinfo17
-rw-r--r--lang/python34/patches/patch-Lib_ctypes_util.py41
-rw-r--r--lang/python34/patches/patch-Lib_distutils_command_install.py (renamed from lang/python34/patches/patch-av)2
-rw-r--r--lang/python34/patches/patch-Modules___cursesmodule.c (renamed from lang/python34/patches/patch-ah)124
-rw-r--r--lang/python34/patches/patch-Modules_makesetup (renamed from lang/python34/patches/patch-an)2
-rw-r--r--lang/python34/patches/patch-Modules_nismodule.c (renamed from lang/python34/patches/patch-aw)2
-rw-r--r--lang/python34/patches/patch-Python_thread__pthread.h (renamed from lang/python34/patches/patch-xa)2
-rw-r--r--lang/python34/patches/patch-configure (renamed from lang/python34/patches/patch-al)2
-rw-r--r--lang/python34/patches/patch-setup.py (renamed from lang/python34/patches/patch-am)49
-rw-r--r--lang/python35/Makefile71
-rw-r--r--lang/python35/PLIST.Linux3
-rw-r--r--lang/python35/distinfo11
-rw-r--r--lang/python35/patches/patch-Lib_ctypes_util.py41
-rw-r--r--lang/python35/patches/patch-Modules___cursesmodule.c123
-rw-r--r--lang/python35/patches/patch-configure71
-rw-r--r--lang/python35/patches/patch-pyconfig.h.in21
-rw-r--r--lang/python35/patches/patch-setup.py53
-rw-r--r--lang/python36/Makefile72
-rw-r--r--lang/python36/PLIST.Linux3
-rw-r--r--lang/python36/distinfo7
-rw-r--r--lang/python36/patches/patch-Lib_ctypes_util.py16
-rw-r--r--lang/python36/patches/patch-Lib_distutils_command_install.py4
-rw-r--r--lang/python36/patches/patch-setup.py56
43 files changed, 707 insertions, 392 deletions
diff --git a/lang/python27/Makefile b/lang/python27/Makefile
index c00faa42e0e..177d3fa8f37 100644
--- a/lang/python27/Makefile
+++ b/lang/python27/Makefile
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.73 2017/11/22 19:16:20 bsiegert Exp $
+# $NetBSD: Makefile,v 1.74 2018/06/17 19:21:21 adam Exp $
.include "dist.mk"
PKGNAME= python27-${PY_DISTVERSION}
+PKGREVISION= 1
CATEGORIES= lang python
MAINTAINER= pkgsrc-users@NetBSD.org
@@ -14,14 +15,14 @@ DEPENDS= mozilla-rootcerts>=1.0.20150804nb1:../../security/mozilla-rootcerts
CONFLICTS+= python-[0-9]*
+USE_LANGUAGES= c c++
GNU_CONFIGURE= yes
-CONFIGURE_ARGS+= --with-threads
CONFIGURE_ARGS+= --enable-shared
-CONFIGURE_ARGS+= OPT=${CFLAGS:Q}
-CONFIGURE_ARGS+= --with-system-ffi
CONFIGURE_ARGS+= --with-dbmliborder=ndbm:bdb
+CONFIGURE_ARGS+= --with-system-ffi
+CONFIGURE_ARGS+= --with-threads
CONFIGURE_ENV+= MKDIR_P=${MKDIR:Q}
-
+CONFIGURE_ENV+= OPT=${CFLAGS:Q}
PKGCONFIG_OVERRIDE+= Misc/python.pc.in
LDFLAGS+= -L${WRKSRC}
@@ -29,8 +30,6 @@ LDFLAGS+= -L${WRKSRC}
# $RANDOM usage there is fine
CHECK_PORTABILITY_SKIP= Tools/faqwiz/move-faqwiz.sh
-USE_LANGUAGES= c c++
-
PTHREAD_OPTS+= require
PTHREAD_AUTO_VARS= yes
.include "../../mk/pthread.buildlink3.mk"
@@ -52,12 +51,6 @@ LIBS.SunOS+= -lrt
PY_VER_SUFFIX= 2.7
-PLIST_SRC= ${.CURDIR}/../../lang/python27/PLIST.common
-.if exists(${.CURDIR}/../../lang/python27/PLIST.${OPSYS})
-PLIST_SRC+= ${.CURDIR}/../../lang/python27/PLIST.${OPSYS}
-.endif
-PLIST_SRC+= ${.CURDIR}/../../lang/python27/PLIST.common_end
-
.if ${OPSYS} == "NetBSD"
# XXX work around a botched autoconf check which ignores libintl
CONFIGURE_ENV+= ac_cv_func_bind_textdomain_codeset=yes
@@ -103,7 +96,7 @@ PLIST.extra-so= yes
# For Xcode 5 we need to search the SDK path for headers, otherwise certain
# modules will not be built.
.if ${OPSYS} == "Darwin" && exists(${OSX_SDK_PATH}/usr/include)
-CFLAGS+= -I${OSX_SDK_PATH}/usr/include
+CFLAGS+= -I${OSX_SDK_PATH:Q}/usr/include
.endif
PLIST_VARS+= dll nis no-nis
@@ -135,8 +128,38 @@ INSTALL_TARGET= altinstall
REPLACE_INTERPRETER+= py27
REPLACE.py27.old= .*python[^ ]*
REPLACE.py27.new= ${PREFIX}/bin/python${PY_VER_SUFFIX}
-REPLACE_FILES.py27= Lib/*.py Lib/*/*.py Lib/*/*/*.py
-REPLACE_FILES.py27+= Lib/*/*/*/*.py
+REPLACE_FILES.py27= Lib/UserString.py
+REPLACE_FILES.py27+= Lib/base64.py
+REPLACE_FILES.py27+= Lib/cProfile.py
+REPLACE_FILES.py27+= Lib/cgi.py
+REPLACE_FILES.py27+= Lib/encodings/rot_13.py
+REPLACE_FILES.py27+= Lib/idlelib/PyShell.py
+REPLACE_FILES.py27+= Lib/keyword.py
+REPLACE_FILES.py27+= Lib/lib2to3/pgen2/token.py
+REPLACE_FILES.py27+= Lib/lib2to3/tests/data/different_encoding.py
+REPLACE_FILES.py27+= Lib/lib2to3/tests/data/false_encoding.py
+REPLACE_FILES.py27+= Lib/lib2to3/tests/pytree_idempotency.py
+REPLACE_FILES.py27+= Lib/mimify.py
+REPLACE_FILES.py27+= Lib/pdb.py
+REPLACE_FILES.py27+= Lib/plat-mac/appletrunner.py
+REPLACE_FILES.py27+= Lib/plat-mac/bundlebuilder.py
+REPLACE_FILES.py27+= Lib/platform.py
+REPLACE_FILES.py27+= Lib/profile.py
+REPLACE_FILES.py27+= Lib/pydoc.py
+REPLACE_FILES.py27+= Lib/quopri.py
+REPLACE_FILES.py27+= Lib/smtpd.py
+REPLACE_FILES.py27+= Lib/smtplib.py
+REPLACE_FILES.py27+= Lib/symbol.py
+REPLACE_FILES.py27+= Lib/tabnanny.py
+REPLACE_FILES.py27+= Lib/test/bisect.py
+REPLACE_FILES.py27+= Lib/test/curses_tests.py
+REPLACE_FILES.py27+= Lib/test/re_tests.py
+REPLACE_FILES.py27+= Lib/test/pystone.py
+REPLACE_FILES.py27+= Lib/test/regrtest.py
+REPLACE_FILES.py27+= Lib/timeit.py
+REPLACE_FILES.py27+= Lib/trace.py
+REPLACE_FILES.py27+= Lib/uu.py
+REPLACE_FILES.py27+= Lib/webbrowser.py
SUBST_CLASSES+= libffi
SUBST_MESSAGE.libffi= Fixing libffi include path on Darwin.
@@ -155,12 +178,6 @@ SUBST_SED.findlib= -e 's,/usr/local,${PREFIX},'
# >>> from ctypes.util import find_library
# >>> find_library("m")
# 'libm.so.0'
-# >>> find_library("crypto")
-# 'libcrypto.so.11'
-# >>> find_library("GL")
-# 'libGL.so.2'
-# >>> find_library("curl")
-# 'libcurl.so.4'
SUBST_CLASSES+= pfindlib
SUBST_MESSAGE.pfindlib= Fixing find_library() on POSIX-like (excluding Darwin) systems.
diff --git a/lang/python27/PLIST.common b/lang/python27/PLIST
index 022cf4ce0bc..5c6d7fc01d8 100644
--- a/lang/python27/PLIST.common
+++ b/lang/python27/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST.common,v 1.19 2018/05/19 06:54:55 spz Exp $
+@comment $NetBSD: PLIST,v 1.1 2018/06/17 19:21:21 adam Exp $
bin/2to3-${PY_VER_SUFFIX}
bin/pydoc${PY_VER_SUFFIX}
bin/python${PY_VER_SUFFIX}
@@ -2052,10 +2052,10 @@ lib/python${PY_VER_SUFFIX}/lib-tk/ttk.pyo
lib/python${PY_VER_SUFFIX}/lib-tk/turtle.py
lib/python${PY_VER_SUFFIX}/lib-tk/turtle.pyc
lib/python${PY_VER_SUFFIX}/lib-tk/turtle.pyo
-lib/python${PY_VER_SUFFIX}/lib2to3/Grammar.txt
lib/python${PY_VER_SUFFIX}/lib2to3/Grammar${PKGVERSION}.final.0.pickle
-lib/python${PY_VER_SUFFIX}/lib2to3/PatternGrammar.txt
+lib/python${PY_VER_SUFFIX}/lib2to3/Grammar.txt
lib/python${PY_VER_SUFFIX}/lib2to3/PatternGrammar${PKGVERSION}.final.0.pickle
+lib/python${PY_VER_SUFFIX}/lib2to3/PatternGrammar.txt
lib/python${PY_VER_SUFFIX}/lib2to3/__init__.py
lib/python${PY_VER_SUFFIX}/lib2to3/__init__.pyc
lib/python${PY_VER_SUFFIX}/lib2to3/__init__.pyo
diff --git a/lang/python27/PLIST.Linux b/lang/python27/PLIST.Linux
index 347d0f07997..56b6bfb8832 100644
--- a/lang/python27/PLIST.Linux
+++ b/lang/python27/PLIST.Linux
@@ -1,4 +1,5 @@
-@comment $NetBSD: PLIST.Linux,v 1.3 2012/05/10 08:10:00 sbd Exp $
+@comment $NetBSD: PLIST.Linux,v 1.4 2018/06/17 19:21:21 adam Exp $
+lib/python${PY_VER_SUFFIX}/lib-dynload/spwd.so
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/CDROM.py
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/CDROM.pyc
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/CDROM.pyo
diff --git a/lang/python27/PLIST.common_end b/lang/python27/PLIST.common_end
deleted file mode 100644
index 71a27b64721..00000000000
--- a/lang/python27/PLIST.common_end
+++ /dev/null
@@ -1,2 +0,0 @@
-@comment $NetBSD: PLIST.common_end,v 1.3 2011/10/29 14:40:00 obache Exp $
-@pkgdir lib/python${PY_VER_SUFFIX}/lib-old
diff --git a/lang/python27/distinfo b/lang/python27/distinfo
index c8aa0c8e2eb..6828be437b7 100644
--- a/lang/python27/distinfo
+++ b/lang/python27/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.69 2018/06/03 07:49:27 leot Exp $
+$NetBSD: distinfo,v 1.70 2018/06/17 19:21:21 adam Exp $
SHA1 (Python-2.7.15.tar.xz) = f99348a095ec4a6411c84c0d15343d11920c9724
RMD160 (Python-2.7.15.tar.xz) = 4bbb2b0012b82e1b27661a08305fad461371679f
@@ -6,26 +6,27 @@ SHA512 (Python-2.7.15.tar.xz) = 27ea43eb45fc68f3d2469d5f07636e10801dee11635a430e
Size (Python-2.7.15.tar.xz) = 12642436 bytes
SHA1 (patch-Include_pyerrors.h) = 0d2cd52d18cc719b895fa32ed7e11c6cb15bae54
SHA1 (patch-Include_pyport.h) = f3e4ddbc954425a65301465410911222ca471320
+SHA1 (patch-Lib_ctypes_util.py) = 6fa516c7b43f08992427a0afcbe80c17bcc070f1
+SHA1 (patch-Lib_distutils_command_build__ext.py) = ea4feba4e93dbcff07050c82a00d591bb650e934
+SHA1 (patch-Lib_distutils_command_install.py) = e6aef090b444b455fe351308d251e670329b7dc3
SHA1 (patch-Lib_distutils_unixccompiler.py) = db16c9aca2f29730945f28247b88b18828739bbb
+SHA1 (patch-Lib_distutils_util.py) = 5bcfad96f8e490351160f1a7c1f4ece7706a33fa
SHA1 (patch-Lib_multiprocessing_process.py) = 15699bd8ec822bf54a0631102e00e0a34f882803
+SHA1 (patch-Lib_plistlib.py) = 96ae702995d434e2d7ec0ac62e37427a90b61d13
+SHA1 (patch-Lib_sysconfig.py) = 8a7a0e5cbfec279a05945dffafea1b1131a76f0e
SHA1 (patch-Makefile.pre.in) = ceaf34237588b527478ce1f9163c9168382fa201
SHA1 (patch-Modules___multiprocessing_multiprocessing.h) = 7ca8fe22ba4bdcde6d39dd50fe2e86c25994c146
SHA1 (patch-Modules___multiprocessing_semaphore.c) = 03b9c33ef38da383d5f7c2c84c17fe38cdd2911e
SHA1 (patch-Modules__ssl.c) = 6e68f88ad205106691900f091a897ffe0a4c363c
SHA1 (patch-Modules_getaddrinfo.c) = aa699d257f1bc98b9a3183a21324053e134409d1
SHA1 (patch-Modules_getpath.c) = 9bb2c040895ad6bbe4d0b5807803723b5437d47b
+SHA1 (patch-Modules_makesetup) = 9aad78714c4fe1a21cf66a6627d97d164ecea196
+SHA1 (patch-Modules_nismodule.c) = 129ef7b32779944c2f1827c6b078a3aafab60729
SHA1 (patch-Modules_posixmodule.c) = 5105d380cd49bf49b8adbd9aa5ffb245195728ed
+SHA1 (patch-Modules_selectmodule.c) = 01e113b0bd251978b555caaaa60b79c372edebce
SHA1 (patch-Modules_socketmodule.c) = 16848d90947b3de1f921a0813fa5c317f76961d4
-SHA1 (patch-ab) = ea4feba4e93dbcff07050c82a00d591bb650e934
-SHA1 (patch-ad) = 96ae702995d434e2d7ec0ac62e37427a90b61d13
-SHA1 (patch-ae) = d836d77854a2b3d79fa34a06a8e2493bf0a503e6
-SHA1 (patch-al) = 999700e96dd227cdd16cea3ae1001eb887ab8fee
-SHA1 (patch-am) = 25c29f3799cb02db962d5c42d71ec59b4748466f
-SHA1 (patch-an) = 9aad78714c4fe1a21cf66a6627d97d164ecea196
-SHA1 (patch-ao) = 5bcfad96f8e490351160f1a7c1f4ece7706a33fa
-SHA1 (patch-av) = e6aef090b444b455fe351308d251e670329b7dc3
-SHA1 (patch-aw) = d07129531ec1427669092c504c12247206408c2d
-SHA1 (patch-ax) = 8a7a0e5cbfec279a05945dffafea1b1131a76f0e
-SHA1 (patch-az) = 01e113b0bd251978b555caaaa60b79c372edebce
+SHA1 (patch-Modules_sunaudiodev.c) = d836d77854a2b3d79fa34a06a8e2493bf0a503e6
+SHA1 (patch-Python_thread__pthread.h) = 517cfefc2f2e13631d22bad28c327513cdf17c10
+SHA1 (patch-configure) = 999700e96dd227cdd16cea3ae1001eb887ab8fee
SHA1 (patch-pyconfig.h.in) = a0143ecdc2a3fb10220d0e3ee94fb9779a45e9e1
-SHA1 (patch-xa) = 517cfefc2f2e13631d22bad28c327513cdf17c10
+SHA1 (patch-setup.py) = bf9763d5a3584970474d5951ed1fc73eb03ea11c
diff --git a/lang/python27/patches/patch-Lib_ctypes_util.py b/lang/python27/patches/patch-Lib_ctypes_util.py
new file mode 100644
index 00000000000..4d062278d04
--- /dev/null
+++ b/lang/python27/patches/patch-Lib_ctypes_util.py
@@ -0,0 +1,41 @@
+$NetBSD: patch-Lib_ctypes_util.py,v 1.1 2018/06/17 19:21:21 adam Exp $
+
+Find libraries using 'ld' (taken from Python 3.7).
+Note: /usr/local will get replaced by SUBST.
+
+--- Lib/ctypes/util.py.orig 2018-05-22 08:00:59.000000000 +0000
++++ Lib/ctypes/util.py
+@@ -270,8 +270,32 @@ elif os.name == "posix":
+ return None
+ return res.group(1)
+
++ def _findLib_ld(name):
++ # See issue #9998 for why this is needed
++ expr = r'[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name)
++ cmd = ['ld', '-t', '-L', '/usr/local/lib']
++ libpath = os.environ.get('LD_LIBRARY_PATH')
++ if libpath:
++ for d in libpath.split(':'):
++ cmd.extend(['-L', d])
++ cmd.extend(['-o', os.devnull, '-l%s' % name])
++ result = None
++ try:
++ p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
++ stderr=subprocess.PIPE,
++ universal_newlines=True)
++ out, _ = p.communicate()
++ res = re.search(expr, os.fsdecode(out))
++ if res:
++ result = res.group(0)
++ except Exception as e:
++ pass # result will be None
++ return result
++
+ def find_library(name):
+- return _findSoname_ldconfig(name) or _get_soname(_findLib_gcc(name))
++ # See issue #9998
++ return _findSoname_ldconfig(name) or \
++ _get_soname(_findLib_gcc(name) or _findLib_ld(name))
+
+ ################################################################
+ # test code
diff --git a/lang/python27/patches/patch-ab b/lang/python27/patches/patch-Lib_distutils_command_build__ext.py
index 06c6b6831de..7b888387bcb 100644
--- a/lang/python27/patches/patch-ab
+++ b/lang/python27/patches/patch-Lib_distutils_command_build__ext.py
@@ -1,4 +1,4 @@
-$NetBSD: patch-ab,v 1.4 2015/04/24 03:01:36 rodent Exp $
+$NetBSD: patch-Lib_distutils_command_build__ext.py,v 1.1 2018/06/17 19:21:21 adam Exp $
--- Lib/distutils/command/build_ext.py.orig 2014-12-10 15:59:34.000000000 +0000
+++ Lib/distutils/command/build_ext.py
diff --git a/lang/python27/patches/patch-av b/lang/python27/patches/patch-Lib_distutils_command_install.py
index 019716aa8fd..c16e8cd8f2a 100644
--- a/lang/python27/patches/patch-av
+++ b/lang/python27/patches/patch-Lib_distutils_command_install.py
@@ -1,4 +1,4 @@
-$NetBSD: patch-av,v 1.3 2015/04/24 03:01:36 rodent Exp $
+$NetBSD: patch-Lib_distutils_command_install.py,v 1.1 2018/06/17 19:21:21 adam Exp $
Add a knob (enviroment variable) for disabling installation of egg metadata
in extensions until we have infrastructure in place for dealing w/ it.
diff --git a/lang/python27/patches/patch-ao b/lang/python27/patches/patch-Lib_distutils_util.py
index 83951c937f6..34fe6ef106b 100644
--- a/lang/python27/patches/patch-ao
+++ b/lang/python27/patches/patch-Lib_distutils_util.py
@@ -1,4 +1,4 @@
-$NetBSD: patch-ao,v 1.6 2015/04/24 03:01:36 rodent Exp $
+$NetBSD: patch-Lib_distutils_util.py,v 1.1 2018/06/17 19:21:21 adam Exp $
--- Lib/distutils/util.py.orig 2014-12-10 15:59:35.000000000 +0000
+++ Lib/distutils/util.py
diff --git a/lang/python27/patches/patch-ad b/lang/python27/patches/patch-Lib_plistlib.py
index bd224e31c2f..eddfa0534c2 100644
--- a/lang/python27/patches/patch-ad
+++ b/lang/python27/patches/patch-Lib_plistlib.py
@@ -1,4 +1,4 @@
-$NetBSD: patch-ad,v 1.3 2015/04/24 03:01:36 rodent Exp $
+$NetBSD: patch-Lib_plistlib.py,v 1.1 2018/06/17 19:21:21 adam Exp $
Add ability to parse unsigned integers as externalized by NetBSD proplib(3).
diff --git a/lang/python27/patches/patch-ax b/lang/python27/patches/patch-Lib_sysconfig.py
index 45e5729ee32..88b1dc9809c 100644
--- a/lang/python27/patches/patch-ax
+++ b/lang/python27/patches/patch-Lib_sysconfig.py
@@ -1,4 +1,4 @@
-$NetBSD: patch-ax,v 1.6 2015/04/24 03:01:36 rodent Exp $
+$NetBSD: patch-Lib_sysconfig.py,v 1.1 2018/06/17 19:21:21 adam Exp $
chop "-RELEASE" or "-DEVELOPMENT" from release for DragonFly.
diff --git a/lang/python27/patches/patch-an b/lang/python27/patches/patch-Modules_makesetup
index 9ed00396352..a559365b27e 100644
--- a/lang/python27/patches/patch-an
+++ b/lang/python27/patches/patch-Modules_makesetup
@@ -1,4 +1,4 @@
-$NetBSD: patch-an,v 1.3 2015/04/24 03:01:36 rodent Exp $
+$NetBSD: patch-Modules_makesetup,v 1.1 2018/06/17 19:21:21 adam Exp $
--- Modules/makesetup.orig 2014-12-10 15:59:55.000000000 +0000
+++ Modules/makesetup
diff --git a/lang/python27/patches/patch-aw b/lang/python27/patches/patch-Modules_nismodule.c
index 2c6772be2e8..55a5eb209e8 100644
--- a/lang/python27/patches/patch-aw
+++ b/lang/python27/patches/patch-Modules_nismodule.c
@@ -1,4 +1,6 @@
-$NetBSD: patch-aw,v 1.3 2015/04/24 03:01:36 rodent Exp $
+$NetBSD: patch-Modules_nismodule.c,v 1.1 2018/06/17 19:21:21 adam Exp $
+
+Add DragonFly support.
--- Modules/nismodule.c.orig 2014-12-10 15:59:55.000000000 +0000
+++ Modules/nismodule.c
diff --git a/lang/python27/patches/patch-az b/lang/python27/patches/patch-Modules_selectmodule.c
index 29e7d4380c8..b4230701933 100644
--- a/lang/python27/patches/patch-az
+++ b/lang/python27/patches/patch-Modules_selectmodule.c
@@ -1,4 +1,4 @@
-$NetBSD: patch-az,v 1.5 2015/04/24 03:01:36 rodent Exp $
+$NetBSD: patch-Modules_selectmodule.c,v 1.1 2018/06/17 19:21:21 adam Exp $
--- Modules/selectmodule.c.orig 2014-12-10 15:59:55.000000000 +0000
+++ Modules/selectmodule.c
diff --git a/lang/python27/patches/patch-ae b/lang/python27/patches/patch-Modules_sunaudiodev.c
index 61d045cf4f5..cb8ca7a10e4 100644
--- a/lang/python27/patches/patch-ae
+++ b/lang/python27/patches/patch-Modules_sunaudiodev.c
@@ -1,4 +1,4 @@
-$NetBSD: patch-ae,v 1.3 2015/04/24 03:01:36 rodent Exp $
+$NetBSD: patch-Modules_sunaudiodev.c,v 1.1 2018/06/17 19:21:21 adam Exp $
XXXbjs: I use amd64, and audioop is broken on 64-bit platforms.
Thus, this needs to be tested.
diff --git a/lang/python27/patches/patch-xa b/lang/python27/patches/patch-Python_thread__pthread.h
index c2cf520347b..5cf64a19b12 100644
--- a/lang/python27/patches/patch-xa
+++ b/lang/python27/patches/patch-Python_thread__pthread.h
@@ -1,4 +1,4 @@
-$NetBSD: patch-xa,v 1.3 2015/04/24 03:01:36 rodent Exp $
+$NetBSD: patch-Python_thread__pthread.h,v 1.1 2018/06/17 19:21:21 adam Exp $
--- Python/thread_pthread.h.orig 2014-12-10 15:59:59.000000000 +0000
+++ Python/thread_pthread.h
diff --git a/lang/python27/patches/patch-al b/lang/python27/patches/patch-configure
index 397c0f1c08f..fa0bc608aff 100644
--- a/lang/python27/patches/patch-al
+++ b/lang/python27/patches/patch-configure
@@ -1,4 +1,4 @@
-$NetBSD: patch-al,v 1.18 2018/05/19 06:54:55 spz Exp $
+$NetBSD: patch-configure,v 1.1 2018/06/17 19:21:21 adam Exp $
- recognize MirBSD, Interix
- remove special-case library version hack for FreeBSD
diff --git a/lang/python27/patches/patch-am b/lang/python27/patches/patch-setup.py
index 0ecdb99c002..35e01f3382e 100644
--- a/lang/python27/patches/patch-am
+++ b/lang/python27/patches/patch-setup.py
@@ -1,39 +1,29 @@
-$NetBSD: patch-am,v 1.22 2017/01/26 23:10:35 wiz Exp $
-
-Disabled modules for normal build:
-bsddb
-bsddb185
-curses
-curses_panel
-elementtree
-sqlite3
-tkinter
-gdbm
-pyexpat
-readline
-{linux,oss,sun}audiodev
-spwd
-Those have separate packages where needed.
+$NetBSD: patch-setup.py,v 1.1 2018/06/17 19:21:21 adam Exp $
+Disable certain modules, so they can be built as separate packages.
Only check the BUILDLINK_DIR for libraries etc, do not pick up random
headers and libraries from the system.
+Do not look for ncursesw.
+Assume panel_library is correct; this is a fix for ncurses' gnupanel
+ which will get transformed to panel in buildlink.
+
Build the _ssl module with pkgsrc choiced OpenSSL.
cygwin 2.7.3-no-libm.patch
---- setup.py.orig 2016-06-25 21:49:32.000000000 +0000
+--- setup.py.orig 2018-04-29 22:47:33.000000000 +0000
+++ setup.py
-@@ -33,7 +33,7 @@
+@@ -33,7 +33,7 @@ host_platform = get_platform()
COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
# This global variable is used to hold the list of modules to be disabled.
-disabled_module_list = []
-+disabled_module_list = ["_bsddb", "bsddb185", "_curses", "_curses_panel", "_elementtree", "_sqlite3", "_tkinter", "gdbm", "pyexpat", "readline", "linuxaudiodev", "ossaudiodev", "spwd", "sunaudiodev"]
++disabled_module_list = ["_bsddb", "bsddb185", "_curses", "_curses_panel", "_elementtree", "gdbm", "pyexpat", "readline", "_sqlite3", "_tkinter", "linuxaudiodev", "ossaudiodev", "sunaudiodev"]
def add_dir_to_list(dirlist, dir):
"""Add the directory 'dir' to the list 'dirlist' (at the front) if
-@@ -454,10 +454,15 @@
+@@ -454,10 +454,15 @@ class PyBuildExt(build_ext):
os.unlink(tmpfile)
def detect_modules(self):
@@ -53,7 +43,7 @@ cygwin 2.7.3-no-libm.patch
if cross_compiling:
self.add_gcc_paths()
self.add_multiarch_paths()
-@@ -569,7 +574,7 @@
+@@ -569,7 +574,7 @@ class PyBuildExt(build_ext):
# Check for MacOS X, which doesn't need libm.a at all
math_libs = ['m']
@@ -62,7 +52,16 @@ cygwin 2.7.3-no-libm.patch
math_libs = []
# XXX Omitted modules: gl, pure, dl, SGI-specific modules
-@@ -809,11 +814,10 @@
+@@ -745,8 +750,6 @@ class PyBuildExt(build_ext):
+ # use the same library for the readline and curses modules.
+ if 'curses' in readline_termcap_library:
+ curses_library = readline_termcap_library
+- elif self.compiler.find_library_file(lib_dirs, 'ncursesw'):
+- curses_library = 'ncursesw'
+ elif self.compiler.find_library_file(lib_dirs, 'ncurses'):
+ curses_library = 'ncurses'
+ elif self.compiler.find_library_file(lib_dirs, 'curses'):
+@@ -809,11 +812,10 @@ class PyBuildExt(build_ext):
libraries=math_libs) )
# Detect SSL support for the socket module (via _ssl)
search_for_ssl_incs_in = [
@@ -77,7 +76,7 @@ cygwin 2.7.3-no-libm.patch
)
if ssl_incs is not None:
krb5_h = find_file('krb5.h', inc_dirs,
-@@ -821,9 +825,7 @@
+@@ -821,9 +823,7 @@ class PyBuildExt(build_ext):
if krb5_h:
ssl_incs += krb5_h
ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
@@ -88,7 +87,7 @@ cygwin 2.7.3-no-libm.patch
if (ssl_incs is not None and
ssl_libs is not None):
-@@ -842,7 +844,7 @@
+@@ -842,7 +842,7 @@ class PyBuildExt(build_ext):
# look for the openssl version header on the compiler search path.
opensslv_h = find_file('openssl/opensslv.h', [],
@@ -97,7 +96,7 @@ cygwin 2.7.3-no-libm.patch
if opensslv_h:
name = os.path.join(opensslv_h[0], 'openssl/opensslv.h')
if host_platform == 'darwin' and is_macosx_sdk_path(name):
-@@ -942,175 +944,6 @@
+@@ -942,175 +942,6 @@ class PyBuildExt(build_ext):
else:
raise ValueError("unknown major BerkeleyDB version", major)
@@ -273,7 +272,7 @@ cygwin 2.7.3-no-libm.patch
# The sqlite interface
sqlite_setup_debug = False # verbose debug prints from this script?
-@@ -1216,46 +1049,32 @@
+@@ -1216,46 +1047,32 @@ class PyBuildExt(build_ext):
else:
missing.append('_sqlite3')
@@ -343,7 +342,7 @@ cygwin 2.7.3-no-libm.patch
config_args = [arg.strip("'")
for arg in sysconfig.get_config_var("CONFIG_ARGS").split()]
dbm_args = [arg for arg in config_args
-@@ -1267,7 +1086,7 @@
+@@ -1267,7 +1084,7 @@ class PyBuildExt(build_ext):
dbmext = None
for cand in dbm_order:
if cand == "ndbm":
@@ -352,7 +351,7 @@ cygwin 2.7.3-no-libm.patch
# Some systems have -lndbm, others have -lgdbm_compat,
# others don't have either
if self.compiler.find_library_file(lib_dirs,
-@@ -1311,18 +1130,14 @@
+@@ -1311,18 +1128,14 @@ class PyBuildExt(build_ext):
libraries = gdbm_libs)
break
elif cand == "bdb":
@@ -379,7 +378,17 @@ cygwin 2.7.3-no-libm.patch
if dbmext is not None:
exts.append(dbmext)
else:
-@@ -2250,9 +2065,9 @@
+@@ -1383,8 +1196,7 @@ class PyBuildExt(build_ext):
+ missing.append('_curses')
+
+ # If the curses module is enabled, check for the panel module
+- if (module_enabled(exts, '_curses') and
+- self.compiler.find_library_file(lib_dirs, panel_library)):
++ if (module_enabled(exts, '_curses')):
+ exts.append( Extension('_curses_panel', ['_curses_panel.c'],
+ include_dirs = curses_incs,
+ libraries = [panel_library] + curses_libs) )
+@@ -2296,9 +2108,9 @@ def main():
ext_modules=[Extension('_struct', ['_struct.c'])],
# Scripts to install
diff --git a/lang/python34/Makefile b/lang/python34/Makefile
index 24db91116a9..c968278f1a9 100644
--- a/lang/python34/Makefile
+++ b/lang/python34/Makefile
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.26 2018/02/23 15:26:15 wiz Exp $
+# $NetBSD: Makefile,v 1.27 2018/06/17 19:21:21 adam Exp $
.include "dist.mk"
PKGNAME= python34-${PY_DISTVERSION}
+PKGREVISION= 1
CATEGORIES= lang python
MAINTAINER= pkgsrc-users@NetBSD.org
@@ -18,19 +19,17 @@ PRINT_PLIST_AWK+= /^[^@]/ && /[^\/]+\.py[co]$$/ {
PRINT_PLIST_AWK+= gsub(/__pycache__\//, "")
PRINT_PLIST_AWK+= gsub(/\.cpython-34/, "")}
+USE_LANGUAGES= c c++
GNU_CONFIGURE= yes
-CONFIGURE_ARGS+= --with-threads
CONFIGURE_ARGS+= --enable-shared
-CONFIGURE_ARGS+= OPT=${CFLAGS:M*:Q}
CONFIGURE_ARGS+= --with-system-ffi
-CONFIGURE_ARGS+= --without-pymalloc
+CONFIGURE_ARGS+= --with-threads
CONFIGURE_ARGS+= --without-ensurepip
+CONFIGURE_ARGS+= --without-pymalloc
+CONFIGURE_ENV+= OPT=${CFLAGS:M*:Q}
CONFIGURE_ENV+= ac_cv_path_mkdir=${TOOLS_PATH.mkdir}
-
PKGCONFIG_OVERRIDE+= Misc/python.pc.in
-USE_LANGUAGES= c c++
-
PTHREAD_OPTS+= require
.include "../../mk/pthread.buildlink3.mk"
@@ -104,15 +103,58 @@ PRINT_PLIST_AWK+= { gsub(/python${PY_VER_SUFFIX}/, \
TEST_TARGET= test
INSTALL_TARGET= altinstall
-REPLACE_INTERPRETER+= py34
-REPLACE.py34.old= .*python[^ ]*
-REPLACE.py34.new= ${PREFIX}/bin/python${PY_VER_SUFFIX}
-REPLACE_FILES.py34= Lib/*.py Lib/*/*.py Lib/*/*/*.py Lib/*/*/*/*.py
+REPLACE_INTERPRETER+= python
+REPLACE.python.old= .*python[^ ]*
+REPLACE.python.new= ${PREFIX}/bin/python${PY_VER_SUFFIX}
+REPLACE_FILES.python= Lib/base64.py
+REPLACE_FILES.python+= Lib/cProfile.py
+REPLACE_FILES.python+= Lib/cgi.py
+REPLACE_FILES.python+= Lib/encodings/rot_13.py
+REPLACE_FILES.python+= Lib/idlelib/PyShell.py
+REPLACE_FILES.python+= Lib/keyword.py
+REPLACE_FILES.python+= Lib/lib2to3/pgen2/token.py
+REPLACE_FILES.python+= Lib/lib2to3/tests/data/different_encoding.py
+REPLACE_FILES.python+= Lib/lib2to3/tests/data/false_encoding.py
+REPLACE_FILES.python+= Lib/lib2to3/tests/pytree_idempotency.py
+REPLACE_FILES.python+= Lib/pdb.py
+REPLACE_FILES.python+= Lib/platform.py
+REPLACE_FILES.python+= Lib/profile.py
+REPLACE_FILES.python+= Lib/pydoc.py
+REPLACE_FILES.python+= Lib/quopri.py
+REPLACE_FILES.python+= Lib/smtpd.py
+REPLACE_FILES.python+= Lib/smtplib.py
+REPLACE_FILES.python+= Lib/symbol.py
+REPLACE_FILES.python+= Lib/tabnanny.py
+REPLACE_FILES.python+= Lib/tarfile.py
+REPLACE_FILES.python+= Lib/test/crashers/recursive_call.py
+REPLACE_FILES.python+= Lib/test/curses_tests.py
+REPLACE_FILES.python+= Lib/test/pystone.py
+REPLACE_FILES.python+= Lib/test/re_tests.py
+REPLACE_FILES.python+= Lib/test/regrtest.py
+REPLACE_FILES.python+= Lib/timeit.py
+REPLACE_FILES.python+= Lib/trace.py
+REPLACE_FILES.python+= Lib/turtledemo/__main__.py
+REPLACE_FILES.python+= Lib/turtledemo/bytedesign.py
+REPLACE_FILES.python+= Lib/turtledemo/clock.py
+REPLACE_FILES.python+= Lib/turtledemo/forest.py
+REPLACE_FILES.python+= Lib/turtledemo/fractalcurves.py
+REPLACE_FILES.python+= Lib/turtledemo/lindenmayer.py
+REPLACE_FILES.python+= Lib/turtledemo/minimal_hanoi.py
+REPLACE_FILES.python+= Lib/turtledemo/paint.py
+REPLACE_FILES.python+= Lib/turtledemo/peace.py
+REPLACE_FILES.python+= Lib/turtledemo/penrose.py
+REPLACE_FILES.python+= Lib/turtledemo/planet_and_moon.py
+REPLACE_FILES.python+= Lib/turtledemo/tree.py
+REPLACE_FILES.python+= Lib/turtledemo/yinyang.py
+REPLACE_FILES.python+= Lib/uu.py
+REPLACE_FILES.python+= Lib/webbrowser.py
SUBST_CLASSES+= findlib
SUBST_MESSAGE.findlib= Fixing find_library_file on Darwin.
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
@@ -120,12 +162,6 @@ SUBST_SED.findlib= -e 's,/usr/local,${PREFIX},'
# >>> from ctypes.util import find_library
# >>> find_library("m")
# 'libm.so.0'
-# >>> find_library("crypto")
-# 'libcrypto.so.11'
-# >>> find_library("GL")
-# 'libGL.so.2'
-# >>> find_library("curl")
-# 'libcurl.so.4'
SUBST_CLASSES+= pfindlib
SUBST_MESSAGE.pfindlib= Fixing find_library() on POSIX-like (excluding Darwin) systems.
diff --git a/lang/python34/PLIST.Linux b/lang/python34/PLIST.Linux
index 3e5c2b31014..cfa63467acd 100644
--- a/lang/python34/PLIST.Linux
+++ b/lang/python34/PLIST.Linux
@@ -1,5 +1,6 @@
-@comment $NetBSD: PLIST.Linux,v 1.1 2014/05/09 02:27:14 wen Exp $
+@comment $NetBSD: PLIST.Linux,v 1.2 2018/06/17 19:21:21 adam Exp $
lib/python${PY_VER_SUFFIX}/lib-dynload/ossaudiodev.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/spwd.so
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/CDROM.py
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/CDROM.pyc
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/CDROM.pyo
diff --git a/lang/python34/distinfo b/lang/python34/distinfo
index d81d3b77ce9..aee57cbe4f9 100644
--- a/lang/python34/distinfo
+++ b/lang/python34/distinfo
@@ -1,18 +1,19 @@
-$NetBSD: distinfo,v 1.30 2018/02/05 17:35:12 adam Exp $
+$NetBSD: distinfo,v 1.31 2018/06/17 19:21:21 adam Exp $
SHA1 (Python-3.4.8.tar.xz) = 65d62d3f62ade072a84eb64eca4490b940c73542
RMD160 (Python-3.4.8.tar.xz) = dcdde1eb1917e2fb9bc021288228432b3cb2def4
SHA512 (Python-3.4.8.tar.xz) = 478552c72efe606cb1993024b81839c51d01f1c949564c007ab2b76016f110e1f7bd418e5de3f4f93b466ce7dbe6583d3c150830d1f28f75e0809625b568a7ec
Size (Python-3.4.8.tar.xz) = 14576444 bytes
+SHA1 (patch-Lib_ctypes_util.py) = 2bd826c0996bbbc8f8986ba0502a33ab90194ed9
+SHA1 (patch-Lib_distutils_command_install.py) = 9b44f339f65f029b7f17dbc654739a7ae3c12780
SHA1 (patch-Lib_distutils_unixccompiler.py) = 7d6df07921ad3357757d4681a964256b560b3f57
SHA1 (patch-Makefile.pre.in) = 06402b33a01076b6cbea9659f4c6beb4cd0b80f1
+SHA1 (patch-Modules___cursesmodule.c) = ae0f7a69d74058a5a7853fcd2319360d8b083065
+SHA1 (patch-Modules_makesetup) = c9b571eb54fdf0b1e93524a6de6780e8c4119221
+SHA1 (patch-Modules_nismodule.c) = bd290417c265846e238660180e60e76c0f5f696a
SHA1 (patch-Modules_socketmodule.c) = 3b091755d7c104b5d1fc696a0d4a679ed3565ef4
SHA1 (patch-Modules_socketmodule.h) = ed334a97c2a6662c5b44b4e50c1b8efcc220fa1f
-SHA1 (patch-ah) = 0acdfcbf3ebcb96b18a1cf28f18b286aa507a62f
-SHA1 (patch-al) = 5cf4d44d24020a9b6fe41deeb916edbe87a937cb
-SHA1 (patch-am) = 5822927f1c315b4fce5078626efe5418c764665e
-SHA1 (patch-an) = c9b571eb54fdf0b1e93524a6de6780e8c4119221
-SHA1 (patch-av) = 9b44f339f65f029b7f17dbc654739a7ae3c12780
-SHA1 (patch-aw) = bd290417c265846e238660180e60e76c0f5f696a
+SHA1 (patch-Python_thread__pthread.h) = fb81eaa604b4ed7c1b64c3f4731d58a8aee257be
+SHA1 (patch-configure) = 5cf4d44d24020a9b6fe41deeb916edbe87a937cb
SHA1 (patch-pyconfig.h.in) = 1fbd8b94a6317e31a3b9db683db0c2c9c4334713
-SHA1 (patch-xa) = fb81eaa604b4ed7c1b64c3f4731d58a8aee257be
+SHA1 (patch-setup.py) = 42c81cb89b2568124b40d1bc2134d3221b4bca1e
diff --git a/lang/python34/patches/patch-Lib_ctypes_util.py b/lang/python34/patches/patch-Lib_ctypes_util.py
new file mode 100644
index 00000000000..c7a0bd79db0
--- /dev/null
+++ b/lang/python34/patches/patch-Lib_ctypes_util.py
@@ -0,0 +1,41 @@
+$NetBSD: patch-Lib_ctypes_util.py,v 1.1 2018/06/17 19:21:21 adam Exp $
+
+Find libraries using 'ld' (taken from Python 3.7).
+Note: /usr/local will get replaced by SUBST.
+
+--- Lib/ctypes/util.py.orig 2018-02-04 23:40:38.000000000 +0000
++++ Lib/ctypes/util.py
+@@ -229,8 +229,32 @@ elif os.name == "posix":
+ except OSError:
+ pass
+
++ def _findLib_ld(name):
++ # See issue #9998 for why this is needed
++ expr = r'[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name)
++ cmd = ['ld', '-t', '-L', '/usr/local/lib']
++ libpath = os.environ.get('LD_LIBRARY_PATH')
++ if libpath:
++ for d in libpath.split(':'):
++ cmd.extend(['-L', d])
++ cmd.extend(['-o', os.devnull, '-l%s' % name])
++ result = None
++ try:
++ p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
++ stderr=subprocess.PIPE,
++ universal_newlines=True)
++ out, _ = p.communicate()
++ res = re.search(expr, os.fsdecode(out))
++ if res:
++ result = res.group(0)
++ except Exception as e:
++ pass # result will be None
++ return result
++
+ def find_library(name):
+- return _findSoname_ldconfig(name) or _get_soname(_findLib_gcc(name))
++ # See issue #9998
++ return _findSoname_ldconfig(name) or \
++ _get_soname(_findLib_gcc(name) or _findLib_ld(name))
+
+ ################################################################
+ # test code
diff --git a/lang/python34/patches/patch-av b/lang/python34/patches/patch-Lib_distutils_command_install.py
index c5a8a88960b..a0e84c73fe8 100644
--- a/lang/python34/patches/patch-av
+++ b/lang/python34/patches/patch-Lib_distutils_command_install.py
@@ -1,4 +1,4 @@
-$NetBSD: patch-av,v 1.1 2014/05/09 02:27:14 wen Exp $
+$NetBSD: patch-Lib_distutils_command_install.py,v 1.1 2018/06/17 19:21:21 adam Exp $
--- Lib/distutils/command/install.py.orig 2012-02-23 20:22:44.000000000 +0000
+++ Lib/distutils/command/install.py
diff --git a/lang/python34/patches/patch-ah b/lang/python34/patches/patch-Modules___cursesmodule.c
index c34a30459be..de673a3361c 100644
--- a/lang/python34/patches/patch-ah
+++ b/lang/python34/patches/patch-Modules___cursesmodule.c
@@ -1,11 +1,12 @@
-$NetBSD: patch-ah,v 1.5 2017/01/05 23:16:42 roy Exp $
+$NetBSD: patch-Modules___cursesmodule.c,v 1.1 2018/06/17 19:21:21 adam Exp $
Allow py-curses to use NetBSD curses as well as ncurses
http://bugs.python.org/issue21457
+Use is_pad() when supported (taken from Python 3.7).
---- Modules/_cursesmodule.c.orig 2016-06-25 21:52:32.000000000 +0000
+--- Modules/_cursesmodule.c.orig 2018-02-04 23:40:38.000000000 +0000
+++ Modules/_cursesmodule.c
-@@ -112,14 +112,7 @@ char *PyCursesVersion = "2.2";
+@@ -112,13 +112,13 @@ char *PyCursesVersion = "2.2";
#define CURSES_MODULE
#include "py_curses.h"
@@ -15,12 +16,17 @@ http://bugs.python.org/issue21457
- explicit prototypes here. */
-extern int setupterm(char *,int,int *);
-#ifdef __sgi
++#if defined(HAVE_TERM_H) || defined(__sgi)
++/* For termname, longname, putp, tigetflag, tigetnum, tigetstr, tparm
++ which are not declared in SysV curses and for setupterm. */
#include <term.h>
--#endif
++/* Including <term.h> #defines many common symbols. */
++#undef lines
++#undef columns
+ #endif
#ifdef HAVE_LANGINFO_H
- #include <langinfo.h>
-@@ -484,17 +477,9 @@ Window_NoArg2TupleReturnFunction(getpary
+@@ -484,17 +484,9 @@ Window_NoArg2TupleReturnFunction(getpary
Window_OneArgNoReturnFunction(clearok, int, "i;True(1) or False(0)")
Window_OneArgNoReturnFunction(idlok, int, "i;True(1) or False(0)")
@@ -38,16 +44,29 @@ http://bugs.python.org/issue21457
Window_OneArgNoReturnFunction(notimeout, int, "i;True(1) or False(0)")
Window_OneArgNoReturnFunction(scrollok, int, "i;True(1) or False(0)")
Window_OneArgNoReturnFunction(winsdelln, int, "i;nlines")
-@@ -1133,7 +1118,7 @@ PyCursesWindow_EchoChar(PyCursesWindowOb
+@@ -993,6 +985,12 @@ int py_mvwdelch(WINDOW *w, int y, int x)
+ }
+ #endif
+
++#if defined(HAVE_CURSES_IS_PAD)
++#define py_is_pad(win) is_pad(win)
++#elif defined(WINDOW_HAS_FLAGS)
++#define py_is_pad(win) ((win) ? ((win)->_flags & _ISPAD) != 0 : FALSE)
++#endif
++
+ /* chgat, added by Fabian Kreutz <fabian.kreutz at gmx.net> */
+
+ static PyObject *
+@@ -1133,7 +1131,7 @@ PyCursesWindow_EchoChar(PyCursesWindowOb
return NULL;
#ifdef WINDOW_HAS_FLAGS
- if (self->win->_flags & _ISPAD)
-+ if (is_pad(self->win))
++ if (py_is_pad(self->win))
return PyCursesCheckERR(pechochar(self->win, ch | attr),
"echochar");
else
-@@ -1219,11 +1204,7 @@ PyCursesWindow_GetKey(PyCursesWindowObje
+@@ -1219,11 +1217,7 @@ PyCursesWindow_GetKey(PyCursesWindowObje
return Py_BuildValue("C", rtn);
} else {
const char *knp;
@@ -59,54 +78,34 @@ http://bugs.python.org/issue21457
return PyUnicode_FromString((knp == NULL) ? "" : knp);
}
}
-@@ -1656,7 +1637,7 @@ PyCursesWindow_NoOutRefresh(PyCursesWind
+@@ -1672,7 +1666,7 @@ PyCursesWindow_NoOutRefresh(PyCursesWind
#ifndef WINDOW_HAS_FLAGS
if (0)
#else
- if (self->win->_flags & _ISPAD)
-+ if (is_pad(self->win))
++ if (py_is_pad(self->win))
#endif
{
switch(PyTuple_Size(args)) {
-@@ -1831,7 +1812,7 @@ PyCursesWindow_Refresh(PyCursesWindowObj
+@@ -1847,7 +1841,7 @@ PyCursesWindow_Refresh(PyCursesWindowObj
#ifndef WINDOW_HAS_FLAGS
if (0)
#else
- if (self->win->_flags & _ISPAD)
-+ if (is_pad(self->win))
++ if (py_is_pad(self->win))
#endif
{
switch(PyTuple_Size(args)) {
-@@ -1898,7 +1879,7 @@ PyCursesWindow_SubWin(PyCursesWindowObje
+@@ -1914,7 +1908,7 @@ PyCursesWindow_SubWin(PyCursesWindowObje
/* printf("Subwin: %i %i %i %i \n", nlines, ncols, begin_y, begin_x); */
#ifdef WINDOW_HAS_FLAGS
- if (self->win->_flags & _ISPAD)
-+ if (is_pad(self->win))
++ if (py_is_pad(self->win))
win = subpad(self->win, nlines, ncols, begin_y, begin_x);
else
#endif
-@@ -2639,15 +2620,15 @@ PyCurses_IntrFlush(PyObject *self, PyObj
- static PyObject *
- PyCurses_Is_Term_Resized(PyObject *self, PyObject *args)
- {
-- int lines;
-- int columns;
-+ int nlines;
-+ int ncolumns;
- int result;
-
- PyCursesInitialised;
-
-- if (!PyArg_ParseTuple(args,"ii:is_term_resized", &lines, &columns))
-+ if (!PyArg_ParseTuple(args,"ii:is_term_resized", &nlines, &ncolumns))
- return NULL;
-- result = is_term_resized(lines, columns);
-+ result = is_term_resized(nlines, ncolumns);
- if (result == TRUE) {
- Py_INCREF(Py_True);
- return Py_True;
-@@ -2658,7 +2639,6 @@ PyCurses_Is_Term_Resized(PyObject *self,
+@@ -2674,7 +2668,6 @@ PyCurses_Is_Term_Resized(PyObject *self,
}
#endif /* HAVE_CURSES_IS_TERM_RESIZED */
@@ -114,7 +113,7 @@ http://bugs.python.org/issue21457
static PyObject *
PyCurses_KeyName(PyObject *self, PyObject *args)
{
-@@ -2677,7 +2657,6 @@ PyCurses_KeyName(PyObject *self, PyObjec
+@@ -2693,7 +2686,6 @@ PyCurses_KeyName(PyObject *self, PyObjec
return PyBytes_FromString((knp == NULL) ? "" : (char *)knp);
}
@@ -122,50 +121,7 @@ http://bugs.python.org/issue21457
static PyObject *
PyCurses_KillChar(PyObject *self)
-@@ -2935,16 +2914,16 @@ update_lines_cols(void)
- static PyObject *
- PyCurses_ResizeTerm(PyObject *self, PyObject *args)
- {
-- int lines;
-- int columns;
-+ int nlines;
-+ int ncolumns;
- PyObject *result;
-
- PyCursesInitialised;
-
-- if (!PyArg_ParseTuple(args,"ii:resizeterm", &lines, &columns))
-+ if (!PyArg_ParseTuple(args,"ii:resizeterm", &nlines, &ncolumns))
- return NULL;
-
-- result = PyCursesCheckERR(resizeterm(lines, columns), "resizeterm");
-+ result = PyCursesCheckERR(resizeterm(nlines, ncolumns), "resizeterm");
- if (!result)
- return NULL;
- if (!update_lines_cols())
-@@ -2958,17 +2937,17 @@ PyCurses_ResizeTerm(PyObject *self, PyOb
- static PyObject *
- PyCurses_Resize_Term(PyObject *self, PyObject *args)
- {
-- int lines;
-- int columns;
-+ int nlines;
-+ int ncolumns;
-
- PyObject *result;
-
- PyCursesInitialised;
-
-- if (!PyArg_ParseTuple(args,"ii:resize_term", &lines, &columns))
-+ if (!PyArg_ParseTuple(args,"ii:resize_term", &nlines, &ncolumns))
- return NULL;
-
-- result = PyCursesCheckERR(resize_term(lines, columns), "resize_term");
-+ result = PyCursesCheckERR(resize_term(nlines, ncolumns), "resize_term");
- if (!result)
- return NULL;
- if (!update_lines_cols())
-@@ -3284,9 +3263,7 @@ static PyMethodDef PyCurses_methods[] =
+@@ -3300,9 +3292,7 @@ static PyMethodDef PyCurses_methods[] =
#ifdef HAVE_CURSES_IS_TERM_RESIZED
{"is_term_resized", (PyCFunction)PyCurses_Is_Term_Resized, METH_VARARGS},
#endif
@@ -175,7 +131,7 @@ http://bugs.python.org/issue21457
{"killchar", (PyCFunction)PyCurses_KillChar, METH_NOARGS},
{"longname", (PyCFunction)PyCurses_longname, METH_NOARGS},
{"meta", (PyCFunction)PyCurses_Meta, METH_VARARGS},
-@@ -3412,9 +3389,7 @@ PyInit__curses(void)
+@@ -3428,9 +3418,7 @@ PyInit__curses(void)
SetDictInt("A_DIM", A_DIM);
SetDictInt("A_BOLD", A_BOLD);
SetDictInt("A_ALTCHARSET", A_ALTCHARSET);
@@ -185,7 +141,7 @@ http://bugs.python.org/issue21457
SetDictInt("A_PROTECT", A_PROTECT);
SetDictInt("A_CHARTEXT", A_CHARTEXT);
SetDictInt("A_COLOR", A_COLOR);
-@@ -3486,7 +3461,6 @@ PyInit__curses(void)
+@@ -3502,7 +3490,6 @@ PyInit__curses(void)
int key;
char *key_n;
char *key_n2;
@@ -193,7 +149,7 @@ http://bugs.python.org/issue21457
for (key=KEY_MIN;key < KEY_MAX; key++) {
key_n = (char *)keyname(key);
if (key_n == NULL || strcmp(key_n,"UNKNOWN KEY")==0)
-@@ -3514,7 +3488,6 @@ PyInit__curses(void)
+@@ -3530,7 +3517,6 @@ PyInit__curses(void)
if (key_n2 != key_n)
PyMem_Free(key_n2);
}
diff --git a/lang/python34/patches/patch-an b/lang/python34/patches/patch-Modules_makesetup
index f1f3a3fb7ca..56e9a4ecdc5 100644
--- a/lang/python34/patches/patch-an
+++ b/lang/python34/patches/patch-Modules_makesetup
@@ -1,4 +1,4 @@
-$NetBSD: patch-an,v 1.2 2014/05/09 09:19:06 wiz Exp $
+$NetBSD: patch-Modules_makesetup,v 1.1 2018/06/17 19:21:21 adam Exp $
Support -pthread compiler flag.
http://bugs.python.org/issue21461
diff --git a/lang/python34/patches/patch-aw b/lang/python34/patches/patch-Modules_nismodule.c
index 504ddbfaee6..f8499a1fb6a 100644
--- a/lang/python34/patches/patch-aw
+++ b/lang/python34/patches/patch-Modules_nismodule.c
@@ -1,4 +1,4 @@
-$NetBSD: patch-aw,v 1.2 2014/05/09 09:19:06 wiz Exp $
+$NetBSD: patch-Modules_nismodule.c,v 1.1 2018/06/17 19:21:21 adam Exp $
DragonFlyBSD support
http://bugs.python.org/issue21459
diff --git a/lang/python34/patches/patch-xa b/lang/python34/patches/patch-Python_thread__pthread.h
index 0e796b399a6..82512713074 100644
--- a/lang/python34/patches/patch-xa
+++ b/lang/python34/patches/patch-Python_thread__pthread.h
@@ -1,4 +1,4 @@
-$NetBSD: patch-xa,v 1.1 2014/05/09 02:27:14 wen Exp $
+$NetBSD: patch-Python_thread__pthread.h,v 1.1 2018/06/17 19:21:21 adam Exp $
--- Python/thread_pthread.h.orig 2013-05-15 16:33:00.000000000 +0000
+++ Python/thread_pthread.h
diff --git a/lang/python34/patches/patch-al b/lang/python34/patches/patch-configure
index 3cb7eed84fc..0140f0d0ed0 100644
--- a/lang/python34/patches/patch-al
+++ b/lang/python34/patches/patch-configure
@@ -1,4 +1,4 @@
-$NetBSD: patch-al,v 1.6 2017/05/30 14:04:53 bouyer Exp $
+$NetBSD: patch-configure,v 1.1 2018/06/17 19:21:21 adam Exp $
MirBSD support
http://bugs.python.org/issue21458
diff --git a/lang/python34/patches/patch-am b/lang/python34/patches/patch-setup.py
index 1050d101c6d..1e931434de9 100644
--- a/lang/python34/patches/patch-am
+++ b/lang/python34/patches/patch-setup.py
@@ -1,18 +1,22 @@
-$NetBSD: patch-am,v 1.7 2017/01/26 09:45:23 jperkin Exp $
+$NetBSD: patch-setup.py,v 1.1 2018/06/17 19:21:21 adam Exp $
---- setup.py.orig 2014-03-17 02:31:31.000000000 +0000
+Disable certain modules, so they can be built as separate packages.
+Do not look for ncursesw.
+Assume panel_library is correct; this is a fix for ncurses' gnupanel
+ which will get transformed to panel in buildlink.
+
+--- setup.py.orig 2018-02-04 23:40:38.000000000 +0000
+++ setup.py
-@@ -33,7 +33,8 @@ host_platform = get_platform()
+@@ -39,7 +39,7 @@ host_platform = get_platform()
COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
# This global variable is used to hold the list of modules to be disabled.
-disabled_module_list = []
-+disabled_module_list = ["_curses", "_curses_panel", "_elementtree",
-+"_sqlite3", "_tkinter", "_gdbm", "pyexpat", "readline", "spwd", "xxlimited"]
++disabled_module_list = ["_curses", "_curses_panel", "_elementtree", "_gdbm", "pyexpat", "readline", "_sqlite3", "_tkinter", "xxlimited"]
def add_dir_to_list(dirlist, dir):
"""Add the directory 'dir' to the list 'dirlist' (after any relative
-@@ -441,15 +442,15 @@ class PyBuildExt(build_ext):
+@@ -447,15 +447,15 @@ class PyBuildExt(build_ext):
os.unlink(tmpfile)
def detect_modules(self):
@@ -37,7 +41,16 @@ $NetBSD: patch-am,v 1.7 2017/01/26 09:45:23 jperkin Exp $
self.add_multiarch_paths()
# Add paths specified in the environment variables LDFLAGS and
-@@ -751,8 +752,7 @@ class PyBuildExt(build_ext):
+@@ -693,8 +693,6 @@ class PyBuildExt(build_ext):
+ # use the same library for the readline and curses modules.
+ if 'curses' in readline_termcap_library:
+ curses_library = readline_termcap_library
+- elif self.compiler.find_library_file(lib_dirs, 'ncursesw'):
+- curses_library = 'ncursesw'
+ elif self.compiler.find_library_file(lib_dirs, 'ncurses'):
+ curses_library = 'ncurses'
+ elif self.compiler.find_library_file(lib_dirs, 'curses'):
+@@ -759,8 +757,7 @@ class PyBuildExt(build_ext):
depends = ['socketmodule.h']) )
# Detect SSL support for the socket module (via _ssl)
search_for_ssl_incs_in = [
@@ -47,7 +60,7 @@ $NetBSD: patch-am,v 1.7 2017/01/26 09:45:23 jperkin Exp $
]
ssl_incs = find_file('openssl/ssl.h', inc_dirs,
search_for_ssl_incs_in
-@@ -763,9 +763,7 @@ class PyBuildExt(build_ext):
+@@ -771,9 +768,7 @@ class PyBuildExt(build_ext):
if krb5_h:
ssl_incs += krb5_h
ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
@@ -58,7 +71,7 @@ $NetBSD: patch-am,v 1.7 2017/01/26 09:45:23 jperkin Exp $
if (ssl_incs is not None and
ssl_libs is not None):
-@@ -784,7 +782,7 @@ class PyBuildExt(build_ext):
+@@ -792,7 +787,7 @@ class PyBuildExt(build_ext):
# look for the openssl version header on the compiler search path.
opensslv_h = find_file('openssl/opensslv.h', [],
@@ -67,7 +80,7 @@ $NetBSD: patch-am,v 1.7 2017/01/26 09:45:23 jperkin Exp $
if opensslv_h:
name = os.path.join(opensslv_h[0], 'openssl/opensslv.h')
if host_platform == 'darwin' and is_macosx_sdk_path(name):
-@@ -1148,6 +1146,30 @@ class PyBuildExt(build_ext):
+@@ -1166,6 +1161,30 @@ class PyBuildExt(build_ext):
dbm_order = ['gdbm']
# The standard Unix dbm module:
if host_platform not in ['cygwin']:
@@ -98,7 +111,7 @@ $NetBSD: patch-am,v 1.7 2017/01/26 09:45:23 jperkin Exp $
config_args = [arg.strip("'")
for arg in sysconfig.get_config_var("CONFIG_ARGS").split()]
dbm_args = [arg for arg in config_args
-@@ -1159,7 +1181,7 @@ class PyBuildExt(build_ext):
+@@ -1177,7 +1196,7 @@ class PyBuildExt(build_ext):
dbmext = None
for cand in dbm_order:
if cand == "ndbm":
@@ -107,7 +120,17 @@ $NetBSD: patch-am,v 1.7 2017/01/26 09:45:23 jperkin Exp $
# Some systems have -lndbm, others have -lgdbm_compat,
# others don't have either
if self.compiler.find_library_file(lib_dirs,
-@@ -1956,10 +1986,7 @@ class PyBuildExt(build_ext):
+@@ -1314,8 +1333,7 @@ class PyBuildExt(build_ext):
+ missing.append('_curses')
+
+ # If the curses module is enabled, check for the panel module
+- if (module_enabled(exts, '_curses') and
+- self.compiler.find_library_file(lib_dirs, panel_library)):
++ if (module_enabled(exts, '_curses')):
+ exts.append( Extension('_curses_panel', ['_curses_panel.c'],
+ include_dirs=curses_includes,
+ define_macros=curses_defines,
+@@ -1977,10 +1995,7 @@ class PyBuildExt(build_ext):
depends = ['_decimal/docstrings.h']
else:
srcdir = sysconfig.get_config_var('srcdir')
@@ -119,7 +142,7 @@ $NetBSD: patch-am,v 1.7 2017/01/26 09:45:23 jperkin Exp $
libraries = []
sources = [
'_decimal/_decimal.c',
-@@ -2205,7 +2232,7 @@ def main():
+@@ -2226,7 +2241,7 @@ def main():
# If you change the scripts installed here, you also need to
# check the PyBuildScripts command above, and change the links
# created by the bininstall target in Makefile.pre.in
diff --git a/lang/python35/Makefile b/lang/python35/Makefile
index 0025786583f..05c33330de9 100644
--- a/lang/python35/Makefile
+++ b/lang/python35/Makefile
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.13 2018/02/05 17:34:18 adam Exp $
+# $NetBSD: Makefile,v 1.14 2018/06/17 19:21:22 adam Exp $
.include "dist.mk"
PKGNAME= python35-${PY_DISTVERSION}
+PKGREVISION= 1
CATEGORIES= lang python
MAINTAINER= pkgsrc-users@NetBSD.org
@@ -22,12 +23,12 @@ PRINT_PLIST_AWK+= sub(/.opt-[12].pyc$$/, ".pyo")}
USE_LANGUAGES= c c++
GNU_CONFIGURE= yes
-CONFIGURE_ARGS+= --with-threads
CONFIGURE_ARGS+= --enable-shared
-CONFIGURE_ARGS+= OPT=${CFLAGS:M*:Q}
CONFIGURE_ARGS+= --with-system-ffi
-CONFIGURE_ARGS+= --without-pymalloc
+CONFIGURE_ARGS+= --with-threads
CONFIGURE_ARGS+= --without-ensurepip
+CONFIGURE_ARGS+= --without-pymalloc
+CONFIGURE_ENV+= OPT=${CFLAGS:M*:Q}
CONFIGURE_ENV+= ac_cv_path_mkdir=${TOOLS_PATH.mkdir}
PKGCONFIG_OVERRIDE+= Misc/python.pc.in
@@ -104,15 +105,59 @@ PRINT_PLIST_AWK+= { gsub(/python${PY_VER_SUFFIX}/, \
TEST_TARGET= test
INSTALL_TARGET= altinstall
-REPLACE_INTERPRETER+= py35
-REPLACE.py35.old= .*python[^ ]*
-REPLACE.py35.new= ${PREFIX}/bin/python${PY_VER_SUFFIX}
-REPLACE_FILES.py35= Lib/*.py Lib/*/*.py Lib/*/*/*.py Lib/*/*/*/*.py
+REPLACE_INTERPRETER+= python
+REPLACE.python.old= .*python[^ ]*
+REPLACE.python.new= ${PREFIX}/bin/python${PY_VER_SUFFIX}
+REPLACE_FILES.python= Lib/base64.py
+REPLACE_FILES.python+= Lib/cProfile.py
+REPLACE_FILES.python+= Lib/cgi.py
+REPLACE_FILES.python+= Lib/encodings/rot_13.py
+REPLACE_FILES.python+= Lib/idlelib/PyShell.py
+REPLACE_FILES.python+= Lib/keyword.py
+REPLACE_FILES.python+= Lib/lib2to3/pgen2/token.py
+REPLACE_FILES.python+= Lib/lib2to3/tests/data/different_encoding.py
+REPLACE_FILES.python+= Lib/lib2to3/tests/data/false_encoding.py
+REPLACE_FILES.python+= Lib/lib2to3/tests/pytree_idempotency.py
+REPLACE_FILES.python+= Lib/pdb.py
+REPLACE_FILES.python+= Lib/platform.py
+REPLACE_FILES.python+= Lib/profile.py
+REPLACE_FILES.python+= Lib/pydoc.py
+REPLACE_FILES.python+= Lib/quopri.py
+REPLACE_FILES.python+= Lib/smtpd.py
+REPLACE_FILES.python+= Lib/smtplib.py
+REPLACE_FILES.python+= Lib/symbol.py
+REPLACE_FILES.python+= Lib/tabnanny.py
+REPLACE_FILES.python+= Lib/tarfile.py
+REPLACE_FILES.python+= Lib/test/bisect.py
+REPLACE_FILES.python+= Lib/test/crashers/recursive_call.py
+REPLACE_FILES.python+= Lib/test/curses_tests.py
+REPLACE_FILES.python+= Lib/test/pystone.py
+REPLACE_FILES.python+= Lib/test/re_tests.py
+REPLACE_FILES.python+= Lib/test/regrtest.py
+REPLACE_FILES.python+= Lib/timeit.py
+REPLACE_FILES.python+= Lib/trace.py
+REPLACE_FILES.python+= Lib/turtledemo/__main__.py
+REPLACE_FILES.python+= Lib/turtledemo/bytedesign.py
+REPLACE_FILES.python+= Lib/turtledemo/clock.py
+REPLACE_FILES.python+= Lib/turtledemo/forest.py
+REPLACE_FILES.python+= Lib/turtledemo/fractalcurves.py
+REPLACE_FILES.python+= Lib/turtledemo/lindenmayer.py
+REPLACE_FILES.python+= Lib/turtledemo/minimal_hanoi.py
+REPLACE_FILES.python+= Lib/turtledemo/paint.py
+REPLACE_FILES.python+= Lib/turtledemo/peace.py
+REPLACE_FILES.python+= Lib/turtledemo/penrose.py
+REPLACE_FILES.python+= Lib/turtledemo/planet_and_moon.py
+REPLACE_FILES.python+= Lib/turtledemo/sorting_animate.py
+REPLACE_FILES.python+= Lib/turtledemo/tree.py
+REPLACE_FILES.python+= Lib/turtledemo/yinyang.py
+REPLACE_FILES.python+= Lib/uu.py
+REPLACE_FILES.python+= Lib/webbrowser.py
SUBST_CLASSES+= findlib
SUBST_MESSAGE.findlib= Fixing find_library_file on Darwin.
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_SED.findlib= -e 's,/usr/local,${PREFIX},'
# XXX: It might be needed to add manually more paths like ${PREFIX}/qt5/lib
@@ -120,18 +165,12 @@ SUBST_SED.findlib= -e 's,/usr/local,${PREFIX},'
# >>> from ctypes.util import find_library
# >>> find_library("m")
# 'libm.so.0'
-# >>> find_library("crypto")
-# 'libcrypto.so.11'
-# >>> find_library("GL")
-# 'libGL.so.2'
-# >>> find_library("curl")
-# 'libcurl.so.4'
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.pfindlib= -e "s!\('-Wl,-t', \)!'${COMPILER_RPATH_FLAG}${PREFIX}/lib', '-L${PREFIX}/lib', \1!"
.include "options.mk"
diff --git a/lang/python35/PLIST.Linux b/lang/python35/PLIST.Linux
index 421c031c667..dc7591a753d 100644
--- a/lang/python35/PLIST.Linux
+++ b/lang/python35/PLIST.Linux
@@ -1,5 +1,6 @@
-@comment $NetBSD: PLIST.Linux,v 1.1 2015/12/05 17:12:13 adam Exp $
+@comment $NetBSD: PLIST.Linux,v 1.2 2018/06/17 19:21:22 adam Exp $
lib/python${PY_VER_SUFFIX}/lib-dynload/ossaudiodev.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/spwd.so
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/CDROM.py
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/CDROM.pyc
lib/python${PY_VER_SUFFIX}/plat-${PY_PLATNAME}/CDROM.pyo
diff --git a/lang/python35/distinfo b/lang/python35/distinfo
index 65d36b5f685..0aa4fcd017c 100644
--- a/lang/python35/distinfo
+++ b/lang/python35/distinfo
@@ -1,18 +1,19 @@
-$NetBSD: distinfo,v 1.15 2018/02/05 17:34:18 adam Exp $
+$NetBSD: distinfo,v 1.16 2018/06/17 19:21:22 adam Exp $
SHA1 (Python-3.5.5.tar.xz) = 66c4cfc0f64b545ee5a7725f26a2fd834cdf1682
RMD160 (Python-3.5.5.tar.xz) = dd0b7b9e093312b854b7ba56afbe12a655934744
SHA512 (Python-3.5.5.tar.xz) = c9056baee6a2d1fe7f14b1f310db95b78e8972766d086f8ae10954f38f8182956171580bde01ddadebe897f2545a6fbe47669ca3e4887026ac1fae5ee9197f22
Size (Python-3.5.5.tar.xz) = 15351440 bytes
+SHA1 (patch-Lib_ctypes_util.py) = 24ee6d33e39edc2168adabb2065941ff4efb977c
SHA1 (patch-Lib_distutils_command_install.py) = 9b44f339f65f029b7f17dbc654739a7ae3c12780
SHA1 (patch-Lib_distutils_unixccompiler.py) = 7d0b70a64b79ee6084c41d8fbb01c8e8e4553419
SHA1 (patch-Makefile.pre.in) = 213f57b7130507e541ee23d6b8da097fd6168fb7
-SHA1 (patch-Modules___cursesmodule.c) = 2ab2779e0418a4529987641c254686ba05d28593
+SHA1 (patch-Modules___cursesmodule.c) = 5b0e9253186c58f5364f2dcd230b1c04f4eba7b7
SHA1 (patch-Modules_makesetup) = c9b571eb54fdf0b1e93524a6de6780e8c4119221
SHA1 (patch-Modules_nismodule.c) = bd290417c265846e238660180e60e76c0f5f696a
SHA1 (patch-Modules_socketmodule.c) = 63d583340b071b07ff3e31cf332fcc2ca9ab50e3
SHA1 (patch-Modules_socketmodule.h) = 13a3290eb72078067060d3e71b7baa08f3eb591c
SHA1 (patch-Python_thread__pthread.h) = fb81eaa604b4ed7c1b64c3f4731d58a8aee257be
-SHA1 (patch-configure) = fcdc55c8cc84017364f840f35e7ec4a131074520
-SHA1 (patch-pyconfig.h.in) = 5d11bd737a949f89b3fbd14db4920873bcc3282e
-SHA1 (patch-setup.py) = 7d8afe5e799c8373fe41fbb65e283e0c6f3967d2
+SHA1 (patch-configure) = bce1b2f7dfedb23c561e1d8f32959cd043cdd0df
+SHA1 (patch-pyconfig.h.in) = e0aa80eb1ed3677da77fcd0a93f72b61ce148d0d
+SHA1 (patch-setup.py) = 26ea130352cf73a49110d86bbccf1803795211e5
diff --git a/lang/python35/patches/patch-Lib_ctypes_util.py b/lang/python35/patches/patch-Lib_ctypes_util.py
new file mode 100644
index 00000000000..8802872d200
--- /dev/null
+++ b/lang/python35/patches/patch-Lib_ctypes_util.py
@@ -0,0 +1,41 @@
+$NetBSD: patch-Lib_ctypes_util.py,v 1.1 2018/06/17 19:21:22 adam Exp $
+
+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
+@@ -285,8 +285,32 @@ elif os.name == "posix":
+ except OSError:
+ pass
+
++ def _findLib_ld(name):
++ # See issue #9998 for why this is needed
++ expr = r'[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name)
++ cmd = ['ld', '-t', '-L', '/usr/local/lib']
++ libpath = os.environ.get('LD_LIBRARY_PATH')
++ if libpath:
++ for d in libpath.split(':'):
++ cmd.extend(['-L', d])
++ cmd.extend(['-o', os.devnull, '-l%s' % name])
++ result = None
++ try:
++ p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
++ stderr=subprocess.PIPE,
++ universal_newlines=True)
++ out, _ = p.communicate()
++ res = re.search(expr, os.fsdecode(out))
++ if res:
++ result = res.group(0)
++ except Exception as e:
++ pass # result will be None
++ return result
++
+ def find_library(name):
+- return _findSoname_ldconfig(name) or _get_soname(_findLib_gcc(name))
++ # See issue #9998
++ return _findSoname_ldconfig(name) or \
++ _get_soname(_findLib_gcc(name) or _findLib_ld(name))
+
+ ################################################################
+ # test code
diff --git a/lang/python35/patches/patch-Modules___cursesmodule.c b/lang/python35/patches/patch-Modules___cursesmodule.c
index b56ad9f92b7..21f259406b9 100644
--- a/lang/python35/patches/patch-Modules___cursesmodule.c
+++ b/lang/python35/patches/patch-Modules___cursesmodule.c
@@ -1,11 +1,12 @@
-$NetBSD: patch-Modules___cursesmodule.c,v 1.4 2017/01/05 23:16:42 roy Exp $
+$NetBSD: patch-Modules___cursesmodule.c,v 1.5 2018/06/17 19:21:22 adam Exp $
Allow py-curses to use NetBSD curses as well as ncurses
http://bugs.python.org/issue21457
+Use is_pad() when supported (taken from Python 3.7).
---- Modules/_cursesmodule.c.orig 2016-06-25 21:38:38.000000000 +0000
+--- Modules/_cursesmodule.c.orig 2018-02-04 23:40:56.000000000 +0000
+++ Modules/_cursesmodule.c
-@@ -112,12 +112,7 @@ char *PyCursesVersion = "2.2";
+@@ -112,13 +112,13 @@ char *PyCursesVersion = "2.2";
#define CURSES_MODULE
#include "py_curses.h"
@@ -15,11 +16,17 @@ http://bugs.python.org/issue21457
- explicit prototypes here. */
-extern int setupterm(char *,int,int *);
-#ifdef __sgi
-+#ifdef HAVE_TERM_H
++#if defined(HAVE_TERM_H) || defined(__sgi)
++/* For termname, longname, putp, tigetflag, tigetnum, tigetstr, tparm
++ which are not declared in SysV curses and for setupterm. */
#include <term.h>
++/* Including <term.h> #defines many common symbols. */
++#undef lines
++#undef columns
#endif
-@@ -486,17 +481,9 @@ Window_NoArg2TupleReturnFunction(getpary
+ #ifdef HAVE_LANGINFO_H
+@@ -494,17 +494,9 @@ Window_NoArg2TupleReturnFunction(getpary
Window_OneArgNoReturnFunction(clearok, int, "i;True(1) or False(0)")
Window_OneArgNoReturnFunction(idlok, int, "i;True(1) or False(0)")
@@ -37,16 +44,29 @@ http://bugs.python.org/issue21457
Window_OneArgNoReturnFunction(notimeout, int, "i;True(1) or False(0)")
Window_OneArgNoReturnFunction(scrollok, int, "i;True(1) or False(0)")
Window_OneArgNoReturnFunction(winsdelln, int, "i;nlines")
-@@ -1070,7 +1057,7 @@ PyCursesWindow_EchoChar(PyCursesWindowOb
+@@ -940,6 +932,12 @@ int py_mvwdelch(WINDOW *w, int y, int x)
+ }
+ #endif
+
++#if defined(HAVE_CURSES_IS_PAD)
++#define py_is_pad(win) is_pad(win)
++#elif defined(WINDOW_HAS_FLAGS)
++#define py_is_pad(win) ((win) ? ((win)->_flags & _ISPAD) != 0 : FALSE)
++#endif
++
+ /* chgat, added by Fabian Kreutz <fabian.kreutz at gmx.net> */
+
+ static PyObject *
+@@ -1080,7 +1078,7 @@ PyCursesWindow_EchoChar(PyCursesWindowOb
return NULL;
#ifdef WINDOW_HAS_FLAGS
- if (self->win->_flags & _ISPAD)
-+ if (is_pad(self->win))
++ if (py_is_pad(self->win))
return PyCursesCheckERR(pechochar(self->win, ch | attr),
"echochar");
else
-@@ -1156,11 +1143,7 @@ PyCursesWindow_GetKey(PyCursesWindowObje
+@@ -1166,11 +1164,7 @@ PyCursesWindow_GetKey(PyCursesWindowObje
return Py_BuildValue("C", rtn);
} else {
const char *knp;
@@ -58,54 +78,34 @@ http://bugs.python.org/issue21457
return PyUnicode_FromString((knp == NULL) ? "" : knp);
}
}
-@@ -1593,7 +1576,7 @@ PyCursesWindow_NoOutRefresh(PyCursesWind
+@@ -1619,7 +1613,7 @@ PyCursesWindow_NoOutRefresh(PyCursesWind
#ifndef WINDOW_HAS_FLAGS
if (0)
#else
- if (self->win->_flags & _ISPAD)
-+ if (is_pad(self->win))
++ if (py_is_pad(self->win))
#endif
{
switch(PyTuple_Size(args)) {
-@@ -1768,7 +1751,7 @@ PyCursesWindow_Refresh(PyCursesWindowObj
+@@ -1794,7 +1788,7 @@ PyCursesWindow_Refresh(PyCursesWindowObj
#ifndef WINDOW_HAS_FLAGS
if (0)
#else
- if (self->win->_flags & _ISPAD)
-+ if (is_pad(self->win))
++ if (py_is_pad(self->win))
#endif
{
switch(PyTuple_Size(args)) {
-@@ -1835,7 +1818,7 @@ PyCursesWindow_SubWin(PyCursesWindowObje
+@@ -1861,7 +1855,7 @@ PyCursesWindow_SubWin(PyCursesWindowObje
/* printf("Subwin: %i %i %i %i \n", nlines, ncols, begin_y, begin_x); */
#ifdef WINDOW_HAS_FLAGS
- if (self->win->_flags & _ISPAD)
-+ if (is_pad(self->win))
++ if (py_is_pad(self->win))
win = subpad(self->win, nlines, ncols, begin_y, begin_x);
else
#endif
-@@ -2576,15 +2559,15 @@ PyCurses_IntrFlush(PyObject *self, PyObj
- static PyObject *
- PyCurses_Is_Term_Resized(PyObject *self, PyObject *args)
- {
-- int lines;
-- int columns;
-+ int nlines;
-+ int ncolumns;
- int result;
-
- PyCursesInitialised;
-
-- if (!PyArg_ParseTuple(args,"ii:is_term_resized", &lines, &columns))
-+ if (!PyArg_ParseTuple(args,"ii:is_term_resized", &nlines, &ncolumns))
- return NULL;
-- result = is_term_resized(lines, columns);
-+ result = is_term_resized(nlines, ncolumns);
- if (result == TRUE) {
- Py_INCREF(Py_True);
- return Py_True;
-@@ -2595,7 +2578,6 @@ PyCurses_Is_Term_Resized(PyObject *self,
+@@ -2621,7 +2615,6 @@ PyCurses_Is_Term_Resized(PyObject *self,
}
#endif /* HAVE_CURSES_IS_TERM_RESIZED */
@@ -113,7 +113,7 @@ http://bugs.python.org/issue21457
static PyObject *
PyCurses_KeyName(PyObject *self, PyObject *args)
{
-@@ -2614,7 +2596,6 @@ PyCurses_KeyName(PyObject *self, PyObjec
+@@ -2640,7 +2633,6 @@ PyCurses_KeyName(PyObject *self, PyObjec
return PyBytes_FromString((knp == NULL) ? "" : knp);
}
@@ -121,50 +121,7 @@ http://bugs.python.org/issue21457
static PyObject *
PyCurses_KillChar(PyObject *self)
-@@ -2879,16 +2860,16 @@ PyCurses_update_lines_cols(PyObject *sel
- static PyObject *
- PyCurses_ResizeTerm(PyObject *self, PyObject *args)
- {
-- int lines;
-- int columns;
-+ int nlines;
-+ int ncolumns;
- PyObject *result;
-
- PyCursesInitialised;
-
-- if (!PyArg_ParseTuple(args,"ii:resizeterm", &lines, &columns))
-+ if (!PyArg_ParseTuple(args,"ii:resizeterm", &nlines, &ncolumns))
- return NULL;
-
-- result = PyCursesCheckERR(resizeterm(lines, columns), "resizeterm");
-+ result = PyCursesCheckERR(resizeterm(nlines, ncolumns), "resizeterm");
- if (!result)
- return NULL;
- if (!update_lines_cols())
-@@ -2902,17 +2883,17 @@ PyCurses_ResizeTerm(PyObject *self, PyOb
- static PyObject *
- PyCurses_Resize_Term(PyObject *self, PyObject *args)
- {
-- int lines;
-- int columns;
-+ int nlines;
-+ int ncolumns;
-
- PyObject *result;
-
- PyCursesInitialised;
-
-- if (!PyArg_ParseTuple(args,"ii:resize_term", &lines, &columns))
-+ if (!PyArg_ParseTuple(args,"ii:resize_term", &nlines, &ncolumns))
- return NULL;
-
-- result = PyCursesCheckERR(resize_term(lines, columns), "resize_term");
-+ result = PyCursesCheckERR(resize_term(nlines, ncolumns), "resize_term");
- if (!result)
- return NULL;
- if (!update_lines_cols())
-@@ -3228,9 +3209,7 @@ static PyMethodDef PyCurses_methods[] =
+@@ -3254,9 +3246,7 @@ static PyMethodDef PyCurses_methods[] =
#ifdef HAVE_CURSES_IS_TERM_RESIZED
{"is_term_resized", (PyCFunction)PyCurses_Is_Term_Resized, METH_VARARGS},
#endif
@@ -174,7 +131,7 @@ http://bugs.python.org/issue21457
{"killchar", (PyCFunction)PyCurses_KillChar, METH_NOARGS},
{"longname", (PyCFunction)PyCurses_longname, METH_NOARGS},
{"meta", (PyCFunction)PyCurses_Meta, METH_VARARGS},
-@@ -3359,9 +3338,7 @@ PyInit__curses(void)
+@@ -3385,9 +3375,7 @@ PyInit__curses(void)
SetDictInt("A_DIM", A_DIM);
SetDictInt("A_BOLD", A_BOLD);
SetDictInt("A_ALTCHARSET", A_ALTCHARSET);
@@ -184,7 +141,7 @@ http://bugs.python.org/issue21457
SetDictInt("A_PROTECT", A_PROTECT);
SetDictInt("A_CHARTEXT", A_CHARTEXT);
SetDictInt("A_COLOR", A_COLOR);
-@@ -3433,7 +3410,6 @@ PyInit__curses(void)
+@@ -3459,7 +3447,6 @@ PyInit__curses(void)
int key;
char *key_n;
char *key_n2;
@@ -192,7 +149,7 @@ http://bugs.python.org/issue21457
for (key=KEY_MIN;key < KEY_MAX; key++) {
key_n = (char *)keyname(key);
if (key_n == NULL || strcmp(key_n,"UNKNOWN KEY")==0)
-@@ -3461,7 +3437,6 @@ PyInit__curses(void)
+@@ -3487,7 +3474,6 @@ PyInit__curses(void)
if (key_n2 != key_n)
PyMem_Free(key_n2);
}
diff --git a/lang/python35/patches/patch-configure b/lang/python35/patches/patch-configure
index 88c33511de9..e264f15b107 100644
--- a/lang/python35/patches/patch-configure
+++ b/lang/python35/patches/patch-configure
@@ -1,17 +1,13 @@
-$NetBSD: patch-configure,v 1.2 2017/05/30 14:04:54 bouyer Exp $
-
-MirBSD support
-http://bugs.python.org/issue21458
+$NetBSD: patch-configure,v 1.3 2018/06/17 19:21:22 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
-XXX: Not sure what the BLDSHARED changes are about.
-
-detect netcan/can.h on NetBSD
-
---- configure.orig 2017-01-17 08:57:54.000000000 +0100
-+++ configure 2017-05-30 15:40:52.322257152 +0200
-@@ -3462,7 +3462,7 @@
+--- configure.orig 2018-02-04 23:40:56.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.
# In addition, Stefan Krah confirms that issue #1244610 exists through
# OpenBSD 4.6, but is fixed in 4.7.
@@ -20,7 +16,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
-@@ -5996,7 +5996,7 @@
+@@ -5975,7 +5975,7 @@ $as_echo "#define Py_ENABLE_SHARED 1" >>
PY3LIBRARY=libpython3.so
fi
;;
@@ -29,7 +25,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}}
-@@ -7991,7 +7991,7 @@
+@@ -7990,7 +7990,7 @@ done
# On Linux, can.h and can/raw.h require sys/socket.h
@@ -38,7 +34,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" "
-@@ -9269,8 +9269,8 @@
+@@ -9268,8 +9268,8 @@ then
LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
else
# No framework, use the Python app as bundle-loader
@@ -49,7 +45,7 @@ detect netcan/can.h on NetBSD
LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
fi ;;
Darwin/*)
-@@ -9294,9 +9294,9 @@
+@@ -9293,9 +9293,9 @@ then
LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
else
# No framework, use the Python app as bundle-loader
@@ -62,7 +58,7 @@ detect netcan/can.h on NetBSD
fi
else
# building for OS X 10.3 and later
-@@ -9335,6 +9335,9 @@
+@@ -9334,6 +9334,9 @@ then
;;
esac
fi;;
@@ -72,7 +68,7 @@ detect netcan/can.h on NetBSD
NetBSD*|DragonFly*)
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared';;
-@@ -9378,7 +9381,7 @@
+@@ -9377,7 +9380,7 @@ then
fi;;
Linux*|GNU*) CCSHARED="-fPIC";;
BSD/OS*/4*) CCSHARED="-fpic";;
@@ -81,7 +77,7 @@ detect netcan/can.h on NetBSD
OpenUNIX*|UnixWare*)
if test "$GCC" = "yes"
then CCSHARED="-fPIC"
-@@ -9427,7 +9430,7 @@
+@@ -9426,7 +9429,7 @@ then
OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
@@ -90,7 +86,7 @@ detect netcan/can.h on NetBSD
if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
then
LINKFORSHARED="-Wl,--export-dynamic"
-@@ -14758,8 +14761,6 @@
+@@ -14757,8 +14760,6 @@ $as_echo "$SOABI" >&6; }
case $ac_sys_system in
@@ -99,3 +95,40 @@ detect netcan/can.h on NetBSD
*)
EXT_SUFFIX=${SHLIB_SUFFIX};;
esac
+@@ -15694,6 +15695,36 @@ $as_echo "#define WINDOW_HAS_FLAGS 1" >>
+
+ fi
+
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
++$as_echo_n "checking for is_pad... " >&6; }
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++#include <curses.h>
++int
++main ()
++{
++
++#ifndef is_pad
++void *x=is_pad
++#endif
++
++ ;
++ return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++
++$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
+ $as_echo_n "checking for is_term_resized... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
diff --git a/lang/python35/patches/patch-pyconfig.h.in b/lang/python35/patches/patch-pyconfig.h.in
index 6c73eb502bb..4970e14c0bb 100644
--- a/lang/python35/patches/patch-pyconfig.h.in
+++ b/lang/python35/patches/patch-pyconfig.h.in
@@ -1,10 +1,21 @@
-$NetBSD: patch-pyconfig.h.in,v 1.1 2017/05/30 14:04:54 bouyer Exp $
+$NetBSD: patch-pyconfig.h.in,v 1.2 2018/06/17 19:21:22 adam Exp $
-detect netcan/can.h on NetBSD
+Detect is_pad() (taken from Python 3.7).
+Detect netcan/can.h on NetBSD
---- pyconfig.h.in.orig 2017-01-17 08:57:54.000000000 +0100
-+++ pyconfig.h.in 2017-05-30 15:41:41.207090795 +0200
-@@ -540,6 +540,9 @@
+--- pyconfig.h.in.orig 2018-02-04 23:40:56.000000000 +0000
++++ pyconfig.h.in
+@@ -146,6 +146,9 @@
+ /* Define to 1 if you have the <curses.h> header file. */
+ #undef HAVE_CURSES_H
+
++/* Define if you have the 'is_pad' function or macro. */
++#undef HAVE_CURSES_IS_PAD
++
+ /* Define if you have the 'is_term_resized' function. */
+ #undef HAVE_CURSES_IS_TERM_RESIZED
+
+@@ -540,6 +543,9 @@
/* Define to 1 if you have the <linux/can/raw.h> header file. */
#undef HAVE_LINUX_CAN_RAW_H
diff --git a/lang/python35/patches/patch-setup.py b/lang/python35/patches/patch-setup.py
index 64e3ebf5383..60f9c294e87 100644
--- a/lang/python35/patches/patch-setup.py
+++ b/lang/python35/patches/patch-setup.py
@@ -1,27 +1,31 @@
-$NetBSD: patch-setup.py,v 1.4 2017/01/26 09:45:23 jperkin Exp $
+$NetBSD: patch-setup.py,v 1.5 2018/06/17 19:21:22 adam Exp $
---- setup.py.orig 2017-01-17 07:57:54.000000000 +0000
+Disable certain modules, so they can be built as separate packages.
+Do not look for ncursesw.
+Assume panel_library is correct; this is a fix for ncurses' gnupanel
+ which will get transformed to panel in buildlink.
+
+--- setup.py.orig 2018-02-04 23:40:56.000000000 +0000
+++ setup.py
@@ -7,7 +7,7 @@ import importlib._bootstrap
import importlib.util
import sysconfig
-from distutils import log
-+from distutils import log,text_file
++from distutils import log, text_file
from distutils.errors import *
from distutils.core import Extension, setup
from distutils.command.build_ext import build_ext
-@@ -43,7 +43,8 @@ host_platform = get_platform()
+@@ -43,7 +43,7 @@ host_platform = get_platform()
COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
# This global variable is used to hold the list of modules to be disabled.
-disabled_module_list = []
-+disabled_module_list = ["_curses", "_curses_panel", "_elementtree",
-+"_sqlite3", "_tkinter", "_gdbm", "pyexpat", "readline", "spwd", "xxlimited"]
++disabled_module_list = ["_curses", "_curses_panel", "_elementtree", "_gdbm", "pyexpat", "readline", "_sqlite3", "_tkinter", "xxlimited"]
def add_dir_to_list(dirlist, dir):
"""Add the directory 'dir' to the list 'dirlist' (after any relative
-@@ -487,15 +488,15 @@ class PyBuildExt(build_ext):
+@@ -487,15 +487,15 @@ class PyBuildExt(build_ext):
return ['m']
def detect_modules(self):
@@ -46,17 +50,26 @@ $NetBSD: patch-setup.py,v 1.4 2017/01/26 09:45:23 jperkin Exp $
self.add_multiarch_paths()
# Add paths specified in the environment variables LDFLAGS and
-@@ -808,8 +809,7 @@ class PyBuildExt(build_ext):
+@@ -742,8 +742,6 @@ class PyBuildExt(build_ext):
+ # use the same library for the readline and curses modules.
+ if 'curses' in readline_termcap_library:
+ curses_library = readline_termcap_library
+- elif self.compiler.find_library_file(lib_dirs, 'ncursesw'):
+- curses_library = 'ncursesw'
+ elif self.compiler.find_library_file(lib_dirs, 'ncurses'):
+ curses_library = 'ncurses'
+ elif self.compiler.find_library_file(lib_dirs, 'curses'):
+@@ -808,8 +806,7 @@ class PyBuildExt(build_ext):
depends = ['socketmodule.h']) )
# Detect SSL support for the socket module (via _ssl)
search_for_ssl_incs_in = [
- '/usr/local/ssl/include',
- '/usr/contrib/ssl/include/'
-+ '/usr/include'
++ '@SSLBASE@/include'
]
ssl_incs = find_file('openssl/ssl.h', inc_dirs,
search_for_ssl_incs_in
-@@ -820,9 +820,7 @@ class PyBuildExt(build_ext):
+@@ -820,9 +817,7 @@ class PyBuildExt(build_ext):
if krb5_h:
ssl_incs += krb5_h
ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
@@ -67,7 +80,7 @@ $NetBSD: patch-setup.py,v 1.4 2017/01/26 09:45:23 jperkin Exp $
if (ssl_incs is not None and
ssl_libs is not None):
-@@ -841,7 +839,7 @@ class PyBuildExt(build_ext):
+@@ -841,7 +836,7 @@ class PyBuildExt(build_ext):
# look for the openssl version header on the compiler search path.
opensslv_h = find_file('openssl/opensslv.h', [],
@@ -76,7 +89,7 @@ $NetBSD: patch-setup.py,v 1.4 2017/01/26 09:45:23 jperkin Exp $
if opensslv_h:
name = os.path.join(opensslv_h[0], 'openssl/opensslv.h')
if host_platform == 'darwin' and is_macosx_sdk_path(name):
-@@ -1215,6 +1213,30 @@ class PyBuildExt(build_ext):
+@@ -1215,6 +1210,30 @@ class PyBuildExt(build_ext):
dbm_order = ['gdbm']
# The standard Unix dbm module:
if host_platform not in ['cygwin']:
@@ -107,7 +120,7 @@ $NetBSD: patch-setup.py,v 1.4 2017/01/26 09:45:23 jperkin Exp $
config_args = [arg.strip("'")
for arg in sysconfig.get_config_var("CONFIG_ARGS").split()]
dbm_args = [arg for arg in config_args
-@@ -1226,7 +1248,7 @@ class PyBuildExt(build_ext):
+@@ -1226,7 +1245,7 @@ class PyBuildExt(build_ext):
dbmext = None
for cand in dbm_order:
if cand == "ndbm":
@@ -116,7 +129,17 @@ $NetBSD: patch-setup.py,v 1.4 2017/01/26 09:45:23 jperkin Exp $
# Some systems have -lndbm, others have -lgdbm_compat,
# others don't have either
if self.compiler.find_library_file(lib_dirs,
-@@ -2028,10 +2050,7 @@ class PyBuildExt(build_ext):
+@@ -1363,8 +1382,7 @@ class PyBuildExt(build_ext):
+ missing.append('_curses')
+
+ # If the curses module is enabled, check for the panel module
+- if (module_enabled(exts, '_curses') and
+- self.compiler.find_library_file(lib_dirs, panel_library)):
++ if (module_enabled(exts, '_curses')):
+ exts.append( Extension('_curses_panel', ['_curses_panel.c'],
+ include_dirs=curses_includes,
+ define_macros=curses_defines,
+@@ -2031,10 +2049,7 @@ class PyBuildExt(build_ext):
depends = ['_decimal/docstrings.h']
else:
srcdir = sysconfig.get_config_var('srcdir')
@@ -128,7 +151,7 @@ $NetBSD: patch-setup.py,v 1.4 2017/01/26 09:45:23 jperkin Exp $
libraries = []
sources = [
'_decimal/_decimal.c',
-@@ -2277,7 +2296,7 @@ def main():
+@@ -2280,7 +2295,7 @@ def main():
# If you change the scripts installed here, you also need to
# check the PyBuildScripts command above, and change the links
# created by the bininstall target in Makefile.pre.in
diff --git a/lang/python36/Makefile b/lang/python36/Makefile
index a2684617b69..89159db7c01 100644
--- a/lang/python36/Makefile
+++ b/lang/python36/Makefile
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.13 2017/12/19 09:37:14 adam Exp $
+# $NetBSD: Makefile,v 1.14 2018/06/17 19:21:22 adam Exp $
.include "dist.mk"
PKGNAME= python36-${PY_DISTVERSION}
+PKGREVISION= 1
CATEGORIES= lang python
MAINTAINER= pkgsrc-users@NetBSD.org
@@ -22,12 +23,12 @@ PRINT_PLIST_AWK+= sub(/.opt-[12].pyc$$/, ".pyo")}
USE_LANGUAGES= c c++
GNU_CONFIGURE= yes
-CONFIGURE_ARGS+= --with-threads
CONFIGURE_ARGS+= --enable-shared
-CONFIGURE_ARGS+= OPT=${CFLAGS:M*:Q}
CONFIGURE_ARGS+= --with-system-ffi
-CONFIGURE_ARGS+= --without-pymalloc
+CONFIGURE_ARGS+= --with-threads
CONFIGURE_ARGS+= --without-ensurepip
+CONFIGURE_ARGS+= --without-pymalloc
+CONFIGURE_ENV+= OPT=${CFLAGS:M*:Q}
CONFIGURE_ENV+= ac_cv_path_mkdir=${TOOLS_PATH.mkdir}
PKGCONFIG_OVERRIDE+= Misc/python.pc.in
@@ -104,15 +105,60 @@ PRINT_PLIST_AWK+= { gsub(/python${PY_VER_SUFFIX}/, \
TEST_TARGET= test
INSTALL_TARGET= altinstall
-REPLACE_INTERPRETER+= py36
-REPLACE.py36.old= .*python[^ ]*
-REPLACE.py36.new= ${PREFIX}/bin/python${PY_VER_SUFFIX}
-REPLACE_FILES.py36= Lib/*.py Lib/*/*.py Lib/*/*/*.py Lib/*/*/*/*.py
+REPLACE_INTERPRETER+= python
+REPLACE.python.old= .*python[^ ]*
+REPLACE.python.new= ${PREFIX}/bin/python${PY_VER_SUFFIX}
+REPLACE_FILES.python= Lib/base64.py
+REPLACE_FILES.python+= Lib/cProfile.py
+REPLACE_FILES.python+= Lib/cgi.py
+REPLACE_FILES.python+= Lib/encodings/rot_13.py
+REPLACE_FILES.python+= Lib/idlelib/pyshell.py
+REPLACE_FILES.python+= Lib/keyword.py
+REPLACE_FILES.python+= Lib/lib2to3/pgen2/token.py
+REPLACE_FILES.python+= Lib/lib2to3/tests/data/different_encoding.py
+REPLACE_FILES.python+= Lib/lib2to3/tests/data/false_encoding.py
+REPLACE_FILES.python+= Lib/lib2to3/tests/pytree_idempotency.py
+REPLACE_FILES.python+= Lib/pdb.py
+REPLACE_FILES.python+= Lib/platform.py
+REPLACE_FILES.python+= Lib/profile.py
+REPLACE_FILES.python+= Lib/pydoc.py
+REPLACE_FILES.python+= Lib/quopri.py
+REPLACE_FILES.python+= Lib/smtpd.py
+REPLACE_FILES.python+= Lib/smtplib.py
+REPLACE_FILES.python+= Lib/symbol.py
+REPLACE_FILES.python+= Lib/tabnanny.py
+REPLACE_FILES.python+= Lib/tarfile.py
+REPLACE_FILES.python+= Lib/test/bisect.py
+REPLACE_FILES.python+= Lib/test/crashers/recursive_call.py
+REPLACE_FILES.python+= Lib/test/curses_tests.py
+REPLACE_FILES.python+= Lib/test/pystone.py
+REPLACE_FILES.python+= Lib/test/re_tests.py
+REPLACE_FILES.python+= Lib/test/regrtest.py
+REPLACE_FILES.python+= Lib/timeit.py
+REPLACE_FILES.python+= Lib/trace.py
+REPLACE_FILES.python+= Lib/turtledemo/__main__.py
+REPLACE_FILES.python+= Lib/turtledemo/bytedesign.py
+REPLACE_FILES.python+= Lib/turtledemo/clock.py
+REPLACE_FILES.python+= Lib/turtledemo/forest.py
+REPLACE_FILES.python+= Lib/turtledemo/fractalcurves.py
+REPLACE_FILES.python+= Lib/turtledemo/lindenmayer.py
+REPLACE_FILES.python+= Lib/turtledemo/minimal_hanoi.py
+REPLACE_FILES.python+= Lib/turtledemo/paint.py
+REPLACE_FILES.python+= Lib/turtledemo/peace.py
+REPLACE_FILES.python+= Lib/turtledemo/penrose.py
+REPLACE_FILES.python+= Lib/turtledemo/planet_and_moon.py
+REPLACE_FILES.python+= Lib/turtledemo/sorting_animate.py
+REPLACE_FILES.python+= Lib/turtledemo/tree.py
+REPLACE_FILES.python+= Lib/turtledemo/yinyang.py
+REPLACE_FILES.python+= Lib/uu.py
+REPLACE_FILES.python+= Lib/webbrowser.py
SUBST_CLASSES+= findlib
SUBST_MESSAGE.findlib= Fixing find_library_file on Darwin.
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
@@ -120,18 +166,12 @@ SUBST_SED.findlib= -e 's,/usr/local,${PREFIX},'
# >>> from ctypes.util import find_library
# >>> find_library("m")
# 'libm.so.0'
-# >>> find_library("crypto")
-# 'libcrypto.so.11'
-# >>> find_library("GL")
-# 'libGL.so.2'
-# >>> find_library("curl")
-# 'libcurl.so.4'
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.pfindlib= -e "s!\('-Wl,-t', \)!'${COMPILER_RPATH_FLAG}${PREFIX}/lib', '-L${PREFIX}/lib', \1!"
.include "options.mk"
diff --git a/lang/python36/PLIST.Linux b/lang/python36/PLIST.Linux
index 531748d7bdb..a63bc9c9e3f 100644
--- a/lang/python36/PLIST.Linux
+++ b/lang/python36/PLIST.Linux
@@ -1,2 +1,3 @@
-@comment $NetBSD: PLIST.Linux,v 1.2 2017/01/19 11:15:52 leot Exp $
+@comment $NetBSD: PLIST.Linux,v 1.3 2018/06/17 19:21:22 adam Exp $
lib/python${PY_VER_SUFFIX}/lib-dynload/ossaudiodev.so
+lib/python${PY_VER_SUFFIX}/lib-dynload/spwd.so
diff --git a/lang/python36/distinfo b/lang/python36/distinfo
index 0253f21c284..e3513f934bf 100644
--- a/lang/python36/distinfo
+++ b/lang/python36/distinfo
@@ -1,10 +1,11 @@
-$NetBSD: distinfo,v 1.19 2018/06/02 23:31:48 youri Exp $
+$NetBSD: distinfo,v 1.20 2018/06/17 19:21:22 adam Exp $
SHA1 (Python-3.6.5.tar.xz) = 5a7a833a36f1006257d298787f4c38493c5d1689
RMD160 (Python-3.6.5.tar.xz) = 213ced5e09552468b1efc855727b743a3ab30e8b
SHA512 (Python-3.6.5.tar.xz) = 6b26fcd296b9bd8e67861eff10d14db7507711ddba947288d16d6def53135c39326b7f969c04bb2b2993f924d9e7ad3f5c5282a3915760bc0885cf0a8ea5eb51
Size (Python-3.6.5.tar.xz) = 17049912 bytes
-SHA1 (patch-Lib_distutils_command_install.py) = 6fc6f5d918b7581fc62cd0fe55857ee932c3a341
+SHA1 (patch-Lib_ctypes_util.py) = 9f8b674e06eea11e723a34c8af762436a5e3f52e
+SHA1 (patch-Lib_distutils_command_install.py) = 29204f34296f36ab2b21c745f915ba73caf2b71c
SHA1 (patch-Lib_distutils_sysconfig.py) = 6822eafb4dfded86d7f7353831816aeb8119e6cf
SHA1 (patch-Lib_distutils_unixccompiler.py) = e7aa684fa186de7a01486c3d8bfa177afdd22ef9
SHA1 (patch-Lib_sysconfig.py) = a4f009ed73ebbd9d9c4bf7e12b7981182ed8fd7c
@@ -16,4 +17,4 @@ SHA1 (patch-Modules_socketmodule.h) = 13a3290eb72078067060d3e71b7baa08f3eb591c
SHA1 (patch-Python_thread__pthread.h) = fb81eaa604b4ed7c1b64c3f4731d58a8aee257be
SHA1 (patch-configure) = ab2fb05bb25ba11baecfeb58918f436d3717b2ae
SHA1 (patch-pyconfig.h.in) = 58e2c03489f9b6e4d88f144d8c09773f92eacd61
-SHA1 (patch-setup.py) = 95d4b411b81e18635556af6c8c4e7af6a8a2a14c
+SHA1 (patch-setup.py) = 56851b30c8a1538012e7c78e7d33af25da5f7db4
diff --git a/lang/python36/patches/patch-Lib_ctypes_util.py b/lang/python36/patches/patch-Lib_ctypes_util.py
new file mode 100644
index 00000000000..da7b0d54c8b
--- /dev/null
+++ b/lang/python36/patches/patch-Lib_ctypes_util.py
@@ -0,0 +1,16 @@
+$NetBSD: patch-Lib_ctypes_util.py,v 1.1 2018/06/17 19:21:22 adam Exp $
+
+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
+@@ -278,7 +278,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(':'):
diff --git a/lang/python36/patches/patch-Lib_distutils_command_install.py b/lang/python36/patches/patch-Lib_distutils_command_install.py
index fa19a7d2c9a..633f8baaba5 100644
--- a/lang/python36/patches/patch-Lib_distutils_command_install.py
+++ b/lang/python36/patches/patch-Lib_distutils_command_install.py
@@ -1,4 +1,6 @@
-$NetBSD: patch-Lib_distutils_command_install.py,v 1.1 2017/01/01 14:34:27 adam Exp $
+$NetBSD: patch-Lib_distutils_command_install.py,v 1.2 2018/06/17 19:21:22 adam Exp $
+
+Conditionally install Python eggs.
--- Lib/distutils/command/install.py.orig 2016-12-23 02:21:19.000000000 +0000
+++ Lib/distutils/command/install.py
diff --git a/lang/python36/patches/patch-setup.py b/lang/python36/patches/patch-setup.py
index 3208feb38c7..a4470fbd785 100644
--- a/lang/python36/patches/patch-setup.py
+++ b/lang/python36/patches/patch-setup.py
@@ -1,28 +1,31 @@
-$NetBSD: patch-setup.py,v 1.4 2017/12/19 09:37:14 adam Exp $
+$NetBSD: patch-setup.py,v 1.5 2018/06/17 19:21:22 adam Exp $
-Disable modules, so they can be built as separate packages.
+Disable certain modules, so they can be built as separate packages.
+Do not look for ncursesw.
+Assume panel_library is correct; this is a fix for ncurses' gnupanel
+ which will get transformed to panel in buildlink.
---- setup.py.orig 2017-12-19 04:53:56.000000000 +0000
+--- setup.py.orig 2018-03-28 09:19:31.000000000 +0000
+++ setup.py
-@@ -8,6 +8,7 @@ import importlib.util
+@@ -7,7 +7,7 @@ import importlib._bootstrap
+ import importlib.util
import sysconfig
- from distutils import log
-+from distutils import text_file
+-from distutils import log
++from distutils import log, text_file
from distutils.errors import *
from distutils.core import Extension, setup
from distutils.command.build_ext import build_ext
-@@ -43,7 +44,8 @@ host_platform = get_platform()
+@@ -43,7 +43,7 @@ host_platform = get_platform()
COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
# This global variable is used to hold the list of modules to be disabled.
-disabled_module_list = []
-+disabled_module_list = ["_curses", "_curses_panel", "_elementtree",
-+"_sqlite3", "_tkinter", "_gdbm", "pyexpat", "readline", "spwd", "xxlimited"]
++disabled_module_list = ["_curses", "_curses_panel", "_elementtree", "_gdbm", "pyexpat", "readline", "_sqlite3", "_tkinter", "xxlimited"]
def add_dir_to_list(dirlist, dir):
"""Add the directory 'dir' to the list 'dirlist' (after any relative
-@@ -512,15 +514,15 @@ class PyBuildExt(build_ext):
+@@ -512,15 +512,15 @@ class PyBuildExt(build_ext):
return ['m']
def detect_modules(self):
@@ -47,7 +50,16 @@ Disable modules, so they can be built as separate packages.
self.add_multiarch_paths()
# Add paths specified in the environment variables LDFLAGS and
-@@ -842,8 +844,7 @@ class PyBuildExt(build_ext):
+@@ -776,8 +776,6 @@ class PyBuildExt(build_ext):
+ # use the same library for the readline and curses modules.
+ if 'curses' in readline_termcap_library:
+ curses_library = readline_termcap_library
+- elif self.compiler.find_library_file(lib_dirs, 'ncursesw'):
+- curses_library = 'ncursesw'
+ elif self.compiler.find_library_file(lib_dirs, 'ncurses'):
+ curses_library = 'ncurses'
+ elif self.compiler.find_library_file(lib_dirs, 'curses'):
+@@ -842,8 +840,7 @@ class PyBuildExt(build_ext):
depends = ['socketmodule.h']) )
# Detect SSL support for the socket module (via _ssl)
search_for_ssl_incs_in = [
@@ -57,7 +69,7 @@ Disable modules, so they can be built as separate packages.
]
ssl_incs = find_file('openssl/ssl.h', inc_dirs,
search_for_ssl_incs_in
-@@ -854,9 +855,7 @@ class PyBuildExt(build_ext):
+@@ -854,9 +851,7 @@ class PyBuildExt(build_ext):
if krb5_h:
ssl_incs += krb5_h
ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
@@ -68,7 +80,7 @@ Disable modules, so they can be built as separate packages.
if (ssl_incs is not None and
ssl_libs is not None):
-@@ -875,7 +874,7 @@ class PyBuildExt(build_ext):
+@@ -875,7 +870,7 @@ class PyBuildExt(build_ext):
# look for the openssl version header on the compiler search path.
opensslv_h = find_file('openssl/opensslv.h', [],
@@ -77,7 +89,7 @@ Disable modules, so they can be built as separate packages.
if opensslv_h:
name = os.path.join(opensslv_h[0], 'openssl/opensslv.h')
if host_platform == 'darwin' and is_macosx_sdk_path(name):
-@@ -1275,6 +1274,30 @@ class PyBuildExt(build_ext):
+@@ -1275,6 +1270,30 @@ class PyBuildExt(build_ext):
dbm_order = ['gdbm']
# The standard Unix dbm module:
if host_platform not in ['cygwin']:
@@ -108,7 +120,7 @@ Disable modules, so they can be built as separate packages.
config_args = [arg.strip("'")
for arg in sysconfig.get_config_var("CONFIG_ARGS").split()]
dbm_args = [arg for arg in config_args
-@@ -1286,7 +1309,7 @@ class PyBuildExt(build_ext):
+@@ -1286,7 +1305,7 @@ class PyBuildExt(build_ext):
dbmext = None
for cand in dbm_order:
if cand == "ndbm":
@@ -117,7 +129,17 @@ Disable modules, so they can be built as separate packages.
# Some systems have -lndbm, others have -lgdbm_compat,
# others don't have either
if self.compiler.find_library_file(lib_dirs,
-@@ -2105,10 +2128,7 @@ class PyBuildExt(build_ext):
+@@ -1418,8 +1437,7 @@ class PyBuildExt(build_ext):
+ missing.append('_curses')
+
+ # If the curses module is enabled, check for the panel module
+- if (module_enabled(exts, '_curses') and
+- self.compiler.find_library_file(lib_dirs, panel_library)):
++ if (module_enabled(exts, '_curses')):
+ exts.append( Extension('_curses_panel', ['_curses_panel.c'],
+ include_dirs=curses_includes,
+ define_macros=curses_defines,
+@@ -2103,10 +2121,7 @@ class PyBuildExt(build_ext):
depends = ['_decimal/docstrings.h']
else:
srcdir = sysconfig.get_config_var('srcdir')
@@ -129,7 +151,7 @@ Disable modules, so they can be built as separate packages.
libraries = self.detect_math_libs()
sources = [
'_decimal/_decimal.c',
-@@ -2345,7 +2365,7 @@ def main():
+@@ -2389,7 +2404,7 @@ def main():
# If you change the scripts installed here, you also need to
# check the PyBuildScripts command above, and change the links
# created by the bininstall target in Makefile.pre.in