[100047] trunk/dports/devel/gob2

raimue at macports.org raimue at macports.org
Sun Nov 25 03:54:35 PST 2012


Revision: 100047
          https://trac.macports.org/changeset/100047
Author:   raimue at macports.org
Date:     2012-11-25 03:54:34 -0800 (Sun, 25 Nov 2012)
Log Message:
-----------
devel/gob2:
Do not output preprocessor statement '#line 0', which is treat as an error by
some versions of clang while gcc accepts it as a GNU extension to the
C standard. This fixes building other ports using gob2 with clang.

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

Added Paths:
-----------
    trunk/dports/devel/gob2/files/
    trunk/dports/devel/gob2/files/patch-out-line0.diff

Modified: trunk/dports/devel/gob2/Portfile
===================================================================
--- trunk/dports/devel/gob2/Portfile	2012-11-25 11:17:00 UTC (rev 100046)
+++ trunk/dports/devel/gob2/Portfile	2012-11-25 11:54:34 UTC (rev 100047)
@@ -6,6 +6,7 @@
 name             gob2
 version          2.0.17
 set branch       [join [lrange [split ${version} .] 0 1] .]
+revision         1
 categories       devel
 license          GPL-2+
 maintainers      nomaintainer
@@ -28,6 +29,10 @@
 
 depends_lib      path:lib/pkgconfig/glib-2.0.pc:glib2
 
+# Do not output preprocessor statement '#line 0' which is an error for some
+# versions of clang
+patchfiles       patch-out-line0.diff
+
 configure.args   --mandir=${prefix}/share/man
 
 livecheck.type   regex

Added: trunk/dports/devel/gob2/files/patch-out-line0.diff
===================================================================
--- trunk/dports/devel/gob2/files/patch-out-line0.diff	                        (rev 0)
+++ trunk/dports/devel/gob2/files/patch-out-line0.diff	2012-11-25 11:54:34 UTC (rev 100047)
@@ -0,0 +1,17 @@
+http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/gob2/files/patch-src_out.c?rev=1.1;content-type=text%2Fplain
+--- src/out.c.orig	2009-07-10 16:43:05.000000000 +0200
++++ src/out.c	2009-11-27 14:07:58.000000000 +0100
+@@ -69,6 +69,13 @@
+ 	} else
+ 		g_assert_not_reached();
+ 
++	/* 
++	 * According to clang developers #line 0 is not allowed by the C spec.
++	 * Gcc does accept it though. http://llvm.org/bugs/show_bug.cgi?id=5603
++	 */
++	if (line == 0)
++		line += 1;
++
+ 	fprintf(fp, "#line %d \"%s\"\n", line, filename);
+ }
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121125/1eda7bad/attachment.html>


More information about the macports-changes mailing list