[68235] trunk/dports/math/qrupdate
mcalhoun at macports.org
mcalhoun at macports.org
Sat May 29 12:43:54 PDT 2010
Revision: 68235
http://trac.macports.org/changeset/68235
Author: mcalhoun at macports.org
Date: 2010-05-29 12:43:48 -0700 (Sat, 29 May 2010)
Log Message:
-----------
qrupdate: Allow 32/64-bit universal build. Build shared libraries.
Modified Paths:
--------------
trunk/dports/math/qrupdate/Portfile
Added Paths:
-----------
trunk/dports/math/qrupdate/files/
trunk/dports/math/qrupdate/files/patch-Makefile.diff
Modified: trunk/dports/math/qrupdate/Portfile
===================================================================
--- trunk/dports/math/qrupdate/Portfile 2010-05-29 19:15:39 UTC (rev 68234)
+++ trunk/dports/math/qrupdate/Portfile 2010-05-29 19:43:48 UTC (rev 68235)
@@ -2,9 +2,11 @@
# $Id$
PortSystem 1.0
+PortGroup muniversal 1.0
name qrupdate
version 1.1.1
+revision 1
categories math
maintainers nomaintainer
description library for fast updates of QR and Cholesky decompositions
@@ -18,14 +20,51 @@
sha1 8fbaba202b0d4bf80852b2dc6c8d1d4b90b816d4 \
rmd160 fd63306abe91adcd5d47e408d9cd4af3e1b32b0c
-use_configure no
-build.target lib
-destroot {
- xinstall -m 644 ${worksrcpath}/lib${name}.a ${destroot}${prefix}/lib
- system "ranlib ${destroot}${prefix}/lib/lib${name}.a"
+depends_lib-append port:atlas
+
+use_configure no
+build.target lib solib
+
+build.args PREFIX=${prefix} BLAS="-L${prefix}/lib" LAPACK="-L${prefix}/lib -llapack"
+destroot.args PREFIX=${prefix} BLAS="-L${prefix}/lib" LAPACK="-L${prefix}/lib -llapack"
+test.args PREFIX=${prefix} BLAS="-L${prefix}/lib" LAPACK="-L${prefix}/lib -llapack"
+
+patchfiles patch-Makefile.diff
+
+post-patch {
+ # Mac install program does not support -D flag.
+ reinplace "s|install -D|install|" ${worksrcpath}/src/Makefile
+
+ # Running ranlib on static libraries make universal builds a little more complicated.
+ reinplace "s|ar -cr |libtool -o |" ${worksrcpath}/src/Makefile
}
-variant g95 conflicts gcc43 gcc44 description {build with g95} {
+# Fortran compilers can not cross-compile
+if { ${os.arch}=="i386" } {
+ set universal_archs_supported "i386 x86_64"
+} else {
+ set universal_archs_supported "ppc ppc64"
+}
+
+post-configure {
+ if { ! [variant_isset universal] } {
+ if { ${build_arch} == "x86_64" || ${build_arch} == "ppc64" } {
+ reinplace "s|^FFLAGS=|FFLAGS=-m64 |" ${worksrcpath}/Makeconf
+ } else {
+ reinplace "s|^FFLAGS=|FFLAGS=-m32 |" ${worksrcpath}/Makeconf
+ }
+ } else {
+ foreach arch ${universal_archs_to_use} {
+ if { ${arch}=="x86_64" || ${arch}=="ppc64" } {
+ reinplace "s|^FFLAGS=|FFLAGS=-m64 |" ${worksrcpath}-${arch}/Makeconf
+ } else {
+ reinplace "s|^FFLAGS=|FFLAGS=-m32 |" ${worksrcpath}-${arch}/Makeconf
+ }
+ }
+ }
+}
+
+variant g95 conflicts gcc43 gcc44 universal description {build with g95} {
depends_build-append port:g95
post-patch {
reinplace "s|Makeconf|Makeconf.g95|" ${worksrcpath}/Makefile
@@ -33,12 +72,13 @@
}
}
-variant gcc43 conflicts g95 gcc44 description {build with gcc43 fortran} {
+variant gcc43 conflicts g95 gcc44 universal description {build with gcc43 fortran} {
depends_build-append port:gcc43
post-patch {
reinplace "s|gfortran|gfortran-mp-4.3|" ${worksrcpath}/Makeconf
}
}
+
variant gcc44 conflicts g95 gcc43 description {build with gcc44 fortran} {
depends_build-append port:gcc44
post-patch {
@@ -47,6 +87,7 @@
}
if {![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset g95]} {
- default_variants +gcc43
+ default_variants +gcc44
}
+test.run yes
Added: trunk/dports/math/qrupdate/files/patch-Makefile.diff
===================================================================
--- trunk/dports/math/qrupdate/files/patch-Makefile.diff (rev 0)
+++ trunk/dports/math/qrupdate/files/patch-Makefile.diff 2010-05-29 19:43:48 UTC (rev 68235)
@@ -0,0 +1,8 @@
+--- Makefile~ 2009-02-06 02:12:00.000000000 -0700
++++ Makefile 2010-04-10 07:18:26.000000000 -0700
+@@ -51,3 +51,5 @@
+
+ install-staticlib:
+ make -C src/ install-staticlib
++
++.PHONY: install
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100529/23213e9f/attachment.html>
More information about the macports-changes
mailing list