44b37cc4b1
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.
129 lines
3.7 KiB
Text
129 lines
3.7 KiB
Text
# $NetBSD: Makefile.common,v 1.34 2006/06/01 15:25:03 jlam Exp $
|
|
#
|
|
|
|
DISTNAME= Python-2.3.5
|
|
CATEGORIES= lang python
|
|
MASTER_SITES= ftp://ftp.python.org/pub/python/2.3.5/ \
|
|
http://www.python.org/ftp/python/2.3.5/
|
|
EXTRACT_SUFX= .tgz
|
|
|
|
MAINTAINER= recht@NetBSD.org
|
|
HOMEPAGE= http://www.python.org/
|
|
COMMENT= Interpreted, interactive, object-oriented programming language
|
|
|
|
USE_LANGUAGES= c c++
|
|
GNU_CONFIGURE= yes
|
|
CONFIGURE_ARGS+= --enable-shared
|
|
CONFIGURE_ARGS+= OPT=${CFLAGS:M*:Q}
|
|
|
|
# fdatasync()
|
|
LIBS.SunOS+= -lrt
|
|
|
|
REPLACE_INTERPRETER+= python
|
|
REPLACE.python.old= .*python
|
|
REPLACE.python.new= ${PREFIX}/bin/python${PY_VER_SUFFIX}
|
|
REPLACE_FILES.python= Lib/cgi.py Lib/bsddb/dbshelve.py Lib/idlelib/idle \
|
|
Lib/idlelib/idle.py Lib/test/test_bz2.py \
|
|
Lib/test/test_largefile.py Lib/test/test_optparse.py
|
|
CHECK_INTERPRETER_SKIP= lib/python${PY_VER_SUFFIX}/test/test_pep263.py
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
PLIST_SRC= ${.CURDIR}/../../lang/python23/PLIST.common
|
|
.if exists(${.CURDIR}/../../lang/python23/PLIST.${OPSYS})
|
|
PLIST_SRC+= ${.CURDIR}/../../lang/python23/PLIST.${OPSYS}
|
|
.endif
|
|
PLIST_SRC+= ${.CURDIR}/../../lang/python23/PLIST.common_end
|
|
|
|
.if ${OPSYS} == "Darwin" || ${OPSYS} == "Interix"
|
|
PY_PLATNAME= ${LOWER_OPSYS}
|
|
.elif ${OPSYS} == "IRIX"
|
|
PY_PLATNAME= ${LOWER_OPSYS:C/\..*//}
|
|
.elif ${OPSYS} == "SunOS"
|
|
PY_PLATNAME= sunos${OS_VERSION:C/\..*//}
|
|
.else
|
|
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 !empty(IS_64BIT_PLATFORM:M[yY][eE][sS]) || \
|
|
(${OPSYS} == "Darwin") || (${OPSYS} == "Interix")
|
|
PLIST_SUBST+= DLMODULE="@comment "
|
|
.else
|
|
PLIST_SUBST+= DLMODULE=
|
|
.endif
|
|
|
|
# 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
|
|
|
|
# ossaudiodev is only available on x86 for the following platforms
|
|
.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
|
|
|
|
# Make sure python modules can link correctly
|
|
.if ${OPSYS} == "Darwin"
|
|
INSTALL_UNSTRIPPED= yes
|
|
.endif
|
|
|
|
.if ${OPSYS} == "IRIX"
|
|
. if ${ABI} == "64"
|
|
PLIST_SUBST+= NISMODULE="@comment "
|
|
. else
|
|
PLIST_SUBST+= NISMODULE=
|
|
. endif
|
|
PLIST_SUBST+= BSDDBMODULE="@comment "
|
|
PLIST_SUBST+= NOSHLIB="@comment "
|
|
.else
|
|
. include "../../mk/bdb.buildlink3.mk"
|
|
MAKE_ENV+= PY_BDB_TYPE=${BDB_TYPE:Q}
|
|
MAKE_ENV+= PY_BDB_INCDIRS=${BDBBASE}/${BUILDLINK_INCDIRS.${BDB_TYPE}}
|
|
MAKE_ENV+= PY_BDB_LIBDIRS=${BDBBASE}/lib
|
|
PLIST_SUBST+= BSDDBMODULE=
|
|
PLIST_SUBST+= NOSHLIB=
|
|
. if ${OPSYS} == "Interix"
|
|
PLIST_SUBST+= NISMODULE="@comment "
|
|
CONFIGURE_ENV+= ac_cv_header_stropts_h=no
|
|
. else
|
|
PLIST_SUBST+= NISMODULE=
|
|
. endif
|
|
.endif
|
|
|
|
.if defined(BUILDLINK_TRANSFORM)
|
|
MAKE_ENV+= PY_BDB_TRANSFORM=${BUILDLINK_TRANSFORM:Q}
|
|
.endif
|
|
|
|
PLIST_SUBST+= PY_VER_SUFFIX=${PY_VER_SUFFIX:Q}
|
|
|
|
TEST_TARGET= test
|
|
INSTALL_TARGET= altinstall
|
|
|
|
post-extract:
|
|
${MV} ${WRKSRC}/Tools/scripts/pydoc ${WRKSRC}/Tools/scripts/pydoc${PY_VER_SUFFIX}
|
|
|
|
.include "../../archivers/bzip2/buildlink3.mk"
|
|
.include "../../devel/gettext-lib/buildlink3.mk"
|
|
.include "../../devel/zlib/buildlink3.mk"
|
|
.include "../../security/openssl/buildlink3.mk"
|
|
.include "../../mk/dlopen.buildlink3.mk"
|
|
.include "../../mk/oss.buildlink3.mk"
|
|
.include "../../mk/bsd.pkg.mk"
|