2006-06-03 05:14:04 -04:00
|
|
|
# $OpenBSD: python.port.mk,v 1.12 2006/06/03 09:14:04 alek Exp $
|
2003-07-31 03:01:21 -04:00
|
|
|
#
|
|
|
|
# python.port.mk - Xavier Santolaria <xavier@santolaria.net>
|
|
|
|
# This file is in the public domain.
|
2003-07-28 13:48:13 -04:00
|
|
|
|
2006-06-03 05:14:04 -04:00
|
|
|
MODPY_VERSION?= 2.4
|
2003-07-28 13:48:13 -04:00
|
|
|
|
|
|
|
_MODPY_BUILD_DEPENDS= :python-${MODPY_VERSION}*:lang/python/${MODPY_VERSION}
|
|
|
|
|
2004-02-06 03:37:22 -05:00
|
|
|
.if ${NO_BUILD:L} == "no"
|
2003-07-28 13:48:13 -04:00
|
|
|
BUILD_DEPENDS+= ${_MODPY_BUILD_DEPENDS}
|
2004-02-06 03:37:22 -05:00
|
|
|
.endif
|
2003-07-28 13:48:13 -04:00
|
|
|
RUN_DEPENDS+= ${_MODPY_BUILD_DEPENDS}
|
|
|
|
|
2004-08-06 03:33:19 -04:00
|
|
|
.if !defined(NO_SHARED_LIBS) || ${NO_SHARED_LIBS:U} != YES
|
|
|
|
MODPY_EXPAT_DEPENDS= :python-expat-${MODPY_VERSION}*:lang/python/${MODPY_VERSION},-expat
|
|
|
|
MODPY_TKINTER_DEPENDS= :python-tkinter-${MODPY_VERSION}*:lang/python/${MODPY_VERSION},-tkinter
|
|
|
|
.endif
|
|
|
|
|
2003-07-28 13:48:13 -04:00
|
|
|
MODPY_BIN= ${LOCALBASE}/bin/python${MODPY_VERSION}
|
2004-05-15 05:24:12 -04:00
|
|
|
MODPY_INCDIR= ${LOCALBASE}/include/python${MODPY_VERSION}
|
2003-08-12 16:23:20 -04:00
|
|
|
MODPY_LIBDIR= ${LOCALBASE}/lib/python${MODPY_VERSION}
|
2004-05-15 05:24:12 -04:00
|
|
|
MODPY_SITEPKG= ${MODPY_LIBDIR}/site-packages
|
2003-07-28 13:48:13 -04:00
|
|
|
|
|
|
|
# usually setup.py but Setup.py can be found too
|
|
|
|
MODPY_SETUP?= setup.py
|
|
|
|
|
|
|
|
# build or build_ext are commonly used
|
|
|
|
MODPY_DISTUTILS_BUILD?= build --build-base=${WRKSRC}
|
|
|
|
MODPY_DISTUTILS_INSTALL?= install --prefix=${PREFIX}
|
|
|
|
|
2004-06-21 19:25:07 -04:00
|
|
|
MAKE_ENV+= CC=${CC}
|
|
|
|
|
2003-08-12 16:23:20 -04:00
|
|
|
_MODPY_CMD= @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
|
2003-07-29 15:35:32 -04:00
|
|
|
${MODPY_BIN} ./${MODPY_SETUP}
|
2003-07-28 13:48:13 -04:00
|
|
|
|
|
|
|
SUBST_VARS+= MODPY_VERSION
|
|
|
|
|
|
|
|
# dirty way to do it with no modifications in bsd.port.mk
|
2006-01-27 12:50:54 -05:00
|
|
|
.if empty(CONFIGURE_STYLE)
|
|
|
|
. if !target(do-build)
|
2003-07-28 13:48:13 -04:00
|
|
|
do-build:
|
2003-08-12 16:23:20 -04:00
|
|
|
${_MODPY_CMD} ${MODPY_DISTUTILS_BUILD} ${MODPY_DISTUTILS_BUILDARGS}
|
2006-01-27 12:50:54 -05:00
|
|
|
. endif
|
2003-07-28 13:48:13 -04:00
|
|
|
|
|
|
|
# extra documentation or scripts should be installed via post-install
|
2006-01-27 12:50:54 -05:00
|
|
|
. if !target(do-install)
|
2003-07-28 13:48:13 -04:00
|
|
|
do-install:
|
2003-10-10 12:38:18 -04:00
|
|
|
${_MODPY_CMD} ${MODPY_DISTUTILS_BUILD} ${MODPY_DISTUTILS_BUILDARGS} \
|
|
|
|
${MODPY_DISTUTILS_INSTALL} ${MODPY_DISTUTILS_INSTALLARGS}
|
2006-01-27 12:50:54 -05:00
|
|
|
. endif
|
2003-07-28 13:48:13 -04:00
|
|
|
.endif
|