[ports-gcc] Unbreak x11/libdbusmenu

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ports-gcc] Unbreak x11/libdbusmenu

Charlene Wendling

> http://build-failures.rhaalovely.net/powerpc/2019-02-04/x11/libdbusmenu.log
> http://build-failures.rhaalovely.net/sparc64/2019-02-03/x11/libdbusmenu.log

config.log says:

configure:4031: cc -O2 -pipe -Wno-error=gnu-designator  conftest.c  >&5
cc1: error: -Werror=gnu-designator: No option -Wgnu-designator

According to what i've read around, it's a clangism. It's used to build
tests (that are broken). An easy solution would be to remove that flag,
but as this port uses base compilers i've chosen to be conservative.

It builds on macppc [1] and amd64 [2], and tests included in logs show
that it fails in the same exact way whatever compiler used.


Comments are welcome!

Charlène.


[1] http://0x0.st/z8XK.txt
[2] http://0x0.st/z8Xb.txt


Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/libdbusmenu/Makefile,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 Makefile
--- Makefile 13 Dec 2018 12:14:27 -0000 1.3
+++ Makefile 16 Mar 2019 22:53:59 -0000
@@ -2,6 +2,7 @@
 
 COMMENT = D-Bus menu implementation for Gtk
 DISTNAME = libdbusmenu-16.04.0
+REVISION = 0
 CATEGORIES = x11 devel
 SHARED_LIBS +=  dbusmenu-glib             0.0 # 4.12
 SHARED_LIBS +=  dbusmenu-gtk3             0.0 # 4.12
@@ -17,9 +18,6 @@ MASTER_SITES = https://launchpad.net/lib
 CONFIGURE_STYLE = gnu
 USE_GMAKE= yes
 
-# allows tests to build, but they try to spawn dbus-test-runner and are broken
-CONFIGURE_ENV=CPPFLAGS=-Wno-error=gnu-designator
-
 MODULES = textproc/intltool
 
 BUILD_DEPENDS = devel/gettext-tools \
@@ -40,5 +38,12 @@ WANTLIB += gmodule-2.0 gobject-2.0 graph
 WANTLIB += gtk-x11-2.0 harfbuzz iconv intl json-glib-1.0 m pango-1.0
 WANTLIB += pangocairo-1.0 pangoft2-1.0 pcre pixman-1 png pthread
 WANTLIB += xcb xcb-render xcb-shm z
+
+.include <bsd.port.arch.mk>
+.if ${PROPERTIES:Mclang}
+# allows tests to build, but they try to spawn dbus-test-runner and are broken
+# this option is only available for clang
+CONFIGURE_ENV=CPPFLAGS=-Wno-error=gnu-designator
+.endif
 
 .include <bsd.port.mk>