[127411] trunk/dports/science/libxc

dstrubbe at macports.org dstrubbe at macports.org
Mon Oct 27 11:06:26 PDT 2014


Revision: 127411
          https://trac.macports.org/changeset/127411
Author:   dstrubbe at macports.org
Date:     2014-10-27 11:06:26 -0700 (Mon, 27 Oct 2014)
Log Message:
-----------
libxc: Use compilers portgroup, thus adding variants for gcc49, dragonegg, and g95, and using clang (or other default compiler) instead of gcc C compilers. Some workarounds were necessary for clang and g95.

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

Added Paths:
-----------
    trunk/dports/science/libxc/files/
    trunk/dports/science/libxc/files/patch-src-util.h.diff

Modified: trunk/dports/science/libxc/Portfile
===================================================================
--- trunk/dports/science/libxc/Portfile	2014-10-27 16:12:01 UTC (rev 127410)
+++ trunk/dports/science/libxc/Portfile	2014-10-27 18:06:26 UTC (rev 127411)
@@ -2,6 +2,7 @@
 # $Id$
 
 PortSystem          1.0
+PortGroup           compilers 1.0
 
 name                libxc
 version             2.1.0
@@ -24,10 +25,27 @@
 checksums           rmd160  8797838fc92ae1435cde7d21e2e90cae91726d9c \
                     sha256  481fcd811d7f5e99ceab2596be09e422a21e9b03437ca607b9c03ffc42050d29
 
+compilers.choose    fc
+compilers.setup     require_fortran
+
+if {![fortran_variant_isset]} {
+    default_variants-append +gcc48
+}
+
 pre-configure {
     configure.args  FCCPP=${configure.cpp}
 }
 
+pre-build {
+    # This file is automatically generated by 'make' and was unwisely included in
+    # the release; it has line numbers from cpp that are unacceptable to g95.
+    delete ${worksrcpath}/src/libxc.f90
+}
+
+# Fixes linking problem with clang. From libxc commit r11961.
+# Affects libxc version 2.2.0 as well, but will be fixed in any future release.
+patchfiles          patch-src-util.h.diff
+
 use_parallel_build  no
 
 universal_variant   no
@@ -35,23 +53,6 @@
 test.run            yes
 test.target         check
 
-variant gcc45 conflicts gcc46 gcc47 gcc48 description {Build with GCC 4.5} {
-    configure.compiler  macports-gcc-4.5
-}
-variant gcc46 conflicts gcc45 gcc47 gcc48 description {Build with GCC 4.6} {
-    configure.compiler  macports-gcc-4.6
-}
-variant gcc47 conflicts gcc45 gcc46 gcc48 description {Build with GCC 4.7} {
-    configure.compiler  macports-gcc-4.7
-}
-variant gcc48 conflicts gcc45 gcc46 gcc47 description {Build with GCC 4.8} {
-    configure.compiler  macports-gcc-4.8
-}
-
-if {![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset gcc47]} {
-    default_variants    +gcc48
-}
-
 livecheck.url       ${master_sites}
 livecheck.type      regex
 livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}

Added: trunk/dports/science/libxc/files/patch-src-util.h.diff
===================================================================
--- trunk/dports/science/libxc/files/patch-src-util.h.diff	                        (rev 0)
+++ trunk/dports/science/libxc/files/patch-src-util.h.diff	2014-10-27 18:06:26 UTC (rev 127411)
@@ -0,0 +1,10 @@
+--- src/util.h.orig	2014-10-27 11:12:00.000000000 -0400
++++ src/util.h	2014-10-27 11:12:22.000000000 -0400
+@@ -219,6 +219,7 @@
+ 
+ void XC(gga_c_pw91_func)(const XC(func_type) *p, XC(gga_work_c_t) *r);
+ void XC(gga_c_pbe_func) (const XC(func_type) *p, XC(gga_work_c_t) *r);
++void XC(gga_c_q2d_func) (const XC(func_type) *p, XC(gga_work_c_t) *r);
+ 
+ /* meta GGAs */
+ typedef struct XC(mgga_work_x_t) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141027/743a0b13/attachment.html>


More information about the macports-changes mailing list