--- /opt/local/var/macports/sources/rsync.macports.org/release/ports/math/arpack/Portfile	2007-07-16 16:48:01.000000000 -0500
+++ Portfile	2008-05-02 08:09:01.000000000 -0500
@@ -4,7 +4,7 @@
 
 name          arpack
 version       1
-revision      1
+revision      2
 categories    math
 platforms     darwin
 maintainers		mmoll@cs.rice.edu
@@ -18,14 +18,10 @@
 checksums     arpack96.tar.gz md5 fffaa970198b285676f4156cebc8626e \
 	      patch.tar.gz md5 14830d758f195f272b8594a493501fa2
 
-# We need gfortran. Gcc41 doesn't seem to compile on Intel Mac, so we'll take
-# gcc42. Too bad that the actual gfortran binary in gcc42 is called 
-# gfortran-mp-4.2, otherwise we could just say bin:gfortran:gcc42.
-depends_build port:gcc42
 use_configure	no
 worksrcdir	ARPACK
 patchfiles	patch-arpack.diff
-build.args 	all FC=gfortran-mp-4.2 home=${worksrcpath} 
+build.args 	all home=${worksrcpath} 
 destroot    { 
    xinstall -m 644 -v -W ${worksrcpath} libarpack.a ${destroot}${prefix}/lib
 }
@@ -33,6 +29,24 @@
 	system "ranlib ${destroot}${prefix}/lib/libarpack.a"
 }
 
+variant gcc42 description {build with gfortran-mp-4.2} conflicts gcc43 g95 {
+	configure.f77	      ${prefix}/bin/gfortran-mp-4.2
+	configure.fc	      ${prefix}/bin/gfortran-mp-4.2
+	depends_build-append    port:gcc42
+}
+
+variant gcc43 description {build with gfortran-mp-4.3} conflicts gcc42 g95 {
+	configure.f77	      ${prefix}/bin/gfortran-mp-4.3
+	configure.fc	      ${prefix}/bin/gfortran-mp-4.3
+	depends_build-append    port:gcc43
+}
+
+variant g95 description {build with gfortran-mp-4.2} conflicts gcc42 gcc43 {
+	configure.f77	      ${prefix}/bin/g95
+	configure.fc	      ${prefix}/bin/g95
+	depends_build-append    port:g95
+}
+
 variant mpi {
   distfiles-append parpack96.tar.gz ppatch.tar.gz
   checksums-append parpack96.tar.gz md5 598d0453b938ccd99a078246be5927f3 \
@@ -48,3 +62,7 @@
 		system "ranlib ${destroot}${prefix}/lib/libparpack.a"
 	}
 }
+
+if { ![variant_isset gcc42] && ![variant_isset gcc43] && ![variant_isset g95] } {
+	default_variants      +gcc42
+}

