[110122] trunk/dports/science/bali-phy/Portfile

jeremyhu at macports.org jeremyhu at macports.org
Mon Aug 26 09:55:59 PDT 2013


Revision: 110122
          https://trac.macports.org/changeset/110122
Author:   jeremyhu at macports.org
Date:     2013-08-26 09:55:59 -0700 (Mon, 26 Aug 2013)
Log Message:
-----------
bali-phy: Fix build failures with recent boost, mark unsupported on Mavericks.

Modified Paths:
--------------
    trunk/dports/science/bali-phy/Portfile

Modified: trunk/dports/science/bali-phy/Portfile
===================================================================
--- trunk/dports/science/bali-phy/Portfile	2013-08-26 16:33:37 UTC (rev 110121)
+++ trunk/dports/science/bali-phy/Portfile	2013-08-26 16:55:59 UTC (rev 110122)
@@ -26,7 +26,7 @@
 depends_build       port:pkgconfig
 
 configure.args      --with-system-boost --enable-cairo
-configure.env       CFLAGS=-DBOOST_FILESYSTEM_VERSION=2 CXXFLAGS=-DBOOST_FILESYSTEM_VERSION=2
+configure.env-append BOOST_SUFFIX=-mt
 
 variant no_cairo description {disable drawing routines} {
     depends_lib-delete      path:lib/pkgconfig/cairo.pc:cairo
@@ -39,24 +39,71 @@
     configure.args-append   --with-mpi
 }
 
-variant gcc43 conflicts gcc44 gcc45 gcc46 gcc47 description {build using macports-gcc-4.3} {
-    configure.compiler  macports-gcc-4.3
-}
+# The project doesn't even configure with clang.  Based on how long it's
+# been broken, I doubt this project is even used much, so it may not be
+# worh the effort to fix
+#
+# conftest.cpp:60:11: error: no type named 'default_name_check' in 'boost::filesystem::path'
+# fs::path::default_name_check(fs::portable_posix_name);
+# ~~~~~~~~~~^
+# conftest.cpp:60:34: error: definition or redeclaration of 'portable_posix_name' not allowed inside a function
+# fs::path::default_name_check(fs::portable_posix_name);
+#                              ~~~~^
+# 2 errors generated.
+compiler.blacklist *clang*
 
-variant gcc44 conflicts gcc43 gcc45 gcc46 gcc47 description {build using macports-gcc-4.4} {
-    configure.compiler  macports-gcc-4.4
+platform darwin {
+    if {${os.major} >= 13} {
+        # TODO: Test Mavericks once the clang build failures are addressed
+
+        depends_lib
+        depends_run
+        pre-fetch {
+            ui_error "$name does not build on Mavericks or later."
+            error "unsupported platform"
+        }
+    }
 }
 
-variant gcc45 conflicts gcc43 gcc44 gcc46 gcc47 description {build using macports-gcc-4.5} {
-    configure.compiler  macports-gcc-4.5
+set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9}
+set default_fortran_variant +gcc48
+
+foreach ver ${gcc_versions} {
+    set ver_no_dot [join [split ${ver} "."] ""]
+
+    variant gcc${ver_no_dot} description {build with gfortran from gcc${ver_no_dot}} {}
+
+    foreach over ${gcc_versions} {
+        if {${ver} == ${over}} {
+            continue
+        }
+
+        set over_no_dot [join [split ${over} "."] ""]
+        variant gcc${ver_no_dot} conflicts gcc${over_no_dot} {}
+    }
+
+    if {[variant_isset gcc${ver_no_dot}]} {
+        if {${default_fortran_variant} != "+gcc${ver_no_dot}"} {
+            set default_fortran_variant ""
+        }
+    }
 }
 
-variant gcc46 conflicts gcc43 gcc44 gcc45 gcc47 description {build using macports-gcc-4.6} {
-    configure.compiler  macports-gcc-4.6
+if {${default_fortran_variant} != ""} {
+    default_variants-append "${default_fortran_variant}"
 }
 
-variant gcc47 conflicts gcc43 gcc44 gcc45 gcc46 description {build using macports-gcc-4.7} {
-    configure.compiler  macports-gcc-4.7
+foreach ver ${gcc_versions} {
+    set ver_no_dot [join [split ${ver} "."] ""]
+
+    if {[variant_isset gcc${ver_no_dot}]} {
+        depends_lib-append port:libgcc
+        depends_build-append port:gcc${ver_no_dot}
+
+        configure.fc  ${prefix}/bin/gfortran-mp-${ver}
+        configure.f77 ${prefix}/bin/gfortran-mp-${ver}
+        configure.f90 ${prefix}/bin/gfortran-mp-${ver}
+    }
 }
 
 livecheck.type  regex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130826/fb6cce0b/attachment.html>


More information about the macports-changes mailing list