net-mail/ssmtp: remove (libressl stuff is gone now)
[sgilles-overlay.git] / dev-libs / wayland / files / 1.10.0-build-fix-configure-disable-dtd-validation.patch
blob7b55e2f9cdabff37259838a315fb11ed10df0dd8
1 From: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2 Date: Mon, 29 Feb 2016 14:59:51 +0200
3 Subject: [PATCH] build: fix ./configure --disable-dtd-validation
5 When configured with --disable-dtd-validation:
7 CPPAS src/dtddata.o
8 src/dtddata.S: Assembler messages:
9 src/dtddata.S:39: Error: file not found: src/wayland.dtd.embed
10 Makefile:1520: recipe for target 'src/dtddata.o' failed
12 This is because the variable name used does not match the implicit
13 variable name in autoconf.
15 Fix the variable name, making both --disable-dtd-validation and
16 --enable-dtd-validation to what they should.
18 Do not try to build dtddata.S if dtd-validation is disabled. It depends
19 on wayland.dtd.embed which is created by configure only if
20 dtd-validation is enabled.
22 If not building dtddata.S, also make sure the extern definitions in
23 scanner.c are compiled out.
25 Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=575212
26 Reported-by: leio@gentoo.org
27 Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
28 Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
29 Tested-by: Bryce Harrington <bryce@osg.samsung.com>
30 [Mart: Added Makefile.in and configure changes to patch file to avoid autoreconf]
31 Signed-off-by: Mart Raudsepp <leio@gentoo.org>
32 ---
33 Makefile.am | 5 ++++-
34 Makefile.in | 20 ++++++++++++--------
35 configure | 18 ++++++++++++++++--
36 configure.ac | 5 +++--
37 src/scanner.c | 6 +++---
38 5 files changed, 38 insertions(+), 16 deletions(-)
40 diff --git a/Makefile.am b/Makefile.am
41 index e850abc..49e25a6 100644
42 --- a/Makefile.am
43 +++ b/Makefile.am
44 @@ -23,11 +23,14 @@ pkgconfigdir = $(libdir)/pkgconfig
45 pkgconfig_DATA =
47 bin_PROGRAMS = wayland-scanner
48 -wayland_scanner_SOURCES = src/scanner.c src/dtddata.S
49 +wayland_scanner_SOURCES = src/scanner.c
50 wayland_scanner_CFLAGS = $(EXPAT_CFLAGS) $(LIBXML_CFLAGS) $(AM_CFLAGS)
51 wayland_scanner_LDADD = $(EXPAT_LIBS) $(LIBXML_LIBS) libwayland-util.la
52 pkgconfig_DATA += src/wayland-scanner.pc
54 +if DTD_VALIDATION
55 +wayland_scanner_SOURCES += src/dtddata.S
56 +endif
57 src/dtddata.o: protocol/wayland.dtd
59 if USE_HOST_SCANNER
60 diff --git a/configure.ac b/configure.ac
61 index f54a8b9..b27f34b 100644
62 --- a/configure.ac
63 +++ b/configure.ac
64 @@ -76,7 +76,7 @@ AC_ARG_ENABLE([dtd-validation],
65 [AC_HELP_STRING([--disable-dtd-validation],
66 [Disable DTD validation of the protocol])],
67 [],
68 - [enable_dtdvalidation=yes])
69 + [enable_dtd_validation=yes])
71 AM_CONDITIONAL(USE_HOST_SCANNER, test "x$with_host_scanner" = xyes)
73 @@ -112,7 +112,8 @@ PKG_CHECK_MODULES(EXPAT, [expat], [],
74 AC_SUBST(EXPAT_LIBS)
77 -if test "x$enable_dtdvalidation" = "xyes"; then
78 +AM_CONDITIONAL([DTD_VALIDATION], [test "x$enable_dtd_validation" = "xyes"])
79 +if test "x$enable_dtd_validation" = "xyes"; then
80 PKG_CHECK_MODULES(LIBXML, [libxml-2.0])
81 AC_DEFINE(HAVE_LIBXML, 1, [libxml-2.0 is available])
82 AC_CONFIG_LINKS([src/wayland.dtd.embed:protocol/wayland.dtd])
83 diff --git a/aclocal.m4 b/aclocal.m4
84 index 71ca3dc..86eace8 100644
85 --- a/aclocal.m4
86 +++ b/aclocal.m4
87 @@ -1327,6 +1327,7 @@ AC_SUBST([am__tar])
88 AC_SUBST([am__untar])
89 ]) # _AM_PROG_TAR
91 +#timestamp update to avoid regen
92 m4_include([m4/libtool.m4])
93 m4_include([m4/ltoptions.m4])
94 m4_include([m4/ltsugar.m4])
95 diff --git a/config.h.in b/config.h.in
96 index 1400592..33f0e99 100644
97 --- a/config.h.in
98 +++ b/config.h.in
99 @@ -15,6 +15,7 @@
100 /* Define to 1 if you have the <inttypes.h> header file. */
101 #undef HAVE_INTTYPES_H
103 +/* Timestamp update */
104 /* libxml-2.0 is available */
105 #undef HAVE_LIBXML
107 diff --git a/Makefile.in b/Makefile.in
108 index 6d9ffb2..32e6d51 100644
109 --- a/Makefile.in
110 +++ b/Makefile.in
111 @@ -82,8 +82,9 @@ POST_UNINSTALL = :
112 build_triplet = @build@
113 host_triplet = @host@
114 bin_PROGRAMS = wayland-scanner$(EXEEXT)
115 -@ENABLE_LIBRARIES_TRUE@am__append_1 = libwayland-private.la
116 -@ENABLE_LIBRARIES_TRUE@am__append_2 = src/wayland-client.pc \
117 +@DTD_VALIDATION_TRUE@am__append_1 = src/dtddata.S
118 +@ENABLE_LIBRARIES_TRUE@am__append_2 = libwayland-private.la
119 +@ENABLE_LIBRARIES_TRUE@am__append_3 = src/wayland-client.pc \
120 @ENABLE_LIBRARIES_TRUE@ src/wayland-server.pc \
121 @ENABLE_LIBRARIES_TRUE@ cursor/wayland-cursor.pc
122 @ENABLE_LIBRARIES_TRUE@TESTS = array-test$(EXEEXT) \
123 @@ -101,7 +102,7 @@ bin_PROGRAMS = wayland-scanner$(EXEEXT)
124 @ENABLE_LIBRARIES_TRUE@ resources-test$(EXEEXT) \
125 @ENABLE_LIBRARIES_TRUE@ message-test$(EXEEXT) \
126 @ENABLE_LIBRARIES_TRUE@ headers-test$(EXEEXT) $(am__EXEEXT_1)
127 -@ENABLE_CPP_TEST_TRUE@@ENABLE_LIBRARIES_TRUE@am__append_3 = cpp-compile-test
128 +@ENABLE_CPP_TEST_TRUE@@ENABLE_LIBRARIES_TRUE@am__append_4 = cpp-compile-test
129 @ENABLE_LIBRARIES_TRUE@check_PROGRAMS = $(am__EXEEXT_2) \
130 @ENABLE_LIBRARIES_TRUE@ exec-fd-leak-checker$(EXEEXT)
131 @ENABLE_LIBRARIES_TRUE@noinst_PROGRAMS = fixed-benchmark$(EXEEXT)
132 @@ -382,8 +383,10 @@ am__socket_test_SOURCES_DIST = tests/socket-test.c
133 @ENABLE_LIBRARIES_TRUE@ tests/socket-test.$(OBJEXT)
134 socket_test_OBJECTS = $(am_socket_test_OBJECTS)
135 @ENABLE_LIBRARIES_TRUE@socket_test_DEPENDENCIES = libtest-runner.la
136 +am__wayland_scanner_SOURCES_DIST = src/scanner.c src/dtddata.S
137 +@DTD_VALIDATION_TRUE@am__objects_1 = src/dtddata.$(OBJEXT)
138 am_wayland_scanner_OBJECTS = src/wayland_scanner-scanner.$(OBJEXT) \
139 - src/dtddata.$(OBJEXT)
140 + $(am__objects_1)
141 wayland_scanner_OBJECTS = $(am_wayland_scanner_OBJECTS)
142 wayland_scanner_DEPENDENCIES = $(am__DEPENDENCIES_1) \
143 $(am__DEPENDENCIES_1) libwayland-util.la
144 @@ -491,7 +494,8 @@ DIST_SOURCES = $(am__libtest_runner_la_SOURCES_DIST) \
145 $(am__resources_test_SOURCES_DIST) \
146 $(am__sanity_test_SOURCES_DIST) \
147 $(am__signal_test_SOURCES_DIST) \
148 - $(am__socket_test_SOURCES_DIST) $(wayland_scanner_SOURCES)
149 + $(am__socket_test_SOURCES_DIST) \
150 + $(am__wayland_scanner_SOURCES_DIST)
151 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
152 ctags-recursive dvi-recursive html-recursive info-recursive \
153 install-data-recursive install-dvi-recursive \
154 @@ -918,8 +922,8 @@ dist_pkgdata_DATA = \
155 protocol/wayland.dtd
157 pkgconfigdir = $(libdir)/pkgconfig
158 -pkgconfig_DATA = src/wayland-scanner.pc $(am__append_2)
159 -wayland_scanner_SOURCES = src/scanner.c src/dtddata.S
160 +pkgconfig_DATA = src/wayland-scanner.pc $(am__append_3)
161 +wayland_scanner_SOURCES = src/scanner.c $(am__append_1)
162 wayland_scanner_CFLAGS = $(EXPAT_CFLAGS) $(LIBXML_CFLAGS) $(AM_CFLAGS)
163 wayland_scanner_LDADD = $(EXPAT_LIBS) $(LIBXML_LIBS) libwayland-util.la
164 @USE_HOST_SCANNER_FALSE@wayland_scanner = $(top_builddir)/wayland-scanner
165 @@ -929,7 +933,7 @@ libwayland_util_la_SOURCES = \
166 src/wayland-util.c \
167 src/wayland-util.h
169 -noinst_LTLIBRARIES = libwayland-util.la $(am__append_1)
170 +noinst_LTLIBRARIES = libwayland-util.la $(am__append_2)
171 @ENABLE_LIBRARIES_TRUE@lib_LTLIBRARIES = libwayland-server.la \
172 @ENABLE_LIBRARIES_TRUE@ libwayland-client.la \
173 @ENABLE_LIBRARIES_TRUE@ libwayland-cursor.la
174 diff --git a/configure b/configure
175 index 83e4971..6340d4f 100755
176 --- a/configure
177 +++ b/configure
178 @@ -711,6 +711,8 @@ HAVE_XSLTPROC_TRUE
179 XSLTPROC
180 LIBXML_LIBS
181 LIBXML_CFLAGS
182 +DTD_VALIDATION_FALSE
183 +DTD_VALIDATION_TRUE
184 EXPAT_LIBS
185 EXPAT_CFLAGS
186 FFI_LIBS
187 @@ -15728,7 +15730,7 @@ fi
188 if test "${enable_dtd_validation+set}" = set; then :
189 enableval=$enable_dtd_validation;
190 else
191 - enable_dtdvalidation=yes
192 + enable_dtd_validation=yes
196 @@ -16114,7 +16116,15 @@ $as_echo "yes" >&6; }
200 -if test "x$enable_dtdvalidation" = "xyes"; then
201 + if test "x$enable_dtd_validation" = "xyes"; then
202 + DTD_VALIDATION_TRUE=
203 + DTD_VALIDATION_FALSE='#'
204 +else
205 + DTD_VALIDATION_TRUE='#'
206 + DTD_VALIDATION_FALSE=
209 +if test "x$enable_dtd_validation" = "xyes"; then
211 pkg_failed=no
212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBXML" >&5
213 @@ -16669,6 +16679,10 @@ if test -z "${ENABLE_LIBRARIES_TRUE}" && test -z "${ENABLE_LIBRARIES_FALSE}"; th
214 as_fn_error $? "conditional \"ENABLE_LIBRARIES\" was never defined.
215 Usually this means the macro was only invoked conditionally." "$LINENO" 5
217 +if test -z "${DTD_VALIDATION_TRUE}" && test -z "${DTD_VALIDATION_FALSE}"; then
218 + as_fn_error $? "conditional \"DTD_VALIDATION\" was never defined.
219 +Usually this means the macro was only invoked conditionally." "$LINENO" 5
221 if test -z "${HAVE_XSLTPROC_TRUE}" && test -z "${HAVE_XSLTPROC_FALSE}"; then
222 as_fn_error $? "conditional \"HAVE_XSLTPROC\" was never defined.
223 Usually this means the macro was only invoked conditionally." "$LINENO" 5
224 diff --git a/src/scanner.c b/src/scanner.c
225 index d3e2328..04747e3 100644
226 --- a/src/scanner.c
227 +++ b/src/scanner.c
228 @@ -40,13 +40,13 @@
230 #if HAVE_LIBXML
231 #include <libxml/parser.h>
232 -#endif
234 -#include "wayland-util.h"
236 /* Embedded wayland.dtd file, see dtddata.S */
237 extern char DTD_DATA_begin;
238 extern int DTD_DATA_len;
239 +#endif
241 +#include "wayland-util.h"
243 enum side {
244 CLIENT,
246 2.6.4