[103605] trunk/dports/science/lanHEP/Portfile

larryv at macports.org larryv at macports.org
Sat Mar 2 14:59:59 PST 2013


Revision: 103605
          https://trac.macports.org/changeset/103605
Author:   larryv at macports.org
Date:     2013-03-02 14:59:59 -0800 (Sat, 02 Mar 2013)
Log Message:
-----------
lanHEP: Update to 3.1.7; add +gcc4{3,5,6,7} compiler variants.

* Make +gcc43 the transitional default.
* Correctly set CC/LD/FC based on configure.compiler.
* Install SLHAplus library and headers.
* Install manuals.

Modified Paths:
--------------
    trunk/dports/science/lanHEP/Portfile

Modified: trunk/dports/science/lanHEP/Portfile
===================================================================
--- trunk/dports/science/lanHEP/Portfile	2013-03-02 20:39:18 UTC (rev 103604)
+++ trunk/dports/science/lanHEP/Portfile	2013-03-02 22:59:59 UTC (rev 103605)
@@ -4,13 +4,12 @@
 PortSystem          1.0
 
 name                lanHEP
-set shortname       lhep
-version             3.1.5
-set shortversion    315
+version             3.1.7
 categories          science
 maintainers         nomaintainer
 platforms           darwin
 license             Restrictive/nondistributable
+
 description         Automatic Feynman rule generation
 long_description    The LanHEP program for Feynman rules generation in \
                     momentum representation is presented. It reads the \
@@ -23,25 +22,67 @@
                     Feynman rules in terms of physical fields and \
                     independent parameters.
 homepage            http://theory.sinp.msu.ru/~semenov/lanhep.html
+
+set short_version [join [split ${version} .] {}]
+
 master_sites        http://theory.sinp.msu.ru/~semenov/
+distname            lhep${short_version}
 extract.suffix      .tgz
-distfiles           ${shortname}${shortversion}${extract.suffix}
-distname            lanhep${shortversion}
+checksums           rmd160  6809ef8057c119141bc7c9cf2276658ac59fa3f5 \
+                    sha256  108a04e1b6a7b8ddeb13b1582adce15b8761f5accdb33051dae1f0bfbbd6da3b
 
-checksums           md5     cdd84731bd34e6b2b534dd560e02792a \
-                    sha1    5469899da20645a14f0a2d1a0e18149fa46c33a9 \
-                    rmd160  779f8226a7da7977c671ecd7e17d38f55651fbf5
+worksrcdir          lanhep${short_version}
 
-depends_build       port:gcc43
+use_configure       no
 
+pre-build {
+    build.args      CC=${configure.cc} \
+                    CFLAGS="${configure.cflags} [get_canonical_archflags cc]" \
+                    LD=${configure.cc} \
+                    FC=${configure.fc} \
+                    FFLAGS="${configure.fflags} [get_canonical_archflags fc]"
+}
+build.target
 use_parallel_build  no
-use_configure       no
 
-build.env-append    FC=gfortran-mp-4.3
-build.target        { }
+destroot {
+    xinstall ${worksrcpath}/lhep ${destroot}${prefix}/bin
 
-destroot {
-    file copy ${workpath}/${distname}/lhep ${destroot}${prefix}/bin
-    file mkdir ${destroot}${prefix}/share/${name}
-    file copy ${workpath}/${distname}/mdl ${destroot}${prefix}/share/${name}/mdl
+    xinstall -m 644 ${worksrcpath}/SLHAplus/libSLHAplus.a \
+        ${destroot}${prefix}/lib
+    xinstall -m 644 -W ${worksrcpath}/SLHAplus SLHAplus.h SLHAplus.fh \
+        ${destroot}${prefix}/include
+
+    set share ${destroot}${prefix}/share
+    xinstall -d ${share}/${name}
+    copy ${worksrcpath}/mdl ${share}/${name}/mdl
+    xinstall -d ${share}/doc/${name}
+    xinstall -m 644 -W ${worksrcpath}/manuals man30.pdf man31.pdf \
+        ${share}/doc/${name}
 }
+
+variant gcc43 conflicts gcc45 gcc46 gcc47 description {Build with GCC 4.3} {
+    configure.compiler  macports-gcc-4.3
+    depends_lib-append  port:gcc43
+}
+
+variant gcc45 conflicts gcc43 gcc46 gcc47 description {Build with GCC 4.5} {
+    configure.compiler  macports-gcc-4.5
+    depends_lib-append  port:gcc45
+}
+
+variant gcc46 conflicts gcc43 gcc45 gcc47 description {Build with GCC 4.6} {
+    configure.compiler  macports-gcc-4.6
+    depends_lib-append  port:gcc46
+}
+
+variant gcc47 conflicts gcc43 gcc45 gcc46 description {Build with GCC 4.7} {
+    configure.compiler  macports-gcc-4.7
+    depends_lib-append  port:gcc47
+}
+
+if {![variant_isset gcc45] && ![variant_isset gcc46] &&
+    ![variant_isset gcc47]
+} then {
+    default_variants    +gcc43
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130302/8cc50299/attachment.html>


More information about the macports-changes mailing list