pkgsrc/lang/python23/Makefile.common

103 lines
2.7 KiB
Text

# $NetBSD: Makefile.common,v 1.15 2004/08/28 16:41:33 danw Exp $
#
DISTNAME= Python-2.3.4
PKGREVISION= 2
CATEGORIES= lang python
MASTER_SITES= ftp://ftp.python.org/pub/python/2.3.4/
EXTRACT_SUFX= .tgz
MAINTAINER= recht@NetBSD.org
HOMEPAGE= http://www.python.org/
COMMENT= Interpreted, interactive, object-oriented programming language
USE_LANGUAGES= c c++
USE_GCC_SHLIB= yes
USE_BUILDLINK3= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --enable-shared
CONFIGURE_ARGS+= OPT="${CFLAGS}"
# fdatasync()
LIBS.SunOS= -lrt
.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} == "SunOS"
LOWER_OPSYS= sunos
.endif
.if ${OPSYS} == "Darwin" || ${OPSYS} == "IRIX"
PY_PLATNAME= ${LOWER_OPSYS}
.else
PY_PLATNAME= ${LOWER_OPSYS}${OS_VERSION:C/\..*//}
.endif
PLIST_SUBST+= PY_PLATNAME=${PY_PLATNAME}
# 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"
PLIST_SUBST+= DLMODULE="@comment "
.else
PLIST_SUBST+= DLMODULE=
.endif
EXTRA_SO_SUBST= "@comment "
OSSAUDIODEV_SUBST= "@comment "
# 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"
EXTRA_SO_SUBST=
.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
.endif
# ensure that the bsddb185 module is built on all platforms
USE_DB185= yes
.include "../../mk/bdb.buildlink3.mk"
MAKE_ENV+= PY_BDB_TYPE=${BDB_TYPE}
.if ${BDB_TYPE} == "native"
MAKE_ENV+= PY_BDB_INCDIRS=/usr/${_BDB_INCDIRS}
.else
MAKE_ENV+= PY_BDB_INCDIRS=${BDBBASE}/${BUILDLINK_INCDIRS.${BDB_TYPE}}
MAKE_ENV+= PY_BDB_LIBDIRS=${BDBBASE}/lib
.endif
.if defined(BUILDLINK_TRANSFORM)
MAKE_ENV+= PY_BDB_TRANSFORM="${BUILDLINK_TRANSFORM}"
.endif
PLIST_SUBST+= PY_VER_SUFFIX=${PY_VER_SUFFIX}
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/zlib/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../mk/ossaudio.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"