[112512] trunk/dports/science/sparskit
snc at macports.org
snc at macports.org
Thu Oct 24 14:35:30 PDT 2013
Revision: 112512
https://trac.macports.org/changeset/112512
Author: snc at macports.org
Date: 2013-10-24 14:35:30 -0700 (Thu, 24 Oct 2013)
Log Message:
-----------
sparskit:
Fortran recipies/tests
maintainer patch
fixes #40638
Modified Paths:
--------------
trunk/dports/science/sparskit/Portfile
Added Paths:
-----------
trunk/dports/science/sparskit/files/
trunk/dports/science/sparskit/files/patch-INFO-makefile.diff
trunk/dports/science/sparskit/files/patch-INOUT-makefile.diff
trunk/dports/science/sparskit/files/patch-MATGEN-FEM-makefile.diff
trunk/dports/science/sparskit/files/patch-makefile.diff
Modified: trunk/dports/science/sparskit/Portfile
===================================================================
--- trunk/dports/science/sparskit/Portfile 2013-10-24 21:26:23 UTC (rev 112511)
+++ trunk/dports/science/sparskit/Portfile 2013-10-24 21:35:30 UTC (rev 112512)
@@ -27,28 +27,85 @@
use_configure no
-pre-build {
- build.args F77=${configure.f90} OPT="-c -O3"
-}
+patchfiles patch-makefile.diff \
+ patch-INFO-makefile.diff \
+ patch-INOUT-makefile.diff \
+ patch-MATGEN-FEM-makefile.diff
+build.args OPT="-c -O3"
+
use_parallel_build yes
+test.run yes
+test.args FFLAGS=-O3
+# test requires FC, FFLAGS set because test makefiles lack explicit rule for .f -> .o and these are in the implicit rule
+
destroot {
xinstall ${worksrcpath}/libskit.a ${destroot}${prefix}/lib/
}
-variant gcc46 conflicts gcc47 description {Build with GCC 4.6} {
- configure.compiler macports-gcc-4.6
+set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9}
+set default_fortran_variant +gcc48
+set g95_conflicts {}
+
+foreach ver ${gcc_versions} {
+ set ver_no_dot [join [split ${ver} "."] ""]
+
+ set variant_line {variant gcc${ver_no_dot} description "build with gfortran from gcc${ver_no_dot}" conflicts g95}
+
+ foreach over ${gcc_versions} {
+ if {${ver} == ${over}} {
+ continue
+ }
+
+ set over_no_dot [join [split ${over} "."] ""]
+ append variant_line " conflicts gcc${over_no_dot}"
+ }
+ append variant_line { {}}
+
+ eval $variant_line
+
+ append g95_conflicts " conflicts gcc${ver_no_dot}"
+
+ if {[variant_isset gcc${ver_no_dot}]} {
+ if {${default_fortran_variant} != "+gcc${ver_no_dot}"} {
+ set default_fortran_variant ""
+ }
+ }
}
-variant gcc47 conflicts gcc46 description {Build with GCC 4.7} {
- configure.compiler macports-gcc-4.7
+eval [concat {variant g95 description {build with g95}} $g95_conflicts {{}}]
+
+if {[variant_isset g95]} {
+ if {${default_fortran_variant} != "+g95"} {
+ set default_fortran_variant ""
+ }
}
-if {![variant_isset gcc46]} {
- default_variants +gcc47
+if {${default_fortran_variant} != ""} {
+ default_variants-append "${default_fortran_variant}"
}
+foreach ver ${gcc_versions} {
+ set ver_no_dot [join [split ${ver} "."] ""]
+
+ if {[variant_isset gcc${ver_no_dot}]} {
+ depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
+ depends_build-append port:gcc${ver_no_dot}
+
+ build.args-append F77=${prefix}/bin/gfortran-mp-${ver}
+ test.args-append F77=${prefix}/bin/gfortran-mp-${ver} FC=${prefix}/bin/gfortran-mp-${ver}
+ }
+}
+
+if {[variant_isset g95]} {
+ depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
+ depends_build-append port:g95
+
+ build.args-append F77=${prefix}/bin/g95
+ test.args-append F77=${prefix}/bin/g95 FC=${prefix}/bin/g95
+}
+
livecheck.type regex
livecheck.url [lindex ${master_sites} 0]
livecheck.regex SPARSKIT(\[0-9.\]+)${extract.suffix}
Added: trunk/dports/science/sparskit/files/patch-INFO-makefile.diff
===================================================================
--- trunk/dports/science/sparskit/files/patch-INFO-makefile.diff (rev 0)
+++ trunk/dports/science/sparskit/files/patch-INFO-makefile.diff 2013-10-24 21:35:30 UTC (rev 112512)
@@ -0,0 +1,12 @@
+--- INFO/makefile.orig 2013-09-30 23:36:16.000000000 -0400
++++ INFO/makefile 2013-09-30 23:36:42.000000000 -0400
+@@ -1,8 +1,8 @@
+ #
+ FILES = rinfo1.o dinfo13.o
+ ## needs library libskit.a in whatever machine version --
+
+-LIB = -L/project/darpa/lib/PC -lskit
++LIB = ../libskit.a
+ ##LIB = -L/project/darpa/lib/solaris -lskit
+
+ info1.ex: $(FILES)
Added: trunk/dports/science/sparskit/files/patch-INOUT-makefile.diff
===================================================================
--- trunk/dports/science/sparskit/files/patch-INOUT-makefile.diff (rev 0)
+++ trunk/dports/science/sparskit/files/patch-INOUT-makefile.diff 2013-10-24 21:35:30 UTC (rev 112512)
@@ -0,0 +1,13 @@
+--- INOUT/makefile.orig 2013-09-30 23:41:15.000000000 -0400
++++ INOUT/makefile 2013-09-30 23:41:35.000000000 -0400
+@@ -11,8 +5,8 @@
+ chk.ex: $(FILES1) ../MATGEN/FDIF/functns.o ../libskit.a
+ $(F77) $(FFLAGS) -o chk.ex $(FILES1) ../MATGEN/FDIF/functns.o ../libskit.a
+
+-hb2ps.ex: $(FILES2) ../libskit32.a
+- $(F77) $(FFLAGS) -o hb2ps.ex $(FILES2) ../libskit32.a
++hb2ps.ex: $(FILES2) ../libskit.a
++ $(F77) $(FFLAGS) -o hb2ps.ex $(FILES2) ../libskit.a
+
+ hb2pic.ex: $(FILES3) ../libskit.a
+ $(F77) $(FFLAGS) -o hb2pic.ex $(FILES3) ../libskit.a
Added: trunk/dports/science/sparskit/files/patch-MATGEN-FEM-makefile.diff
===================================================================
--- trunk/dports/science/sparskit/files/patch-MATGEN-FEM-makefile.diff (rev 0)
+++ trunk/dports/science/sparskit/files/patch-MATGEN-FEM-makefile.diff 2013-10-24 21:35:30 UTC (rev 112512)
@@ -0,0 +1,12 @@
+--- MATGEN/FEM/makefile.orig 2013-09-30 23:43:17.000000000 -0400
++++ MATGEN/FEM/makefile 2013-09-30 23:43:29.000000000 -0400
+@@ -1,7 +1,7 @@
+ FILES = convdif.o functns2.o
+
+-fem.ex: $(FILES) ../../UNSUPP/PLOTS/psgrd.o ../../libskit32.a
+- $(F77) $(FFLAGS) -o fem.ex $(FILES) ../../UNSUPP/PLOTS/psgrd.o ../../libskit32.a
++fem.ex: $(FILES) ../../UNSUPP/PLOTS/psgrd.o ../../libskit.a
++ $(F77) $(FFLAGS) -o fem.ex $(FILES) ../../UNSUPP/PLOTS/psgrd.o ../../libskit.a
+
+ clean:
+ rm -f *.o *.ex core *.trace
Added: trunk/dports/science/sparskit/files/patch-makefile.diff
===================================================================
--- trunk/dports/science/sparskit/files/patch-makefile.diff (rev 0)
+++ trunk/dports/science/sparskit/files/patch-makefile.diff 2013-10-24 21:35:30 UTC (rev 112512)
@@ -0,0 +1,39 @@
+--- makefile.orig 2013-09-29 22:51:48.000000000 -0400
++++ makefile 2013-09-30 19:37:31.000000000 -0400
+@@ -151,3 +151,36 @@
+ (cd UNSUPP/PLOTS ; $(F77) $(OPT) texgrid1.f)
+ UNSUPP/PLOTS/texplt1.o : UNSUPP/PLOTS/texplt1.f
+ (cd UNSUPP/PLOTS ; $(F77) $(OPT) texplt1.f)
++
++# replaces unwieldy script "dotests"
++test : all
++ cd BLASSM && $(MAKE) mvec.ex tester.ex
++ cd FORMATS && $(MAKE) un.ex fmt.ex rvbr.ex
++ cd INFO && $(MAKE) info1.ex
++ cd INOUT && $(MAKE) chk.ex hb2ps.ex hb2pic.ex
++ cd ITSOL && $(MAKE) riters.ex rilut.ex riter2.ex
++ cd MATGEN/FDIF && $(MAKE) gen5.ex genbl.ex
++ cd MATGEN/FEM && $(MAKE) fem.ex
++ cd MATGEN/MISC && $(MAKE) sobel.ex zlatev.ex markov.ex
++ cd UNSUPP/MATEXP && $(MAKE) exp.ex phi.ex
++
++ cd BLASSM && ./mvec.ex
++ cd BLASSM && ./tester.ex
++ cd FORMATS && ./un.ex && cat unary.mat
++ cd FORMATS && ./fmt.ex && grep ERROR *.mat || ls -s *.mat
++ cd FORMATS && ./rvbr.ex
++ cd INFO && ./info1.ex < saylr1
++ cd INOUT && ./chk.ex
++ cd INOUT && ./hb2ps.ex < ../INFO/saylr1 > saylr1.ps
++ cd INOUT && ./hb2pic.ex < ../INFO/saylr1 > saylr1.pic
++ cd ITSOL && ./riters.ex
++ cd ITSOL && ./rilut.ex
++ cd ITSOL && ./riter2.ex < ../INFO/saylr1
++ cd MATGEN/FDIF && echo "10 10 1\ntestpt.mat" | ./gen5.ex
++ cd MATGEN/FDIF && echo "10 10 1\n4\ntestbl.mat" | ./genbl.ex
++ cd MATGEN/FEM && echo "2\n2" | ./fem.ex && cat mat.hb
++ cd MATGEN/MISC && echo "10" | ./sobel.ex
++ cd MATGEN/MISC && ./zlatev.ex && cat zlatev*.mat
++ cd MATGEN/MISC && echo "10" | ./markov.ex && cat markov.mat
++ cd UNSUPP/MATEXP && echo "0.1\n0.00001\n10" | ./exp.ex
++ cd UNSUPP/MATEXP && echo "0.1\n0.00001\n10" | ./phi.ex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131024/c91b5c22/attachment.html>
More information about the macports-changes
mailing list