[145987] trunk/dports/devel/glib2-devel

ryandesign at macports.org ryandesign at macports.org
Tue Feb 23 12:13:12 PST 2016


Revision: 145987
          https://trac.macports.org/changeset/145987
Author:   ryandesign at macports.org
Date:     2016-02-23 12:13:12 -0800 (Tue, 23 Feb 2016)
Log Message:
-----------
glib2-devel: fix build failure with GCC < 4.4 (i.e. with Xcode < 4.3)

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

Added Paths:
-----------
    trunk/dports/devel/glib2-devel/files/patch-glib-gdate.c.diff

Modified: trunk/dports/devel/glib2-devel/Portfile
===================================================================
--- trunk/dports/devel/glib2-devel/Portfile	2016-02-23 19:24:39 UTC (rev 145986)
+++ trunk/dports/devel/glib2-devel/Portfile	2016-02-23 20:13:12 UTC (rev 145987)
@@ -52,6 +52,11 @@
     compiler.blacklist-append {clang < 600}
 }
 
+if {[string match {*gcc-4.[0123]} ${configure.compiler}]} {
+    # Remove pragmas incompatible with gcc < 4.4
+    patchfiles-append       patch-glib-gdate.c.diff
+}
+
 depends_build               bin:xmllint:libxml2
 
 depends_lib                 port:gettext \

Added: trunk/dports/devel/glib2-devel/files/patch-glib-gdate.c.diff
===================================================================
--- trunk/dports/devel/glib2-devel/files/patch-glib-gdate.c.diff	                        (rev 0)
+++ trunk/dports/devel/glib2-devel/files/patch-glib-gdate.c.diff	2016-02-23 20:13:12 UTC (rev 145987)
@@ -0,0 +1,15 @@
+Fix "error: #pragma GCC diagnostic not allowed inside functions" with GCC < 4.4
+https://bugzilla.gnome.org/show_bug.cgi?id=762562
+--- glib/gdate.c.orig	2016-02-16 05:10:31.000000000 -0600
++++ glib/gdate.c	2016-02-23 13:43:39.000000000 -0600
+@@ -2494,10 +2494,7 @@
+        * recognize whether strftime actually failed or just returned "".
+        */
+       tmpbuf[0] = '\1';
+-      #pragma GCC diagnostic push
+-      #pragma GCC diagnostic ignored "-Wformat-nonliteral"
+       tmplen = strftime (tmpbuf, tmpbufsize, locale_format, &tm);
+-      #pragma GCC diagnostic pop
+ 
+       if (tmplen == 0 && tmpbuf[0] != '\0')
+         {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160223/30e714e4/attachment.html>


More information about the macports-changes mailing list