1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-21 04:06:46 +00:00

- Introduce PYTHON_ABIVER: fix PYTHON_INCLUDEDIR for python32 users (PYMALLOC and UCS4 are on by default)

- Use devel/py-distribute as setuptools for python 3.x users
- Use py${PYTHON_VER} instead of ${PYTHON_VERSION:S/thon//}
- Use "yes"

PR:		ports/158662
Submitted by:	sunpoet (myself)
Reviewed by:	lwhsu
Tested by:	exp-run by pav
With Hat:	python
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2011-07-14 04:13:24 +00:00
parent 17e06e5500
commit 96cd508600
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=277662

View File

@ -152,14 +152,14 @@ Python_Include_MAINTAINER= python@FreeBSD.org
#
# PYDISTUTILS_EGGINFO
# - Canonical name for egg-info.
# default: ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-${PYTHON_VERSION:S/thon//}.egg-info
# default: ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-py${PYTHON_VER}.egg-info
#
# PYDISTUTILS_NOEGGINFO
# - Skip an egg-info entry from plist when defined.
#
# PYEASYINSTALL_EGG
# - Canonical directory name for easy_install egg packages.
# default: ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-${PYTHON_VERSION:S/thon//}${PYEASYINSTALL_OSARCH}.egg
# default: ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-py${PYTHON_VER}${PYEASYINSTALL_OSARCH}.egg
#
# PYEASYINSTALL_OSARCH
# - Platform identifier for easy_install.
@ -286,7 +286,7 @@ USE_PYTHON= ${USE_PYTHON_BUILD}
.elif defined(USE_PYTHON_RUN)
USE_PYTHON= ${USE_PYTHON_RUN}
.else
USE_PYTHON= any
USE_PYTHON= yes
.endif # defined(USE_PYTHON_BUILD)
.else
USE_PYTHON_BUILD= yes
@ -364,6 +364,9 @@ PYTHON_PORTSDIR= ${PORTSDIR}/lang/python32
PYTHON_REL= 320
PYTHON_SUFFIX= 32
PYTHON_VER= 3.2
.if exists(${PYTHON_CMD}-config)
PYTHON_ABIVER!= ${PYTHON_CMD}-config --abiflags
.endif
# Python-3.1
.elif ${PYTHON_VERSION} == "python3.1"
@ -433,7 +436,8 @@ PYTHON_MASTER_SITE_SUBDIR= ftp/python/${PYTHON_PORTVERSION:C/rc[0-9]//}
PYTHON_DISTFILE= Python-${PYTHON_PORTVERSION:S/.rc/rc/}.tgz
PYTHON_WRKSRC= ${WRKDIR}/Python-${PYTHON_PORTVERSION:S/.rc/rc/}
PYTHON_INCLUDEDIR= ${PYTHONBASE}/include/${PYTHON_VERSION}
PYTHON_ABIVER?= # empty
PYTHON_INCLUDEDIR= ${PYTHONBASE}/include/${PYTHON_VERSION}${PYTHON_ABIVER}
PYTHON_LIBDIR= ${PYTHONBASE}/lib/${PYTHON_VERSION}
PYTHON_PKGNAMEPREFIX= py${PYTHON_SUFFIX}-
PYTHON_PKGNAMESUFFIX= -py${PYTHON_SUFFIX}
@ -446,8 +450,13 @@ PYTHONPREFIX_SITELIBDIR= ${PYTHON_SITELIBDIR:S;${PYTHONBASE};${PREFIX};}
# setuptools support
.if defined(USE_PYDISTUTILS) && ${USE_PYDISTUTILS} == "easy_install"
.if ${PYTHON_SUFFIX} < 30
BUILD_DEPENDS+= ${PYEASYINSTALL_CMD}:${PORTSDIR}/devel/py-setuptools
RUN_DEPENDS+= ${PYEASYINSTALL_CMD}:${PORTSDIR}/devel/py-setuptools
.else
BUILD_DEPENDS+= ${PYEASYINSTALL_CMD}:${PORTSDIR}/devel/py-distribute
RUN_DEPENDS+= ${PYEASYINSTALL_CMD}:${PORTSDIR}/devel/py-distribute
.endif
PYDISTUTILS_BUILD_TARGET?= bdist_egg
PYDISTUTILS_INSTALL_TARGET?= easy_install
@ -465,7 +474,7 @@ _OSRELEASE!= ${UNAME} -r
.endif
PYEASYINSTALL_OSARCH?= -${OPSYS:L}-${_OSRELEASE}-${ARCH}
.endif
PYEASYINSTALL_EGG?= ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-${PYTHON_VERSION:S/thon//}${PYEASYINSTALL_OSARCH}.egg
PYEASYINSTALL_EGG?= ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-py${PYTHON_VER}${PYEASYINSTALL_OSARCH}.egg
PYEASYINSTALL_CMD?= ${LOCALBASE}/bin/easy_install-${PYTHON_VER}
PYEASYINSTALL_BINDIR?= ${PREFIX}/bin
PYEASYINSTALL_SITELIBDIR?= ${PYTHONPREFIX_SITELIBDIR}
@ -503,7 +512,7 @@ PYDISTUTILS_BUILDARGS?=
PYDISTUTILS_INSTALLARGS?= -c -O1 --prefix=${PREFIX}
PYDISTUTILS_PKGNAME?= ${PORTNAME}
PYDISTUTILS_PKGVERSION?=${PORTVERSION}
PYDISTUTILS_EGGINFO?= ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-${PYTHON_VERSION:S/thon//}.egg-info
PYDISTUTILS_EGGINFO?= ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-py${PYTHON_VER}.egg-info
PYDISTUTILS_EGGINFODIR?=${PYTHONPREFIX_SITELIBDIR}
.if !defined(PYDISTUTILS_NOEGGINFO) && \