Import of pkgsrc-2014Q1
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $NetBSD: application.mk,v 1.10 2010/07/24 18:12:11 gdt Exp $
|
||||
# $NetBSD: application.mk,v 1.11 2014/01/25 10:45:50 wiz Exp $
|
||||
#
|
||||
# Replace the #! interpreter for Python scripts.
|
||||
#
|
||||
@@ -12,17 +12,14 @@
|
||||
# REPLACE_PYTHON
|
||||
# A list of Python scripts to be installed, relative to ${WRKSRC}.
|
||||
#
|
||||
# PYTHON_PATCH_SCRIPTS
|
||||
# The same as REPLACE_PYTHON.
|
||||
#
|
||||
# Keywords: python
|
||||
#
|
||||
|
||||
.include "../../lang/python/pyversion.mk"
|
||||
|
||||
.if defined(PYTHON_PATCH_SCRIPTS) || defined(REPLACE_PYTHON)
|
||||
.if defined(REPLACE_PYTHON)
|
||||
REPLACE_INTERPRETER+= python
|
||||
REPLACE.python.old= .*python[^ ]*
|
||||
REPLACE.python.new= ${PYTHONBIN}
|
||||
REPLACE_FILES.python= ${PYTHON_PATCH_SCRIPTS} ${REPLACE_PYTHON}
|
||||
REPLACE_FILES.python= ${REPLACE_PYTHON}
|
||||
.endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $NetBSD: egg.mk,v 1.15 2012/12/10 03:15:48 tsarna Exp $
|
||||
# $NetBSD: egg.mk,v 1.17 2014/01/26 00:41:07 wiz Exp $
|
||||
#
|
||||
# Common logic to handle Python Eggs
|
||||
#
|
||||
@@ -36,11 +36,7 @@ _PYSETUPTOOLSINSTALLARGS= --single-version-externally-managed
|
||||
_PYSETUPTOOLSINSTALLARGS+= --root=/
|
||||
.endif
|
||||
|
||||
.if ${_PYTHON_VERSION} == "31" || ${_PYTHON_VERSION} == "32" || ${_PYTHON_VERSION} == "33"
|
||||
DEPENDS+= ${PYPKGPREFIX}-distribute-[0-9]*:../../devel/py-distribute
|
||||
.else
|
||||
DEPENDS+= ${PYPKGPREFIX}-setuptools>=0.6c9:../../devel/py-setuptools
|
||||
.endif
|
||||
|
||||
INSTALLATION_DIRS+= ${PYSITELIB}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $NetBSD: extension.mk,v 1.31 2012/10/03 22:03:41 wiz Exp $
|
||||
# $NetBSD: extension.mk,v 1.37 2014/01/24 12:42:52 obache Exp $
|
||||
|
||||
.include "../../lang/python/pyversion.mk"
|
||||
|
||||
@@ -25,6 +25,9 @@ _PYSETUPINSTALLARGS= ${PYSETUPINSTALLARGS} ${PYSETUPOPTARGS} ${_PYSETUPTOOLSINST
|
||||
_PYSETUPINSTALLARGS+= --root=${DESTDIR:Q}
|
||||
.endif
|
||||
PY_PATCHPLIST?= yes
|
||||
PYSETUPINSTALLARGS?= #empty
|
||||
PYSETUPTESTTARGET?= test
|
||||
PYSETUPTESTARGS?= #empty
|
||||
PYSETUPSUBDIR?= #empty
|
||||
|
||||
do-build:
|
||||
@@ -34,6 +37,12 @@ do-build:
|
||||
do-install:
|
||||
(cd ${WRKSRC}/${PYSETUPSUBDIR} && ${SETENV} ${INSTALL_ENV} ${MAKE_ENV} \
|
||||
${PYTHONBIN} ${PYSETUP} ${PYSETUPARGS} "install" ${_PYSETUPINSTALLARGS})
|
||||
.if !target(do-test) && !(defined(TEST_TARGET) && !empty(TEST_TARGET))
|
||||
do-test:
|
||||
(cd ${WRKSRC}/${PYSETUPSUBDIR} && ${SETENV} ${MAKE_ENV} ${PYTHONBIN} \
|
||||
${PYSETUP} ${PYSETUPARGS} ${PYSETUPTESTTARGET} ${PYSETUPTESTARGS})
|
||||
.endif
|
||||
|
||||
.endif
|
||||
|
||||
# PY_NO_EGG suppress the installation of the egg info file (and
|
||||
@@ -52,8 +61,15 @@ INSTALL_ENV+= PKGSRC_PYTHON_NO_EGG=defined
|
||||
PLIST_SUBST+= PYINC=${PYINC} PYLIB=${PYLIB} PYSITELIB=${PYSITELIB}
|
||||
.endif
|
||||
|
||||
# prepare Python>=32 bytecode file location change
|
||||
.if empty(_PYTHON_VERSION:M2?) && ${_PYTHON_VERSION} != "31"
|
||||
# prepare Python>=3.2 bytecode file location change
|
||||
# http://www.python.org/dev/peps/pep-3147/
|
||||
.if empty(_PYTHON_VERSION:M2?)
|
||||
PY_PEP3147?= yes
|
||||
.endif
|
||||
.if defined(PY_PEP3147) && !empty(PY_PEP3147:M[yY][eE][sS])
|
||||
PLIST_AWK+= -f ${PKGSRCDIR}/lang/python/plist-python.awk
|
||||
PLIST_AWK_ENV+= PYTHON_SOABI="cpython-${_PYTHON_VERSION}"
|
||||
PRINT_PLIST_AWK+= /^[^@]/ && /[^\/]+\.py[co]$$/ {
|
||||
PRINT_PLIST_AWK+= gsub(/__pycache__\//, "")
|
||||
PRINT_PLIST_AWK+= gsub(/\.cpython-${_PYTHON_VERSION}/, "")}
|
||||
.endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $NetBSD: pyversion.mk,v 1.109 2013/05/12 00:19:55 riastradh Exp $
|
||||
# $NetBSD: pyversion.mk,v 1.113 2014/01/25 10:31:01 wiz Exp $
|
||||
|
||||
# This file determines which Python version is used as a dependency for
|
||||
# a package.
|
||||
@@ -8,7 +8,7 @@
|
||||
# PYTHON_VERSION_DEFAULT
|
||||
# The preferred Python version to use.
|
||||
#
|
||||
# Possible values: 26 27 32 33
|
||||
# Possible values: 26 27 33
|
||||
# Default: 27
|
||||
#
|
||||
# === Infrastructure variables ===
|
||||
@@ -27,22 +27,14 @@
|
||||
# order of the entries matters, since earlier entries are
|
||||
# preferred over later ones.
|
||||
#
|
||||
# Possible values: 33 32 27 26
|
||||
# Default: (33 32) 27 26
|
||||
#
|
||||
# PYTHON_VERSIONS_INCLUDE_3X
|
||||
# Wether the default PYTHON_VERSIONS_ACCEPTED should include
|
||||
# 3.x versions for for this package or not.
|
||||
# This variable must be set before including bsd.prefs.mk.
|
||||
#
|
||||
# Possible values: yes no
|
||||
# Default: no
|
||||
# Possible values: 33 27 26
|
||||
# Default: (33) 27 26
|
||||
#
|
||||
# PYTHON_VERSIONS_INCOMPATIBLE
|
||||
# The Python versions that are NOT acceptable for the package.
|
||||
#
|
||||
# Possible values: 26 27 32 33
|
||||
# Default: (depends on the platform)
|
||||
# Possible values: 26 27 33
|
||||
# Default: (empty)
|
||||
#
|
||||
# PYTHON_FOR_BUILD_ONLY
|
||||
# Whether Python is needed only at build time or at run time.
|
||||
@@ -93,16 +85,11 @@ BUILD_DEFS+= PYTHON_VERSION_DEFAULT
|
||||
BUILD_DEFS_EFFECTS+= PYPACKAGE
|
||||
|
||||
PYTHON_VERSION_DEFAULT?= 27
|
||||
.if ${PYTHON_VERSIONS_INCLUDE_3X:U:tl} == "yes"
|
||||
PYTHON_VERSIONS_ACCEPTED?= 33 32 27 26
|
||||
.else
|
||||
PYTHON_VERSIONS_ACCEPTED?= 27 26
|
||||
.endif
|
||||
PYTHON_VERSIONS_ACCEPTED?= 33 27 26
|
||||
PYTHON_VERSIONS_INCOMPATIBLE?= # empty by default
|
||||
|
||||
BUILDLINK_API_DEPENDS.python26?= python26>=2.6
|
||||
BUILDLINK_API_DEPENDS.python27?= python27>=2.7
|
||||
BUILDLINK_API_DEPENDS.python32?= python32>=3.2
|
||||
BUILDLINK_API_DEPENDS.python33?= python33>=3.3
|
||||
|
||||
# transform the list into individual variables
|
||||
@@ -166,13 +153,6 @@ PYPACKAGE= python33
|
||||
PYVERSSUFFIX= 3.3
|
||||
PYPKGPREFIX= py33
|
||||
PLIST.py3x= yes
|
||||
.elif ${_PYTHON_VERSION} == "32"
|
||||
PYPKGSRCDIR= ../../lang/python32
|
||||
PYDEPENDENCY= ${BUILDLINK_API_DEPENDS.python32}:${PYPKGSRCDIR}
|
||||
PYPACKAGE= python32
|
||||
PYVERSSUFFIX= 3.2
|
||||
PYPKGPREFIX= py32
|
||||
PLIST.py3x= yes
|
||||
.elif ${_PYTHON_VERSION} == "27"
|
||||
PYPKGSRCDIR= ../../lang/python27
|
||||
PYDEPENDENCY= ${BUILDLINK_API_DEPENDS.python27}:${PYPKGSRCDIR}
|
||||
|
||||
53
lang/python/versioned_dependencies.mk
Normal file
53
lang/python/versioned_dependencies.mk
Normal file
@@ -0,0 +1,53 @@
|
||||
# $NetBSD: versioned_dependencies.mk,v 1.11 2014/01/31 11:26:12 wiz Exp $
|
||||
#
|
||||
# This file determines which separate distribution of a Python
|
||||
# package is used as dependency, depending on the Python version
|
||||
# used.
|
||||
#
|
||||
# === User-settable variables ===
|
||||
#
|
||||
# PYTHON_VERSIONED_DEPENDENCIES
|
||||
# The Python package which should be added as a dependency.
|
||||
#
|
||||
# Possible values: dateutil
|
||||
# Default: (nothing)
|
||||
#
|
||||
|
||||
.include "../../lang/python/pyversion.mk"
|
||||
|
||||
_SUPPORTED_PACKAGES=# empty
|
||||
_SUPPORTED_PACKAGES+=Pmw x11/py-Pmw x11/py-Pmw2
|
||||
_SUPPORTED_PACKAGES+=X x11/py-X2 x11/py-X
|
||||
_SUPPORTED_PACKAGES+=cairo graphics/py-cairo graphics/py-cairo3
|
||||
_SUPPORTED_PACKAGES+=dateutil time/py-dateutil time/py-dateutil2
|
||||
_SUPPORTED_PACKAGES+=dns net/py-dns net/py-dns3
|
||||
_SUPPORTED_PACKAGES+=ephem math/py-ephem math/py-ephem3
|
||||
_SUPPORTED_PACKAGES+=flup www/py-flup www/py-flup3
|
||||
_SUPPORTED_PACKAGES+=jsonlib textproc/py-jsonlib textproc/py-jsonlib3
|
||||
_SUPPORTED_PACKAGES+=unittest2 devel/py-unittest2 devel/py-unittest2py3k
|
||||
|
||||
.for pattern in ${PYTHON_VERSIONED_DEPENDENCIES}
|
||||
_PKG_MATCHED= no
|
||||
pkg:= ${pattern:C/:.*//}
|
||||
type:= ${pattern:C/[^:]*//}
|
||||
.for name py2dir py3dir in ${_SUPPORTED_PACKAGES}
|
||||
.if "${pkg}" == "${name}"
|
||||
_PKG_MATCHED= yes
|
||||
.if ${PYPKGPREFIX} == "py26" || ${PYPKGPREFIX} == "py27"
|
||||
dir:= ${py2dir}
|
||||
.else
|
||||
dir:= ${py3dir}
|
||||
.endif
|
||||
.if "${type}" == ":link"
|
||||
.include "../../${dir}/buildlink3.mk"
|
||||
.elif "${type}" == ":build"
|
||||
BUILD_DEPENDS:= ${BUILD_DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir}
|
||||
.else
|
||||
DEPENDS:= ${DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir}
|
||||
.endif
|
||||
.endif
|
||||
.endfor
|
||||
.if ${_PKG_MATCHED} == "no"
|
||||
PKG_FAIL_REASON= "${pkg} unsupported in PYTHON_VERSIONED_DEPENDENCIES"
|
||||
.endif
|
||||
.endfor
|
||||
Reference in New Issue
Block a user