diff options
author | Alexander Botero-Lowry <alexbl@FreeBSD.org> | 2007-07-30 09:42:28 +0000 |
---|---|---|
committer | Alexander Botero-Lowry <alexbl@FreeBSD.org> | 2007-07-30 09:42:28 +0000 |
commit | 4942ce5a7d8a3d0cbebaf4d202011850d1f7569f (patch) | |
tree | db1f21912f461000d609ddcd5d130946bcfe9e09 /lang/python24 | |
parent | In ATLAS/INSTALL.txt it is said that gcc42 is superior to both gcc3 and gcc41 (diff) |
- 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
Notes
Notes:
svn path=/head/; revision=196700
Diffstat (limited to 'lang/python24')
-rw-r--r-- | lang/python24/Makefile | 43 | ||||
-rw-r--r-- | lang/python24/files/patch-setup.py | 14 | ||||
-rw-r--r-- | lang/python24/pkg-plist | 12 |
3 files changed, 48 insertions, 21 deletions
diff --git a/lang/python24/Makefile b/lang/python24/Makefile index f5090983280b..0b6d353a4355 100644 --- a/lang/python24/Makefile +++ b/lang/python24/Makefile @@ -7,12 +7,13 @@ PORTNAME= python24 PORTVERSION= 2.4.4 +PORTREVISION= 1 CATEGORIES= lang python ipv6 MASTER_SITES= ${PYTHON_MASTER_SITES} MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR} DISTFILES= ${PYTHON_DISTFILE} -MAINTAINER= perky@FreeBSD.org +MAINTAINER= python@FreeBSD.org COMMENT?= An interpreted object-oriented programming language DIST_SUBDIR= python @@ -22,8 +23,8 @@ CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} CONFIGURE_ENV= OPT="${CFLAGS}" MAKE_ENV= VPATH="${WRKSRC}" USE_LDCONFIG= yes -INSTALL_TARGET= install -MAN1= python.1 ${PYTHON_VERSION}.1 +INSTALL_TARGET= altinstall +MAN1= ${PYTHON_VERSION}.1 USE_PYTHON= yes PYTHON_VERSION= python2.4 @@ -35,11 +36,9 @@ 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 -PLISTCAT= ${GREP} -v 'nis.so$$' ${PKGDIR}/pkg-plist -.else -PLISTCAT= ${CAT} ${PKGDIR}/pkg-plist -.endif +BIN_SCRIPTS= idle pydoc python python-shared smtpd.py +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 \ @@ -50,6 +49,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 @@ -91,6 +97,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 !defined(WITHOUT_IPV6) && ${OSVERSION} >= 400014 CONFIGURE_ARGS+= --enable-ipv6 .else @@ -166,9 +178,9 @@ pre-su-install: .endfor pre-install: - ${PLISTCAT} | ${AWK} '{ print $$0; } \ - /LIBDIR.*\.py$$/ && !/\/bad/ { print $$0 "o"; print $$0 "c"; }' \ - > ${PLIST} + ${AWK} '{ print $$0; } \ + /LIBDIR.*\.py$$/ && !/\/bad/ { print $$0 "o"; print $$0 "c"; }' \ + ${PKGDIR}/pkg-plist > ${PLIST} post-install: @# shared version of executable and library @@ -180,8 +192,6 @@ post-install: ${INSTALL_PROGRAM} \ ${SHARED_WRKSRC}/${PYTHON_VERSION:S/thon/thon-shared/} \ ${PREFIX}/bin - cd ${PREFIX}/bin; \ - ${LN} -f ${PYTHON_VERSION:S/thon/thon-shared/} python-shared @# additional files installing by ports @${MKDIR} ${MANPREFIX}/man/man1 @@ -190,6 +200,13 @@ post-install: ${INSTALL_SCRIPT} ${WRKDIR}/pydoc2.4 ${WRKDIR}/idle2.4 \ ${WRKDIR}/smtpd2.4.py ${PREFIX}/bin +.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 ${WRKSRC}; tar -c --exclude='*CVS*' -f - Tools | \ diff --git a/lang/python24/files/patch-setup.py b/lang/python24/files/patch-setup.py index 167e803a1290..0b578c9ec329 100644 --- a/lang/python24/files/patch-setup.py +++ b/lang/python24/files/patch-setup.py @@ -1,5 +1,5 @@ ---- setup.py.orig Tue Feb 27 20:10:53 2007 -+++ setup.py Tue Feb 27 20:15:23 2007 +--- setup.py.orig Fri Mar 30 04:28:05 2007 ++++ setup.py Fri Mar 30 04:30:54 2007 @@ -15,7 +15,7 @@ from distutils.command.install_lib import install_lib @@ -52,3 +52,13 @@ libraries = [panel_library] + curses_libs) ) +@@ -1225,8 +1227,7 @@ + ext_modules=[Extension('struct', ['structmodule.c'])], + + # Scripts to install +- scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle', +- 'Lib/smtpd.py'] ++ scripts = [] + ) + + # --install-platlib diff --git a/lang/python24/pkg-plist b/lang/python24/pkg-plist index 437b6287fa0c..9c946a43e15f 100644 --- a/lang/python24/pkg-plist +++ b/lang/python24/pkg-plist @@ -1,13 +1,13 @@ -bin/idle +%%IF_DEFAULT%%bin/idle bin/idle%%PYVER%% -bin/pydoc +%%IF_DEFAULT%%bin/pydoc bin/pydoc%%PYVER%% -bin/python +%%IF_DEFAULT%%bin/python bin/python%%PYVER%% -bin/python-shared +%%IF_DEFAULT%%bin/python-shared bin/python-shared%%PYVER%% +%%IF_DEFAULT%%bin/smtpd.py bin/smtpd%%PYVER%%.py -bin/smtpd.py %%PYTHON_INCLUDEDIR%%/Python.h %%PYTHON_INCLUDEDIR%%/Python-ast.h %%PYTHON_INCLUDEDIR%%/abstract.h @@ -574,7 +574,7 @@ lib/lib%%PYTHON_VERSION%%.so.1 %%PYTHON_LIBDIR%%/lib-dynload/math.so %%PYTHON_LIBDIR%%/lib-dynload/md5.so %%PYTHON_LIBDIR%%/lib-dynload/mmap.so -%%PYTHON_LIBDIR%%/lib-dynload/nis.so +%%NO_NIS%%%%PYTHON_LIBDIR%%/lib-dynload/nis.so %%PYTHON_LIBDIR%%/lib-dynload/operator.so %%PYTHON_LIBDIR%%/lib-dynload/ossaudiodev.so %%PYTHON_LIBDIR%%/lib-dynload/parser.so |