diff options
author | jlam <jlam@pkgsrc.org> | 2006-06-01 15:25:03 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2006-06-01 15:25:03 +0000 |
commit | 44b37cc4b1dbb3654f6c7aa713276474699ba735 (patch) | |
tree | c46bc79814a26b5242e87f3c153d869045ed913a /lang | |
parent | 45811b6b625d799dfaf600332b71c1c92c644bf0 (diff) | |
download | pkgsrc-44b37cc4b1dbb3654f6c7aa713276474699ba735.tar.gz |
Inspecting the setup.py file, one can see that python23 and python24
only build certain modules if the platform is *not* 64-bit. Correct
the PLIST for those cases. This should fix the build on non-64bit,
non-x86 platforms, e.g. powerpc.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/python23/Makefile.common | 51 | ||||
-rw-r--r-- | lang/python24/Makefile | 47 | ||||
-rw-r--r-- | lang/python24/PLIST.common | 4 |
3 files changed, 55 insertions, 47 deletions
diff --git a/lang/python23/Makefile.common b/lang/python23/Makefile.common index a17f8a09c59..2b55b6c5d70 100644 --- a/lang/python23/Makefile.common +++ b/lang/python23/Makefile.common @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.33 2006/05/14 20:46:37 minskim Exp $ +# $NetBSD: Makefile.common,v 1.34 2006/06/01 15:25:03 jlam Exp $ # DISTNAME= Python-2.3.5 @@ -46,37 +46,40 @@ PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//} .endif PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q} +.if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "amd64") || \ + (${MACHINE_ARCH} == "sparc64") || (${MACHINE_ARCH} == "x86_64") || \ + (defined(ABI) && ${ABI} == "64") +IS_64BIT_PLATFORM?= yes +.else +IS_64BIT_PLATFORM?= no +.endif + # the dl module isn't built for 64 bit archs and Darwin -.if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "amd64" \ - || ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "x86_64" \ - || ${OPSYS} == "Darwin" || ( ${OPSYS} == "IRIX" && ${ABI} == "64" ) \ - || ${OPSYS} == "Interix" -PLIST_SUBST+= DLMODULE="@comment " +.if !empty(IS_64BIT_PLATFORM:M[yY][eE][sS]) || \ + (${OPSYS} == "Darwin") || (${OPSYS} == "Interix") +PLIST_SUBST+= DLMODULE="@comment " .else -PLIST_SUBST+= DLMODULE= +PLIST_SUBST+= DLMODULE= .endif -EXTRA_SO_SUBST= "@comment " -OSSAUDIODEV_SUBST= "@comment " +# setup.py causes some modules to be built if the platform is *not* 64bit. +.if !empty(IS_64BIT_PLATFORM:M[nN][oO]) +PLIST_SUBST+= EXTRA_SO= +.else +PLIST_SUBST+= EXTRA_SO="@comment " +.endif -# activate extra modules -.if ${MACHINE_ARCH} == "i386" -EXTRA_SO_SUBST= # ossaudiodev is only available on x86 for the following platforms -. if ${PY_PLATNAME} == "linux2" || ${PY_PLATNAME} == "freebsd4" \ - || ${PY_PLATNAME} == "freebsd5" -OSSAUDIODEV_SUBST= -. endif -.elif ${OPSYS} == "SunOS" || ( ${OPSYS} == "IRIX" && ${ABI} != "64" ) -EXTRA_SO_SUBST= -.endif -.if ${MACHINE_ARCH} == "x86_64" && ${PY_PLATNAME} == "linux2" -OSSAUDIODEV_SUBST= +.if (${MACHINE_ARCH} == "i386") && \ + (${PY_PLATNAME} == "linux2" || ${PY_PLATNAME} == "freebsd4" || \ + ${PY_PLATNAME} == "freebsd5") +PLIST_SUBST+= OSSAUDIODEV= +.elif (${MACHINE_ARCH} == "x86_64") && (${PY_PLATNAME} == "linux2") +PLIST_SUBST+= OSSAUDIODEV= +.else +PLIST_SUBST+= OSSAUDIODEV="@comment " .endif -PLIST_SUBST+= EXTRA_SO=${EXTRA_SO_SUBST} -PLIST_SUBST+= OSSAUDIODEV=${OSSAUDIODEV_SUBST} - # Make sure python modules can link correctly .if ${OPSYS} == "Darwin" INSTALL_UNSTRIPPED= yes diff --git a/lang/python24/Makefile b/lang/python24/Makefile index d5bf55f591a..f8a8e9e07c2 100644 --- a/lang/python24/Makefile +++ b/lang/python24/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.25 2006/05/07 15:11:44 tv Exp $ +# $NetBSD: Makefile,v 1.26 2006/06/01 15:25:03 jlam Exp $ # DISTNAME= Python-2.4.3 @@ -54,34 +54,39 @@ PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//} .endif PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME:Q} +.if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "amd64") || \ + (${MACHINE_ARCH} == "sparc64") || (${MACHINE_ARCH} == "x86_64") || \ + (defined(ABI) && ${ABI} == "64") +IS_64BIT_PLATFORM?= yes +.else +IS_64BIT_PLATFORM?= no +.endif + # the dl module isn't built for 64 bit archs and Darwin -.if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "amd64" \ - || ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "x86_64" \ - || ${OPSYS} == "Darwin" || ( ${OPSYS} == "IRIX" && ${ABI} == "64" ) -PLIST_SUBST+= DLMODULE="@comment " +.if !empty(IS_64BIT_PLATFORM:M[yY][eE][sS]) || (${OPSYS} == "Darwin") +PLIST_SUBST+= DLMODULE="@comment " .else -PLIST_SUBST+= DLMODULE= +PLIST_SUBST+= DLMODULE= .endif -EXTRA_SO_SUBST= "@comment " -OSSAUDIODEV_SUBST= "@comment " +# setup.py causes some modules to be built if the platform is *not* 64bit. +.if !empty(IS_64BIT_PLATFORM:M[nN][oO]) +PLIST_SUBST+= EXTRA_SO= +.else +PLIST_SUBST+= EXTRA_SO="@comment " +.endif -# activate extra modules -.if ${MACHINE_ARCH} == "i386" -EXTRA_SO_SUBST= # ossaudiodev is only available on x86 for the following platforms -. if ${PY_PLATNAME} == "linux2" || ${PY_PLATNAME} == "freebsd4" \ - || ${PY_PLATNAME} == "freebsd5" -OSSAUDIODEV_SUBST= -. endif -.elif ${OPSYS} == "SunOS" || ( ${OPSYS} == "IRIX" && ${ABI} != "64" ) \ - || ${OPSYS} == "Darwin" -EXTRA_SO_SUBST= +.if (${MACHINE_ARCH} == "i386") && \ + (${PY_PLATNAME} == "linux2" || ${PY_PLATNAME} == "freebsd4" || \ + ${PY_PLATNAME} == "freebsd5") +PLIST_SUBST+= OSSAUDIODEV= +.elif (${MACHINE_ARCH} == "x86_64") && (${PY_PLATNAME} == "linux2") +PLIST_SUBST+= OSSAUDIODEV= +.else +PLIST_SUBST+= OSSAUDIODEV="@comment " .endif -PLIST_SUBST+= EXTRA_SO=${EXTRA_SO_SUBST} -PLIST_SUBST+= OSSAUDIODEV=${OSSAUDIODEV_SUBST} - # Make sure python modules can link correctly .if ${OPSYS} == "Darwin" INSTALL_UNSTRIPPED= yes diff --git a/lang/python24/PLIST.common b/lang/python24/PLIST.common index 6d298e99562..60514795081 100644 --- a/lang/python24/PLIST.common +++ b/lang/python24/PLIST.common @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST.common,v 1.5 2006/04/12 20:21:48 drochner Exp $ +@comment $NetBSD: PLIST.common,v 1.6 2006/06/01 15:25:03 jlam Exp $ bin/pydoc${PY_VER_SUFFIX} bin/python${PY_VER_SUFFIX} bin/smtpd${PY_VER_SUFFIX}.py @@ -1272,7 +1272,7 @@ lib/python${PY_VER_SUFFIX}/lib-dynload/_ssl.so lib/python${PY_VER_SUFFIX}/lib-dynload/_testcapi.so lib/python${PY_VER_SUFFIX}/lib-dynload/_weakref.so lib/python${PY_VER_SUFFIX}/lib-dynload/array.so -${EXTRA_SO}lib/python${PY_VER_SUFFIX}/lib-dynload/audioop.so +lib/python${PY_VER_SUFFIX}/lib-dynload/audioop.so lib/python${PY_VER_SUFFIX}/lib-dynload/binascii.so ${BSDDBMODULE}lib/python${PY_VER_SUFFIX}/lib-dynload/bsddb185.so lib/python${PY_VER_SUFFIX}/lib-dynload/bz2.so |