Date: Sun, 1 Dec 2013 12:25:37 +0000 (UTC) From: Kubilay Kocak <koobs@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r335376 - in head/lang: python31 python31/files python32 python32/files Message-ID: <201312011225.rB1CPbCm026752@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: koobs Date: Sun Dec 1 12:25:37 2013 New Revision: 335376 URL: http://svnweb.freebsd.org/changeset/ports/335376 Log: Fix OSS Audio and enable FreeBSD 11 support in Python 3.2 and 3.1 - Add the appropriate Python platform (plat-*) files for FreeBSD 11 - Update pkg-plist Backport a upstream change [1] removing OS major version from the check to enable the OSS Audio module in setup.py: Issue #12326: don't test the major version of sys.platform Use startswith, instead of ==, when testing sys.platform to support new platforms like Linux 3 or OpenBSD 5. [2] [1] http://hg.python.org/cpython/rev/50f1922bc1d5 [2] http://bugs.python.org/issue12326 Modified: head/lang/python31/Makefile head/lang/python31/files/patch-setup.py (contents, props changed) head/lang/python31/pkg-plist head/lang/python32/Makefile head/lang/python32/files/patch-setup.py head/lang/python32/pkg-plist Modified: head/lang/python31/Makefile ============================================================================== --- head/lang/python31/Makefile Sun Dec 1 11:56:09 2013 (r335375) +++ head/lang/python31/Makefile Sun Dec 1 12:25:37 2013 (r335376) @@ -2,7 +2,7 @@ PORTNAME= python31 PORTVERSION= 3.1.5 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= lang python ipv6 MASTER_SITES= PYTHON MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR} @@ -49,7 +49,7 @@ DATADIR= ${PREFIX}/share/${PYTHON_VERSIO PLATFORMS= plat-freebsd4 plat-freebsd5 plat-freebsd6 \ plat-freebsd7 plat-freebsd8 plat-freebsd9 \ - plat-freebsd10 + plat-freebsd10 plat-freebsd11 BIN_SCRIPTS= 2to3 idle3 pydoc3 BIN_FILES= python python-shared python-config python-shared-config \ @@ -123,6 +123,8 @@ pre-patch: ${PATCH_WRKSRC}/Lib/plat-freebsd9 ${CP} -r ${PATCH_WRKSRC}/Lib/plat-freebsd8 \ ${PATCH_WRKSRC}/Lib/plat-freebsd10 + ${CP} -r ${PATCH_WRKSRC}/Lib/plat-freebsd8 \ + ${PATCH_WRKSRC}/Lib/plat-freebsd11 ${MKDIR} ${WRKSRC} ${SHARED_WRKSRC}/Modules .for script in ${BIN_SCRIPTS} ${SED} -e '1s,^.*$$,#!${PREFIX}/bin/${PYTHON_VERSION},' \ Modified: head/lang/python31/files/patch-setup.py ============================================================================== --- head/lang/python31/files/patch-setup.py Sun Dec 1 11:56:09 2013 (r335375) +++ head/lang/python31/files/patch-setup.py Sun Dec 1 12:25:37 2013 (r335376) @@ -1,5 +1,5 @@ ---- setup.py.orig 2010-11-26 19:56:26.000000000 +0800 -+++ setup.py 2010-12-14 10:53:36.000000000 +0800 +--- ./setup.py.orig 2012-04-10 09:25:37.000000000 +1000 ++++ ./setup.py 2013-12-01 21:05:04.742891449 +1100 @@ -17,7 +17,7 @@ from distutils.spawn import find_executable @@ -9,7 +9,7 @@ def add_dir_to_list(dirlist, dir): """Add the directory 'dir' to the list 'dirlist' (at the front) if -@@ -578,7 +578,7 @@ +@@ -601,7 +601,7 @@ # curses_library = readline_termcap_library # elif self.compiler.find_library_file(lib_dirs, 'ncursesw'): # (...) @@ -18,7 +18,7 @@ curses_library = 'ncursesw' elif self.compiler.find_library_file(lib_dirs, 'ncurses'): curses_library = 'ncurses' -@@ -614,7 +614,7 @@ +@@ -637,7 +637,7 @@ 'termcap'): readline_libs.append('termcap') exts.append( Extension('readline', ['readline.c'], @@ -27,7 +27,7 @@ extra_link_args=readline_extra_link_args, libraries=readline_libs) ) else: -@@ -708,6 +708,8 @@ +@@ -731,6 +731,8 @@ # OpenSSL doesn't do these until 0.9.8 so we'll bring our own hash exts.append( Extension('_sha256', ['sha256module.c']) ) exts.append( Extension('_sha512', ['sha512module.c']) ) @@ -36,7 +36,7 @@ if openssl_ver < 0x00907000: # no openssl at all, use our own md5 and sha1 -@@ -1116,12 +1118,13 @@ +@@ -1139,12 +1141,13 @@ # provided by the ncurses library. panel_library = 'panel' if curses_library.startswith('ncurses'): @@ -51,7 +51,7 @@ libraries = curses_libs) ) elif curses_library == 'curses' and platform != 'darwin': # OSX has an old Berkeley curses, not good enough for -@@ -1142,6 +1145,7 @@ +@@ -1165,6 +1168,7 @@ if (module_enabled(exts, '_curses') and self.compiler.find_library_file(lib_dirs, panel_library)): exts.append( Extension('_curses_panel', ['_curses_panel.c'], @@ -59,7 +59,7 @@ libraries = [panel_library] + curses_libs) ) else: missing.append('_curses_panel') -@@ -1278,7 +1282,7 @@ +@@ -1301,7 +1305,7 @@ macros = dict() libraries = [] @@ -68,17 +68,22 @@ # FreeBSD's P1003.1b semaphore support is very experimental # and has many known problems. (as of June 2008) macros = dict() -@@ -1321,8 +1325,7 @@ +@@ -1344,8 +1348,12 @@ # End multiprocessing # Platform-specific libraries - if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6', - 'freebsd7', 'freebsd8'): -+ if platform in ('linux2', 'freebsd6', 'freebsd7', 'freebsd8', 'freebsd9', 'freebsd10'): ++ ############################# ++ # Backport Commit: http://hg.python.org/cpython/rev/50f1922bc1d5 ++ # Backport Issue: http://bugs.python.org/issue12326 ++ ############################# ++ if any(platform.startswith(prefix) ++ for prefix in ("linux", "freebsd", "gnukfreebsd")): exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) ) else: missing.append('ossaudiodev') -@@ -1808,8 +1811,7 @@ +@@ -1831,8 +1839,7 @@ # called unless there's at least one extension module defined. ext_modules=[Extension('_struct', ['_struct.c'])], Modified: head/lang/python31/pkg-plist ============================================================================== --- head/lang/python31/pkg-plist Sun Dec 1 11:56:09 2013 (r335375) +++ head/lang/python31/pkg-plist Sun Dec 1 12:25:37 2013 (r335376) @@ -894,6 +894,8 @@ libdata/pkgconfig/python-3.1.pc %%PYTHON_LIBDIR%%/plat-freebsd9/regen %%PYTHON_LIBDIR%%/plat-freebsd10/IN.py %%PYTHON_LIBDIR%%/plat-freebsd10/regen +%%PYTHON_LIBDIR%%/plat-freebsd11/IN.py +%%PYTHON_LIBDIR%%/plat-freebsd11/regen %%PYTHON_LIBDIR%%/platform.py %%PYTHON_LIBDIR%%/plistlib.py %%PYTHON_LIBDIR%%/poplib.py @@ -2210,6 +2212,7 @@ libdata/pkgconfig/python-3.1.pc @dirrm %%PYTHON_LIBDIR%%/sqlite3 @dirrm %%PYTHON_LIBDIR%%/site-packages @dirrm %%PYTHON_LIBDIR%%/pydoc_data +@dirrm %%PYTHON_LIBDIR%%/plat-freebsd11 @dirrm %%PYTHON_LIBDIR%%/plat-freebsd10 @dirrm %%PYTHON_LIBDIR%%/plat-freebsd9 @dirrm %%PYTHON_LIBDIR%%/plat-freebsd8 Modified: head/lang/python32/Makefile ============================================================================== --- head/lang/python32/Makefile Sun Dec 1 11:56:09 2013 (r335375) +++ head/lang/python32/Makefile Sun Dec 1 12:25:37 2013 (r335376) @@ -2,7 +2,7 @@ PORTNAME= python32 PORTVERSION= 3.2.5 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= lang python ipv6 MASTER_SITES= PYTHON MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR} @@ -44,7 +44,7 @@ DATADIR= ${PREFIX}/share/${PYTHON_VERSIO PLATFORMS= plat-freebsd4 plat-freebsd5 plat-freebsd6 \ plat-freebsd7 plat-freebsd8 plat-freebsd9 \ - plat-freebsd10 + plat-freebsd10 plat-freebsd11 BIN_SCRIPTS= 2to3 idle3 pydoc3 BIN_FILES= python python-shared python-config python-shared-config \ @@ -121,6 +121,8 @@ pre-patch: ${PATCH_WRKSRC}/Lib/plat-freebsd9 ${CP} -r ${PATCH_WRKSRC}/Lib/plat-freebsd8 \ ${PATCH_WRKSRC}/Lib/plat-freebsd10 + ${CP} -r ${PATCH_WRKSRC}/Lib/plat-freebsd8 \ + ${PATCH_WRKSRC}/Lib/plat-freebsd11 ${MKDIR} ${WRKSRC} ${SHARED_WRKSRC}/Modules .for script in ${BIN_SCRIPTS} ${SED} -e '1s,^.*$$,#!${PREFIX}/bin/${PYTHON_VERSION},' \ Modified: head/lang/python32/files/patch-setup.py ============================================================================== --- head/lang/python32/files/patch-setup.py Sun Dec 1 11:56:09 2013 (r335375) +++ head/lang/python32/files/patch-setup.py Sun Dec 1 12:25:37 2013 (r335376) @@ -1,5 +1,5 @@ ---- setup.py.orig 2013-05-16 02:33:58.000000000 +1000 -+++ setup.py 2013-09-08 02:31:44.216199627 +1000 +--- ./setup.py.orig 2013-05-16 02:33:58.000000000 +1000 ++++ ./setup.py 2013-12-01 21:08:17.425989640 +1100 @@ -21,7 +21,7 @@ COMPILED_WITH_PYDEBUG = hasattr(sys, 'gettotalrefcount') @@ -70,17 +70,23 @@ # FreeBSD's P1003.1b semaphore support is very experimental # and has many known problems. (as of June 2008) macros = dict() -@@ -1416,8 +1418,7 @@ +@@ -1416,9 +1418,12 @@ # End multiprocessing # Platform-specific libraries - if (platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6', - 'freebsd7', 'freebsd8') -+ if (platform in ('freebsd7', 'freebsd8', 'freebsd9', 'freebsd10') - or platform.startswith("gnukfreebsd")): +- or platform.startswith("gnukfreebsd")): ++ ############################# ++ # Backport Commit: http://hg.python.org/cpython/rev/50f1922bc1d5 ++ # Backport Issue: http://bugs.python.org/issue12326 ++ ############################# ++ if any(platform.startswith(prefix) ++ for prefix in ("linux", "freebsd", "gnukfreebsd")): exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) ) else: -@@ -1935,8 +1936,7 @@ + missing.append('ossaudiodev') +@@ -1935,8 +1940,7 @@ # 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 Modified: head/lang/python32/pkg-plist ============================================================================== --- head/lang/python32/pkg-plist Sun Dec 1 11:56:09 2013 (r335375) +++ head/lang/python32/pkg-plist Sun Dec 1 12:25:37 2013 (r335376) @@ -2286,6 +2286,10 @@ libdata/pkgconfig/python-3.2.pc %%PYTHON_LIBDIR%%/plat-freebsd10/__pycache__/IN.cpython-32.pyc %%PYTHON_LIBDIR%%/plat-freebsd10/__pycache__/IN.cpython-32.pyo %%PYTHON_LIBDIR%%/plat-freebsd10/regen +%%PYTHON_LIBDIR%%/plat-freebsd11/IN.py +%%PYTHON_LIBDIR%%/plat-freebsd11/__pycache__/IN.cpython-32.pyc +%%PYTHON_LIBDIR%%/plat-freebsd11/__pycache__/IN.cpython-32.pyo +%%PYTHON_LIBDIR%%/plat-freebsd11/regen %%PYTHON_LIBDIR%%/platform.py %%PYTHON_LIBDIR%%/plistlib.py %%PYTHON_LIBDIR%%/poplib.py @@ -4357,6 +4361,8 @@ libdata/pkgconfig/python-3.2.pc @dirrm %%PYTHON_LIBDIR%%/plat-freebsd9 @dirrm %%PYTHON_LIBDIR%%/plat-freebsd10/__pycache__ @dirrm %%PYTHON_LIBDIR%%/plat-freebsd10 +@dirrm %%PYTHON_LIBDIR%%/plat-freebsd11/__pycache__ +@dirrm %%PYTHON_LIBDIR%%/plat-freebsd11 @dirrm %%PYTHON_LIBDIR%%/pydoc_data/__pycache__ @dirrm %%PYTHON_LIBDIR%%/pydoc_data @dirrm %%PYTHON_LIBDIR%%/site-packages
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312011225.rB1CPbCm026752>