summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch')
-rw-r--r--meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch216
1 files changed, 0 insertions, 216 deletions
diff --git a/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch b/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch
deleted file mode 100644
index e6998f6e68..0000000000
--- a/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch
+++ /dev/null
@@ -1,216 +0,0 @@
1From 43edc9a445ed66cceb7533eadeef242940b4592c Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Sat, 11 May 2019 20:37:12 +0800
4Subject: [PATCH] AM_PATH_XML2 uses xml-config which we disable through
5binconfig-disabled.bbclass, so port it to use pkg-config instead.
6
7Upstream-Status: Pending
8Signed-off-by: Ross Burton <ross.burton@intel.com>
9
10Rebase to 2.9.9
11Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
12---
13 libxml.m4 | 186 ++------------------------------------------------------------
14 1 file changed, 5 insertions(+), 181 deletions(-)
15
16diff --git a/libxml.m4 b/libxml.m4
17index 2d7a6f5..1c53585 100644
18--- a/libxml.m4
19+++ b/libxml.m4
20@@ -1,188 +1,12 @@
21-# Configure paths for LIBXML2
22-# Mike Hommey 2004-06-19
23-# use CPPFLAGS instead of CFLAGS
24-# Toshio Kuratomi 2001-04-21
25-# Adapted from:
26-# Configure paths for GLIB
27-# Owen Taylor 97-11-3
28-
29 dnl AM_PATH_XML2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
30 dnl Test for XML, and define XML_CPPFLAGS and XML_LIBS
31 dnl
32-AC_DEFUN([AM_PATH_XML2],[
33-AC_ARG_WITH(xml-prefix,
34- [ --with-xml-prefix=PFX Prefix where libxml is installed (optional)],
35- xml_config_prefix="$withval", xml_config_prefix="")
36-AC_ARG_WITH(xml-exec-prefix,
37- [ --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)],
38- xml_config_exec_prefix="$withval", xml_config_exec_prefix="")
39-AC_ARG_ENABLE(xmltest,
40- [ --disable-xmltest Do not try to compile and run a test LIBXML program],,
41- enable_xmltest=yes)
42-
43- if test x$xml_config_exec_prefix != x ; then
44- xml_config_args="$xml_config_args"
45- if test x${XML2_CONFIG+set} != xset ; then
46- XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config
47- fi
48- fi
49- if test x$xml_config_prefix != x ; then
50- xml_config_args="$xml_config_args --prefix=$xml_config_prefix"
51- if test x${XML2_CONFIG+set} != xset ; then
52- XML2_CONFIG=$xml_config_prefix/bin/xml2-config
53- fi
54- fi
55-
56- AC_PATH_PROG(XML2_CONFIG, xml2-config, no)
57- min_xml_version=ifelse([$1], ,2.0.0,[$1])
58- AC_MSG_CHECKING(for libxml - version >= $min_xml_version)
59- no_xml=""
60- if test "$XML2_CONFIG" = "no" ; then
61- no_xml=yes
62- else
63- XML_CPPFLAGS=`$XML2_CONFIG $xml_config_args --cflags`
64- XML_LIBS=`$XML2_CONFIG $xml_config_args --libs`
65- xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \
66- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
67- xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \
68- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
69- xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \
70- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
71- if test "x$enable_xmltest" = "xyes" ; then
72- ac_save_CPPFLAGS="$CPPFLAGS"
73- ac_save_LIBS="$LIBS"
74- CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
75- LIBS="$XML_LIBS $LIBS"
76-dnl
77-dnl Now check if the installed libxml is sufficiently new.
78-dnl (Also sanity checks the results of xml2-config to some extent)
79-dnl
80- rm -f conf.xmltest
81- AC_TRY_RUN([
82-#include <stdlib.h>
83-#include <stdio.h>
84-#include <string.h>
85-#include <libxml/xmlversion.h>
86-
87-int
88-main()
89-{
90- int xml_major_version, xml_minor_version, xml_micro_version;
91- int major, minor, micro;
92- char *tmp_version;
93-
94- system("touch conf.xmltest");
95-
96- /* Capture xml2-config output via autoconf/configure variables */
97- /* HP/UX 9 (%@#!) writes to sscanf strings */
98- tmp_version = (char *)strdup("$min_xml_version");
99- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
100- printf("%s, bad version string from xml2-config\n", "$min_xml_version");
101- exit(1);
102- }
103- free(tmp_version);
104-
105- /* Capture the version information from the header files */
106- tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION);
107- if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) {
108- printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION");
109- exit(1);
110- }
111- free(tmp_version);
112-
113- /* Compare xml2-config output to the libxml headers */
114- if ((xml_major_version != $xml_config_major_version) ||
115- (xml_minor_version != $xml_config_minor_version) ||
116- (xml_micro_version != $xml_config_micro_version))
117- {
118- printf("*** libxml header files (version %d.%d.%d) do not match\n",
119- xml_major_version, xml_minor_version, xml_micro_version);
120- printf("*** xml2-config (version %d.%d.%d)\n",
121- $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version);
122- return 1;
123- }
124-/* Compare the headers to the library to make sure we match */
125- /* Less than ideal -- doesn't provide us with return value feedback,
126- * only exits if there's a serious mismatch between header and library.
127- */
128- LIBXML_TEST_VERSION;
129-
130- /* Test that the library is greater than our minimum version */
131- if ((xml_major_version > major) ||
132- ((xml_major_version == major) && (xml_minor_version > minor)) ||
133- ((xml_major_version == major) && (xml_minor_version == minor) &&
134- (xml_micro_version >= micro)))
135- {
136- return 0;
137- }
138- else
139- {
140- printf("\n*** An old version of libxml (%d.%d.%d) was found.\n",
141- xml_major_version, xml_minor_version, xml_micro_version);
142- printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n",
143- major, minor, micro);
144- printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n");
145- printf("***\n");
146- printf("*** If you have already installed a sufficiently new version, this error\n");
147- printf("*** probably means that the wrong copy of the xml2-config shell script is\n");
148- printf("*** being found. The easiest way to fix this is to remove the old version\n");
149- printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n");
150- printf("*** correct copy of xml2-config. (In this case, you will have to\n");
151- printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
152- printf("*** so that the correct libraries are found at run-time))\n");
153- }
154- return 1;
155-}
156-],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
157- CPPFLAGS="$ac_save_CPPFLAGS"
158- LIBS="$ac_save_LIBS"
159- fi
160- fi
161+AC_DEFUN([AM_PATH_XML2],[
162+ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
163
164- if test "x$no_xml" = x ; then
165- AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version))
166- ifelse([$2], , :, [$2])
167- else
168- AC_MSG_RESULT(no)
169- if test "$XML2_CONFIG" = "no" ; then
170- echo "*** The xml2-config script installed by LIBXML could not be found"
171- echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in"
172- echo "*** your path, or set the XML2_CONFIG environment variable to the"
173- echo "*** full path to xml2-config."
174- else
175- if test -f conf.xmltest ; then
176- :
177- else
178- echo "*** Could not run libxml test program, checking why..."
179- CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
180- LIBS="$LIBS $XML_LIBS"
181- AC_TRY_LINK([
182-#include <libxml/xmlversion.h>
183-#include <stdio.h>
184-], [ LIBXML_TEST_VERSION; return 0;],
185- [ echo "*** The test program compiled, but did not run. This usually means"
186- echo "*** that the run-time linker is not finding LIBXML or finding the wrong"
187- echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your"
188- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
189- echo "*** to the installed location Also, make sure you have run ldconfig if that"
190- echo "*** is required on your system"
191- echo "***"
192- echo "*** If you have an old version installed, it is best to remove it, although"
193- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
194- [ echo "*** The test program failed to compile or link. See the file config.log for the"
195- echo "*** exact error that occurred. This usually means LIBXML was incorrectly installed"
196- echo "*** or that you have moved LIBXML since it was installed. In the latter case, you"
197- echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ])
198- CPPFLAGS="$ac_save_CPPFLAGS"
199- LIBS="$ac_save_LIBS"
200- fi
201- fi
202+ verdep=ifelse([$1], [], [], [">= $1"])
203+ PKG_CHECK_MODULES(XML, [libxml-2.0 $verdep], [$2], [$3])
204
205- XML_CPPFLAGS=""
206- XML_LIBS=""
207- ifelse([$3], , :, [$3])
208- fi
209+ XML_CPPFLAGS=$XML_CFLAGS
210 AC_SUBST(XML_CPPFLAGS)
211- AC_SUBST(XML_LIBS)
212- rm -f conf.xmltest
213 ])
214--
2152.7.4
216