[152193] trunk/dports/python/py-netcdf4
sean at macports.org
sean at macports.org
Wed Aug 31 13:59:10 PDT 2016
Revision: 152193
https://trac.macports.org/changeset/152193
Author: sean at macports.org
Date: 2016-08-31 13:59:10 -0700 (Wed, 31 Aug 2016)
Log Message:
-----------
py-netcdf: fix compilation with hdf5; fixes #51850
Modified Paths:
--------------
trunk/dports/python/py-netcdf4/Portfile
Added Paths:
-----------
trunk/dports/python/py-netcdf4/files/
trunk/dports/python/py-netcdf4/files/patch-hdf5path.diff
Modified: trunk/dports/python/py-netcdf4/Portfile
===================================================================
--- trunk/dports/python/py-netcdf4/Portfile 2016-08-31 20:59:06 UTC (rev 152192)
+++ trunk/dports/python/py-netcdf4/Portfile 2016-08-31 20:59:10 UTC (rev 152193)
@@ -7,6 +7,7 @@
name py-netcdf4
version 1.2.4
+revision 1
categories-append science
platforms darwin
maintainers sean \
@@ -32,6 +33,8 @@
mpi.enforce_variant netcdf
mpi.setup
+patchfiles-append patch-hdf5path.diff
+
build.env-append USE_NCCONFIG=1
destroot.env-append USE_NCCONFIG=1
@@ -39,8 +42,13 @@
if {${name} ne ${subport}} {
depends_lib-append port:netcdf \
- port:py${python.version}-numpy
+ port:py${python.version}-numpy \
+ port:py${python.version}-cython
+ post-patch {
+ reinplace -W ${worksrcpath} "s,@@PREFIX@@,${prefix}," setup.py
+ }
+
pre-configure {
# py-netcdf4's setup.py uses nc-config for flags and libs but not compiler
configure.cc {*}[exec ${prefix}/bin/nc-config --cc]
Added: trunk/dports/python/py-netcdf4/files/patch-hdf5path.diff
===================================================================
--- trunk/dports/python/py-netcdf4/files/patch-hdf5path.diff (rev 0)
+++ trunk/dports/python/py-netcdf4/files/patch-hdf5path.diff 2016-08-31 20:59:10 UTC (rev 152193)
@@ -0,0 +1,13 @@
+--- setup.py.orig 2016-08-05 13:37:29.000000000 -0700
++++ setup.py 2016-08-05 13:38:29.000000000 -0700
+@@ -251,8 +251,10 @@
+ dep=subprocess.Popen([ncconfig,'--libs'],stdout=subprocess.PIPE).communicate()[0]
+ libs = [str(l[2:].decode()) for l in dep.split() if l[0:2].decode() == '-l' ]
+ lib_dirs = [str(l[2:].decode()) for l in dep.split() if l[0:2].decode() == '-L' ]
++ lib_dirs += ["@@PREFIX@@/lib/hdf5-18/lib"]
+ dep=subprocess.Popen([ncconfig,'--cflags'],stdout=subprocess.PIPE).communicate()[0]
+ inc_dirs = [str(i[2:].decode()) for i in dep.split() if i[0:2].decode() == '-I']
++ inc_dirs += ["@@PREFIX@@/lib/hdf5-18/include"]
+ elif HAS_PKG_CONFIG: # Try pkg-config.
+ sys.stdout.write('using pkg-config ...\n')
+ dep=subprocess.Popen(['pkg-config','--libs','netcdf'],stdout=subprocess.PIPE).communicate()[0]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160831/74a4835b/attachment.html>
More information about the macports-changes
mailing list