[88594] trunk/dports/math/arpack/Portfile

mmoll at macports.org mmoll at macports.org
Thu Jan 5 06:35:59 PST 2012


Revision: 88594
          http://trac.macports.org/changeset/88594
Author:   mmoll at macports.org
Date:     2012-01-05 06:35:58 -0800 (Thu, 05 Jan 2012)
Log Message:
-----------
math/arpack: update to version 3.0.2, add gcc46 variant, rename mpi variant to openmpi

Modified Paths:
--------------
    trunk/dports/math/arpack/Portfile

Modified: trunk/dports/math/arpack/Portfile
===================================================================
--- trunk/dports/math/arpack/Portfile	2012-01-05 14:26:10 UTC (rev 88593)
+++ trunk/dports/math/arpack/Portfile	2012-01-05 14:35:58 UTC (rev 88594)
@@ -4,28 +4,23 @@
 PortGroup  muniversal 1.0
 
 name          arpack
-version       1
-revision      4
+version       3.0.2
 categories    math
 license       BSD
 platforms     darwin
 maintainers		mmoll
 description		Package for solving large scale eigenvalue problems
 long_description  \
-	ARPACK is a collection of Fortran77 subroutines designed to solve large \
-	scale eigenvalue problems.
-homepage      	http://www.caam.rice.edu/software/ARPACK
-master_sites	${homepage}/SRC/
-distfiles     arpack96.tar.gz patch.tar.gz
-checksums     arpack96.tar.gz md5 fffaa970198b285676f4156cebc8626e \
-	      patch.tar.gz md5 14830d758f195f272b8594a493501fa2
+    ARPACK is a collection of Fortran77 subroutines designed to solve large \
+    scale eigenvalue problems.
+homepage            http://forge.scilab.org/index.php/p/arpack-ng
+master_sites	    ${homepage}/downloads/353
+distfiles           get
+checksums           md5     fc744f506911401cf4573b1071c0424f \
+                    sha1    1092e4da3a28707ee3a143defaa99f8fa26bba9f \
+                    rmd160  26c74ff0a5ecd300eb61a1a0abea5bdbaa6e358d
+worksrcdir          ${name}-ng-${version}
 
