public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mart Raudsepp" <leio@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/wayland/, dev-libs/wayland/files/
Date: Tue,  1 Mar 2016 17:39:32 +0000 (UTC)	[thread overview]
Message-ID: <1456853944.bd0be58e1d9fd7f19ccf9a24bb963b5fdb742c3d.leio@gentoo> (raw)

commit:     bd0be58e1d9fd7f19ccf9a24bb963b5fdb742c3d
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  1 10:51:20 2016 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Tue Mar  1 17:39:04 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd0be58e

dev-libs/wayland: Fix multilib and add missing libxml2 dependency

Multilib support was broken in previous versions, as the configure
options were in src_configure, not multilib_src_configure, and so
it always built with configuration for "native" ABI, meaning that
USE=doc with multilib was probably broken. Now with 1.10 this
becomes more apparent with a new libxml2 dependency in wayland-scanner
for DTD validation.
As we do not currently install /usr/bin/wayland-scanner for other ABIs,
just disable the dtd validation support there. Ideally we wouldn't
build it at all then, but not a clean way to do so upstream right now.
For --{dis,en}able-dtd-validation to work, we need to patch the
build system to fix the support for the configure flag.
Thanks to this we are able to add the missing libxml2 dependency
without requiring multilib libxml2 for that (and commonly then also
multilib icu), which is nice, as many users haven't had a need for
a 32bit version of those as of yet and icu is a bit bigger compile.

Remove USE=static-libs handling, as autotools-utils takes care
of it for us when it's in IUSE. Also make use of the
multilib_native_use_enable helper to simplify the ebuild.

Gentoo-bug: 575212

 ...uild-fix-configure-disable-dtd-validation.patch | 223 +++++++++++++++++++++
 dev-libs/wayland/wayland-1.10.0.ebuild             |  17 +-
 2 files changed, 232 insertions(+), 8 deletions(-)

