2002-01-11 12:05:29 +00:00
|
|
|
# -*- mode: Makefile; tab-width: 4; -*-
|
2000-09-08 11:43:37 +00:00
|
|
|
# ex: ts=4
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2002-04-17 11:34:47 +00:00
|
|
|
.if !defined(_POSTMKINCLUDED) && !defined(Python_Pre_Include)
|
2000-09-28 11:24:31 +00:00
|
|
|
|
2002-04-17 11:34:47 +00:00
|
|
|
Python_Pre_Include= bsd.python.mk
|
2003-06-09 05:42:04 +00:00
|
|
|
Python_Include_MAINTAINER= perky@FreeBSD.org
|
2000-09-08 11:43:37 +00:00
|
|
|
|
|
|
|
# This file contains some variable definitions that are supposed to
|
|
|
|
# make your life easier when dealing with ports related to the Python
|
2002-04-26 10:45:42 +00:00
|
|
|
# language. It's automatically included when USE_PYTHON or PYTHON_VERSION
|
|
|
|
# is defined in the ports' makefile. Define PYTHON_VERSION to override the
|
2003-10-16 05:58:53 +00:00
|
|
|
# defaults that USE_PYTHON would give you. If your port requires only some
|
|
|
|
# set of Python versions, you can define USE_PYTHON as [min]-[max] or
|
|
|
|
# min+. (eg. 2.1-2.3, 2.0+ or -2.2)
|
2000-09-08 11:43:37 +00:00
|
|
|
#
|
|
|
|
# The variables:
|
|
|
|
#
|
2002-06-14 11:17:08 +00:00
|
|
|
# PYTHONBASE: Python port's installation prefix.
|
|
|
|
# default: ${LOCALBASE}
|
|
|
|
#
|
2000-09-08 11:43:37 +00:00
|
|
|
# PYTHON_CMD: Python's command line file name, including the version
|
2000-09-28 11:24:31 +00:00
|
|
|
# number (used for dependencies).
|
2002-06-14 11:17:08 +00:00
|
|
|
# default: ${PYTHONBASE}/bin/${PYTHON_VERSION}
|
2000-09-08 11:43:37 +00:00
|
|
|
#
|
|
|
|
# PYTHON_DISTFILE: The ${DISTFILE} for your python version. Needed for
|
|
|
|
# extensions like Tkinter, py-gdbm and py-expat, which
|
|
|
|
# are built from sources contained in the Python
|
|
|
|
# distribution.
|
|
|
|
#
|
2003-10-29 21:31:13 +00:00
|
|
|
# PYTHON_MASTER_SITES: The ${MASTER_SITES} for your python version. (You must
|
|
|
|
# use this instead of ${MASTER_SITE_PYTHON} to support
|
|
|
|
# python-devel port.)
|
|
|
|
#
|
|
|
|
# PYTHON_MASTER_SITE_SUBDIR: The ${MASTER_SITE_SUBDIR} for your python
|
|
|
|
# version.
|
2003-10-19 08:49:29 +00:00
|
|
|
#
|
2000-10-18 11:56:23 +00:00
|
|
|
# PYTHON_INCLUDEDIR: Location of the Python include files.
|
2002-06-14 11:17:08 +00:00
|
|
|
# default: ${PYTHONBASE}/include/${PYTHON_VERSION}
|
2000-10-18 11:56:23 +00:00
|
|
|
#
|
2000-09-08 11:43:37 +00:00
|
|
|
# PYTHON_LIBDIR: Base of the python library tree
|
2002-06-14 11:17:08 +00:00
|
|
|
# default: ${PYTHONBASE}/lib/${PYTHON_VERSION}
|
2000-09-08 11:43:37 +00:00
|
|
|
#
|
2000-09-28 11:24:31 +00:00
|
|
|
# PYTHON_PKGNAMEPREFIX: Use this as a ${PKGNAMEPREFIX} to distinguish
|
|
|
|
# packages for different Python versions.
|
|
|
|
# default: py${PYTHON_SUFFIX}-
|
|
|
|
#
|
2003-10-16 05:58:53 +00:00
|
|
|
# PYTHON_PKGNAMESUFFIX: If your port's name is more popular without `py-'
|
|
|
|
# prefix, use this as a ${PKGNAMESUFFIX} alternatively.
|
|
|
|
# default: -py${PYTHON_SUFFIX}
|
|
|
|
#
|
2001-04-03 11:37:25 +00:00
|
|
|
# PYTHON_PLATFORM: Python's idea of the OS release.
|
2005-01-09 10:12:07 +00:00
|
|
|
# XXX This is faked with ${OPSYS} and ${OSREL} until I
|
|
|
|
# find out how to delay defining a variable until after
|
|
|
|
# a certain target has been built.
|
2001-04-03 11:37:25 +00:00
|
|
|
#
|
2000-09-08 11:43:37 +00:00
|
|
|
# PYTHON_PORTSDIR: The source of your binary's port. Needed for the
|
|
|
|
# RUN_DEPENDS.
|
|
|
|
#
|
|
|
|
# PYTHON_PORTVERSION: Version number suitable for ${PORTVERSION}.
|
|
|
|
#
|
2000-09-12 11:50:53 +00:00
|
|
|
# PYTHON_REL: Version number in numerical format, to ease
|
|
|
|
# comparison in makefiles
|
|
|
|
#
|
2000-09-08 11:43:37 +00:00
|
|
|
# PYTHON_SITELIBDIR: Location of the site-packages tree. Don't change,
|
|
|
|
# unless you know what you do.
|
|
|
|
# default: ${PYTHON_LIBDIR}/site-packages
|
|
|
|
#
|
2000-09-28 11:24:31 +00:00
|
|
|
# PYTHON_SUFFIX: Yet another short version number, primarily intended
|
|
|
|
# for ${PYTHON_PKGNAMEPREFIX}.
|
|
|
|
#
|
2005-01-09 10:12:07 +00:00
|
|
|
# PYTHON_VERSION: Version of the python binary in your ${PATH}, in the
|
2000-09-08 11:43:37 +00:00
|
|
|
# format "python2.0". Set this in your makefile in case you
|
|
|
|
# want to build extensions with an older binary.
|
|
|
|
# default: depends on the version of your python binary
|
|
|
|
#
|
|
|
|
# PYTHON_WRKSRC: The ${WRKSRC} for your python version. Needed for
|
|
|
|
# extensions like Tkinter, py-gdbm and py-expat, which
|
|
|
|
# are built from sources contained in the Python
|
|
|
|
# distribution.
|
|
|
|
#
|
2002-06-14 11:17:08 +00:00
|
|
|
# There are PREFIX-clean variants of the PYTHON_*DIR variables above.
|
|
|
|
# They are meant to be used in the installation targets.
|
|
|
|
#
|
|
|
|
# PYTHONPREFIX_INCLUDEDIR: default: ${PREFIX}/include/${PYTHON_VERSION}
|
|
|
|
# PYTHONPREFIX_LIBDIR: default: ${PREFIX}/lib/${PYTHON_VERSION}
|
|
|
|
# PYTHONPREFIX_SITELIBDIR: default: ${PYTHONPREFIX_LIBDIR}/site-packages
|
|
|
|
#
|
2000-09-08 11:43:37 +00:00
|
|
|
# PYDISTUTILS: Dependency line for the distutils extension. As of Python-2.0,
|
|
|
|
# the distutils are in the base distribution.
|
|
|
|
#
|
2002-07-15 11:35:29 +00:00
|
|
|
# PYNUMERIC: Dependency line for the numeric extension. Py-Numeric-17
|
2004-07-08 15:53:45 +00:00
|
|
|
# is the last release that works with Python versions older
|
2002-07-15 11:35:29 +00:00
|
|
|
# than 1.6.
|
|
|
|
#
|
2002-06-14 11:17:08 +00:00
|
|
|
# PYXML: Dependency line for the XML extension. As of Python-2.0,
|
2000-09-08 11:43:37 +00:00
|
|
|
# this extension is in the base distribution.
|
2002-04-17 11:34:47 +00:00
|
|
|
#
|
2002-06-14 11:17:08 +00:00
|
|
|
# USE_PYTHON_PREFIX: Says that the port installs in ${PYTHONBASE}.
|
|
|
|
#
|
2004-07-08 15:53:45 +00:00
|
|
|
# USE_PYDISTUTILS: Use distutils as do-configure, do-build and do-install
|
|
|
|
# targets.
|
|
|
|
#
|
|
|
|
# PYDISTUTILS_CONFIGUREARGS: Arguments to config with distutils.
|
|
|
|
# default: <empty>
|
2002-04-17 11:34:47 +00:00
|
|
|
#
|
|
|
|
# PYDISTUTILS_BUILDARGS: Arguments to build with distutils.
|
|
|
|
# default: <empty>
|
|
|
|
#
|
|
|
|
# PYDISTUTILS_INSTALLARGS: Arguments to install with distutils.
|
|
|
|
# default: -c -O1 --prefix=${PREFIX}
|
|
|
|
#
|
|
|
|
# PYSETUP: Name of the setup script used by the distutils package.
|
|
|
|
# default: setup.py
|
2000-09-08 11:43:37 +00:00
|
|
|
|
2004-12-01 15:04:05 +00:00
|
|
|
_PYTHON_PORTBRANCH= 2.4
|
2005-01-29 05:01:02 +00:00
|
|
|
_PYTHON_ALLBRANCHES= 2.4 2.3 2.2 2.1 2.5 # preferred first
|
2003-10-16 05:58:53 +00:00
|
|
|
|
2004-12-19 17:06:16 +00:00
|
|
|
.if defined(USE_ZOPE)
|
|
|
|
PYTHON_VERSION= python2.3
|
|
|
|
.endif
|
|
|
|
|
2003-10-16 05:58:53 +00:00
|
|
|
.if defined(PYTHON_VERSION)
|
2004-05-01 01:44:08 +00:00
|
|
|
_PYTHON_VERSION!= ${ECHO_CMD} "${PYTHON_VERSION}" | ${SED} 's/^python//'
|
2003-10-16 05:58:53 +00:00
|
|
|
_PYTHON_CMD= ${LOCALBASE}/bin/${PYTHON_VERSION}
|
|
|
|
.else
|
2002-06-14 11:17:08 +00:00
|
|
|
# Determine the currently installed version. If Python is not installed, a
|
|
|
|
# default version number is substituted and the corresponding Python
|
|
|
|
# distribution will be built through the dependency processing.
|
|
|
|
.if defined(PYTHON_CMD)
|
2003-10-16 05:58:53 +00:00
|
|
|
_PYTHON_CMD= ${PYTHON_CMD}
|
2002-06-14 11:17:08 +00:00
|
|
|
.else
|
2003-10-16 05:58:53 +00:00
|
|
|
_PYTHON_CMD= ${LOCALBASE}/bin/python
|
2002-06-14 11:17:08 +00:00
|
|
|
.endif
|
2003-10-16 05:58:53 +00:00
|
|
|
_PYTHON_VERSION!= ${_PYTHON_CMD} -c \
|
|
|
|
'import sys; print sys.version[:3]' 2> /dev/null \
|
2004-05-01 01:44:08 +00:00
|
|
|
|| ${ECHO_CMD} ${_PYTHON_PORTBRANCH}
|
2003-10-16 05:58:53 +00:00
|
|
|
.endif # defined(PYTHON_VERSION)
|
|
|
|
|
2004-07-08 15:53:45 +00:00
|
|
|
.if !defined(USE_PYTHON)
|
|
|
|
.if defined(USE_PYTHON_BUILD)
|
|
|
|
USE_PYTHON= ${USE_PYTHON_BUILD}
|
|
|
|
.elif defined(USE_PYTHON_RUN)
|
|
|
|
USE_PYTHON= ${USE_PYTHON_RUN}
|
|
|
|
.else
|
|
|
|
USE_PYTHON= any
|
|
|
|
.endif # defined(USE_PYTHON_BUILD)
|
|
|
|
.else
|
|
|
|
USE_PYTHON_BUILD= yes
|
|
|
|
USE_PYTHON_RUN= yes
|
|
|
|
.endif # !defined(USE_PYTHON)
|
|
|
|
|
2003-10-16 05:58:53 +00:00
|
|
|
# Validate Python version whether it meets USE_PYTHON version restriction.
|
2004-05-01 01:44:08 +00:00
|
|
|
_PYTHON_VERSION_CHECK!= ${ECHO_CMD} "${USE_PYTHON}" | \
|
2003-10-16 05:58:53 +00:00
|
|
|
${SED} 's/^\([1-9]\.[0-9]\)$$/\1-\1/'
|
2004-05-01 01:44:08 +00:00
|
|
|
_PYTHON_VERSION_MINIMUM!= ${ECHO_CMD} "${_PYTHON_VERSION_CHECK}" | \
|
2003-10-16 05:58:53 +00:00
|
|
|
${SED} -n 's/.*\([1-9]\.[0-9]\)[-+].*/\1/p'
|
2004-05-01 01:44:08 +00:00
|
|
|
_PYTHON_VERSION_MAXIMUM!= ${ECHO_CMD} "${_PYTHON_VERSION_CHECK}" | \
|
2003-10-16 05:58:53 +00:00
|
|
|
${SED} -n 's/.*-\([1-9]\.[0-9]\).*/\1/p'
|
|
|
|
.if !empty(_PYTHON_VERSION_MINIMUM) && ( \
|
|
|
|
${_PYTHON_VERSION} < ${_PYTHON_VERSION_MINIMUM})
|
|
|
|
_PYTHON_VERSION_NONSUPPORTED= ${_PYTHON_VERSION_MINIMUM} at least
|
|
|
|
.elif !empty(_PYTHON_VERSION_MAXIMUM) && ( \
|
|
|
|
${_PYTHON_VERSION} > ${_PYTHON_VERSION_MAXIMUM})
|
|
|
|
_PYTHON_VERSION_NONSUPPORTED= ${_PYTHON_VERSION_MAXIMUM} at most
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# If we have an unsupported version of Python, try another.
|
|
|
|
.if defined(_PYTHON_VERSION_NONSUPPORTED)
|
|
|
|
.if defined(PYTHON_VERSION) || defined(PYTHON_CMD)
|
|
|
|
IGNORE= needs Python ${_PYTHON_VERSION_NONSUPPORTED}.\
|
|
|
|
But you specified ${_PYTHON_VERSION}
|
|
|
|
.else
|
|
|
|
.undef _PYTHON_VERSION
|
|
|
|
.for ver in ${_PYTHON_ALLBRANCHES}
|
|
|
|
__VER= ${ver}
|
|
|
|
.if !defined(_PYTHON_VERSION) && \
|
|
|
|
!(!empty(_PYTHON_VERSION_MINIMUM) && ( \
|
|
|
|
${__VER} < ${_PYTHON_VERSION_MINIMUM})) && \
|
|
|
|
!(!empty(_PYTHON_VERSION_MAXIMUM) && ( \
|
|
|
|
${__VER} > ${_PYTHON_VERSION_MAXIMUM}))
|
|
|
|
_PYTHON_VERSION= ${ver}
|
|
|
|
_PYTHON_CMD= ${LOCALBASE}/bin/python${ver}
|
|
|
|
.endif
|
|
|
|
.endfor
|
|
|
|
.if !defined(_PYTHON_VERSION)
|
|
|
|
IGNORE= needs an unsupported version of Python
|
|
|
|
_PYTHON_VERSION= ${_PYTHON_PORTBRANCH} # just to avoid version sanity checking.
|
|
|
|
.endif
|
|
|
|
.endif # defined(PYTHON_VERSION) || defined(PYTHON_CMD)
|
|
|
|
.endif # defined(_PYTHON_VERSION_NONSUPPORTED)
|
|
|
|
|
2000-09-08 11:43:37 +00:00
|
|
|
PYTHON_VERSION?= python${_PYTHON_VERSION}
|
2003-10-16 05:58:53 +00:00
|
|
|
PYTHON_CMD?= ${_PYTHON_CMD}
|
2003-07-31 19:34:54 +00:00
|
|
|
PYTHONBASE!= (${PYTHON_CMD} -c 'import sys; print sys.prefix') \
|
2004-05-01 01:44:08 +00:00
|
|
|
2> /dev/null || ${ECHO_CMD} ${LOCALBASE}
|
2003-12-20 07:13:43 +00:00
|
|
|
DEPENDS_ARGS+= PYTHON_VERSION=${PYTHON_VERSION}
|
2003-10-19 08:49:29 +00:00
|
|
|
_PYTHON_PORTVERSION!= (${PYTHON_CMD} -c 'import string, sys; \
|
|
|
|
print string.split(sys.version)[0]') 2> /dev/null || ${TRUE}
|
2003-10-29 21:31:13 +00:00
|
|
|
.if !defined(PYTHON_NO_DEPENDS) && !empty(_PYTHON_PORTVERSION)
|
2003-10-19 08:49:29 +00:00
|
|
|
PYTHON_PORTVERSION= ${_PYTHON_PORTVERSION}
|
|
|
|
.endif
|
2001-05-02 11:49:36 +00:00
|
|
|
|
2005-01-29 01:47:40 +00:00
|
|
|
# Propagate the chosen python version to submakes.
|
|
|
|
.MAKEFLAGS: PYTHON_VERSION=python${_PYTHON_VERSION}
|
|
|
|
|
2005-01-29 05:01:02 +00:00
|
|
|
# Python-2.5
|
|
|
|
.if ${PYTHON_VERSION} == "python2.5"
|
|
|
|
PYTHON_PORTVERSION?=2.5.a0.20050129
|
|
|
|
PYTHON_PORTSDIR= ${PORTSDIR}/lang/python-devel
|
|
|
|
PYTHON_REL= 250
|
|
|
|
PYTHON_SUFFIX= 25
|
|
|
|
|
2003-07-31 19:34:54 +00:00
|
|
|
# Python-2.4
|
2005-01-29 05:01:02 +00:00
|
|
|
.elif ${PYTHON_VERSION} == "python2.4"
|
2004-12-01 15:04:05 +00:00
|
|
|
PYTHON_PORTVERSION?=2.4
|
|
|
|
PYTHON_PORTSDIR= ${PORTSDIR}/lang/python
|
2003-07-31 19:34:54 +00:00
|
|
|
PYTHON_REL= 240
|
|
|
|
PYTHON_SUFFIX= 24
|
|
|
|
|
|
|
|
# Python-2.3
|
|
|
|
.elif ${PYTHON_VERSION} == "python2.3"
|
2004-05-27 15:58:02 +00:00
|
|
|
PYTHON_PORTVERSION?=2.3.4
|
2004-12-01 15:04:05 +00:00
|
|
|
PYTHON_PORTSDIR= ${PORTSDIR}/lang/python23
|
2004-05-27 15:58:02 +00:00
|
|
|
PYTHON_REL= 234
|
2003-07-03 14:41:09 +00:00
|
|
|
PYTHON_SUFFIX= 23
|
|
|
|
|
2002-01-07 13:26:47 +00:00
|
|
|
# Python-2.2
|
2003-07-03 14:41:09 +00:00
|
|
|
.elif ${PYTHON_VERSION} == "python2.2"
|
2003-10-19 08:49:29 +00:00
|
|
|
PYTHON_PORTVERSION?=2.2.3
|
2003-07-31 19:34:54 +00:00
|
|
|
PYTHON_PORTSDIR= ${PORTSDIR}/lang/python22
|
2003-06-04 08:36:48 +00:00
|
|
|
PYTHON_REL= 223
|
2002-01-07 13:26:47 +00:00
|
|
|
PYTHON_SUFFIX= 22
|
|
|
|
|
2001-05-02 11:49:36 +00:00
|
|
|
# Python-2.1
|
2002-01-07 13:26:47 +00:00
|
|
|
.elif ${PYTHON_VERSION} == "python2.1"
|
2003-10-19 08:49:29 +00:00
|
|
|
PYTHON_PORTVERSION?=2.1.3
|
2002-01-16 12:23:24 +00:00
|
|
|
PYTHON_PORTSDIR= ${PORTSDIR}/lang/python21
|
2002-04-11 11:29:52 +00:00
|
|
|
PYTHON_REL= 213
|
2002-01-07 13:26:47 +00:00
|
|
|
PYTHON_SUFFIX= 21
|
2000-09-08 11:43:37 +00:00
|
|
|
|
2002-06-14 11:17:08 +00:00
|
|
|
# Python versions in development
|
|
|
|
.elif defined(FORCE_PYTHON_VERSION)
|
|
|
|
PYTHON_PORTSDIR= # empty
|
|
|
|
PYTHON_NO_DEPENDS= YES
|
|
|
|
PYTHON_REL!= ${PYTHON_CMD} -c 'import sys; h = "%x" % sys.hexversion; \
|
|
|
|
print h[0]+h[2]+h[4]'
|
|
|
|
PYTHON_SUFFIX!= ${PYTHON_CMD} -c 'import sys; h = "%x" % sys.hexversion; \
|
|
|
|
print h[0]+h[2]'
|
|
|
|
|
2000-09-08 11:43:37 +00:00
|
|
|
.else
|
2004-01-20 09:14:10 +00:00
|
|
|
check-makevars::
|
|
|
|
@${ECHO} "Makefile error: bad value for PYTHON_VERSION: ${PYTHON_VERSION}."
|
2001-05-02 11:49:36 +00:00
|
|
|
@${ECHO} "Legal values are:"
|
2002-01-11 12:05:29 +00:00
|
|
|
@${ECHO} " python2.1"
|
2003-07-31 19:34:54 +00:00
|
|
|
@${ECHO} " python2.2"
|
2005-01-29 05:01:02 +00:00
|
|
|
@${ECHO} " python2.3"
|
|
|
|
@${ECHO} " python2.4 (default)"
|
|
|
|
@${ECHO} " python2.5"
|
2000-09-08 11:43:37 +00:00
|
|
|
@${FALSE}
|
|
|
|
.endif
|
|
|
|
|
2005-01-29 05:01:02 +00:00
|
|
|
.if defined(PYTHON_REL) && ${PYTHON_REL} == 250
|
|
|
|
PYTHON_MASTER_SITES= ${MASTER_SITE_LOCAL}
|
|
|
|
PYTHON_MASTER_SITE_SUBDIR= perky
|
|
|
|
PYTHON_DISTFILE= Python-${PYTHON_PORTVERSION}.tgz
|
2004-07-08 15:53:45 +00:00
|
|
|
.else
|
2005-01-29 05:01:02 +00:00
|
|
|
PYTHON_MASTER_SITES= ${MASTER_SITE_PYTHON}
|
2003-10-29 21:31:13 +00:00
|
|
|
PYTHON_MASTER_SITE_SUBDIR= ftp/python/${PYTHON_PORTVERSION}
|
|
|
|
PYTHON_DISTFILE= Python-${PYTHON_PORTVERSION}.tgz
|
2005-01-29 05:01:02 +00:00
|
|
|
.endif # defined(PYTHON_REL) && ${PYTHON_REL} == 250
|
2003-10-29 21:31:13 +00:00
|
|
|
PYTHON_WRKSRC= ${WRKDIR}/Python-${PYTHON_PORTVERSION}
|
2003-10-19 08:49:29 +00:00
|
|
|
|
2002-06-14 11:17:08 +00:00
|
|
|
PYTHON_INCLUDEDIR= ${PYTHONBASE}/include/${PYTHON_VERSION}
|
|
|
|
PYTHON_LIBDIR= ${PYTHONBASE}/lib/${PYTHON_VERSION}
|
2000-09-28 11:24:31 +00:00
|
|
|
PYTHON_PKGNAMEPREFIX= py${PYTHON_SUFFIX}-
|
2003-10-16 05:58:53 +00:00
|
|
|
PYTHON_PKGNAMESUFFIX= -py${PYTHON_SUFFIX}
|
2004-10-22 01:34:05 +00:00
|
|
|
PYTHON_PLATFORM!= ${EXPR} ${OPSYS:L}${OSREL} : '\([a-z]*[0-9]*\)\.'
|
2000-09-28 11:24:31 +00:00
|
|
|
PYTHON_SITELIBDIR= ${PYTHON_LIBDIR}/site-packages
|
2002-06-14 11:17:08 +00:00
|
|
|
|
|
|
|
PYTHONPREFIX_INCLUDEDIR= ${PYTHON_INCLUDEDIR:S;${PYTHONBASE};${PREFIX};}
|
|
|
|
PYTHONPREFIX_LIBDIR= ${PYTHON_LIBDIR:S;${PYTHONBASE};${PREFIX};}
|
|
|
|
PYTHONPREFIX_SITELIBDIR= ${PYTHON_SITELIBDIR:S;${PYTHONBASE};${PREFIX};}
|
|
|
|
|
2002-04-17 11:34:47 +00:00
|
|
|
PYSETUP?= setup.py
|
2004-07-08 15:53:45 +00:00
|
|
|
PYDISTUTILS_CONFIGUREARGS?=
|
2002-04-17 11:34:47 +00:00
|
|
|
PYDISTUTILS_BUILDARGS?=
|
|
|
|
PYDISTUTILS_INSTALLARGS?= -c -O1 --prefix=${PREFIX}
|
2000-09-08 11:43:37 +00:00
|
|
|
|
2002-09-20 18:56:41 +00:00
|
|
|
# Zope specific variables
|
|
|
|
.if defined(USE_ZOPE)
|
|
|
|
SZOPEBASEDIR?= www/Zope
|
2004-04-19 07:29:44 +00:00
|
|
|
ZOPEBASEDIR?= ${PREFIX}/${SZOPEBASEDIR}
|
|
|
|
ZOPEPRODUCTDIR?= Products
|
2002-09-20 18:56:41 +00:00
|
|
|
.endif
|
|
|
|
|
2003-07-31 19:34:54 +00:00
|
|
|
PYDISTUTILS= ${PYTHON_LIBDIR}/distutils/core.py:${PYTHON_PORTSDIR}
|
|
|
|
PYNUMERIC= ${PYTHON_SITELIBDIR}/Numeric/Numeric.py:${PORTSDIR}/math/py-numeric
|
|
|
|
PYXML= ${PYTHON_SITELIBDIR}/_xmlplus/__init__.py:${PORTSDIR}/textproc/py-xml
|
|
|
|
|
2003-11-04 18:07:03 +00:00
|
|
|
.if defined(PYTHON_REL) && ${PYTHON_REL} < 232
|
|
|
|
PYEXPAT= ${PYTHON_SITELIBDIR}/pyexpat.so:${PORTSDIR}/textproc/py-expat
|
|
|
|
.else
|
|
|
|
PYEXPAT= ${PYTHON_LIBDIR}/lib-dynload/pyexpat.so:${PYTHON_PORTSDIR}
|
|
|
|
.endif
|
|
|
|
|
2000-09-08 11:43:37 +00:00
|
|
|
# dependencies
|
2000-09-28 11:24:31 +00:00
|
|
|
PYTHON_NO_DEPENDS?= NO
|
2000-09-08 11:43:37 +00:00
|
|
|
|
|
|
|
.if ${PYTHON_NO_DEPENDS} == "NO"
|
2004-07-08 15:53:45 +00:00
|
|
|
.if defined(USE_PYTHON_BUILD)
|
2000-09-08 11:43:37 +00:00
|
|
|
BUILD_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR}
|
2004-07-08 15:53:45 +00:00
|
|
|
.endif
|
|
|
|
.if defined(USE_PYTHON_RUN)
|
2000-09-08 11:43:37 +00:00
|
|
|
RUN_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR}
|
2004-07-08 15:53:45 +00:00
|
|
|
.endif
|
2002-04-17 11:34:47 +00:00
|
|
|
.endif # ${PYTHON_NO_DEPENDS} == "NO"
|
2000-09-08 11:43:37 +00:00
|
|
|
|
2002-09-20 18:56:41 +00:00
|
|
|
.if defined(USE_ZOPE)
|
2004-04-02 00:00:29 +00:00
|
|
|
RUN_DEPENDS+= ${ZOPEBASEDIR}/skel/bin/zopectl.in:${PORTSDIR}/www/zope
|
2002-09-20 18:56:41 +00:00
|
|
|
.endif
|
|
|
|
|
2002-06-14 11:17:08 +00:00
|
|
|
# set $PREFIX as Python's one
|
|
|
|
.if defined(USE_PYTHON_PREFIX)
|
|
|
|
PREFIX= ${PYTHONBASE}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# Substitutions for pkg-plist
|
|
|
|
# Use a short form of the PYTHONPREFIX_*DIR variables; we don't need the
|
|
|
|
# base directory in the plist file.
|
|
|
|
PLIST_SUB+= PYTHON_INCLUDEDIR=${PYTHONPREFIX_INCLUDEDIR:S;${PREFIX}/;;} \
|
|
|
|
PYTHON_LIBDIR=${PYTHONPREFIX_LIBDIR:S;${PREFIX}/;;} \
|
|
|
|
PYTHON_PLATFORM=${PYTHON_PLATFORM} \
|
|
|
|
PYTHON_SITELIBDIR=${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} \
|
|
|
|
PYTHON_VERSION=${PYTHON_VERSION}
|
2000-09-28 11:24:31 +00:00
|
|
|
|
2002-09-20 18:56:41 +00:00
|
|
|
# Zope specific substitutions
|
|
|
|
.if defined(USE_ZOPE)
|
2004-01-26 02:11:36 +00:00
|
|
|
PLIST_SUB+= ZOPEBASEDIR=${SZOPEBASEDIR} \
|
|
|
|
ZOPEPRODUCTDIR=${SZOPEBASEDIR}/${ZOPEPRODUCTDIR}
|
2002-09-20 18:56:41 +00:00
|
|
|
.endif
|
|
|
|
|
2000-09-28 11:24:31 +00:00
|
|
|
# XXX Hm, should I export some of the variables above to *_ENV?
|
|
|
|
|
2002-04-17 11:34:47 +00:00
|
|
|
.endif # !defined(_POSTMKINCLUDED) && !defined(Python_Pre_Include)
|
|
|
|
|
|
|
|
.if defined(_POSTMKINCLUDED) && !defined(Python_Post_Include)
|
|
|
|
|
|
|
|
Python_Post_Include= bsd.python.mk
|
|
|
|
|
|
|
|
# py-distutils support
|
|
|
|
.if defined(USE_PYDISTUTILS)
|
2004-07-10 02:00:14 +00:00
|
|
|
.if !target(do-configure) && !defined(HAS_CONFIGURE) && !defined(GNU_CONFIGURE)
|
2004-07-08 15:53:45 +00:00
|
|
|
do-configure:
|
|
|
|
@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} config ${PYDISTUTILS_CONFIGUREARGS})
|
|
|
|
.endif
|
|
|
|
|
2002-04-17 11:34:47 +00:00
|
|
|
.if !target(do-build)
|
|
|
|
do-build:
|
|
|
|
@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} build ${PYDISTUTILS_BUILDARGS})
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !target(do-install)
|
|
|
|
do-install:
|
|
|
|
@(cd ${INSTALL_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} install ${PYDISTUTILS_INSTALLARGS})
|
|
|
|
.endif
|
|
|
|
.endif # defined(USE_PYDISTUTILS)
|
|
|
|
|
|
|
|
.endif # defined(_POSTMKINCLUDED) && !defined(Python_Post_Include)
|