1 |
commit: bd0be58e1d9fd7f19ccf9a24bb963b5fdb742c3d |
2 |
Author: Mart Raudsepp <leio <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 1 10:51:20 2016 +0000 |
4 |
Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 1 17:39:04 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd0be58e |
7 |
|
8 |
dev-libs/wayland: Fix multilib and add missing libxml2 dependency |
9 |
|
10 |
Multilib support was broken in previous versions, as the configure |
11 |
options were in src_configure, not multilib_src_configure, and so |
12 |
it always built with configuration for "native" ABI, meaning that |
13 |
USE=doc with multilib was probably broken. Now with 1.10 this |
14 |
becomes more apparent with a new libxml2 dependency in wayland-scanner |
15 |
for DTD validation. |
16 |
As we do not currently install /usr/bin/wayland-scanner for other ABIs, |
17 |
just disable the dtd validation support there. Ideally we wouldn't |
18 |
build it at all then, but not a clean way to do so upstream right now. |
19 |
For --{dis,en}able-dtd-validation to work, we need to patch the |
20 |
build system to fix the support for the configure flag. |
21 |
Thanks to this we are able to add the missing libxml2 dependency |
22 |
without requiring multilib libxml2 for that (and commonly then also |
23 |
multilib icu), which is nice, as many users haven't had a need for |
24 |
a 32bit version of those as of yet and icu is a bit bigger compile. |
25 |
|
26 |
Remove USE=static-libs handling, as autotools-utils takes care |
27 |
of it for us when it's in IUSE. Also make use of the |
28 |
multilib_native_use_enable helper to simplify the ebuild. |
29 |
|
30 |
Gentoo-bug: 575212 |
31 |
|
32 |
...uild-fix-configure-disable-dtd-validation.patch | 223 +++++++++++++++++++++ |
33 |
dev-libs/wayland/wayland-1.10.0.ebuild | 17 +- |
34 |
2 files changed, 232 insertions(+), 8 deletions(-) |
35 |
|
36 |
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 |
37 |
new file mode 100644 |
38 |
index 0000000..4d9795b |
39 |
--- /dev/null |
40 |
+++ b/dev-libs/wayland/files/1.10.0-build-fix-configure-disable-dtd-validation.patch |
41 |
@@ -0,0 +1,223 @@ |
42 |
+From: Pekka Paalanen <pekka.paalanen@××××××××××××.uk> |
43 |
+Date: Mon, 29 Feb 2016 14:59:51 +0200 |
44 |
+Subject: [PATCH] build: fix ./configure --disable-dtd-validation |
45 |
+ |
46 |
+When configured with --disable-dtd-validation: |
47 |
+ |
48 |
+ CPPAS src/dtddata.o |
49 |
+src/dtddata.S: Assembler messages: |
50 |
+src/dtddata.S:39: Error: file not found: src/wayland.dtd.embed |
51 |
+Makefile:1520: recipe for target 'src/dtddata.o' failed |
52 |
+ |
53 |
+This is because the variable name used does not match the implicit |
54 |
+variable name in autoconf. |
55 |
+ |
56 |
+Fix the variable name, making both --disable-dtd-validation and |
57 |
+--enable-dtd-validation to what they should. |
58 |
+ |
59 |
+Do not try to build dtddata.S if dtd-validation is disabled. It depends |
60 |
+on wayland.dtd.embed which is created by configure only if |
61 |
+dtd-validation is enabled. |
62 |
+ |
63 |
+If not building dtddata.S, also make sure the extern definitions in |
64 |
+scanner.c are compiled out. |
65 |
+ |
66 |
+Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=575212 |
67 |
+Reported-by: leio@g.o |
68 |
+Signed-off-by: Pekka Paalanen <pekka.paalanen@××××××××××××.uk> |
69 |
+Reviewed-by: Quentin Glidic <sardemff7+git@×××××××××.net> |
70 |
+Tested-by: Bryce Harrington <bryce@×××××××××××.com> |
71 |
+[Mart: Added Makefile.in and configure changes to patch file to avoid autoreconf] |
72 |
+Signed-off-by: Mart Raudsepp <leio@g.o> |
73 |
+--- |
74 |
+ Makefile.am | 5 ++++- |
75 |
+ Makefile.in | 20 ++++++++++++-------- |
76 |
+ configure | 18 ++++++++++++++++-- |
77 |
+ configure.ac | 5 +++-- |
78 |
+ src/scanner.c | 6 +++--- |
79 |
+ 5 files changed, 38 insertions(+), 16 deletions(-) |
80 |
+ |
81 |
+diff --git a/Makefile.am b/Makefile.am |
82 |
+index e850abc..49e25a6 100644 |
83 |
+--- a/Makefile.am |
84 |
++++ b/Makefile.am |
85 |
+@@ -23,11 +23,14 @@ pkgconfigdir = $(libdir)/pkgconfig |
86 |
+ pkgconfig_DATA = |
87 |
+ |
88 |
+ bin_PROGRAMS = wayland-scanner |
89 |
+-wayland_scanner_SOURCES = src/scanner.c src/dtddata.S |
90 |
++wayland_scanner_SOURCES = src/scanner.c |
91 |
+ wayland_scanner_CFLAGS = $(EXPAT_CFLAGS) $(LIBXML_CFLAGS) $(AM_CFLAGS) |
92 |
+ wayland_scanner_LDADD = $(EXPAT_LIBS) $(LIBXML_LIBS) libwayland-util.la |
93 |
+ pkgconfig_DATA += src/wayland-scanner.pc |
94 |
+ |
95 |
++if DTD_VALIDATION |
96 |
++wayland_scanner_SOURCES += src/dtddata.S |
97 |
++endif |
98 |
+ src/dtddata.o: protocol/wayland.dtd |
99 |
+ |
100 |
+ if USE_HOST_SCANNER |
101 |
+diff --git a/Makefile.in b/Makefile.in |
102 |
+index 6d9ffb2..32e6d51 100644 |
103 |
+--- a/Makefile.in |
104 |
++++ b/Makefile.in |
105 |
+@@ -82,8 +82,9 @@ POST_UNINSTALL = : |
106 |
+ build_triplet = @build@ |
107 |
+ host_triplet = @host@ |
108 |
+ bin_PROGRAMS = wayland-scanner$(EXEEXT) |
109 |
+-@ENABLE_LIBRARIES_TRUE@am__append_1 = libwayland-private.la |
110 |
+-@ENABLE_LIBRARIES_TRUE@am__append_2 = src/wayland-client.pc \ |
111 |
++@DTD_VALIDATION_TRUE@am__append_1 = src/dtddata.S |
112 |
++@ENABLE_LIBRARIES_TRUE@am__append_2 = libwayland-private.la |
113 |
++@ENABLE_LIBRARIES_TRUE@am__append_3 = src/wayland-client.pc \ |
114 |
+ @ENABLE_LIBRARIES_TRUE@ src/wayland-server.pc \ |
115 |
+ @ENABLE_LIBRARIES_TRUE@ cursor/wayland-cursor.pc |
116 |
+ @ENABLE_LIBRARIES_TRUE@TESTS = array-test$(EXEEXT) \ |
117 |
+@@ -101,7 +102,7 @@ bin_PROGRAMS = wayland-scanner$(EXEEXT) |
118 |
+ @ENABLE_LIBRARIES_TRUE@ resources-test$(EXEEXT) \ |
119 |
+ @ENABLE_LIBRARIES_TRUE@ message-test$(EXEEXT) \ |
120 |
+ @ENABLE_LIBRARIES_TRUE@ headers-test$(EXEEXT) $(am__EXEEXT_1) |
121 |
+-@ENABLE_CPP_TEST_TRUE@@ENABLE_LIBRARIES_TRUE@am__append_3 = cpp-compile-test |
122 |
++@ENABLE_CPP_TEST_TRUE@@ENABLE_LIBRARIES_TRUE@am__append_4 = cpp-compile-test |
123 |
+ @ENABLE_LIBRARIES_TRUE@check_PROGRAMS = $(am__EXEEXT_2) \ |
124 |
+ @ENABLE_LIBRARIES_TRUE@ exec-fd-leak-checker$(EXEEXT) |
125 |
+ @ENABLE_LIBRARIES_TRUE@noinst_PROGRAMS = fixed-benchmark$(EXEEXT) |
126 |
+@@ -382,8 +383,10 @@ am__socket_test_SOURCES_DIST = tests/socket-test.c |
127 |
+ @ENABLE_LIBRARIES_TRUE@ tests/socket-test.$(OBJEXT) |
128 |
+ socket_test_OBJECTS = $(am_socket_test_OBJECTS) |
129 |
+ @ENABLE_LIBRARIES_TRUE@socket_test_DEPENDENCIES = libtest-runner.la |
130 |
++am__wayland_scanner_SOURCES_DIST = src/scanner.c src/dtddata.S |
131 |
++@DTD_VALIDATION_TRUE@am__objects_1 = src/dtddata.$(OBJEXT) |
132 |
+ am_wayland_scanner_OBJECTS = src/wayland_scanner-scanner.$(OBJEXT) \ |
133 |
+- src/dtddata.$(OBJEXT) |
134 |
++ $(am__objects_1) |
135 |
+ wayland_scanner_OBJECTS = $(am_wayland_scanner_OBJECTS) |
136 |
+ wayland_scanner_DEPENDENCIES = $(am__DEPENDENCIES_1) \ |
137 |
+ $(am__DEPENDENCIES_1) libwayland-util.la |
138 |
+@@ -491,7 +494,8 @@ DIST_SOURCES = $(am__libtest_runner_la_SOURCES_DIST) \ |
139 |
+ $(am__resources_test_SOURCES_DIST) \ |
140 |
+ $(am__sanity_test_SOURCES_DIST) \ |
141 |
+ $(am__signal_test_SOURCES_DIST) \ |
142 |
+- $(am__socket_test_SOURCES_DIST) $(wayland_scanner_SOURCES) |
143 |
++ $(am__socket_test_SOURCES_DIST) \ |
144 |
++ $(am__wayland_scanner_SOURCES_DIST) |
145 |
+ RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ |
146 |
+ ctags-recursive dvi-recursive html-recursive info-recursive \ |
147 |
+ install-data-recursive install-dvi-recursive \ |
148 |
+@@ -918,8 +922,8 @@ dist_pkgdata_DATA = \ |
149 |
+ protocol/wayland.dtd |
150 |
+ |
151 |
+ pkgconfigdir = $(libdir)/pkgconfig |
152 |
+-pkgconfig_DATA = src/wayland-scanner.pc $(am__append_2) |
153 |
+-wayland_scanner_SOURCES = src/scanner.c src/dtddata.S |
154 |
++pkgconfig_DATA = src/wayland-scanner.pc $(am__append_3) |
155 |
++wayland_scanner_SOURCES = src/scanner.c $(am__append_1) |
156 |
+ wayland_scanner_CFLAGS = $(EXPAT_CFLAGS) $(LIBXML_CFLAGS) $(AM_CFLAGS) |
157 |
+ wayland_scanner_LDADD = $(EXPAT_LIBS) $(LIBXML_LIBS) libwayland-util.la |
158 |
+ @USE_HOST_SCANNER_FALSE@wayland_scanner = $(top_builddir)/wayland-scanner |
159 |
+@@ -929,7 +933,7 @@ libwayland_util_la_SOURCES = \ |
160 |
+ src/wayland-util.c \ |
161 |
+ src/wayland-util.h |
162 |
+ |
163 |
+-noinst_LTLIBRARIES = libwayland-util.la $(am__append_1) |
164 |
++noinst_LTLIBRARIES = libwayland-util.la $(am__append_2) |
165 |
+ @ENABLE_LIBRARIES_TRUE@lib_LTLIBRARIES = libwayland-server.la \ |
166 |
+ @ENABLE_LIBRARIES_TRUE@ libwayland-client.la \ |
167 |
+ @ENABLE_LIBRARIES_TRUE@ libwayland-cursor.la |
168 |
+diff --git a/configure.ac b/configure.ac |
169 |
+index f54a8b9..b27f34b 100644 |
170 |
+--- a/configure.ac |
171 |
++++ b/configure.ac |
172 |
+@@ -76,7 +76,7 @@ AC_ARG_ENABLE([dtd-validation], |
173 |
+ [AC_HELP_STRING([--disable-dtd-validation], |
174 |
+ [Disable DTD validation of the protocol])], |
175 |
+ [], |
176 |
+- [enable_dtdvalidation=yes]) |
177 |
++ [enable_dtd_validation=yes]) |
178 |
+ |
179 |
+ AM_CONDITIONAL(USE_HOST_SCANNER, test "x$with_host_scanner" = xyes) |
180 |
+ |
181 |
+@@ -112,7 +112,8 @@ PKG_CHECK_MODULES(EXPAT, [expat], [], |
182 |
+ AC_SUBST(EXPAT_LIBS) |
183 |
+ ]) |
184 |
+ |
185 |
+-if test "x$enable_dtdvalidation" = "xyes"; then |
186 |
++AM_CONDITIONAL([DTD_VALIDATION], [test "x$enable_dtd_validation" = "xyes"]) |
187 |
++if test "x$enable_dtd_validation" = "xyes"; then |
188 |
+ PKG_CHECK_MODULES(LIBXML, [libxml-2.0]) |
189 |
+ AC_DEFINE(HAVE_LIBXML, 1, [libxml-2.0 is available]) |
190 |
+ AC_CONFIG_LINKS([src/wayland.dtd.embed:protocol/wayland.dtd]) |
191 |
+diff --git a/configure b/configure |
192 |
+index 83e4971..6340d4f 100755 |
193 |
+--- a/configure |
194 |
++++ b/configure |
195 |
+@@ -711,6 +711,8 @@ HAVE_XSLTPROC_TRUE |
196 |
+ XSLTPROC |
197 |
+ LIBXML_LIBS |
198 |
+ LIBXML_CFLAGS |
199 |
++DTD_VALIDATION_FALSE |
200 |
++DTD_VALIDATION_TRUE |
201 |
+ EXPAT_LIBS |
202 |
+ EXPAT_CFLAGS |
203 |
+ FFI_LIBS |
204 |
+@@ -15728,7 +15730,7 @@ fi |
205 |
+ if test "${enable_dtd_validation+set}" = set; then : |
206 |
+ enableval=$enable_dtd_validation; |
207 |
+ else |
208 |
+- enable_dtdvalidation=yes |
209 |
++ enable_dtd_validation=yes |
210 |
+ fi |
211 |
+ |
212 |
+ |
213 |
+@@ -16114,7 +16116,15 @@ $as_echo "yes" >&6; } |
214 |
+ |
215 |
+ fi |
216 |
+ |
217 |
+-if test "x$enable_dtdvalidation" = "xyes"; then |
218 |
++ if test "x$enable_dtd_validation" = "xyes"; then |
219 |
++ DTD_VALIDATION_TRUE= |
220 |
++ DTD_VALIDATION_FALSE='#' |
221 |
++else |
222 |
++ DTD_VALIDATION_TRUE='#' |
223 |
++ DTD_VALIDATION_FALSE= |
224 |
++fi |
225 |
++ |
226 |
++if test "x$enable_dtd_validation" = "xyes"; then |
227 |
+ |
228 |
+ pkg_failed=no |
229 |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBXML" >&5 |
230 |
+@@ -16669,6 +16679,10 @@ if test -z "${ENABLE_LIBRARIES_TRUE}" && test -z "${ENABLE_LIBRARIES_FALSE}"; th |
231 |
+ as_fn_error $? "conditional \"ENABLE_LIBRARIES\" was never defined. |
232 |
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
233 |
+ fi |
234 |
++if test -z "${DTD_VALIDATION_TRUE}" && test -z "${DTD_VALIDATION_FALSE}"; then |
235 |
++ as_fn_error $? "conditional \"DTD_VALIDATION\" was never defined. |
236 |
++Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
237 |
++fi |
238 |
+ if test -z "${HAVE_XSLTPROC_TRUE}" && test -z "${HAVE_XSLTPROC_FALSE}"; then |
239 |
+ as_fn_error $? "conditional \"HAVE_XSLTPROC\" was never defined. |
240 |
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
241 |
+diff --git a/src/scanner.c b/src/scanner.c |
242 |
+index d3e2328..04747e3 100644 |
243 |
+--- a/src/scanner.c |
244 |
++++ b/src/scanner.c |
245 |
+@@ -40,13 +40,13 @@ |
246 |
+ |
247 |
+ #if HAVE_LIBXML |
248 |
+ #include <libxml/parser.h> |
249 |
+-#endif |
250 |
+- |
251 |
+-#include "wayland-util.h" |
252 |
+ |
253 |
+ /* Embedded wayland.dtd file, see dtddata.S */ |
254 |
+ extern char DTD_DATA_begin; |
255 |
+ extern int DTD_DATA_len; |
256 |
++#endif |
257 |
++ |
258 |
++#include "wayland-util.h" |
259 |
+ |
260 |
+ enum side { |
261 |
+ CLIENT, |
262 |
+-- |
263 |
+2.6.4 |
264 |
+ |
265 |
|
266 |
diff --git a/dev-libs/wayland/wayland-1.10.0.ebuild b/dev-libs/wayland/wayland-1.10.0.ebuild |
267 |
index bf4b8cc..b3d1bfc 100644 |
268 |
--- a/dev-libs/wayland/wayland-1.10.0.ebuild |
269 |
+++ b/dev-libs/wayland/wayland-1.10.0.ebuild |
270 |
@@ -29,7 +29,8 @@ SLOT="0" |
271 |
IUSE="doc static-libs" |
272 |
|
273 |
RDEPEND=">=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
274 |
- >=virtual/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}]" |
275 |
+ >=virtual/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}] |
276 |
+ dev-libs/libxml2:=" |
277 |
DEPEND="${RDEPEND} |
278 |
doc? ( |
279 |
>=app-doc/doxygen-1.6[dot] |
280 |
@@ -39,19 +40,19 @@ DEPEND="${RDEPEND} |
281 |
) |
282 |
virtual/pkgconfig" |
283 |
|
284 |
-src_configure() { |
285 |
+# dtd validation configure patch is upstream and will be part of 1.11 |
286 |
+PATCHES=( "${FILESDIR}/${PV}-build-fix-configure-disable-dtd-validation.patch" ) |
287 |
+ |
288 |
+multilib_src_configure() { |
289 |
local myeconfargs=( |
290 |
- $(use_enable static-libs static) |
291 |
- $(use_enable doc documentation) |
292 |
+ $(multilib_native_use_enable doc documentation) |
293 |
+ $(multilib_native_enable dtd-validation) |
294 |
) |
295 |
if tc-is-cross-compiler ; then |
296 |
myeconfargs+=( --with-host-scanner ) |
297 |
fi |
298 |
- if ! multilib_is_native_abi; then |
299 |
- myeconfargs+=( --disable-documentation ) |
300 |
- fi |
301 |
|
302 |
- autotools-multilib_src_configure |
303 |
+ autotools-utils_src_configure |
304 |
} |
305 |
|
306 |
src_test() { |