-use_configure	no
-worksrcdir	ARPACK
-patchfiles	patch-arpack.diff
-
-use_parallel_build	no
-
 pre-fetch { 
 	if {"darwin" == ${os.platform} && ${os.major} < 9} { 
 		ui_error "${name} ${version} requires Mac OS X 10.5 or greater" 
@@ -41,178 +36,86 @@
 }
 
 if { ! [variant_isset universal]} {
-	build.args-append home=${worksrcpath}
-	if { ${build_arch}=="x86_64" || ${build_arch}=="ppc64" } {
-		build.args-append FFLAGS='-O2 -m64'
-	} else {
-		build.args-append FFLAGS='-O2 -m32'
-        }
+  configure.args-append home=${worksrcpath}
+  if { ${build_arch}=="x86_64" || ${build_arch}=="ppc64" } {
+      configure.args-append FFLAGS='-O2 -m64' LDFLAGS='-L${prefix}/lib'
+  } else {
+      configure.args-append FFLAGS='-O2 -m32' LDFLAGS='-L${prefix}/lib'
+  }
 } else {
-	foreach arch {x86_64 i386 ppc ppc64} {
-		set merger_build_args(${arch}) home=${worksrcpath}-${arch}
-		if { ${arch}=="x86_64" || ${arch}=="ppc64" } {
-			lappend merger_build_args(${arch}) FFLAGS='-O2 -m64'
-		} else {
-			lappend merger_build_args(${arch}) FFLAGS='-O2 -m32'
-		}
-	}
-
+  foreach arch {x86_64 i386 ppc ppc64} {
+      set merger_build_args(${arch}) home=${worksrcpath}-${arch}
+      set merger_dont_diff "${prefix}/lib/libarpack.la ${prefix}/lib/libparpack.la"
+      if { ${arch}=="x86_64" || ${arch}=="ppc64" } {
+          lappend merger_configure_args(${arch}) FFLAGS='-O2 -m64' LDFLAGS='-L${prefix}/lib'
+      } else {
+          lappend merger_configure_args(${arch}) FFLAGS='-O2 -m32' LDFLAGS='-L${prefix}/lib'
+      }
+  }
 }
 
-proc make_dylib { name lib_dir arch libs curVer } {
-    global destroot prefix gccnumber
-
-    set comVer [join [lrange [split ${curVer} '.'] 0 0] '.']
-
-    set cmd "\
-              /usr/bin/ld -arch ${arch} -dynamic -dylib -single_module -dead_strip \
-              -x -all_load -L. -L${prefix}/lib/gcc${gccnumber}/${arch} -L${prefix}/lib/gcc${gccnumber} -L${prefix}/lib \
-              -ldylib1.o -dylib_install_name ${prefix}/lib/lib${name}.${comVer}.dylib \
-              -current_version ${curVer} \
-              -compatibility_version ${comVer} \
-              lib${name}.a -o lib${name}.${curVer}.dylib ${libs}"
-
-    system "cd ${lib_dir} && ${cmd}"
-}
-
-pre-build {
-	build.args-append FC=${configure.fc} MAKE=${build.cmd}
-}
-
-set lapacklibs "-latlas -llapack -lblas"
-set flibs -lgfortran
-if {![variant_isset g95]} {
-post-build {
-    set curVer ${version}
-    set comVer [join [lrange [split ${version} '.'] 0 1 ] '.']
-
-    if { ![variant_isset universal] } {
-        set archs ${build_arch}
-    } else {
-        set archs ${universal_archs_to_use}
-    }
-
-    foreach arch ${archs} {
-        if { ![variant_isset universal] } {
-            set dir ${worksrcpath}
-        } else {
-            set dir ${worksrcpath}-${arch}
-        }
-
-        make_dylib arpack ${dir} ${arch} "${lapacklibs} ${flibs} -lSystem" ${version}
-        
-        if { [variant_isset mpi] } {
-            make_dylib parpack ${dir} ${arch} "${lapacklibs} ${flibs} -lmpi_f77 -lSystem -larpack.1" ${version}
-        }
-    }
-}
-}
-
-post-configure {
-        if { [variant_isset mpi] } {
-            set stlibs "libarpack.a libparpack.a"
-            set shlibs "libarpack.1.dylib libparpack.1.dylib"
-        } elseif {![variant_isset g95]} {
-            set stlibs "libarpack.a"
-            set shlibs "libarpack.1.dylib"
-        } else {
-            set stlibs "libarpack.a"
-            set shlibs ""
-        }
-
-        if { ![variant_isset universal] } {
-            set fl [open ${worksrcpath}/Makefile "a"]
-            puts ${fl} "\n.PHONY: install"
-            puts ${fl} "install: ${stlibs} ${shlibs}"
-            foreach lib ${stlibs} {
-                puts ${fl} "\tinstall -m 644 -v ${lib} ${destroot}${prefix}/lib"
-            }
-            foreach lib ${shlibs} {
-                puts ${fl} "\tinstall -m 755 -v ${lib} ${destroot}${prefix}/lib"
-            }
-            close ${fl}
-        } else {
-            foreach arch ${universal_archs_to_use} {
-                set fl [open ${worksrcpath}-${arch}/Makefile "a"]
-                puts ${fl} "\n.PHONY: install"
-                puts ${fl} "install: ${stlibs} ${shlibs}"
-                foreach lib ${stlibs} {
-                    puts ${fl} "\tinstall -m 644 -v ${lib} ${destroot}-${arch}${prefix}/lib"
-                }
-                foreach lib ${shlibs} {
-                    puts ${fl} "\tinstall -m 755 -v ${lib} ${destroot}-${arch}${prefix}/lib"
-                }
-                close ${fl}
-            }
-        }
-}
-
-variant gcc42 description {build with gfortran-mp-4.2} conflicts gcc43 gcc44 gcc45 g95 universal {
+variant gcc42 description {build with gfortran-mp-4.2} conflicts gcc43 gcc44 gcc45 gcc46 g95 universal {
 	depends_build-append    port:gcc42
-	configure.fc ${prefix}/bin/gfortran-mp-4.2
+	configure.env-append F77=${prefix}/bin/gfortran-mp-4.2
 }
 
-variant gcc43 description {build with gfortran-mp-4.3} conflicts gcc42 gcc44 gcc45 g95 universal {
+variant gcc43 description {build with gfortran-mp-4.3} conflicts gcc42 gcc44 gcc45 gcc46 g95 universal {
 	depends_build-append    port:gcc43
-	configure.fc ${prefix}/bin/gfortran-mp-4.3
+	configure.env-append F77=${prefix}/bin/gfortran-mp-4.3
 }
 
-variant gcc44 description {build with gfortran-mp-4.4} conflicts gcc42 gcc43 gcc45 g95 {
+variant gcc44 description {build with gfortran-mp-4.4} conflicts gcc42 gcc43 gcc45 gcc46 g95 {
 	depends_build-append    port:gcc44
-	configure.fc ${prefix}/bin/gfortran-mp-4.4
+	configure.env-append F77=${prefix}/bin/gfortran-mp-4.4
 }
 
-variant gcc45 description {build with gfortran-mp-4.5} conflicts gcc42 gcc43 gcc44 g95 {
+variant gcc45 description {build with gfortran-mp-4.5} conflicts gcc42 gcc43 gcc44 gcc46 g95 {
 	depends_build-append    port:gcc45
-	configure.fc ${prefix}/bin/gfortran-mp-4.5
+	configure.env-append F77=${prefix}/bin/gfortran-mp-4.5
 }
 
-variant g95 description {build with g95} conflicts gcc42 gcc43 gcc44 gcc45 universal {
+variant gcc46 description {build with gfortran-mp-4.6} conflicts gcc42 gcc43 gcc44 gcc45 g95 {
+	depends_build-append    port:gcc46
+	configure.env-append F77=${prefix}/bin/gfortran-mp-4.6
+}
+
+variant g95 description {build with g95} conflicts gcc42 gcc43 gcc44 gcc45 gcc46 universal {
         depends_build-append    port:g95
-        configure.fc ${prefix}/bin/g95
+        configure.env-append F77=${prefix}/bin/g95
 }
 
 if { ![variant_isset gcc42] && ![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset g95] } {
 	default_variants      +gcc44
 }
 
-if { [variant_isset gcc42] } {
-  set gccversion    4.2
-} elseif { [variant_isset gcc43] } {
-  set gccversion    4.3
-} elseif { [variant_isset gcc44] } {
-  set gccversion    4.4
-} else {
-  set gccversion    4.5
+variant openmpi description {build PARPACK, the parallel eigenvalue solver library} conflicts universal {
+    pre-fetch { 	 
+        if {![file exists ${prefix}/bin/openmpif77]} {
+            return -code error "Please install one of the following variants of the openmpi port: gcc42, gcc43, gcc44, gcc45."
+        }
+    }
+    depends_build port:openmpi
+    configure.args-append --enable-mpi
+    configure.env-append MPIF77=${prefix}/bin/openmpif77
 }
-set gccnumber       [join [split ${gccversion} .] ""]
 
-variant mpi description {build PARPACK, the parallel eigenvalue solver library} conflicts universal {
-  distfiles-append parpack96.tar.gz ppatch.tar.gz
-  checksums-append parpack96.tar.gz md5 598d0453b938ccd99a078246be5927f3 \
-  		   ppatch.tar.gz md5 e6f0d70dd99f719c0efee351d0875c96
-	pre-fetch { 	 
-	   if {![file exists ${prefix}/bin/openmpif77]} {
-	     return -code error "Please install one of the following variants of the openmpi port: gcc42, gcc43, gcc44, gcc45."
-	   }
-	}
-	pre-build { foreach entry [glob -directory ${worksrcpath}/PARPACK */MPI/mpif.h] { delete $entry } }
-
-	depends_build port:openmpi
-	configure.fc ${prefix}/bin/openmpif77
-}
-
 variant accelerate conflicts atlas description {build with Accelerate framework} {
-        set lapacklibs "-framework Accelerate"
+    configure.args-append --with-lapack=/usr/lib/liblapack.dylib
 }
 
 variant atlas description {build with atlas} {
-	depends_lib-append port:atlas
-	set lapacklibs "-latlas -llapack -lblas"
+    depends_lib-append port:atlas
+    configure.args-append --with-lapack=${prefix}/lib/liblapack.dylib
 }
 
 if {![variant_isset atlas]} {
     default_variants +accelerate
 }
 
-livecheck.type  none
+post-destroot {
+    reinplace "s|/usr|${prefix}|g" ${destroot}${prefix}/lib/pkgconfig/arpack.pc
+}
+
+livecheck.type  regex
+livecheck.url   ${master_sites}
+livecheck.regex ${name}_(\[0-9.\]+\[0-9\])
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120105/162951ec/attachment.html>


More information about the macports-changes mailing list