Index: science/apbs/Portfile
===================================================================
diff --git a/trunk/dports/science/apbs/Portfile b/trunk/dports/science/apbs/Portfile
--- a/trunk/dports/science/apbs/Portfile	(revision 103612)
+++ b/trunk/dports/science/apbs/Portfile	(working copy)
@@ -6,7 +6,7 @@
 
 name                apbs
 version             1.3.0
-revision            1
+revision            2
 set branch          [join [lrange [split ${version} .] 0 1] .]
 categories          science
 maintainers         bromo.med.uc.edu:howarth
@@ -25,8 +25,7 @@
 checksums           md5     f99a505365f07f6853979cfe2ef23365 \
                     sha1    1494f36e35f2e4b1a18d4b22516fad4948c6391f
 
-depends_lib         port:gcc45 \
-                    port:readline \
+depends_lib         port:readline \
                     port:py26-zsi
 patchfiles          apbs.diff
 
@@ -36,8 +35,11 @@
 
 build.cmd           make
 build.target        all
-configure.env       py_path=${python.bin} F77=gfortran-mp-4.5
+configure.env       py_path=${python.bin}
 configure.args      --enable-python --with-python=${python.bin} --with-blas="-L/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A -lblas -Wl,-framework -Wl,vecLib -Wl,-undefined -Wl,dynamic_lookup" FFLAGS="-O3"
