diff options
author | alexbl <alexbl@FreeBSD.org> | 2007-07-30 09:42:28 +0000 |
---|---|---|
committer | alexbl <alexbl@FreeBSD.org> | 2007-07-30 09:42:28 +0000 |
commit | 7d749db4cf14f30613e9a53a08ffa3d3b4575146 (patch) | |
tree | ad9062005432bbf28f5cce4ad3a1cd32a59dba69 /lang/python25/Makefile | |
parent | 8e2da239f74a82ad1c98b69bd27abb3f4e40ecf3 (diff) | |
download | FreeBSD-ports-7d749db4cf14f30613e9a53a08ffa3d3b4575146.zip FreeBSD-ports-7d749db4cf14f30613e9a53a08ffa3d3b4575146.tar.gz |
- Make Python 2.5.1 the default Python version
- Add significantly better support in bsd.python.mk for working with
Python Eggs and the easy_install system
Tested by: pointyhat runs
Approved by: pav (portmgr)
Most work by: perky
Thanks to: pav
Diffstat (limited to 'lang/python25/Makefile')
-rw-r--r-- | lang/python25/Makefile | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/lang/python25/Makefile b/lang/python25/Makefile index 33f5cff9..a688a3c 100644 --- a/lang/python25/Makefile +++ b/lang/python25/Makefile @@ -5,8 +5,7 @@ # $FreeBSD$ PORTNAME= python25 -PORTVERSION= 2.5 -PORTREVISION= 1 +PORTVERSION= 2.5.1 CATEGORIES= lang python ipv6 MASTER_SITES= ${PYTHON_MASTER_SITES} MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR} @@ -39,11 +38,10 @@ PLIST_SUB= PYVER=${PYTHON_VERSION:S/python//} \ DEMODIR= ${PREFIX}/share/examples/${PYTHON_VERSION} TOOLSDIR= ${PREFIX}/share/${PYTHON_VERSION} -.if !exists(/usr/bin/ypcat) # the world with NO_NIS -PLIST_EXCLUDE= 'nis.so$$' -.else -PLIST_EXCLUDE= '^$$' # nothing -.endif +BIN_SCRIPTS= idle pydoc python python-shared smtpd.py python-config \ + python-shared-config +BINLINKS_SUB= -e 's,smtpd,smtpd${PYTHON_VER},' \ + -e 's,(idle|pydoc|python-shared|python),\1${PYTHON_VER},' OPTIONS= THREADS "Enable thread support" on \ HUGE_STACK_SIZE "Use a larger thread stack" off \ @@ -54,6 +52,13 @@ OPTIONS= THREADS "Enable thread support" on \ .include <bsd.port.pre.mk> +.if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION} +MLINKS= ${PYTHON_VERSION}.1 python.1 +PLIST_SUB+= IF_DEFAULT="" +.else +PLIST_SUB+= IF_DEFAULT="@comment " +.endif + # workaround for a bug in base curses.h. CFLAGS+= -D__wchar_t=wchar_t @@ -95,6 +100,12 @@ PLIST_SUB+= 32BIT_ONLY="" CFLAGS+= -DPYTHON_DEFAULT_RECURSION_LIMIT=900 .endif +.if !exists(/usr/bin/ypcat) # the world with NO_NIS +PLIST_SUB+= NO_NIS="@comment " +.else +PLIST_SUB+= NO_NIS="" +.endif + .if ${OSVERSION} < 400000 LIB_DEPENDS+= ncurses.5:${PORTSDIR}/devel/ncurses CFLAGS+= -I${LOCALBASE}/include/ncurses -I${LOCALBASE}/include @@ -180,8 +191,7 @@ pre-su-install: .endfor pre-install: - ${EGREP} -v ${PLIST_EXCLUDE} ${PLIST_TEMPLATE} | \ - ${AWK} '{ print $$0; } \ + ${CAT} ${PLIST_TEMPLATE} | ${AWK} '{ print $$0; } \ /LIBDIR.*\.py$$/ && !/\/bad/ { print $$0 "o"; print $$0 "c"; }' > ${PLIST} @# if openssl 0.9.8 is detected, _sha{256,512} module won't be installed @@ -211,6 +221,13 @@ post-install: ${INSTALL_MAN} ${PYTHON_WRKSRC}/Misc/python.man \ ${MANPREFIX}/man/man1/${PYTHON_VERSION}.1 +.if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION} + for f in ${BIN_SCRIPTS}; do \ + TARGET=`${ECHO_CMD} $$f | ${SED} -E ${BINLINKS_SUB}`; \ + cd ${PREFIX}/bin && ${LN} -f $$TARGET $$f; \ + done +.endif + .if !defined(NOPORTDOCS) @${MKDIR} ${TOOLSDIR} @cd ${PYTHON_WRKSRC}; ${TAR} -cf - Tools | \ |