[89292] trunk/dports/science/alliance/Portfile

and.damore at macports.org and.damore at macports.org
Mon Jan 23 10:03:20 PST 2012


Revision: 89292
          http://trac.macports.org/changeset/89292
Author:   and.damore at macports.org
Date:     2012-01-23 10:03:18 -0800 (Mon, 23 Jan 2012)
Log Message:
-----------
port alliance: fixing compiler issues, cf. #32947

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

Modified: trunk/dports/science/alliance/Portfile
===================================================================
--- trunk/dports/science/alliance/Portfile	2012-01-23 14:34:07 UTC (rev 89291)
+++ trunk/dports/science/alliance/Portfile	2012-01-23 18:03:18 UTC (rev 89292)
@@ -36,15 +36,19 @@
 destroot.env-append     YACC='/usr/bin/yacc'
 
 # compiler_issue
-# this port is broken with clang and llvm - cf. http://trac.macports.org/ticket/32947
-#
-# even adding -Wno-return-type to clang's CFLAGS doesn't make compiler correctly export
-# symbols in nero/src/MDRGrid.o thus leading in a undef symbol at link time
-if {${configure.compiler} == "clang" || ${configure.compiler} == "llvm-gcc-4.2"} {
-    configure.compiler gcc-4.2
-    if {[vercmp $xcodeversion 4.2] >= 0} {
-        depends_build-append port:apple-gcc42
-        configure.compiler apple-gcc-4.2
+if {${configure.compiler} == "clang"} {
+    # adding -Wno-return-type to clang's CFLAGS to prevent error on missing return statements
+    # cf. http://trac.macports.org/ticket/32947
+    configure.cflags-append -Wno-return-type
+
+}
+if {${configure.compiler} == "clang" ||
+    ${configure.compiler} == "llvm-gcc-4.2"} {
+    # removing -O2 in nero/src in order to correctly export symbols in MDRGrid.o
+    # cf. http://llvm.org/bugs/show_bug.cgi?id=7445
+    # cf. http://trac.macports.org/ticket/32947#comment:3
+    post-configure {
+        reinplace "/^CXXFLAGS/s/ -O2//" ${worksrcpath}/nero/src/Makefile
     }
 }
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120123/8bf06653/attachment.html>


More information about the macports-changes mailing list