From owner-svn-ports-head@FreeBSD.ORG Sun Dec 23 17:52:49 2012 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A75BFF7C; Sun, 23 Dec 2012 17:52:49 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8B64A8FC12; Sun, 23 Dec 2012 17:52:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBNHqnjj039918; Sun, 23 Dec 2012 17:52:49 GMT (envelope-from lwhsu@svn.freebsd.org) Received: (from lwhsu@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBNHqlKM039907; Sun, 23 Dec 2012 17:52:47 GMT (envelope-from lwhsu@svn.freebsd.org) Message-Id: <201212231752.qBNHqlKM039907@svn.freebsd.org> From: Li-Wen Hsu Date: Sun, 23 Dec 2012 17:52:47 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r309444 - in head: Mk lang/python26 lang/python27 lang/python31 lang/python32 lang/python33 X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Dec 2012 17:52:49 -0000 Author: lwhsu Date: Sun Dec 23 17:52:46 2012 New Revision: 309444 URL: http://svnweb.freebsd.org/changeset/ports/309444 Log: - 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/ Modified: head/Mk/bsd.python.mk head/lang/python26/Makefile head/lang/python26/pkg-plist head/lang/python27/Makefile head/lang/python27/pkg-plist head/lang/python31/Makefile head/lang/python31/pkg-plist head/lang/python32/Makefile head/lang/python32/pkg-plist head/lang/python33/Makefile head/lang/python33/pkg-plist Modified: head/Mk/bsd.python.mk ============================================================================== --- head/Mk/bsd.python.mk Sun Dec 23 17:52:24 2012 (r309443) +++ head/Mk/bsd.python.mk Sun Dec 23 17:52:46 2012 (r309444) @@ -87,6 +87,12 @@ Python_Include_MAINTAINER= python@FreeBS # in case you want to use an older version as a default. # default: python2.7 # +# PYTHON3_DEFAULT_VERSION +# - Version of the default python binary in your ${PATH}, in +# the format "python3.2". Set this in your /etc/make.conf +# in case you want to use an older version as a default. +# default: python3.3 +# # PYTHON_MAJOR_VER - Python version major number. 2 for python-2.x, # 3 for python-3.x and so on. # @@ -274,6 +280,12 @@ _PYTHON_DEFAULT_VERSION= ${_PYTHON_PORTB PYTHON_DEFAULT_VERSION= python${_PYTHON_DEFAULT_VERSION} .endif +.if ${PYTHON_DEFAULT_VERSION:R} == "python3" +PYTHON3_DEFAULT_VERSION= ${PYTHON_DEFAULT_VERSION} +.else +PYTHON3_DEFAULT_VERSION= python3.3 +.endif + .if defined(PYTHON_VERSION) _PYTHON_VERSION:= ${PYTHON_VERSION:S/^python//} _PYTHON_CMD= ${LOCALBASE}/bin/${PYTHON_VERSION} Modified: head/lang/python26/Makefile ============================================================================== --- head/lang/python26/Makefile Sun Dec 23 17:52:24 2012 (r309443) +++ head/lang/python26/Makefile Sun Dec 23 17:52:46 2012 (r309444) @@ -1,13 +1,9 @@ -# New ports collection makefile for: python26 -# Date created: 3 July 2003 -# Whom: Hye-Shik Chang -# +# Created by: Hye-Shik Chang # $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. 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 p 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 Modified: head/lang/python26/pkg-plist ============================================================================== --- head/lang/python26/pkg-plist Sun Dec 23 17:52:24 2012 (r309443) +++ head/lang/python26/pkg-plist Sun Dec 23 17:52:46 2012 (r309444) @@ -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 Modified: head/lang/python27/Makefile ============================================================================== --- head/lang/python27/Makefile Sun Dec 23 17:52:24 2012 (r309443) +++ head/lang/python27/Makefile Sun Dec 23 17:52:46 2012 (r309444) @@ -1,13 +1,9 @@ -# New ports collection makefile for: python26 -# Date created: 3 July 2003 -# Whom: Hye-Shik Chang -# +# Created by: Hye-Shik Chang # $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 p 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 Modified: head/lang/python27/pkg-plist ============================================================================== --- head/lang/python27/pkg-plist Sun Dec 23 17:52:24 2012 (r309443) +++ head/lang/python27/pkg-plist Sun Dec 23 17:52:46 2012 (r309444) @@ -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 Modified: head/lang/python31/Makefile ============================================================================== --- head/lang/python31/Makefile Sun Dec 23 17:52:24 2012 (r309443) +++ head/lang/python31/Makefile Sun Dec 23 17:52:46 2012 (r309444) @@ -1,13 +1,8 @@ -# New ports collection makefile for: python31 -# Date created: 2009-06-28 -# Whom: Li-Wen Hsu -# # $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. 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 .include -.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 | \ Modified: head/lang/python31/pkg-plist ============================================================================== --- head/lang/python31/pkg-plist Sun Dec 23 17:52:24 2012 (r309443) +++ head/lang/python31/pkg-plist Sun Dec 23 17:52:46 2012 (r309444) @@ -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%% Modified: head/lang/python32/Makefile ============================================================================== --- head/lang/python32/Makefile Sun Dec 23 17:52:24 2012 (r309443) +++ head/lang/python32/Makefile Sun Dec 23 17:52:46 2012 (r309444) @@ -1,13 +1,8 @@ -# New ports collection makefile for: python31 -# Date created: 2009-06-28 -# Whom: Li-Wen Hsu -# # $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 app 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 .include -.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 | \ Modified: head/lang/python32/pkg-plist ============================================================================== --- head/lang/python32/pkg-plist Sun Dec 23 17:52:24 2012 (r309443) +++ head/lang/python32/pkg-plist Sun Dec 23 17:52:46 2012 (r309444) @@ -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%% Modified: head/lang/python33/Makefile ============================================================================== --- head/lang/python33/Makefile Sun Dec 23 17:52:24 2012 (r309443) +++ head/lang/python33/Makefile Sun Dec 23 17:52:46 2012 (r309444) @@ -1,13 +1,8 @@ -# New ports collection makefile for: python31 -# Date created: 2009-06-28 -# Whom: Li-Wen Hsu -# # $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 .include -.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} Modified: head/lang/python33/pkg-plist ============================================================================== --- head/lang/python33/pkg-plist Sun Dec 23 17:52:24 2012 (r309443) +++ head/lang/python33/pkg-plist Sun Dec 23 17:52:46 2012 (r309444) @@ -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%%