- Fixed hard-coded path in pkg-plist that caused Tinderbox breakage

under Python 2.4.
- Added handling for the lack of egg info under Python <2.5.
- Bumped PORTREVISION.

Reported by:	tabthorpe
This commit is contained in:
Greg Larkin 2008-11-26 22:22:09 +00:00
parent 601b636d68
commit efc676cab7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=223427
2 changed files with 30 additions and 11 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= numeric
PORTVERSION= 24.2
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= math python
MASTER_SITES= http://numpy.scipy.org/:doc \
${MASTER_SITE_SOURCEFORGE:S/$/:source/}
@ -35,7 +35,7 @@ EXAMPLESDIR= ${PREFIX}/share/examples/py-numeric
.include <bsd.port.pre.mk>
.if exists(${LOCALBASE}/bin/easy_install)
.if exists(${LOCALBASE}/bin/easy_install-${PYTHON_VER})
# py-setuptools is installed - adjust pkg-plist to work with
# implicit usage in setup.py
EASY=""
@ -46,7 +46,19 @@ EASY="@comment "
NOTEASY=""
.endif
PLIST_SUB+= EASY=${EASY} NOTEASY=${NOTEASY}
# Adjusting pkg-plist gets weirder here. Python 2.5+ incorporates
# install_egg_info functionality into distutils, so if py-numeric
# is installed into a lesser Python version, make sure all egg-related
# pkg-plist entries are omitted
.if ${PYTHON_SUFFIX} < 25
NOEGGINFO="@comment "
.else
NOEGGINFO=""
.endif
PLIST_SUB+= EASY=${EASY} NOTEASY=${NOTEASY} \
PYDISTUTILS_EGGINFO=${PYDISTUTILS_EGGINFO} \
NOEGGINFO=${NOEGGINFO}
pre-fetch:
.if ${PYTHON_REL} < 200
@ -57,12 +69,19 @@ pre-fetch:
post-extract:
@${CP} ${DISTDIR}/numpy.pdf ${WRKDIR}
#
# Force the setup.py file to use a specific version of Python,
# since more than one may be installed, and we want to use
# the correct one, because if one has setuptools and another
# doesn't, that could mess with how pkg-plist is constructed.
#
@${REINPLACE_CMD} -e "s|/usr/bin/env python|/usr/bin/env python${PYTHON_VER}|" ${WRKSRC}/setup.py
post-install:
.if !defined(NOPORTEXAMPLES)
@${INSTALL} -d ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/Demo/*.py ${EXAMPLESDIR}
@${MKDIR} ${EXAMPLESDIR}/NumTut
@${INSTALL} -d ${EXAMPLESDIR}/NumTut
${INSTALL_DATA} ${WRKSRC}/Demo/NumTut/* ${EXAMPLESDIR}/NumTut
.endif
.if !defined(NOPORTDOCS)

View file

@ -31,12 +31,12 @@
%%PYTHON_SITELIBDIR%%/Numeric/Matrix.py
%%PYTHON_SITELIBDIR%%/Numeric/Matrix.pyc
%%PYTHON_SITELIBDIR%%/Numeric/Matrix.pyo
%%NOTEASY%%%%PYTHON_SITELIBDIR%%/Numeric/Numeric-24.2-py2.5.egg-info
%%EASY%%%%PYTHON_SITELIBDIR%%/Numeric/Numeric-24.2-py2.5.egg-info/PKG-INFO
%%EASY%%%%PYTHON_SITELIBDIR%%/Numeric/Numeric-24.2-py2.5.egg-info/SOURCES.txt
%%EASY%%%%PYTHON_SITELIBDIR%%/Numeric/Numeric-24.2-py2.5.egg-info/dependency_links.txt
%%EASY%%%%PYTHON_SITELIBDIR%%/Numeric/Numeric-24.2-py2.5.egg-info/not-zip-safe
%%EASY%%%%PYTHON_SITELIBDIR%%/Numeric/Numeric-24.2-py2.5.egg-info/top_level.txt
%%NOEGGINFO%%%%NOTEASY%%%%PYTHON_SITELIBDIR%%/Numeric/%%PYDISTUTILS_EGGINFO%%
%%NOEGGINFO%%%%EASY%%%%PYTHON_SITELIBDIR%%/Numeric/%%PYDISTUTILS_EGGINFO%%/PKG-INFO
%%NOEGGINFO%%%%EASY%%%%PYTHON_SITELIBDIR%%/Numeric/%%PYDISTUTILS_EGGINFO%%/SOURCES.txt
%%NOEGGINFO%%%%EASY%%%%PYTHON_SITELIBDIR%%/Numeric/%%PYDISTUTILS_EGGINFO%%/dependency_links.txt
%%NOEGGINFO%%%%EASY%%%%PYTHON_SITELIBDIR%%/Numeric/%%PYDISTUTILS_EGGINFO%%/not-zip-safe
%%NOEGGINFO%%%%EASY%%%%PYTHON_SITELIBDIR%%/Numeric/%%PYDISTUTILS_EGGINFO%%/top_level.txt
%%PYTHON_SITELIBDIR%%/Numeric/Numeric.py
%%PYTHON_SITELIBDIR%%/Numeric/Numeric.pyc
%%PYTHON_SITELIBDIR%%/Numeric/Numeric.pyo
@ -87,7 +87,7 @@
@dirrm %%PYTHON_SITELIBDIR%%/Numeric/RNG
%%EASY%%@dirrm %%PYTHON_SITELIBDIR%%/Numeric/Numeric_headers/Numeric
@dirrm %%PYTHON_SITELIBDIR%%/Numeric/Numeric_headers
%%EASY%%@dirrm %%PYTHON_SITELIBDIR%%/Numeric/Numeric-24.2-py2.5.egg-info
%%NOEGGINFO%%%%EASY%%@dirrm %%PYTHON_SITELIBDIR%%/Numeric/%%PYDISTUTILS_EGGINFO%%
@dirrm %%PYTHON_SITELIBDIR%%/Numeric/MA
@dirrm %%PYTHON_SITELIBDIR%%/Numeric/FFT
@dirrm %%PYTHON_SITELIBDIR%%/Numeric