[141746] trunk/dports/devel/akonadi/Portfile

nicos at macports.org nicos at macports.org
Sat Dec 12 02:50:03 PST 2015


Revision: 141746
          https://trac.macports.org/changeset/141746
Author:   nicos at macports.org
Date:     2015-10-27 09:24:45 -0700 (Tue, 27 Oct 2015)
Log Message:
-----------
akonadi: arrange compilers for cases without libc++ (ticket #49299)

Modified Paths:
--------------
    trunk/dports/devel/akonadi/Portfile

Modified: trunk/dports/devel/akonadi/Portfile
===================================================================
--- trunk/dports/devel/akonadi/Portfile	2015-10-27 16:09:58 UTC (rev 141745)
+++ trunk/dports/devel/akonadi/Portfile	2015-10-27 16:24:45 UTC (rev 141746)
@@ -27,10 +27,39 @@
                     port:boost \
                     port:shared-mime-info
 
-#Older compilers cannot handle c++0x instructions contained in akonadi
-compiler.blacklist  gcc-4.2 llvm-gcc-4.2 apple-gcc-4.2
-compiler.blacklist-append   {clang < 500}
+# require c++11
 
+post-patch {
+    reinplace "s/c++0x/c++11/" ${worksrcpath}/CMakeLists.txt
+}
+
+if {${configure.cxx_stdlib} eq "libstdc++"} {
+
+    # *clang* when using libstdc++ do not seem to support C++11;
+    # C++11 support seems to need GCC 4.7+ when using libstdc++;
+    # could use C++0x support on GCC4.[56], but just ignore it since
+    # there are newer compilers already in place as defaults.
+
+    # Blacklist GCC compilers not supporting C++11 and all CLANG.
+    # This is probably not necessary, but it's good practice.
+
+    compiler.blacklist-append *clang* {*gcc-3*} {*gcc-4.[0-6]}
+
+    # and whitelist GCC compilers that support C++11. wish there were
+    # a better way.  these will be used in the order provided.
+
+    compiler.whitelist macports-gcc-5 macports-gcc-4.9 macports-gcc-4.8 macports-gcc-4.7
+
+} else {
+
+    # using libc++;
+    # Blacklist Clang not supporting C++11 in some form and all GCC.
+    # Just use the cxx11 PortGroup for this specific case.
+
+    PortGroup cxx11 1.0
+
+}
+
 configure.args-append  -DPOSTGRES_PATH=Off
 # mute akonadiserver which is usually overly chatty:
 configure.cflags-append     -DQT_NO_DEBUG_OUTPUT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151212/a0d1a534/attachment-0001.html>


More information about the macports-changes mailing list