Correct the wrong value of LDFLAGS (certain ports will need WANTLIB += ${MODPY_WANTLIB}).

Thanks for fgsch@ for his patch-Modules_selectmodule_c to correct SIGBUS error on sparc64 (test_kqueue.py).

It's time make bulks of Python2.7 on as many archs as we can.

Thanks a lot.

ok sthen@ aja@
This commit is contained in:
rpointel 2011-05-30 21:11:44 +00:00
parent 17f86c3675
commit ea37821819
8 changed files with 49 additions and 52 deletions

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile,v 1.35 2011/05/07 09:36:17 fgsch Exp $
# $OpenBSD: Makefile,v 1.36 2011/05/30 21:11:44 rpointel Exp $
VERSION= 2.4
PATCHLEVEL= .6
REVISION= 7
REVISION= 8
SHARED_LIBS= python2.4 1.0
ALL_TARGET?= all ${WRKSRC}/Lib/plat-openbsd4

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile,v 1.47 2011/05/23 06:42:02 jasper Exp $
# $OpenBSD: Makefile,v 1.48 2011/05/30 21:11:44 rpointel Exp $
VERSION= 2.5
PATCHLEVEL= .4
REVISION= 10
REVISION= 11
SHARED_LIBS= python2.5 1.0
AUTOCONF_VERSION= 2.61

View File

