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 | |
parent | 0c590e6c7a2c631472317099f0d2b647fd7ac6ac (diff) | |
download | ports-6e2fa0573bdbe896a47e2e1d3e49cd84e62d1555.tar.gz ports-6e2fa0573bdbe896a47e2e1d3e49cd84e62d1555.zip |
Notes
Diffstat (limited to 'lang')
-rw-r--r-- | lang/python26/Makefile | 33 | ||||
-rw-r--r-- | lang/python26/pkg-plist | 8 | ||||
-rw-r--r-- | lang/python27/Makefile | 31 | ||||
-rw-r--r-- | lang/python27/pkg-plist | 10 | ||||
-rw-r--r-- | lang/python31/Makefile | 26 | ||||
-rw-r--r-- | lang/python31/pkg-plist | 2 | ||||
-rw-r--r-- | lang/python32/Makefile | 26 | ||||
-rw-r--r-- | lang/python32/pkg-plist | 2 | ||||
-rw-r--r-- | lang/python33/Makefile | 27 | ||||
-rw-r--r-- | lang/python33/pkg-plist | 4 |
10 files changed, 100 insertions, 69 deletions
diff --git a/lang/python26/Makefile b/lang/python26/Makefile index 2adcaa387949..7ef43154d4a2 100644 --- a/lang/python26/Makefile +++ b/lang/python26/Makefile @@ -1,13 +1,9 @@ -# New ports collection makefile for: python26 -# Date created: 3 July 2003 -# Whom: Hye-Shik Chang <perky@FreeBSD.org> -# +# Created by: Hye-Shik Chang <perky@FreeBSD.org> # $FreeBSD$ -# PORTNAME= python26 PORTVERSION= 2.6.8 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= lang python ipv6 MASTER_SITES= ${PYTHON_MASTER_SITES} MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR} @@ -37,6 +33,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/.c/c/} EXAMPLESDIR= ${PREFIX}/share/examples/${PYTHON_VERSION} DATADIR= ${PREFIX}/share/${PYTHON_VERSION} @@ -47,9 +44,11 @@ PLATFORMS= plat-freebsd6 plat-freebsd7 plat-freebsd8 plat-freebsd9 \ BIN_SCRIPTS= 2to3 idle pydoc smtpd.py BIN_FILES= python python-shared python-config python-shared-config \ ${BIN_SCRIPTS} -BINLINKS_SUB= -e 's,smtpd,smtpd${PYTHON_VER},' \ - -e 's,2to3,2to3-${PYTHON_VER},' \ - -e 's,(idle|pydoc|python-shared|python),\1${PYTHON_VER},' +BINLINKS_SUB_TMPL= -e 's,smtpd,smtpd%%VERSION%%,' \ + -e 's,2to3,2to3-%%VERSION%%,' \ + -e 's,(idle|pydoc|python-shared|python),\1%%VERSION%%,' +BINLINKS_SUB_PYTHON_VER= ${BINLINKS_SUB_TMPL:S/%%VERSION%%/${PYTHON_VER}/g} +BINLINKS_SUB_PYTHON_MAJOR_VER= ${BINLINKS_SUB_TMPL:S/%%VERSION%%/${PYTHON_MAJOR_VER}/g} OPTIONS_DEFINE= THREADS SEM PTH PYMALLOC IPV6 FPECTL EXAMPLES NLS OPTIONS_DEFAULT= THREADS UCS4 PYMALLOC IPV6 @@ -67,14 +66,14 @@ SEM_MSG= "" .else IGNORE= POSIX semaphore support only works in FreeBSD 7-STABLE and later .endif # ${OSVERSION} >= 701106 -.else +.else SEM_MSG= "@comment " .endif SUB_FILES= pkg-message SUB_LIST= SEM=${SEM_MSG} -.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 @@ -161,7 +160,7 @@ pre-patch: .for script in ${BIN_SCRIPTS} ${SED} -e '1s,^.*$$,#!${PREFIX}/bin/${PYTHON_VERSION},' \ ${PATCH_WRKSRC}/Tools/scripts/${script} \ - > ${WRKDIR}/`${ECHO_CMD} ${script} | ${SED} -E ${BINLINKS_SUB}` + > ${WRKDIR}/`${ECHO_CMD} ${script} | ${SED} -E ${BINLINKS_SUB_PYTHON_VER}` .endfor ${REINPLACE_CMD} -e \ 's,/usr/doc/python-docs-,${PREFIX}/share/doc/python,g' \ @@ -257,17 +256,19 @@ post-install: @# additional files installing by ports .for script in ${BIN_SCRIPTS} ${INSTALL_SCRIPT} \ - ${WRKDIR}/`${ECHO_CMD} ${script} | ${SED} -E ${BINLINKS_SUB}` \ + ${WRKDIR}/`${ECHO_CMD} ${script} | ${SED} -E ${BINLINKS_SUB_PYTHON_VER}` \ ${PREFIX}/bin .endfor @${MKDIR} ${MANPREFIX}/man/man1 ${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; \ + TARGET=`${ECHO_CMD} $$f | ${SED} -E ${BINLINKS_SUB_PYTHON_VER}`; \ + TARGET_MAJOR=`${ECHO_CMD} $$f | ${SED} -E ${BINLINKS_SUB_PYTHON_MAJOR_VER}`; \ + cd ${PREFIX}/bin && ${LN} -sf $$TARGET $$TARGET_MAJOR; \ + cd ${PREFIX}/bin && ${LN} -sf $$TARGET_MAJOR $$f; \ done .endif diff --git a/lang/python26/pkg-plist b/lang/python26/pkg-plist index df1d65348528..d44b076734c0 100644 --- a/lang/python26/pkg-plist +++ b/lang/python26/pkg-plist @@ -1,18 +1,26 @@ %%IF_DEFAULT%%bin/2to3 +%%IF_DEFAULT%%bin/2to3-%%PYMAJOR%% bin/2to3-%%PYVER%% %%IF_DEFAULT%%bin/idle +%%IF_DEFAULT%%bin/idle%%PYMAJOR%% bin/idle%%PYVER%% %%IF_DEFAULT%%bin/pydoc +%%IF_DEFAULT%%bin/pydoc%%PYMAJOR%% bin/pydoc%%PYVER%% %%IF_DEFAULT%%bin/python +%%IF_DEFAULT%%bin/python%%PYMAJOR%% bin/python%%PYVER%% %%IF_DEFAULT%%bin/python-config +%%IF_DEFAULT%%bin/python%%PYMAJOR%%-config bin/python%%PYVER%%-config %%IF_DEFAULT%%bin/python-shared +%%IF_DEFAULT%%bin/python-shared%%PYMAJOR%% bin/python-shared%%PYVER%% %%IF_DEFAULT%%bin/python-shared-config +%%IF_DEFAULT%%bin/python-shared%%PYMAJOR%%-config bin/python-shared%%PYVER%%-config %%IF_DEFAULT%%bin/smtpd.py +%%IF_DEFAULT%%bin/smtpd%%PYMAJOR%%.py bin/smtpd%%PYVER%%.py %%PYTHON_INCLUDEDIR%%/Python-ast.h %%PYTHON_INCLUDEDIR%%/Python.h diff --git a/lang/python27/Makefile b/lang/python27/Makefile index 346383dbba97..414cb4300d8a 100644 --- a/lang/python27/Makefile +++ b/lang/python27/Makefile @@ -1,13 +1,9 @@ -# New ports collection makefile for: python26 -# Date created: 3 July 2003 -# Whom: Hye-Shik Chang <perky@FreeBSD.org> -# +# Created by: Hye-Shik Chang <perky@FreeBSD.org> # $FreeBSD$ -# PORTNAME= python27 PORTVERSION= 2.7.3 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= lang python ipv6 MASTER_SITES= ${PYTHON_MASTER_SITES} MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR} @@ -48,9 +44,11 @@ PLATFORMS= plat-freebsd6 plat-freebsd7 plat-freebsd8 plat-freebsd9 \ BIN_SCRIPTS= 2to3 idle pydoc smtpd.py BIN_FILES= python python-shared python-config python-shared-config \ ${BIN_SCRIPTS} -BINLINKS_SUB= -e 's,smtpd,smtpd${PYTHON_VER},' \ - -e 's,2to3,2to3-${PYTHON_VER},' \ - -e 's,(idle|pydoc|python-shared|python),\1${PYTHON_VER},' +BINLINKS_SUB_TMPL= -e 's,smtpd,smtpd%%VERSION%%,' \ + -e 's,2to3,2to3-%%VERSION%%,' \ + -e 's,(idle|pydoc|python-shared|python),\1%%VERSION%%,' +BINLINKS_SUB_PYTHON_VER= ${BINLINKS_SUB_TMPL:S/%%VERSION%%/${PYTHON_VER}/g} +BINLINKS_SUB_PYTHON_MAJOR_VER= ${BINLINKS_SUB_TMPL:S/%%VERSION%%/${PYTHON_MAJOR_VER}/g} OPTIONS_DEFINE= THREADS SEM PTH PYMALLOC IPV6 FPECTL EXAMPLES NLS OPTIONS_DEFAULT= THREADS UCS4 PYMALLOC IPV6 @@ -75,7 +73,7 @@ SEM_MSG= "@comment " SUB_FILES= pkg-message SUB_LIST= SEM=${SEM_MSG} -.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 @@ -159,7 +157,6 @@ CONFIGURE_ARGS+= --disable-ipv6 CONFIGURE_ARGS+= --with-fpectl .endif - CONFIGURE_ENV+= OPT="${CFLAGS} ${_PTH_CPPFLAGS}" post-extract: @@ -178,7 +175,7 @@ pre-patch: .for script in ${BIN_SCRIPTS} ${SED} -e '1s,^.*$$,#!${PREFIX}/bin/${PYTHON_VERSION},' \ ${PATCH_WRKSRC}/Tools/scripts/${script} \ - > ${WRKDIR}/`${ECHO_CMD} ${script} | ${SED} -E ${BINLINKS_SUB}` + > ${WRKDIR}/`${ECHO_CMD} ${script} | ${SED} -E ${BINLINKS_SUB_PYTHON_VER}` .endfor ${REINPLACE_CMD} -e \ 's,/usr/doc/python-docs-,${PREFIX}/share/doc/python,g' \ @@ -274,17 +271,19 @@ post-install: @# additional files installing by ports .for script in ${BIN_SCRIPTS} ${INSTALL_SCRIPT} \ - ${WRKDIR}/`${ECHO_CMD} ${script} | ${SED} -E ${BINLINKS_SUB}` \ + ${WRKDIR}/`${ECHO_CMD} ${script} | ${SED} -E ${BINLINKS_SUB_PYTHON_VER}` \ ${PREFIX}/bin .endfor @${MKDIR} ${MANPREFIX}/man/man1 ${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; \ + TARGET=`${ECHO_CMD} $$f | ${SED} -E ${BINLINKS_SUB_PYTHON_VER}`; \ + TARGET_MAJOR=`${ECHO_CMD} $$f | ${SED} -E ${BINLINKS_SUB_PYTHON_MAJOR_VER}`; \ + cd ${PREFIX}/bin && ${LN} -sf $$TARGET $$TARGET_MAJOR; \ + cd ${PREFIX}/bin && ${LN} -sf $$TARGET_MAJOR $$f; \ done .endif diff --git a/lang/python27/pkg-plist b/lang/python27/pkg-plist index 28e2f38fd799..a5bcfbb33235 100644 --- a/lang/python27/pkg-plist +++ b/lang/python27/pkg-plist @@ -1,21 +1,27 @@ libdata/pkgconfig/python-2.7.pc %%IF_DEFAULT%%bin/2to3 +%%IF_DEFAULT%%bin/2to3-%%PYMAJOR%% bin/2to3-%%PYVER%% %%IF_DEFAULT%%bin/idle +%%IF_DEFAULT%%bin/idle%%PYMAJOR%% bin/idle%%PYVER%% %%IF_DEFAULT%%bin/pydoc +%%IF_DEFAULT%%bin/pydoc%%PYMAJOR%% bin/pydoc%%PYVER%% %%IF_DEFAULT%%bin/python -bin/python%%PYMAJOR%% +%%IF_DEFAULT%%bin/python%%PYMAJOR%% bin/python%%PYVER%% %%IF_DEFAULT%%bin/python-config -bin/python%%PYMAJOR%%-config +%%IF_DEFAULT%%bin/python%%PYMAJOR%%-config bin/python%%PYVER%%-config %%IF_DEFAULT%%bin/python-shared +%%IF_DEFAULT%%bin/python-shared%%PYMAJOR%% bin/python-shared%%PYVER%% %%IF_DEFAULT%%bin/python-shared-config +%%IF_DEFAULT%%bin/python-shared%%PYMAJOR%%-config bin/python-shared%%PYVER%%-config %%IF_DEFAULT%%bin/smtpd.py +%%IF_DEFAULT%%bin/smtpd%%PYMAJOR%%.py bin/smtpd%%PYVER%%.py %%PYTHON_INCLUDEDIR%%/Python-ast.h %%PYTHON_INCLUDEDIR%%/Python.h 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%% diff --git a/lang/python32/Makefile b/lang/python32/Makefile index 4481c47ad18c..5208a60c49a7 100644 --- a/lang/python32/Makefile +++ b/lang/python32/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= python32 PORTVERSION= 3.2.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= lang python ipv6 MASTER_SITES= ${PYTHON_MASTER_SITES} MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR} @@ -37,6 +32,7 @@ PYABIVER= # default empty, for after appending SHARED_WRKSRC= ${PYTHON_WRKSRC}/portbld.shared PLIST_SUB= PYVER=${PYTHON_VERSION:S/python//} \ + PYMAJOR=${PYTHON_MAJOR_VER} \ PYVER_WITHPAT=${PORTVERSION:S/.rc/rc/} \ PYABIVER=${PYABIVER} EXAMPLESDIR= ${PREFIX}/share/examples/${PYTHON_VERSION} @@ -59,13 +55,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 @@ -209,13 +211,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/python32/pkg-plist b/lang/python32/pkg-plist index 2860760b13e1..9920aeccb690 100644 --- a/lang/python32/pkg-plist +++ b/lang/python32/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%% diff --git a/lang/python33/Makefile b/lang/python33/Makefile index 59cea232f033..d30fcbb9b3e0 100644 --- a/lang/python33/Makefile +++ b/lang/python33/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= python33 PORTVERSION= 3.3.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= lang python ipv6 MASTER_SITES= ${PYTHON_MASTER_SITES} MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR} @@ -61,19 +56,19 @@ NLS_DESC= Enable Gettext support for the locale module .include <bsd.port.pre.mk> -.if ${OSVERSION} < 800505 -BUILD_DEPENDS+= xz>0:${PORTSDIR}/archivers/xz # Needed for lzma support -LDFLAGS+= "-L${LOCALBASE}/lib" -CFLAGS+= "-I${LOCALBASE}/include" -.endif - -.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 @@ -212,16 +207,18 @@ 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} diff --git a/lang/python33/pkg-plist b/lang/python33/pkg-plist index 69b4f7adbaad..dc24792618c5 100644 --- a/lang/python33/pkg-plist +++ b/lang/python33/pkg-plist @@ -5,10 +5,10 @@ bin/idle3-%%PYVER%% %%IF_DEFAULT%%bin/pydoc3 bin/pydoc3-%%PYVER%% %%IF_DEFAULT%%bin/python -bin/python%%PYMAJOR%% +%%IF_DEFAULT_MAJOR%%bin/python%%PYMAJOR%% bin/python%%PYVER%% %%IF_DEFAULT%%bin/python-config -bin/python%%PYMAJOR%%-config +%%IF_DEFAULT_MAJOR%%bin/python%%PYMAJOR%%-config bin/python%%PYVER%%-config %%IF_DEFAULT%%bin/python-shared bin/python-shared%%PYVER%% |