diff options
Diffstat (limited to 'lang/python32/Makefile')
-rw-r--r-- | lang/python32/Makefile | 26 |
1 files changed, 17 insertions, 9 deletions
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 | \ |