Revision: 93813 https://trac.macports.org/changeset/93813 Author: ryandesign@macports.org Date: 2012-05-31 12:44:12 -0700 (Thu, 31 May 2012) Log Message: ----------- netcdf-fortran: fix universal variant using muniversal portgroup; remove -m32/-m64 flags from nf-config Modified Paths: -------------- trunk/dports/science/netcdf-fortran/Portfile Modified: trunk/dports/science/netcdf-fortran/Portfile =================================================================== --- trunk/dports/science/netcdf-fortran/Portfile 2012-05-31 19:42:20 UTC (rev 93812) +++ trunk/dports/science/netcdf-fortran/Portfile 2012-05-31 19:44:12 UTC (rev 93813) @@ -2,10 +2,11 @@ # $Id$ PortSystem 1.0 +PortGroup muniversal 1.0 name netcdf-fortran version 4.2 -revision 1 +revision 2 maintainers takeshi openmaintainer platforms darwin categories science @@ -28,6 +29,13 @@ depends_lib port:netcdf +# Fortran compilers can not cross-compile +if {${os.arch} == "i386"} { + set universal_archs_supported "i386 x86_64" +} else { + set universal_archs_supported "ppc ppc64" +} + patchfiles patch-netcdf-fortran.pc.in.diff post-patch { if {[variant_isset g95]} { @@ -48,6 +56,20 @@ configure.cppflags-append -DNDEBUG configure.cflags-append -fno-common +post-build { + if {[variant_isset universal]} { + set dirs {} + foreach arch ${universal_archs_to_use} { + lappend dirs ${worksrcpath}-${arch} + } + } else { + set dirs ${worksrcpath} + } + foreach dir ${dirs} { + reinplace -E {s/(-arch [a-z0-9_]+|-m32|-m64)//g} ${dir}/nf-config + } +} + test.run yes test.target check
participants (1)
-
ryandesign@macports.org