@ -1,18 +0,0 @@
$OpenBSD: patch-Lib_distutils_command_build_ext_py,v 1.3 2008/02/27 00:30:47 djm Exp $
--- Lib/distutils/command/build_ext.py.orig Wed Apr 25 01:27:25 2007
+++ Lib/distutils/command/build_ext.py Fri Feb 15 11:53:53 2008
@@ -705,13 +705,6 @@ class build_ext (Command):
return ext.libraries
else:
- from distutils import sysconfig
- if sysconfig.get_config_var('Py_ENABLE_SHARED'):
- template = "python%d.%d"
- pythonlib = (template %
- (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
- return ext.libraries + [pythonlib]
- else:
- return ext.libraries
+ return ext.libraries
# class build_ext

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile,v 1.25 2011/05/23 06:42:02 jasper Exp $
# $OpenBSD: Makefile,v 1.26 2011/05/30 21:11:44 rpointel Exp $
VERSION = 2.6
PATCHLEVEL = .6
REVISION = 3
REVISION = 4
SHARED_LIBS = python2.6 1.0
AUTOCONF_VERSION = 2.65

View File

@ -1,18 +0,0 @@
$OpenBSD: patch-Lib_distutils_command_build_ext_py,v 1.4 2010/07/23 13:56:26 sthen Exp $
--- Lib/distutils/command/build_ext.py.orig Tue Oct 13 22:17:34 2009
+++ Lib/distutils/command/build_ext.py Thu Jun 17 13:04:43 2010
@@ -755,13 +755,6 @@ class build_ext (Command):
return ext.libraries
else:
- from distutils import sysconfig
- if sysconfig.get_config_var('Py_ENABLE_SHARED'):
- template = "python%d.%d"
- pythonlib = (template %
- (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
- return ext.libraries + [pythonlib]
- else:
- return ext.libraries
+ return ext.libraries
# class build_ext

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile,v 1.5 2011/05/22 19:21:24 jasper Exp $
# $OpenBSD: Makefile,v 1.6 2011/05/30 21:11:44 rpointel Exp $
VERSION = 2.7
PATCHLEVEL = .1
REVISION = 3
REVISION = 4
SHARED_LIBS = python2.7 0.0
AUTOCONF_VERSION = 2.65

View File

@ -0,0 +1,29 @@
$OpenBSD: patch-Modules_selectmodule_c,v 1.1 2011/05/30 21:11:44 rpointel Exp $
--- Modules/selectmodule.c.orig Sat May 28 13:29:10 2011
+++ Modules/selectmodule.c Sat May 28 13:30:55 2011
@@ -1215,6 +1215,7 @@ static PyTypeObject kqueue_queue_Type;
*/
#define KQ_OFF(x) offsetof(kqueue_event_Object, x)
+#if !defined(__OpenBSD__)
static struct PyMemberDef kqueue_event_members[] = {
{"ident", T_UINTPTRT, KQ_OFF(e.ident)},
{"filter", T_SHORT, KQ_OFF(e.filter)},
@@ -1224,6 +1225,17 @@ static struct PyMemberDef kqueue_event_members[] = {
{"udata", T_UINTPTRT, KQ_OFF(e.udata)},
{NULL} /* Sentinel */
};
+#else
+static struct PyMemberDef kqueue_event_members[] = {
+ {"ident", T_UINT, KQ_OFF(e.ident)},
+ {"filter", T_SHORT, KQ_OFF(e.filter)},
+ {"flags", T_USHORT, KQ_OFF(e.flags)},
+ {"fflags", T_UINT, KQ_OFF(e.fflags)},
+ {"data", T_INT, KQ_OFF(e.data)},
+ {"udata", T_UINTPTRT, KQ_OFF(e.udata)},
+ {NULL} /* Sentinel */
+};
+#endif
#undef KQ_OFF
static PyObject *

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile.inc,v 1.78 2011/05/23 06:42:02 jasper Exp $
# $OpenBSD: Makefile.inc,v 1.79 2011/05/30 21:11:44 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
@ -62,16 +62,19 @@ LIB_DEPENDS-main += databases/sqlite3
WANTLIB-main += sqlite3
.endif
LIB_DEPENDS-bsddb = databases/db/v4
WANTLIB-bsddb = lib/db4/db>=4
LIB_DEPENDS-gdbm = databases/gdbm
WANTLIB-gdbm = gdbm>=3
LIB_DEPENDS-bsddb = databases/db/v4 \
lang/python/${VERSION},-main
WANTLIB-bsddb = lib/db4/db>=4 python${VERSION}
LIB_DEPENDS-gdbm = databases/gdbm \
lang/python/${VERSION},-main
WANTLIB-gdbm = gdbm>=3 python${VERSION}
RUN_DEPENDS-idle = ${RUN_DEPENDS} \
lang/python/${VERSION},-tkinter
# XXX Tcl/Tk version number handled in patch-setup_py
MODULES += x11/tk
LIB_DEPENDS-tkinter = ${MODTK_LIB_DEPENDS}
WANTLIB-tkinter = X11 ${MODTK_WANTLIB}
LIB_DEPENDS-tkinter = ${MODTK_LIB_DEPENDS} \
lang/python/${VERSION},-main
WANTLIB-tkinter = X11 ${MODTK_WANTLIB} python${VERSION}
.if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "amd64" || \
${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH:Mmips64*}
@ -107,11 +110,12 @@ CONFIGURE_ARGS+= --enable-ipv6
THREAD_STACK_SIZE?=0x20000
CONFIGURE_ENV+= OPT='${CFLAGS} -DTHREAD_STACK_SIZE=${THREAD_STACK_SIZE} -fPIC' \
LDFLAGS='-L${WRKSRC}' SVNVERSION=no \
LDFLAGS='-L${LOCALBASE}/lib/' SVNVERSION=no \
LOCALBASE=${LOCALBASE} X11BASE=${X11BASE}
MAKE_ENV+= LOCALBASE=${LOCALBASE} X11BASE=${X11BASE}
MAKE_FLAGS+= LDLIBRARY=libpython${VERSION}.so.${LIBpython${VERSION}_VERSION}
MAKE_FLAGS+= LD_LIBRARY_PATH=${WRKSRC} PATH="${WRKDIST}:${PORTPATH}"
MAKE_FLAGS+= LDFLAGS='-L${WRKSRC}'
FAKE_FLAGS+= RANLIB=:
ALL_TARGET?= everything ./Lib/plat-openbsd4