Cleaned Makefile.inc and update Python 3.2 -> 3.2.1.

Permit to build on OpenBSD 5.x.
Added patches to permit "make regress" without block (to be improved).

Keep it unhooked.
This commit is contained in:
rpointel 2011-07-20 12:06:57 +00:00
parent 775722bd17
commit a4bb35be59
10 changed files with 154 additions and 39 deletions

View File

@ -1,7 +1,7 @@
# $OpenBSD: Makefile,v 1.2 2011/06/29 11:58:31 rpointel Exp $
# $OpenBSD: Makefile,v 1.3 2011/07/20 12:06:57 rpointel Exp $
VERSION = 3.2
#PATCHLEVEL = .1
PATCHLEVEL = .1
SHARED_LIBS = python3.2m 1.0
AUTOCONF_VERSION = 2.68

View File

@ -1,5 +1,5 @@
MD5 (Python-3.2.tgz) = Xv6Dinh4sXD2co1+XXUXrw==
RMD160 (Python-3.2.tgz) = ZjNunO0jujmUACcImlYYVsdxKIA=
SHA1 (Python-3.2.tgz) = LAhGV4anDYz5vTKctrC0Sduo+N0=
SHA256 (Python-3.2.tgz) = J7Nb/LvwHelWTAJl1ytYuj/z1W3wYVdlNy8qoJ3CDak=
SIZE (Python-3.2.tgz) = 12673043
MD5 (Python-3.2.1.tgz) = bCqjSBytt733TmJf/8NSsg==
RMD160 (Python-3.2.1.tgz) = XLNNNndcMqYdrh06Uva+JTk/c0c=
SHA1 (Python-3.2.1.tgz) = AA/2XbmC+8ZPqVonN6f6Eoc+yTE=
SHA256 (Python-3.2.1.tgz) = fP8p2YRpbZ/ox76lTaW5rTas7zP/XPDT435NEvshxXI=
SIZE (Python-3.2.1.tgz) = 12713430

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-Lib_test_test_capi_py,v 1.1 2011/07/20 12:06:57 rpointel Exp $
--- Lib/test/test_capi.py.orig Sat Jul 9 08:58:50 2011
+++ Lib/test/test_capi.py Mon Jul 11 15:15:28 2011
@@ -91,6 +91,7 @@
if False and support.verbose:
print("(%i)"%(len(l),))
+ @unittest.skipIf(sys.platform.startswith("openbsd"), "blocking on OpenBSD")
def test_pendingcalls_threaded(self):
#do every callback on a separate thread

View File

