diff options
author | Li-Wen Hsu <lwhsu@FreeBSD.org> | 2012-12-23 17:52:46 +0000 |
---|---|---|
committer | Li-Wen Hsu <lwhsu@FreeBSD.org> | 2012-12-23 17:52:46 +0000 |
commit | 6e2fa0573bdbe896a47e2e1d3e49cd84e62d1555 (patch) | |
tree | 7b7863a91726bf0c0cdaa1808b76f78087314103 /lang/python31 | |
parent | - Update to 0.4.9 (diff) |
- Remove "first-installed-win" logic for automatically setting
${PYTHON_DEFAULT_VERSION}, this generates conflicting packages.
- Create symbolic links as PEP 394 [1] suggests. ${PYTHON_DEFAULT_VERSION}
will create python and python${MAJOR_VERSION} links. In current default,
lang/python27 will create: python -> python2 -> python2.7
- Introduce ${PYTHON3_DEFAULT_VERSION}, which will handle bin/python3 link.
At this point, lang/python33 will create python3 -> python3.3
- Minor cleanups
* Trim Makefile headers
* Remove ${OSVERSION} detection for xz, whihc is done by USE_XZ
[1] http://www.python.org/dev/peps/pep-0394/
Notes
Notes:
svn path=/head/; revision=309444
Diffstat (limited to 'lang/python31')
-rw-r--r-- | lang/python31/Makefile | 26 | ||||
-rw-r--r-- | lang/python31/pkg-plist | 2 |
2 files changed, 19 insertions, 9 deletions
diff --git a/lang/python31/Makefile b/lang/python31/Makefile index 59c32c55ffea..7709a6ffc311 100644 --- a/lang/python31/Makefile +++ b/lang/python31/Makefile @@ -1,13 +1,8 @@ -# New ports collection makefile for: python31 -# Date created: 2009-06-28 -# Whom: Li-Wen Hsu <lwhsu@FreeBSD.org> -# # $FreeBSD$ -# PORTNAME= python31 PORTVERSION= 3.1.5 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= lang python ipv6 MASTER_SITES= ${PYTHON_MASTER_SITES} MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR} @@ -37,6 +32,7 @@ SHARED_WRKSRC= ${PYTHON_WRKSRC}/portbld.shared PLIST= ${WRKDIR}/PLIST PLIST_TEMPLATE?=${PKGDIR}/pkg-plist PLIST_SUB= PYVER=${PYTHON_VERSION:S/python//} \ + PYMAJOR=${PYTHON_MAJOR_VER} \ PYVER_WITHPAT=${PORTVERSION:S/.rc/rc/} EXAMPLESDIR= ${PREFIX}/share/examples/${PYTHON_VERSION} DATADIR= ${PREFIX}/share/${PYTHON_VERSION} @@ -58,13 +54,19 @@ NLS_DESC= Enable Gettext support for the locale module .include <bsd.port.pre.mk> -.if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION} || !exists(${LOCALBASE}/bin/python) +.if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION} MLINKS= ${PYTHON_VERSION}.1 python.1 PLIST_SUB+= IF_DEFAULT="" .else PLIST_SUB+= IF_DEFAULT="@comment " .endif +.if ${PYTHON_VERSION} == ${PYTHON3_DEFAULT_VERSION} +PLIST_SUB+= IF_DEFAULT_MAJOR="" +.else +PLIST_SUB+= IF_DEFAULT_MAJOR="@comment " +.endif + .if ${PORT_OPTIONS:MNLS} USE_GETTEXT= yes # XXX do not set any LDFLAGS or CFLAGS - this causes pyexpat to fail building @@ -216,13 +218,19 @@ post-install: ${INSTALL_MAN} ${PYTHON_WRKSRC}/Misc/python.man \ ${MANPREFIX}/man/man1/${PYTHON_VERSION}.1 -.if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION} || !exists(${LOCALBASE}/bin/python) +.if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION} for f in ${BIN_FILES}; do \ TARGET=`${ECHO_CMD} $$f | ${SED} -E ${BINLINKS_SUB}`; \ - cd ${PREFIX}/bin && ${LN} -f $$TARGET $$f; \ + cd ${PREFIX}/bin && ${LN} -sf $$TARGET $$f; \ done .endif +.if ${PYTHON_VERSION} == ${PYTHON3_DEFAULT_VERSION} +.for file in python python-config + cd ${LOCALBASE}/bin && ${LN} -sf ${file:S/python/${PYTHON_VERSION}/} ${file:S/python/python${PYTHON_MAJOR_VER}/} +.endfor +.endif + .if !defined(NOPORTDATA) @${MKDIR} ${DATADIR} @cd ${PYTHON_WRKSRC}; ${TAR} -cf - Tools | \ diff --git a/lang/python31/pkg-plist b/lang/python31/pkg-plist index 52d8d909749f..f64379eb1ee0 100644 --- a/lang/python31/pkg-plist +++ b/lang/python31/pkg-plist @@ -5,8 +5,10 @@ bin/idle3-%%PYVER%% %%IF_DEFAULT%%bin/pydoc3 bin/pydoc3-%%PYVER%% %%IF_DEFAULT%%bin/python +%%IF_DEFAULT_MAJOR%%bin/python%%PYMAJOR%% bin/python%%PYVER%% %%IF_DEFAULT%%bin/python-config +%%IF_DEFAULT_MAJOR%%bin/python%%PYMAJOR%%-config bin/python%%PYVER%%-config %%IF_DEFAULT%%bin/python-shared bin/python-shared%%PYVER%% |