Ticket #38261: add_compiler_variants.diff

File add_compiler_variants.diff, 8.4 KB (added by larryv (Lawrence Velázquez), 12 years ago)

revbump and add compiler variants, defaulting to +gcc45

  • trunk/dports/science/apbs/Portfile

    diff --git a/trunk/dports/science/apbs/Portfile b/trunk/dports/science/apbs/Portfile
    a b  
    66
    77name                apbs
    88version             1.3.0
    9 revision            1
     9revision            2
    1010set branch          [join [lrange [split ${version} .] 0 1] .]
    1111categories          science
    1212maintainers         bromo.med.uc.edu:howarth
     
    2525checksums           md5     f99a505365f07f6853979cfe2ef23365 \
    2626                    sha1    1494f36e35f2e4b1a18d4b22516fad4948c6391f
    2727
    28 depends_lib         port:gcc45 \
    29                     port:readline \
     28depends_lib         port:readline \
    3029                    port:py26-zsi
    3130patchfiles          apbs.diff
    3231
     
    3635
    3736build.cmd           make
    3837build.target        all
    39 configure.env       py_path=${python.bin} F77=gfortran-mp-4.5
     38configure.env       py_path=${python.bin}
    4039configure.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"
     40pre-configure {
     41    configure.env-append    F77=${configure.f77}
     42}
    4143
    4244post-patch {
    4345    reinplace  "s|@PYTHON_PKGD@|${python.pkgd}|g" ${worksrcpath}/configure
     
    7274post-destroot {
    7375    system "${python.bin} -O ${python.libdir}/compileall.py -d ${python.pkgd}/apbs ${destroot}${python.pkgd}/apbs"
    7476}
     77
     78variant gcc45 conflicts gcc46 gcc47 description {Build with GFortran 4.5} {
     79    configure.compiler  macports-gcc-4.5
     80    depends_lib-append  port:gcc45
     81}
     82variant gcc46 conflicts gcc45 gcc47 description {Build with GFortran 4.6} {
     83    configure.compiler  macports-gcc-4.6
     84    depends_lib-append  port:gcc46
     85}
     86variant gcc47 conflicts gcc45 gcc46 description {Build with GFortran 4.7} {
     87    configure.compiler  macports-gcc-4.7
     88    depends_lib-append  port:gcc47
     89}
     90
     91if {![variant_isset gcc46] && ![variant_isset gcc47]} {
     92    default_variants    +gcc45
     93}
  • trunk/dports/science/ccpnmr/Portfile

    diff --git a/trunk/dports/science/ccpnmr/Portfile b/trunk/dports/science/ccpnmr/Portfile
    a b  
    55
    66name                ccpnmr
    77version             2.2.2
    8 revision            1
     8revision            2
    99set branch          [join [lrange [split $version .] 0 1] .]
    1010categories          science python
    1111maintainers         bromo.med.uc.edu:howarth
     
    2323checksums           md5     a3ede39ed484d261eb82137055dc66a1 \
    2424                    sha1    825ad7487ef6191baac0e5aa3d0ec6a6ed94a04f
    2525worksrcdir          ${name}
    26 depends_lib         port:py27-scipy port:mesa port:freeglut port:tk port:py27-tkinter port:gcc45
     26depends_lib         port:py27-scipy port:mesa port:freeglut port:tk port:py27-tkinter
    2727patchfiles          ccpnmr.patch
    2828use_configure       no
    2929
     
    3434set python.libdir ${python.prefix}/lib/python${python.branch}
    3535set python.include      ${python.prefix}/include/python${python.branch}
    3636
     37set lib ""
     38
    3739post-patch {
    3840    reinplace  "s|@PYTHON_BIN@|${python.bin}|g"   ${worksrcpath}/bin/analysis \
    3941                                                  ${worksrcpath}/bin/formatConverter \
     
    5153    reinplace  "s|@PREFIX@|${prefix}|g" ${worksrcpath}/ccpnmr${branch}/c/environment-opengl.txt
    5254    reinplace  "s|/usr/X11R6|${prefix}|g" ${worksrcpath}/ccpnmr${branch}/c/environment-opengl.txt
    5355    reinplace  "s|@PYTHON_INCL@|${python.include}|g" ${worksrcpath}/ccpnmr${branch}/c/environment-opengl.txt
     56    reinplace  "s|@CC@|${configure.cc}|g" ${worksrcpath}/ccpnmr${branch}/c/environment-opengl.txt
     57    reinplace  "s|@GCCLIB@|${lib}|g" ${worksrcpath}/ccpnmr${branch}/c/environment-opengl.txt
    5458}
    5559pre-build {
    5660    copy ${worksrcpath}/ccpnmr${branch}/c/environment-opengl.txt ${worksrcpath}/ccpnmr${branch}/c/environment.txt
    5761}
    5862
    59 configure.compiler  macports-gcc-4.5
    6063build.args      CC=${configure.cc} ARCHFLAGS="${configure.cc_archflags}"
    6164build.dir       ${worksrcpath}/ccpnmr${branch}/c
    6265build.target    all links
     
    7477post-destroot {
    7578    system "${python.bin} -O ${python.libdir}/compileall.py -d ${python.pkgd}/${name}/${name}${branch} ${destroot}${python.pkgd}/${name}/${name}${branch}"
    7679}
     80
     81variant gcc45 conflicts gcc46 gcc47 description {Build with GCC 4.5} {
     82    configure.compiler  macports-gcc-4.5
     83    depends_lib-append  port:gcc45
     84    set lib ${prefix}/lib/gcc45
     85}
     86variant gcc46 conflicts gcc45 gcc47 description {Build with GCC 4.6} {
     87    configure.compiler  macports-gcc-4.6
     88    depends_lib-append  port:gcc46
     89    set lib ${prefix}/lib/gcc46
     90}
     91variant gcc47 conflicts gcc45 gcc46 description {Build with GCC 4.7} {
     92    configure.compiler  macports-gcc-4.7
     93    depends_lib-append  port:gcc47
     94    set lib ${prefix}/lib/gcc47
     95}
     96
     97if {![variant_isset gcc46] && ![variant_isset gcc47]} {
     98    default_variants    +gcc45
     99}
  • trunk/dports/science/ccpnmr/files/ccpnmr.patch

    diff --git a/trunk/dports/science/ccpnmr/files/ccpnmr.patch b/trunk/dports/science/ccpnmr/files/ccpnmr.patch
    a b  
    127127@@ -0,0 +1,56 @@
    128128+#Environment file for use with fink to build ccpnmr suite - environment.txt
    129129+
    130 +CC = gcc-mp-4.5
     130+CC = @CC@
    131131+LINK = $(CC)
    132132+MAKE = make
    133133+CO_NAME = -c $<
     
    146146+COPY_LIBRARIES = sh copySharedObjs
    147147+
    148148+OPENMP_FLAGS = -fopenmp
    149 +OPENMP_LIB  = -L@PREFIX@/lib/gcc45 -lgomp
     149+OPENMP_LIB  = -L@GCCLIB@ -lgomp
    150150+
    151151+GL_FLAG = -DUSE_GL_TRUE
    152152+
  • trunk/dports/science/pdb2pqr/Portfile

    diff --git a/trunk/dports/science/pdb2pqr/Portfile b/trunk/dports/science/pdb2pqr/Portfile
    a b  
    66
    77name                pdb2pqr
    88version             1.7
    9 revision            1
     9revision            2
    1010categories          science
    1111maintainers         bromo.med.uc.edu:howarth
    1212description         automate Poisson-Boltzmann electrostatics calculations
     
    2323use_configure       yes
    2424build.cmd           make
    2525build.target        all
    26 depends_lib         port:gcc45 \
    27                     port:py26-numeric
     26depends_lib         port:py26-numeric
     27
    2828post-patch {
    29     reinplace   "s|fort xlf95 lf95 g95|gfortran-mp-4.5|g" ${worksrcpath}/propka/configure
     29    reinplace   "s|fort xlf95 lf95 g95|${configure.f77}|g" ${worksrcpath}/propka/configure
    3030    reinplace   "s|/usr/bin/env python|${python.bin}|g" ${worksrcpath}/pdb2pka/pka.py
    3131    reinplace   "s|/usr/bin/python|${python.bin}|g" ${worksrcpath}/src/psize.py
    3232    reinplace   "s|-Wl,-framework -Wl,Python -bundle|${python.lib}  -bundle|g" \
     
    3434                                                    ${worksrcpath}/propka/configure
    3535    delete      ${worksrcpath}/contrib
    3636}
    37 configure.args      --with-max-atoms="1000000" --without-url --with-python=${python.bin} \
    38                     -with-f77=gfortran-mp-4.5
     37configure.args      --with-max-atoms="1000000" --without-url --with-python=${python.bin}
     38pre-configure {
     39    configure.args-append   -with-f77=${configure.f77}
     40}
    3941destroot {
    4042      system "find ${worksrcpath} -name '*.o' -delete"
    4143      file mkdir ${destroot}${prefix}/share/{name}
     
    4749      system "echo '${prefix}/share/${name}/propka/propka \"\$@\"' >> ${destroot}${prefix}/bin/propka"
    4850      file attributes ${destroot}${prefix}/bin/propka -permissions a+x
    4951}
     52
     53variant gcc45 conflicts gcc46 gcc47 description {Build with GCC 4.5} {
     54    configure.compiler  macports-gcc-4.5
     55    depends_lib-append  port:gcc45
     56}
     57variant gcc46 conflicts gcc45 gcc47 description {Build with GCC 4.6} {
     58    configure.compiler  macports-gcc-4.6
     59    depends_lib-append  port:gcc46
     60}
     61variant gcc47 conflicts gcc45 gcc46 description {Build with GCC 4.7} {
     62    configure.compiler  macports-gcc-4.7
     63    depends_lib-append  port:gcc47
     64}
     65
     66if {![variant_isset gcc46] && ![variant_isset gcc47]} {
     67    default_variants    +gcc45
     68}