ports/143529: [PATCH] math/py-numpy: does not build
Li-Lun Wang (Leland Wang)
llwang at infor.org
Wed Feb 17 22:40:08 UTC 2010
The following reply was made to PR ports/143529; it has been noted by GNATS.
From: "Li-Lun Wang (Leland Wang)" <llwang at infor.org>
To: bug-followup at freebsd.org
Cc:
Subject: Re: ports/143529: [PATCH] math/py-numpy: does not build
Date: Thu, 18 Feb 2010 06:31:59 +0800
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I forgot to substitute the %%FENV%% in plist in one case. The
following is the updated patch.
diff -urN py-numpy.orig/Makefile py-numpy/Makefile
- --- py-numpy.orig/Makefile 2010-02-07 12:08:47.306031963 -0600
+++ py-numpy/Makefile 2010-02-17 16:28:10.471278208 -0600
@@ -33,6 +33,16 @@
.include <bsd.port.pre.mk>
+.if ${OSVERSION} <= 900009 && (${ARCH} == "i386" || ${ARCH} == "amd64")
+MASTER_SITES+= http://svn.freebsd.org/base/head/lib/msun/:fp
+.if ${ARCH} == "i386"
+FP_ARCH= i387
+.elif ${ARCH} == "amd64"
+FP_ARCH= ${ARCH}
+.endif
+DISTFILES+= ${FP_ARCH}/fenv.c?p=203441:fp ${FP_ARCH}/fenv.h?p=203441:fp
+.endif
+
.if defined(WITH_ATLAS)
LIB_DEPENDS+= atlas.2:${PORTSDIR}/math/atlas
.if !exists(${LOCALBASE}/lib/libalapack.a)
@@ -59,6 +69,14 @@
GCCLIBDIR= `${FC} -print-file-name=libgfortran.so|${SED} -e s/libgfortran.so//`
pre-configure:
+.if ${OSVERSION} <= 900009 && (${ARCH} == "i386" || ${ARCH} == "amd64")
+ @if [ "`${PKG_VERSION} -t \"\`\\\`${CC} -print-prog-name=as\\\` --version | ${AWK} 'NR==1 {sub(/\(GNU Binutils\)/,""); print $$3}'\`\" 2.18.49`" = ">" ] ; then \
+ ${CP} ${DISTDIR}/${FP_ARCH}/fenv.c?p=203441 ${WRKSRC}/numpy/core/include/numpy/fenv/fenv.c; \
+ ${CP} ${DISTDIR}/${FP_ARCH}/fenv.h?p=203441 ${WRKSRC}/numpy/core/include/numpy/fenv/fenv.h; \
+ ${REINPLACE_CMD} -e 's|<fenv.h>|"fenv.h"|' ${WRKSRC}/numpy/core/include/numpy/fenv/fenv.c; \
+ ${PATCH} ${PATCH_DIST_ARGS} < ${FILESDIR}/fenv.patch; \
+ fi
+.endif
.ifdef WITH_ATLAS
@${REINPLACE_CMD} -e "s+%%GCCLIBDIR%%+${GCCLIBDIR}+" \
-e "s+%%LOCALBASE%%+${LOCALBASE}+g" \
@@ -72,11 +90,27 @@
.endif
@${REINPLACE_CMD} -e "s+%%GCCLIBDIR%%+${GCCLIBDIR}+" ${WRKSRC}/numpy/distutils/system_info.py
+pre-install:
+.if ${OSVERSION} <= 900009 && (${ARCH} == "i386" || ${ARCH} == "amd64")
+ @if [ "`${PKG_VERSION} -t \"\`\\\`${CC} -print-prog-name=as\\\` --version | ${AWK} 'NR==1 {sub(/\(GNU Binutils\)/,""); print $$3}'\`\" 2.18.49`" = ">" ] ; then \
+ ${RM} ${WRKSRC}/numpy/core/include/numpy/fenv/fenv.c.bak; \
+ fi
+.endif
+
post-install:
${INSTALL_MAN} ${WRKSRC}/numpy/f2py/f2py.1 ${MAN1PREFIX}/man/man1
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKDIR}/numpybook.pdf ${DOCSDIR}
.endif
+.if ${OSVERSION} <= 900009 && (${ARCH} == "i386" || ${ARCH} == "amd64")
+ @if [ "`${PKG_VERSION} -t \"\`\\\`${CC} -print-prog-name=as\\\` --version | ${AWK} 'NR==1 {sub(/\(GNU Binutils\)/,""); print $$3}'\`\" 2.18.49`" = ">" ] ; then \
+ ${REINPLACE_CMD} -e "s|%%FENV%%||g" ${TMPPLIST}; \
+ else \
+ ${REINPLACE_CMD} -e "s|%%FENV%%|@comment |g" ${TMPPLIST}; \
+ fi
+.else
+ @${REINPLACE_CMD} -e "s|%%FENV%%|@comment |g" ${TMPPLIST}
+.endif
.include <bsd.port.post.mk>
diff -urN py-numpy.orig/distinfo py-numpy/distinfo
- --- py-numpy.orig/distinfo 2010-02-07 12:08:47.346034919 -0600
+++ py-numpy/distinfo 2010-02-15 19:51:49.134852482 -0600
@@ -4,3 +4,15 @@
MD5 (numpybook.pdf) = 637180cd704dc8be4036c09412501397
SHA256 (numpybook.pdf) = 8c9692db7373838c585073e4141ae4bd3b8793dffd59ce3544bf851e71e9b865
SIZE (numpybook.pdf) = 2148630
+MD5 (i387/fenv.c?p=203441) = d371542b4c2d17088d52f73862726496
+SHA256 (i387/fenv.c?p=203441) = c7c558ddb6ab6604c83062fe0655d3ce8cf4d60edb4c9c82777962c49d23ca54
+SIZE (i387/fenv.c?p=203441) = 4791
+MD5 (i387/fenv.h?p=203441) = d7c13d3c58b762a7a8814e7d6c585689
+SHA256 (i387/fenv.h?p=203441) = 40c72f3cdd6990076394056e06461e1daeb6087b6a32f1962d3c33b0a00c0e0d
+SIZE (i387/fenv.h?p=203441) = 6774
+MD5 (amd64/fenv.c?p=203441) = be35d718bd9113d9efa6fc777298d12d
+SHA256 (amd64/fenv.c?p=203441) = 9741a9ad3f8406f8292a268b0bc288dc7cb042e3e102440696d48c9a8b7955f0
+SIZE (amd64/fenv.c?p=203441) = 3601
+MD5 (amd64/fenv.h?p=203441) = 564a4e973990e4f66a5b3ab0e5ded5e1
+SHA256 (amd64/fenv.h?p=203441) = 2daf607fea1bf7e8de5e174599d963fc3bbbe48e293cf2ff08e221351472c9d6
+SIZE (amd64/fenv.h?p=203441) = 5810
diff -urN py-numpy.orig/files/fenv.patch py-numpy/files/fenv.patch
- --- py-numpy.orig/files/fenv.patch 1969-12-31 18:00:00.000000000 -0600
+++ py-numpy/files/fenv.patch 2010-02-15 19:01:10.775996010 -0600
@@ -0,0 +1,40 @@
+--- numpy/core/include/numpy/ufuncobject.h.orig 2009-12-15 06:47:53.000000000 -0600
++++ numpy/core/include/numpy/ufuncobject.h 2010-02-15 18:54:28.490863602 -0600
+@@ -306,7 +306,11 @@
+ #elif defined(__GLIBC__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114))
+
+ #if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__) || defined(__FreeBSD__)
++#if defined(__FreeBSD__) && (__FreeBSD_version <= 900009)
++#include "fenv/fenv.c"
++#else
+ #include <fenv.h>
++#endif
+ #elif defined(__CYGWIN__)
+ #include "fenv/fenv.c"
+ #endif
+--- numpy/numarray/_capi.c.orig 2009-12-28 08:00:09.000000000 -0600
++++ numpy/numarray/_capi.c 2010-02-15 18:57:25.993127759 -0600
+@@ -9,7 +9,12 @@
+ #endif
+
+ #if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114))
++#if defined(__FreeBSD__) && (__FreeBSD_version <= 900009)
++#include "numpy/fenv/fenv.h"
++#include "numpy/fenv/fenv.c"
++#else
+ #include <fenv.h>
++#endif
+ #elif defined(__CYGWIN__)
+ #include "numpy/fenv/fenv.h"
+ #include "numpy/fenv/fenv.c"
+--- numpy/core/setup.py.orig 2009-12-28 08:00:09.000000000 -0600
++++ numpy/core/setup.py 2010-02-15 19:00:44.715666850 -0600
+@@ -625,7 +625,7 @@
+ ]
+
+ # Don't install fenv unless we need them.
+- if sys.platform == 'cygwin':
++ if sys.platform == 'cygwin' or sys.platform.startswith('freebsd'):
+ config.add_data_dir('include/numpy/fenv')
+
+ config.add_extension('_sort',
diff -urN py-numpy.orig/pkg-plist py-numpy/pkg-plist
- --- py-numpy.orig/pkg-plist 2010-02-07 12:08:47.366021172 -0600
+++ py-numpy/pkg-plist 2010-02-15 21:23:46.322187473 -0600
@@ -64,6 +64,8 @@
%%PYTHON_SITELIBDIR%%/numpy/core/include/numpy/_numpyconfig.h
%%PYTHON_SITELIBDIR%%/numpy/core/include/numpy/arrayobject.h
%%PYTHON_SITELIBDIR%%/numpy/core/include/numpy/arrayscalars.h
+%%FENV%%%%PYTHON_SITELIBDIR%%/numpy/core/include/numpy/fenv/fenv.c
+%%FENV%%%%PYTHON_SITELIBDIR%%/numpy/core/include/numpy/fenv/fenv.h
%%PYTHON_SITELIBDIR%%/numpy/core/include/numpy/multiarray_api.txt
%%PYTHON_SITELIBDIR%%/numpy/core/include/numpy/ndarrayobject.h
%%PYTHON_SITELIBDIR%%/numpy/core/include/numpy/noprefix.h
@@ -966,6 +968,7 @@
@dirrm %%PYTHON_SITELIBDIR%%/numpy/core/tests
@dirrm %%PYTHON_SITELIBDIR%%/numpy/core/lib/npy-pkg-config
@dirrm %%PYTHON_SITELIBDIR%%/numpy/core/lib
+%%FENV%%@dirrm %%PYTHON_SITELIBDIR%%/numpy/core/include/numpy/fenv
@dirrm %%PYTHON_SITELIBDIR%%/numpy/core/include/numpy
@dirrm %%PYTHON_SITELIBDIR%%/numpy/core/include
@dirrm %%PYTHON_SITELIBDIR%%/numpy/core
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (FreeBSD)
iD8DBQFLfG5dCQM7t5B2mhARAlXgAJ9oDC4jSXmtikkbaZx3GTS1YAhqJACdFGQb
eOdjZ0ANVyp31EGsuWvI4/c=
=ZubZ
-----END PGP SIGNATURE-----
More information about the freebsd-python
mailing list