diff --git a/dev-libs/wayland/files/1.10.0-build-fix-configure-disable-dtd-validation.patch b/dev-libs/wayland/files/1.10.0-build-fix-configure-disable-dtd-validation.patch
new file mode 100644
index 0000000..4d9795b
--- /dev/null
+++ b/dev-libs/wayland/files/1.10.0-build-fix-configure-disable-dtd-validation.patch
@@ -0,0 +1,223 @@
+From: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
+Date: Mon, 29 Feb 2016 14:59:51 +0200
+Subject: [PATCH] build: fix ./configure --disable-dtd-validation
+
+When configured with --disable-dtd-validation:
+
+  CPPAS    src/dtddata.o
+src/dtddata.S: Assembler messages:
+src/dtddata.S:39: Error: file not found: src/wayland.dtd.embed
+Makefile:1520: recipe for target 'src/dtddata.o' failed
+
+This is because the variable name used does not match the implicit
+variable name in autoconf.
+
+Fix the variable name, making both --disable-dtd-validation and
+--enable-dtd-validation to what they should.
+
+Do not try to build dtddata.S if dtd-validation is disabled. It depends
+on wayland.dtd.embed which is created by configure only if
+dtd-validation is enabled.
+
+If not building dtddata.S, also make sure the extern definitions in
+scanner.c are compiled out.
+
+Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=575212
+Reported-by: leio@gentoo.org
+Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
+Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
+Tested-by: Bryce Harrington <bryce@osg.samsung.com>
+[Mart: Added Makefile.in and configure changes to patch file to avoid autoreconf]
+Signed-off-by: Mart Raudsepp <leio@gentoo.org>
+---
+ Makefile.am   |  5 ++++-
+ Makefile.in   | 20 ++++++++++++--------
+ configure     | 18 ++++++++++++++++--
+ configure.ac  |  5 +++--
+ src/scanner.c |  6 +++---
+ 5 files changed, 38 insertions(+), 16 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index e850abc..49e25a6 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -23,11 +23,14 @@ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA =
+ 
+ bin_PROGRAMS = wayland-scanner
+-wayland_scanner_SOURCES = src/scanner.c src/dtddata.S
++wayland_scanner_SOURCES = src/scanner.c
+ wayland_scanner_CFLAGS = $(EXPAT_CFLAGS) $(LIBXML_CFLAGS) $(AM_CFLAGS)
+ wayland_scanner_LDADD = $(EXPAT_LIBS) $(LIBXML_LIBS) libwayland-util.la
+ pkgconfig_DATA += src/wayland-scanner.pc
+ 
++if DTD_VALIDATION
++wayland_scanner_SOURCES += src/dtddata.S
++endif
+ src/dtddata.o: protocol/wayland.dtd
+ 
+ if USE_HOST_SCANNER
+diff --git a/Makefile.in b/Makefile.in
+index 6d9ffb2..32e6d51 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -82,8 +82,9 @@ POST_UNINSTALL = :
+ build_triplet = @build@
+ host_triplet = @host@
+ bin_PROGRAMS = wayland-scanner$(EXEEXT)
+-@ENABLE_LIBRARIES_TRUE@am__append_1 = libwayland-private.la
+-@ENABLE_LIBRARIES_TRUE@am__append_2 = src/wayland-client.pc \
++@DTD_VALIDATION_TRUE@am__append_1 = src/dtddata.S
++@ENABLE_LIBRARIES_TRUE@am__append_2 = libwayland-private.la
++@ENABLE_LIBRARIES_TRUE@am__append_3 = src/wayland-client.pc \
+ @ENABLE_LIBRARIES_TRUE@	src/wayland-server.pc \
+ @ENABLE_LIBRARIES_TRUE@	cursor/wayland-cursor.pc
+ @ENABLE_LIBRARIES_TRUE@TESTS = array-test$(EXEEXT) \
+@@ -101,7 +102,7 @@ bin_PROGRAMS = wayland-scanner$(EXEEXT)
+ @ENABLE_LIBRARIES_TRUE@	resources-test$(EXEEXT) \
+ @ENABLE_LIBRARIES_TRUE@	message-test$(EXEEXT) \
+ @ENABLE_LIBRARIES_TRUE@	headers-test$(EXEEXT) $(am__EXEEXT_1)
+-@ENABLE_CPP_TEST_TRUE@@ENABLE_LIBRARIES_TRUE@am__append_3 = cpp-compile-test
++@ENABLE_CPP_TEST_TRUE@@ENABLE_LIBRARIES_TRUE@am__append_4 = cpp-compile-test
+ @ENABLE_LIBRARIES_TRUE@check_PROGRAMS = $(am__EXEEXT_2) \
+ @ENABLE_LIBRARIES_TRUE@	exec-fd-leak-checker$(EXEEXT)
+ @ENABLE_LIBRARIES_TRUE@noinst_PROGRAMS = fixed-benchmark$(EXEEXT)
+@@ -382,8 +383,10 @@ am__socket_test_SOURCES_DIST = tests/socket-test.c
+ @ENABLE_LIBRARIES_TRUE@	tests/socket-test.$(OBJEXT)
+ socket_test_OBJECTS = $(am_socket_test_OBJECTS)
+ @ENABLE_LIBRARIES_TRUE@socket_test_DEPENDENCIES = libtest-runner.la
++am__wayland_scanner_SOURCES_DIST = src/scanner.c src/dtddata.S
++@DTD_VALIDATION_TRUE@am__objects_1 = src/dtddata.$(OBJEXT)
+ am_wayland_scanner_OBJECTS = src/wayland_scanner-scanner.$(OBJEXT) \
+-	src/dtddata.$(OBJEXT)
++	$(am__objects_1)
+ wayland_scanner_OBJECTS = $(am_wayland_scanner_OBJECTS)
+ wayland_scanner_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ 	$(am__DEPENDENCIES_1) libwayland-util.la
+@@ -491,7 +494,8 @@ DIST_SOURCES = $(am__libtest_runner_la_SOURCES_DIST) \
+ 	$(am__resources_test_SOURCES_DIST) \
+ 	$(am__sanity_test_SOURCES_DIST) \
+ 	$(am__signal_test_SOURCES_DIST) \
+-	$(am__socket_test_SOURCES_DIST) $(wayland_scanner_SOURCES)
++	$(am__socket_test_SOURCES_DIST) \
++	$(am__wayland_scanner_SOURCES_DIST)
+ RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ 	ctags-recursive dvi-recursive html-recursive info-recursive \
+ 	install-data-recursive install-dvi-recursive \
+@@ -918,8 +922,8 @@ dist_pkgdata_DATA = \
+ 	protocol/wayland.dtd
+ 
+ pkgconfigdir = $(libdir)/pkgconfig
+-pkgconfig_DATA = src/wayland-scanner.pc $(am__append_2)
+-wayland_scanner_SOURCES = src/scanner.c src/dtddata.S
++pkgconfig_DATA = src/wayland-scanner.pc $(am__append_3)
++wayland_scanner_SOURCES = src/scanner.c $(am__append_1)
+ wayland_scanner_CFLAGS = $(EXPAT_CFLAGS) $(LIBXML_CFLAGS) $(AM_CFLAGS)
+ wayland_scanner_LDADD = $(EXPAT_LIBS) $(LIBXML_LIBS) libwayland-util.la
+ @USE_HOST_SCANNER_FALSE@wayland_scanner = $(top_builddir)/wayland-scanner
+@@ -929,7 +933,7 @@ libwayland_util_la_SOURCES = \
+ 	src/wayland-util.c			\
+ 	src/wayland-util.h
+ 
+-noinst_LTLIBRARIES = libwayland-util.la $(am__append_1)
++noinst_LTLIBRARIES = libwayland-util.la $(am__append_2)
+ @ENABLE_LIBRARIES_TRUE@lib_LTLIBRARIES = libwayland-server.la \
+ @ENABLE_LIBRARIES_TRUE@	libwayland-client.la \
+ @ENABLE_LIBRARIES_TRUE@	libwayland-cursor.la
+diff --git a/configure.ac b/configure.ac
+index f54a8b9..b27f34b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -76,7 +76,7 @@ AC_ARG_ENABLE([dtd-validation],
+ 	      [AC_HELP_STRING([--disable-dtd-validation],
+ 			      [Disable DTD validation of the protocol])],
+ 	      [],
+-	      [enable_dtdvalidation=yes])
++	      [enable_dtd_validation=yes])
+ 
+ AM_CONDITIONAL(USE_HOST_SCANNER, test "x$with_host_scanner" = xyes)
+ 
+@@ -112,7 +112,8 @@ PKG_CHECK_MODULES(EXPAT, [expat], [],
+ 	 AC_SUBST(EXPAT_LIBS)
+ 	])
+ 
+-if test "x$enable_dtdvalidation" = "xyes"; then
++AM_CONDITIONAL([DTD_VALIDATION], [test "x$enable_dtd_validation" = "xyes"])
++if test "x$enable_dtd_validation" = "xyes"; then
+ 	PKG_CHECK_MODULES(LIBXML, [libxml-2.0])
+ 	AC_DEFINE(HAVE_LIBXML, 1, [libxml-2.0 is available])
+ 	AC_CONFIG_LINKS([src/wayland.dtd.embed:protocol/wayland.dtd])
+diff --git a/configure b/configure
+index 83e4971..6340d4f 100755
+--- a/configure
++++ b/configure
+@@ -711,6 +711,8 @@ HAVE_XSLTPROC_TRUE
+ XSLTPROC
+ LIBXML_LIBS
+ LIBXML_CFLAGS
++DTD_VALIDATION_FALSE
++DTD_VALIDATION_TRUE
+ EXPAT_LIBS
+ EXPAT_CFLAGS
+ FFI_LIBS
+@@ -15728,7 +15730,7 @@ fi
+ if test "${enable_dtd_validation+set}" = set; then :
+   enableval=$enable_dtd_validation;
+ else
+-  enable_dtdvalidation=yes
++  enable_dtd_validation=yes
+ fi
+ 
+ 
+@@ -16114,7 +16116,15 @@ $as_echo "yes" >&6; }
+ 
+ fi
+ 
+-if test "x$enable_dtdvalidation" = "xyes"; then
++ if test "x$enable_dtd_validation" = "xyes"; then
++  DTD_VALIDATION_TRUE=
++  DTD_VALIDATION_FALSE='#'
++else
++  DTD_VALIDATION_TRUE='#'
++  DTD_VALIDATION_FALSE=
++fi
++
++if test "x$enable_dtd_validation" = "xyes"; then
+ 
+ pkg_failed=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBXML" >&5
+@@ -16669,6 +16679,10 @@ if test -z "${ENABLE_LIBRARIES_TRUE}" && test -z "${ENABLE_LIBRARIES_FALSE}"; th
+   as_fn_error $? "conditional \"ENABLE_LIBRARIES\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
++if test -z "${DTD_VALIDATION_TRUE}" && test -z "${DTD_VALIDATION_FALSE}"; then
++  as_fn_error $? "conditional \"DTD_VALIDATION\" was never defined.
++Usually this means the macro was only invoked conditionally." "$LINENO" 5
++fi
+ if test -z "${HAVE_XSLTPROC_TRUE}" && test -z "${HAVE_XSLTPROC_FALSE}"; then
+   as_fn_error $? "conditional \"HAVE_XSLTPROC\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+diff --git a/src/scanner.c b/src/scanner.c
+index d3e2328..04747e3 100644
+--- a/src/scanner.c
++++ b/src/scanner.c
+@@ -40,13 +40,13 @@
+ 
+ #if HAVE_LIBXML
+ #include <libxml/parser.h>
+-#endif
+-
+-#include "wayland-util.h"
+ 
+ /* Embedded wayland.dtd file, see dtddata.S */
+ extern char DTD_DATA_begin;
+ extern int DTD_DATA_len;
++#endif
++
++#include "wayland-util.h"
+ 
+ enum side {
+ 	CLIENT,
+-- 
+2.6.4
+

diff --git a/dev-libs/wayland/wayland-1.10.0.ebuild b/dev-libs/wayland/wayland-1.10.0.ebuild
index bf4b8cc..b3d1bfc 100644
--- a/dev-libs/wayland/wayland-1.10.0.ebuild
+++ b/dev-libs/wayland/wayland-1.10.0.ebuild
@@ -29,7 +29,8 @@ SLOT="0"
 IUSE="doc static-libs"
 
 RDEPEND=">=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
-	>=virtual/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}]"
+	>=virtual/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}]
+	dev-libs/libxml2:="
 DEPEND="${RDEPEND}
 	doc? (
 		>=app-doc/doxygen-1.6[dot]
@@ -39,19 +40,19 @@ DEPEND="${RDEPEND}
 	)
 	virtual/pkgconfig"
 
-src_configure() {
+# dtd validation configure patch is upstream and will be part of 1.11
+PATCHES=( "${FILESDIR}/${PV}-build-fix-configure-disable-dtd-validation.patch" )
+
+multilib_src_configure() {
 	local myeconfargs=(
-		$(use_enable static-libs static)
-		$(use_enable doc documentation)
+		$(multilib_native_use_enable doc documentation)
+		$(multilib_native_enable dtd-validation)
 	)
 	if tc-is-cross-compiler ; then
 		myeconfargs+=( --with-host-scanner )
 	fi
-	if ! multilib_is_native_abi; then
-		myeconfargs+=( --disable-documentation )
-	fi
 
-	autotools-multilib_src_configure
+	autotools-utils_src_configure
 }
 
 src_test() {


             reply	other threads:[~2016-03-01 17:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-01 17:39 Mart Raudsepp [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-22 14:50 [gentoo-commits] repo/gentoo:master commit in: dev-libs/wayland/, dev-libs/wayland/files/ Sam James
2025-01-10  4:58 Matt Turner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1456853944.bd0be58e1d9fd7f19ccf9a24bb963b5fdb742c3d.leio@gentoo \
    --to=leio@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox