ports/136058: [maintainer update]Fix build of science/py-scipy when suitesparse is installed, and other minor changes in science/py-scipy and math/py-numpy

Li-Lun Wang (Leland Wang) llwang at infor.org
Fri Jun 26 01:30:04 UTC 2009


>Number:         136058
>Category:       ports
>Synopsis:       [maintainer update]Fix build of science/py-scipy when suitesparse is installed, and other minor changes in science/py-scipy and math/py-numpy
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 26 01:30:03 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Li-Lun Wang (Leland Wang)
>Release:        FreeBSD 7.2-PRERELEASE amd64
>Organization:
>Environment:
System: FreeBSD ll-c2d 7.2-PRERELEASE FreeBSD 7.2-PRERELEASE #0: Sun May  3 12:24:21 CDT 2009 root at ll-c2d:/usr/obj/usr/src/sys/C2D amd64


	
>Description:

* Fix build of science/py-scipy when math/suitesparse is installed, by
  correctly detect and depend on it in math/py-numpy
* Replace the old numpy documentation with the new numpy book
* Explicitly tell the distutil to use gnu95 fortran compiler
* Use ${PYTHONPREFIX_SITELIBDIR} rather than ${PYTHON_SITELIBDIR} when
  generating the packing list for science/py-scipy
* Bump PORTREVISIONs, for packing lists are changed

>How-To-Repeat:
	
>Fix:

	

diff -urN py-numpy.orig/Makefile py-numpy/Makefile
--- py-numpy.orig/Makefile	2009-06-25 13:33:23.000000000 -0500
+++ py-numpy/Makefile	2009-06-25 15:07:40.000000000 -0500
@@ -7,6 +7,7 @@
 
 PORTNAME=	numpy
 PORTVERSION=	1.3.0
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	math python
 MASTER_SITES=	http://numpy.scipy.org/:doc \
@@ -14,7 +15,7 @@
 MASTER_SITE_SUBDIR=	numpy/:source
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 DISTFILES=	numpy-${PORTVERSION:S/r/rc/}${EXTRACT_SUFX}:source \
-		numpy.pdf:doc
+		numpybook.pdf:doc
 EXTRACT_ONLY=	numpy-${PORTVERSION:S/r/rc/}${EXTRACT_SUFX}
 
 MAINTAINER=	llwang at infor.org
@@ -44,8 +45,15 @@
 		blas.2:${PORTSDIR}/math/blas
 .endif
 
+.if exists(${LOCALBASE}/lib/libumfpack.so.1)
+LIB_DEPENDS+=	umfpack.1:${PORTSDIR}/math/suitesparse
+.endif
+
+PYDISTUTILS_CONFIGUREARGS+=	--fcompiler=gnu95
+PYDISTUTILS_BUILDARGS+=	--fcompiler=gnu95
+
 post-extract:
-	@${CP} ${DISTDIR}/numpy.pdf ${WRKDIR}
+	@${CP} ${DISTDIR}/numpybook.pdf ${WRKDIR}
 
 post-patch:
 	@${REINPLACE_CMD} -e "s+%%FC%%+${FC}+" ${WRKSRC}/numpy/distutils/fcompiler/gnu.py
@@ -55,12 +63,12 @@
 pre-configure:
 .ifdef WITH_ATLAS
 	@${REINPLACE_CMD} -e "s+%%GCCLIBDIR%%+${GCCLIBDIR}+" \
-	    -e "s+%%LOCALBASE%%+${LOCALBASE}+" \
+	    -e "s+%%LOCALBASE%%+${LOCALBASE}+g" \
 	    -e "s+%%ATLASLIBS%%+alapack_r, f77blas_r, cblas_r, atlas_r+" \
 		${WRKSRC}/site.cfg
 .else
 	@${REINPLACE_CMD} -e "s+%%GCCLIBDIR%%+${GCCLIBDIR}+" \
-	    -e "s+%%LOCALBASE%%+${LOCALBASE}+" \
+	    -e "s+%%LOCALBASE%%+${LOCALBASE}+g" \
 	    -e "s+%%ATLASLIBS%%+lapack, blas+" \
 		 ${WRKSRC}/site.cfg
 .endif