+pre-configure {
+    configure.env-append    F77=${configure.f77}
+}
 
 post-patch {
     reinplace  "s|@PYTHON_PKGD@|${python.pkgd}|g" ${worksrcpath}/configure
@@ -72,3 +74,20 @@
 post-destroot {
     system "${python.bin} -O ${python.libdir}/compileall.py -d ${python.pkgd}/apbs ${destroot}${python.pkgd}/apbs"
 }
+
+variant gcc45 conflicts gcc46 gcc47 description {Build with GFortran 4.5} {
+    configure.compiler  macports-gcc-4.5
+    depends_lib-append  port:gcc45
+}
+variant gcc46 conflicts gcc45 gcc47 description {Build with GFortran 4.6} {
+    configure.compiler  macports-gcc-4.6
+    depends_lib-append  port:gcc46
+}
+variant gcc47 conflicts gcc45 gcc46 description {Build with GFortran 4.7} {
+    configure.compiler  macports-gcc-4.7
+    depends_lib-append  port:gcc47
+}
+
+if {![variant_isset gcc46] && ![variant_isset gcc47]} {
+    default_variants    +gcc45
+}
Index: science/ccpnmr/Portfile
===================================================================
diff --git a/trunk/dports/science/ccpnmr/Portfile b/trunk/dports/science/ccpnmr/Portfile
--- a/trunk/dports/science/ccpnmr/Portfile	(revision 103612)
+++ b/trunk/dports/science/ccpnmr/Portfile	(working copy)
@@ -5,7 +5,7 @@
 
 name                ccpnmr
 version             2.2.2
-revision            1
+revision            2
 set branch          [join [lrange [split $version .] 0 1] .]
 categories          science python
 maintainers         bromo.med.uc.edu:howarth
@@ -23,7 +23,7 @@
 checksums           md5     a3ede39ed484d261eb82137055dc66a1 \
                     sha1    825ad7487ef6191baac0e5aa3d0ec6a6ed94a04f
 worksrcdir          ${name}
-depends_lib         port:py27-scipy port:mesa port:freeglut port:tk port:py27-tkinter port:gcc45
+depends_lib         port:py27-scipy port:mesa port:freeglut port:tk port:py27-tkinter
 patchfiles          ccpnmr.patch
 use_configure       no
 
@@ -34,6 +34,8 @@
 set python.libdir ${python.prefix}/lib/python${python.branch}
 set python.include	${python.prefix}/include/python${python.branch}
 
+set lib ""
+
 post-patch {
     reinplace  "s|@PYTHON_BIN@|${python.bin}|g"   ${worksrcpath}/bin/analysis \
                                                   ${worksrcpath}/bin/formatConverter \
@@ -51,12 +53,13 @@
     reinplace  "s|@PREFIX@|${prefix}|g" ${worksrcpath}/ccpnmr${branch}/c/environment-opengl.txt
     reinplace  "s|/usr/X11R6|${prefix}|g" ${worksrcpath}/ccpnmr${branch}/c/environment-opengl.txt
     reinplace  "s|@PYTHON_INCL@|${python.include}|g" ${worksrcpath}/ccpnmr${branch}/c/environment-opengl.txt
+    reinplace  "s|@CC@|${configure.cc}|g" ${worksrcpath}/ccpnmr${branch}/c/environment-opengl.txt
+    reinplace  "s|@GCCLIB@|${lib}|g" ${worksrcpath}/ccpnmr${branch}/c/environment-opengl.txt
 }
 pre-build {
     copy ${worksrcpath}/ccpnmr${branch}/c/environment-opengl.txt ${worksrcpath}/ccpnmr${branch}/c/environment.txt
 }
 
-configure.compiler  macports-gcc-4.5
 build.args      CC=${configure.cc} ARCHFLAGS="${configure.cc_archflags}"
 build.dir       ${worksrcpath}/ccpnmr${branch}/c
 build.target    all links
@@ -74,3 +77,23 @@
 post-destroot {
     system "${python.bin} -O ${python.libdir}/compileall.py -d ${python.pkgd}/${name}/${name}${branch} ${destroot}${python.pkgd}/${name}/${name}${branch}"
 }
+
+variant gcc45 conflicts gcc46 gcc47 description {Build with GCC 4.5} {
+    configure.compiler  macports-gcc-4.5
+    depends_lib-append  port:gcc45
+    set lib ${prefix}/lib/gcc45
+}
+variant gcc46 conflicts gcc45 gcc47 description {Build with GCC 4.6} {
+    configure.compiler  macports-gcc-4.6
+    depends_lib-append  port:gcc46
+    set lib ${prefix}/lib/gcc46
+}
+variant gcc47 conflicts gcc45 gcc46 description {Build with GCC 4.7} {
+    configure.compiler  macports-gcc-4.7
+    depends_lib-append  port:gcc47
+    set lib ${prefix}/lib/gcc47
+}
+
+if {![variant_isset gcc46] && ![variant_isset gcc47]} {
+    default_variants    +gcc45
+}
Index: science/ccpnmr/files/ccpnmr.patch
===================================================================
diff --git a/trunk/dports/science/ccpnmr/files/ccpnmr.patch b/trunk/dports/science/ccpnmr/files/ccpnmr.patch
--- a/trunk/dports/science/ccpnmr/files/ccpnmr.patch	(revision 103612)
+++ b/trunk/dports/science/ccpnmr/files/ccpnmr.patch	(working copy)
@@ -127,7 +127,7 @@
 @@ -0,0 +1,56 @@
 +#Environment file for use with fink to build ccpnmr suite - environment.txt
 +
-+CC = gcc-mp-4.5
++CC = @CC@
 +LINK = $(CC)
 +MAKE = make
 +CO_NAME = -c $<
@@ -146,7 +146,7 @@
 +COPY_LIBRARIES = sh copySharedObjs
 +
 +OPENMP_FLAGS = -fopenmp
-+OPENMP_LIB  = -L@PREFIX@/lib/gcc45 -lgomp
++OPENMP_LIB  = -L@GCCLIB@ -lgomp
 +
 +GL_FLAG = -DUSE_GL_TRUE
 +
Index: science/pdb2pqr/Portfile
===================================================================
diff --git a/trunk/dports/science/pdb2pqr/Portfile b/trunk/dports/science/pdb2pqr/Portfile
--- a/trunk/dports/science/pdb2pqr/Portfile	(revision 103612)
+++ b/trunk/dports/science/pdb2pqr/Portfile	(working copy)
@@ -6,7 +6,7 @@
 
 name                pdb2pqr
 version             1.7
-revision            1
+revision            2
 categories          science
 maintainers         bromo.med.uc.edu:howarth
 description         automate Poisson-Boltzmann electrostatics calculations
@@ -23,10 +23,10 @@
 use_configure       yes
 build.cmd           make
 build.target        all
-depends_lib         port:gcc45 \
-                    port:py26-numeric
+depends_lib         port:py26-numeric
+
 post-patch {
-    reinplace   "s|fort xlf95 lf95 g95|gfortran-mp-4.5|g" ${worksrcpath}/propka/configure
+    reinplace   "s|fort xlf95 lf95 g95|${configure.f77}|g" ${worksrcpath}/propka/configure
     reinplace   "s|/usr/bin/env python|${python.bin}|g" ${worksrcpath}/pdb2pka/pka.py
     reinplace   "s|/usr/bin/python|${python.bin}|g" ${worksrcpath}/src/psize.py
     reinplace   "s|-Wl,-framework -Wl,Python -bundle|${python.lib}  -bundle|g" \
@@ -34,8 +34,10 @@
                                                     ${worksrcpath}/propka/configure
     delete      ${worksrcpath}/contrib
 }
-configure.args      --with-max-atoms="1000000" --without-url --with-python=${python.bin} \
-                    -with-f77=gfortran-mp-4.5
+configure.args      --with-max-atoms="1000000" --without-url --with-python=${python.bin}
+pre-configure {
+    configure.args-append   -with-f77=${configure.f77}
+}
 destroot {
       system "find ${worksrcpath} -name '*.o' -delete"
       file mkdir ${destroot}${prefix}/share/{name}
@@ -47,3 +49,20 @@
       system "echo '${prefix}/share/${name}/propka/propka \"\$@\"' >> ${destroot}${prefix}/bin/propka"
       file attributes ${destroot}${prefix}/bin/propka -permissions a+x
 }
+
+variant gcc45 conflicts gcc46 gcc47 description {Build with GCC 4.5} {
+    configure.compiler  macports-gcc-4.5
+    depends_lib-append  port:gcc45
+}
+variant gcc46 conflicts gcc45 gcc47 description {Build with GCC 4.6} {
+    configure.compiler  macports-gcc-4.6
+    depends_lib-append  port:gcc46
+}
+variant gcc47 conflicts gcc45 gcc46 description {Build with GCC 4.7} {
+    configure.compiler  macports-gcc-4.7
+    depends_lib-append  port:gcc47
+}
+
+if {![variant_isset gcc46] && ![variant_isset gcc47]} {
+    default_variants    +gcc45
+}