@ -0,0 +1,44 @@
$OpenBSD: patch-Lib_test_test_io_py,v 1.1 2011/07/20 12:06:57 rpointel Exp $
--- Lib/test/test_io.py.orig Sat Jul 9 08:58:50 2011
+++ Lib/test/test_io.py Mon Jul 11 14:13:36 2011
@@ -2694,12 +2694,15 @@
if e.errno != errno.EBADF:
raise
+ @unittest.skipIf(sys.platform.startswith("openbsd"), "blocking on OpenBSD")
def test_interrupted_write_unbuffered(self):
self.check_interrupted_write(b"xy", b"xy", mode="wb", buffering=0)
+ @unittest.skipIf(sys.platform.startswith("openbsd"), "blocking on OpenBSD")
def test_interrupted_write_buffered(self):
self.check_interrupted_write(b"xy", b"xy", mode="wb")
+ @unittest.skipIf(sys.platform.startswith("openbsd"), "blocking on OpenBSD")
def test_interrupted_write_text(self):
self.check_interrupted_write("xy", b"xy", mode="w", encoding="ascii")
@@ -2758,10 +2761,12 @@
os.close(w)
os.close(r)
+ @unittest.skipIf(sys.platform.startswith("openbsd"), "blocking on OpenBSD")
def test_interrupterd_read_retry_buffered(self):
self.check_interrupted_read_retry(lambda x: x.decode('latin1'),
mode="rb")
+ @unittest.skipIf(sys.platform.startswith("openbsd"), "blocking on OpenBSD")
def test_interrupterd_read_retry_text(self):
self.check_interrupted_read_retry(lambda x: x,
mode="r")
@@ -2821,9 +2826,11 @@
if e.errno != errno.EBADF:
raise
+ @unittest.skipIf(sys.platform.startswith("openbsd"), "blocking on OpenBSD")
def test_interrupterd_write_retry_buffered(self):
self.check_interrupted_write_retry(b"x", mode="wb")
+ @unittest.skipIf(sys.platform.startswith("openbsd"), "blocking on OpenBSD")
def test_interrupterd_write_retry_text(self):
self.check_interrupted_write_retry("x", mode="w", encoding="latin1")

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-Lib_test_test_socket_py,v 1.1 2011/07/20 12:06:57 rpointel Exp $
--- Lib/test/test_socket.py.orig Wed Jan 5 22:03:42 2011
+++ Lib/test/test_socket.py Wed Jun 29 15:00:12 2011
@@ -715,6 +715,7 @@
c.close()
s.close()
+ @unittest.skipIf(sys.platform.startswith("openbsd"), "blocking on OpenBSD")
def test_sendall_interrupted(self):
self.check_sendall_interrupted(False)

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-Lib_test_test_subprocess_py,v 1.1 2011/07/20 12:06:57 rpointel Exp $
--- Lib/test/test_subprocess.py.orig Mon Jan 3 23:24:52 2011
+++ Lib/test/test_subprocess.py Wed Jun 29 15:36:22 2011
@@ -1189,6 +1189,7 @@
close_fds=False, pass_fds=(fd, )))
self.assertIn('overriding close_fds', str(context.warning))
+ @unittest.skipIf(sys.platform.startswith("openbsd"), "blocking on OpenBSD")
def test_wait_when_sigchild_ignored(self):
# NOTE: sigchild_ignore.py may not be an effective test on all OSes.
sigchild_ignore = support.findfile("sigchild_ignore.py",

View File

@ -1,7 +1,16 @@
$OpenBSD: patch-configure_in,v 1.1.1.1 2011/06/27 18:44:13 rpointel Exp $
--- configure.in.orig Sat Feb 19 09:58:23 2011
+++ configure.in Mon Jun 27 08:09:44 2011
@@ -743,7 +743,7 @@
$OpenBSD: patch-configure_in,v 1.2 2011/07/20 12:06:57 rpointel Exp $
--- configure.in.orig Sat Jul 9 08:58:56 2011
+++ configure.in Wed Jul 20 10:19:37 2011
@@ -320,7 +320,7 @@
# As this has a different meaning on Linux, only define it on OpenBSD
AC_DEFINE(_BSD_SOURCE, 1, [Define on OpenBSD to activate all library features])
;;
- OpenBSD/4.@<:@789@:>@)
+ OpenBSD/4.@<:@789@:>@ | OpenBSD/5.*)
# OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
# also defined. This can be overridden by defining _BSD_SOURCE
# As this has a different meaning on Linux, only define it on OpenBSD
@@ -755,7 +755,7 @@
PY3LIBRARY=libpython3.so
fi
;;
@ -10,7 +19,7 @@ $OpenBSD: patch-configure_in,v 1.1.1.1 2011/06/27 18:44:13 rpointel Exp $
LDLIBRARY='libpython$(LDVERSION).so'
BLDLIBRARY='-L. -lpython$(LDVERSION)'
RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
@@ -1730,7 +1730,7 @@
@@ -1772,7 +1772,7 @@
BSD/OS*/4*)
LDSHARED="gcc -shared"
LDCXXSHARED="g++ -shared";;
@ -19,7 +28,7 @@ $OpenBSD: patch-configure_in,v 1.1.1.1 2011/06/27 18:44:13 rpointel Exp $
if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
then
LDSHARED='$(CC) -shared'
@@ -1738,22 +1738,6 @@
@@ -1780,22 +1780,6 @@
else
LDSHARED="ld -Bshareable"
fi;;
@ -42,7 +51,7 @@ $OpenBSD: patch-configure_in,v 1.1.1.1 2011/06/27 18:44:13 rpointel Exp $
NetBSD*|DragonFly*)
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared';;
@@ -1903,9 +1887,14 @@
@@ -1945,9 +1929,14 @@
# only check for sem_init if thread support is requested
if test "$with_threads" = "yes" -o -z "$with_threads"; then

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-main,v 1.2 2011/06/28 09:29:28 jasper Exp $
@comment $OpenBSD: PLIST-main,v 1.3 2011/07/20 12:06:57 rpointel Exp $
@comment bin/2to3
bin/2to3-3.2
@comment bin/pydoc3
@ -1005,6 +1005,7 @@ lib/python3.2/distutils/tests/test_upload.py
lib/python3.2/distutils/tests/test_util.py
lib/python3.2/distutils/tests/test_version.py
lib/python3.2/distutils/tests/test_versionpredicate.py
lib/python3.2/distutils/tests/xxmodule.c
lib/python3.2/distutils/text_file.py
lib/python3.2/distutils/unixccompiler.py
lib/python3.2/distutils/util.py
@ -1724,7 +1725,7 @@ lib/python3.2/json/scanner.py
lib/python3.2/json/tool.py
lib/python3.2/keyword.py
lib/python3.2/lib-dynload/
lib/python3.2/lib-dynload/Python-3.2-py3.2.egg-info
lib/python3.2/lib-dynload/Python-3.2.1-py3.2.egg-info
lib/python3.2/lib-dynload/_bisect.so
lib/python3.2/lib-dynload/_codecs_cn.so
lib/python3.2/lib-dynload/_codecs_hk.so
@ -1779,9 +1780,9 @@ lib/python3.2/lib-dynload/xxlimited.so
lib/python3.2/lib-dynload/zlib.so
lib/python3.2/lib2to3/
lib/python3.2/lib2to3/Grammar.txt
lib/python3.2/lib2to3/Grammar3.2.0.final.0.pickle
lib/python3.2/lib2to3/Grammar3.2.1.final.0.pickle
lib/python3.2/lib2to3/PatternGrammar.txt
lib/python3.2/lib2to3/PatternGrammar3.2.0.final.0.pickle
lib/python3.2/lib2to3/PatternGrammar3.2.1.final.0.pickle
lib/python3.2/lib2to3/__init__.py
lib/python3.2/lib2to3/__pycache__/
lib/python3.2/lib2to3/__pycache__/__init__.cpython-32.pyc
@ -2130,12 +2131,12 @@ lib/python3.2/pickle.py
lib/python3.2/pickletools.py
lib/python3.2/pipes.py
lib/python3.2/pkgutil.py
lib/python3.2/plat-openbsd4/
lib/python3.2/plat-openbsd4/IN.py
lib/python3.2/plat-openbsd4/__pycache__/
lib/python3.2/plat-openbsd4/__pycache__/IN.cpython-32.pyc
lib/python3.2/plat-openbsd4/__pycache__/IN.cpython-32.pyo
lib/python3.2/plat-openbsd4/regen
lib/python3.2/plat-openbsd5/
lib/python3.2/plat-openbsd5/IN.py
lib/python3.2/plat-openbsd5/__pycache__/
lib/python3.2/plat-openbsd5/__pycache__/IN.cpython-32.pyc
lib/python3.2/plat-openbsd5/__pycache__/IN.cpython-32.pyo
lib/python3.2/plat-openbsd5/regen
lib/python3.2/platform.py
lib/python3.2/plistlib.py
lib/python3.2/poplib.py

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-tests,v 1.1.1.1 2011/06/27 18:44:15 rpointel Exp $
@comment $OpenBSD: PLIST-tests,v 1.2 2011/07/20 12:06:57 rpointel Exp $
lib/python3.2/test/
lib/python3.2/test/185test.db
lib/python3.2/test/Sine-1000Hz-300ms.aif
@ -13,8 +13,6 @@ lib/python3.2/test/__pycache__/autotest.cpython-32.pyc
lib/python3.2/test/__pycache__/autotest.cpython-32.pyo
lib/python3.2/test/__pycache__/buffer_tests.cpython-32.pyc
lib/python3.2/test/__pycache__/buffer_tests.cpython-32.pyo
lib/python3.2/test/__pycache__/cjkencodings_test.cpython-32.pyc
lib/python3.2/test/__pycache__/cjkencodings_test.cpython-32.pyo
lib/python3.2/test/__pycache__/curses_tests.cpython-32.pyc
lib/python3.2/test/__pycache__/curses_tests.cpython-32.pyo
lib/python3.2/test/__pycache__/datetimetester.cpython-32.pyc
@ -163,6 +161,8 @@ lib/python3.2/test/__pycache__/test_codecencodings_cn.cpython-32.pyc
lib/python3.2/test/__pycache__/test_codecencodings_cn.cpython-32.pyo
lib/python3.2/test/__pycache__/test_codecencodings_hk.cpython-32.pyc
lib/python3.2/test/__pycache__/test_codecencodings_hk.cpython-32.pyo
lib/python3.2/test/__pycache__/test_codecencodings_iso2022.cpython-32.pyc
lib/python3.2/test/__pycache__/test_codecencodings_iso2022.cpython-32.pyo
lib/python3.2/test/__pycache__/test_codecencodings_jp.cpython-32.pyc
lib/python3.2/test/__pycache__/test_codecencodings_jp.cpython-32.pyo
lib/python3.2/test/__pycache__/test_codecencodings_kr.cpython-32.pyc
@ -445,6 +445,8 @@ lib/python3.2/test/__pycache__/test_module.cpython-32.pyc
lib/python3.2/test/__pycache__/test_module.cpython-32.pyo
lib/python3.2/test/__pycache__/test_modulefinder.cpython-32.pyc
lib/python3.2/test/__pycache__/test_modulefinder.cpython-32.pyo
lib/python3.2/test/__pycache__/test_msilib.cpython-32.pyc
lib/python3.2/test/__pycache__/test_msilib.cpython-32.pyo
lib/python3.2/test/__pycache__/test_multibytecodec.cpython-32.pyc
lib/python3.2/test/__pycache__/test_multibytecodec.cpython-32.pyo
lib/python3.2/test/__pycache__/test_multibytecodec_support.cpython-32.pyc
@ -681,6 +683,8 @@ lib/python3.2/test/__pycache__/test_threadsignals.cpython-32.pyc
lib/python3.2/test/__pycache__/test_threadsignals.cpython-32.pyo
lib/python3.2/test/__pycache__/test_time.cpython-32.pyc
lib/python3.2/test/__pycache__/test_time.cpython-32.pyo
lib/python3.2/test/__pycache__/test_timeit.cpython-32.pyc
lib/python3.2/test/__pycache__/test_timeit.cpython-32.pyo
lib/python3.2/test/__pycache__/test_timeout.cpython-32.pyc
lib/python3.2/test/__pycache__/test_timeout.cpython-32.pyo
lib/python3.2/test/__pycache__/test_tk.cpython-32.pyc
@ -817,7 +821,37 @@ lib/python3.2/test/cfgparser.1
lib/python3.2/test/cfgparser.2
lib/python3.2/test/cfgparser.3
lib/python3.2/test/check_soundcard.vbs
lib/python3.2/test/cjkencodings_test.py
lib/python3.2/test/cjkencodings/
lib/python3.2/test/cjkencodings/big5-utf8.txt
lib/python3.2/test/cjkencodings/big5.txt
lib/python3.2/test/cjkencodings/big5hkscs-utf8.txt
lib/python3.2/test/cjkencodings/big5hkscs.txt
lib/python3.2/test/cjkencodings/cp949-utf8.txt
lib/python3.2/test/cjkencodings/cp949.txt
lib/python3.2/test/cjkencodings/euc_jisx0213-utf8.txt
lib/python3.2/test/cjkencodings/euc_jisx0213.txt
lib/python3.2/test/cjkencodings/euc_jp-utf8.txt
lib/python3.2/test/cjkencodings/euc_jp.txt
lib/python3.2/test/cjkencodings/euc_kr-utf8.txt
lib/python3.2/test/cjkencodings/euc_kr.txt
lib/python3.2/test/cjkencodings/gb18030-utf8.txt
lib/python3.2/test/cjkencodings/gb18030.txt
lib/python3.2/test/cjkencodings/gb2312-utf8.txt
lib/python3.2/test/cjkencodings/gb2312.txt
lib/python3.2/test/cjkencodings/gbk-utf8.txt
lib/python3.2/test/cjkencodings/gbk.txt
lib/python3.2/test/cjkencodings/hz-utf8.txt
lib/python3.2/test/cjkencodings/hz.txt
lib/python3.2/test/cjkencodings/iso2022_jp-utf8.txt
lib/python3.2/test/cjkencodings/iso2022_jp.txt
lib/python3.2/test/cjkencodings/iso2022_kr-utf8.txt
lib/python3.2/test/cjkencodings/iso2022_kr.txt
lib/python3.2/test/cjkencodings/johab-utf8.txt
lib/python3.2/test/cjkencodings/johab.txt
lib/python3.2/test/cjkencodings/shift_jis-utf8.txt
lib/python3.2/test/cjkencodings/shift_jis.txt
lib/python3.2/test/cjkencodings/shift_jisx0213-utf8.txt
lib/python3.2/test/cjkencodings/shift_jisx0213.txt
lib/python3.2/test/cmath_testcases.txt
lib/python3.2/test/curses_tests.py
lib/python3.2/test/datetimetester.py
@ -1134,6 +1168,7 @@ lib/python3.2/test/test_code.py
lib/python3.2/test/test_codeccallbacks.py
lib/python3.2/test/test_codecencodings_cn.py
lib/python3.2/test/test_codecencodings_hk.py
lib/python3.2/test/test_codecencodings_iso2022.py
lib/python3.2/test/test_codecencodings_jp.py
lib/python3.2/test/test_codecencodings_kr.py
lib/python3.2/test/test_codecencodings_tw.py
@ -1280,6 +1315,7 @@ lib/python3.2/test/test_minidom.py
lib/python3.2/test/test_mmap.py
lib/python3.2/test/test_module.py
lib/python3.2/test/test_modulefinder.py
lib/python3.2/test/test_msilib.py
lib/python3.2/test/test_multibytecodec.py
lib/python3.2/test/test_multibytecodec_support.py
lib/python3.2/test/test_multiprocessing.py
@ -1398,6 +1434,7 @@ lib/python3.2/test/test_threading.py
lib/python3.2/test/test_threading_local.py
lib/python3.2/test/test_threadsignals.py
lib/python3.2/test/test_time.py
lib/python3.2/test/test_timeit.py
lib/python3.2/test/test_timeout.py
lib/python3.2/test/test_tk.py
lib/python3.2/test/test_tokenize.py

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile.inc,v 1.2 2011/06/29 11:58:31 rpointel Exp $
# $OpenBSD: Makefile.inc,v 1.3 2011/07/20 12:06:57 rpointel Exp $
# IMPORTANT! If you make any changes to the Python ports, be sure
# to also update files/CHANGES.OpenBSD for your change. This is a
@ -8,21 +8,17 @@
SHARED_ONLY= Yes
COMMENT-main= interpreted object-oriented programming language
#COMMENT-bsddb= Berkeley db module for Python
COMMENT-gdbm= GNU dbm module for Python
COMMENT-idle= IDE for Python
COMMENT-tests= Python test suite
COMMENT-tkinter=tk GUI module for Python
#COMMENT-tools= extra tools for Python
DISTNAME= Python-${VERSION}${PATCHLEVEL}
PKGNAME-main= python3-${VERSION}${PATCHLEVEL}
#PKGNAME-bsddb= python3-bsddb-${VERSION}${PATCHLEVEL}
PKGNAME-gdbm= python3-gdbm-${VERSION}${PATCHLEVEL}
PKGNAME-idle= python3-idle-${VERSION}${PATCHLEVEL}
PKGNAME-tests= python3-tests-${VERSION}${PATCHLEVEL}
PKGNAME-tkinter=python3-tkinter-${VERSION}${PATCHLEVEL}
#PKGNAME-tools= python3-tools-${VERSION}${PATCHLEVEL}
CATEGORIES= lang
MASTER_SITES= http://www.python.org/ftp/${PSUBDIR}/ \
http://python.mirrors.pair.com/pub/${PSUBDIR}/
@ -40,7 +36,6 @@ PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
#MULTI_PACKAGES= -main -tests -tools -gdbm -idle -tkinter -bsddb
MULTI_PACKAGES= -main -tests -gdbm -idle -tkinter
# Python 2.6 lists BSD db 4.6.x as unstable on most architectures (see
@ -58,14 +53,10 @@ LIB_DEPENDS-main = archivers/bzip2
RUN_DEPENDS-main =
WANTLIB-main = ssl panelw m crypto c util z readline pthread \
ncursesw stdc++ expat bz2 ffi
#.if ${VERSION} == "2.5" || ${VERSION} == "2.6" || ${VERSION} == "2.7"
LIB_DEPENDS-main += databases/sqlite3 \
devel/libffi
WANTLIB-main += sqlite3
#.endif
#LIB_DEPENDS-bsddb = databases/db/v4
#WANTLIB-bsddb = lib/db4/db>=4
LIB_DEPENDS-gdbm = databases/gdbm \
lang/python3/${VERSION},-main
WANTLIB-gdbm = gdbm>=3 python${VERSION}m
@ -121,7 +112,7 @@ MAKE_FLAGS+= LD_LIBRARY_PATH=${WRKSRC} PATH="${WRKDIST}:${PORTPATH}"
MAKE_FLAGS+= LDFLAGS='-L${WRKSRC}'
FAKE_FLAGS+= RANLIB=:
ALL_TARGET?= everything ./Lib/plat-openbsd4
ALL_TARGET?= everything ./Lib/plat-openbsd5
post-extract:
rm -r ${WRKDIST}/Modules/expat