@@ -70,7 +78,7 @@
 	${INSTALL_MAN} ${WRKSRC}/numpy/f2py/f2py.1 ${MAN1PREFIX}/man/man1
 .if !defined(NOPORTDOCS)
 	@${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${WRKDIR}/numpy.pdf ${DOCSDIR}
+	${INSTALL_DATA} ${WRKDIR}/numpybook.pdf ${DOCSDIR}
 .endif
 
 .include <bsd.port.post.mk>
diff -urN py-numpy.orig/distinfo py-numpy/distinfo
--- py-numpy.orig/distinfo	2009-06-25 13:33:23.000000000 -0500
+++ py-numpy/distinfo	2009-06-25 14:01:29.000000000 -0500
@@ -1,6 +1,6 @@
 MD5 (numpy-1.3.0.tar.gz) = 3f7773ff0971a5ebb8591536d8ec7bd6
 SHA256 (numpy-1.3.0.tar.gz) = 7524687cce85aa78103046db5e617c626b0ef871a203a049159f88f35647c90d
 SIZE (numpy-1.3.0.tar.gz) = 1995868
-MD5 (numpy.pdf) = 258b3758645568724ab1a3ead67db78a
-SHA256 (numpy.pdf) = 1005b55ee84265be490d8270b4e464e11f59455c220da822f6901342f5fe804f
-SIZE (numpy.pdf) = 1234555
+MD5 (numpybook.pdf) = 637180cd704dc8be4036c09412501397
+SHA256 (numpybook.pdf) = 8c9692db7373838c585073e4141ae4bd3b8793dffd59ce3544bf851e71e9b865
+SIZE (numpybook.pdf) = 2148630
diff -urN py-numpy.orig/files/site.cfg py-numpy/files/site.cfg
--- py-numpy.orig/files/site.cfg	2008-09-08 10:03:49.000000000 -0500
+++ py-numpy/files/site.cfg	2009-06-25 14:22:50.000000000 -0500
@@ -1,7 +1,7 @@
 [DEFAULT]
 lapack_type=atlas
 library_dirs = /usr/lib:%%LOCALBASE%%/lib:%%GCCLIBDIR%%
-include_dirs = /usr/include:%%LOCALBASE%%/include
+include_dirs = /usr/include:%%LOCALBASE%%/include:%%LOCALBASE%%/include/suitesparse
 src_dirs = %%LOCALBASE%%/src
 # search static libraries (.a) in preference to shared ones (.so)
 search_static_first = 0
diff -urN py-numpy.orig/pkg-plist py-numpy/pkg-plist
--- py-numpy.orig/pkg-plist	2009-06-25 13:33:23.000000000 -0500
+++ py-numpy/pkg-plist	2009-06-25 14:00:55.000000000 -0500
@@ -837,7 +837,7 @@
 %%PYTHON_SITELIBDIR%%/numpy/version.py
 %%PYTHON_SITELIBDIR%%/numpy/version.pyc
 %%PYTHON_SITELIBDIR%%/numpy/version.pyo
-%%PORTDOCS%%%%DOCSDIR%%/numpy.pdf
+%%PORTDOCS%%%%DOCSDIR%%/numpybook.pdf
 %%PORTDOCS%%@dirrm %%DOCSDIR%%
 @dirrm %%PYTHON_SITELIBDIR%%/numpy/tests
 @dirrm %%PYTHON_SITELIBDIR%%/numpy/testing/tests


diff -urN py-scipy.orig/Makefile py-scipy/Makefile
--- py-scipy.orig/Makefile	2009-02-28 13:54:59.000000000 -0600
+++ py-scipy/Makefile	2009-06-25 16:57:45.000000000 -0500
@@ -7,6 +7,7 @@
 
 PORTNAME=	scipy
 PORTVERSION=	0.7.0
+PORTREVISION=	1
 CATEGORIES=	science python
 MASTER_SITES=	SF
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -48,10 +49,18 @@
 		blas.2:${PORTSDIR}/math/blas
 .endif
 
+.if exists(${LOCALBASE}/lib/libumfpack.so.1)
+BUILD_DEPENDS+=	swig:${PORTSDIR}/devel/swig13
+LIB_DEPENDS+=	umfpack.1:${PORTSDIR}/math/suitesparse
+.endif
+
+PYDISTUTILS_CONFIGUREARGS+=	--fcompiler=gnu95
+PYDISTUTILS_BUILDARGS+=	--fcompiler=gnu95
+
 post-install:
-	@${FIND} ${PYTHON_SITELIBDIR}/scipy ! -type d | \
+	@${FIND} ${PYTHONPREFIX_SITELIBDIR}/scipy ! -type d | \
 		${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
-	@${FIND} ${PYTHON_SITELIBDIR}/scipy -type d | ${SORT} -r | \
+	@${FIND} ${PYTHONPREFIX_SITELIBDIR}/scipy -type d | ${SORT} -r | \
 		${SED} 's,^${PREFIX}/, at dirrm ,' >> ${TMPPLIST}
 
 .include <bsd.port.post.mk>

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list