From 43f5b7bb97ba0ab4e2e3a0845904c94b472e4643 Mon Sep 17 00:00:00 2001 From: "L. E. Segovia" Date: Wed, 21 Feb 2024 11:37:04 -0300 Subject: libxml2: Update to 2.11.6 and port to Meson Part-of: --- recipes/libxml2.recipe | 37 +- recipes/libxml2/0001-Add-Meson-build.patch | 537 +++++++++++++++++++++ .../0001-Enable-windows-cross-compilation.patch | 85 ---- recipes/libxml2/0002-makefiles-disable-tests.patch | 32 -- .../0003-configure-fix-python-dir-prefix.patch | 24 - 5 files changed, 555 insertions(+), 160 deletions(-) create mode 100644 recipes/libxml2/0001-Add-Meson-build.patch delete mode 100644 recipes/libxml2/0001-Enable-windows-cross-compilation.patch delete mode 100644 recipes/libxml2/0002-makefiles-disable-tests.patch delete mode 100644 recipes/libxml2/0003-configure-fix-python-dir-prefix.patch diff --git a/recipes/libxml2.recipe b/recipes/libxml2.recipe index b3a39920..5dfd3cc2 100644 --- a/recipes/libxml2.recipe +++ b/recipes/libxml2.recipe @@ -1,28 +1,27 @@ # -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python - +from cerbero.tools.libtool import LibtoolLibrary class Recipe(recipe.Recipe): name = 'libxml2' - version = '2.9.9' + version = '2.11.6' stype = SourceType.TARBALL - # Upstream still has a broken SSL certificate, use our mirror - #url = 'https://xmlsoft.org/sources/libxml2-%(version)s.tar.gz' - url = 'https://gstreamer.freedesktop.org/src/mirror/libxml2-%(version)s.tar.gz' - tarball_checksum = '94fb70890143e3c6549f265cee93ec064c80a84c42ad0f23e85ee1fd6540a871' - licenses = [{License.MIT: ['COPYING']}] - configure_options = '--with-python=no' + btype = BuildType.MESON + url = 'gnome://' + tarball_checksum = 'c90eee7506764abbe07bb616b82da452529609815aefef423d66ef080eb0c300' + licenses = [{License.MIT: ['Copyright']}] deps = [ 'zlib' ] - files_libs = ['libxml2'] - files_devel = ['include/libxml2', '%(libdir)s/xml2Conf.sh', 'bin/xml2-config', - '%(libdir)s/pkgconfig/libxml-2.0.pc', 'bin/xmllint%(bext)s'] + patches = [ + f'{name}/0001-Add-Meson-build.patch', + ] - def prepare(self): - if self.config.target_platform == Platform.WINDOWS: - self.configure_options += ' --without-threads' - elif self.config.target_platform == Platform.ANDROID: - v = DistroVersion.get_android_api_version(self.config.target_distro_version) - if v < 21: - self.append_env('CFLAGS', '-D_FILE_OFFSET_BITS=32') - self.append_env('CPPFLAGS', '-D_FILE_OFFSET_BITS=32') + files_libs = ['libxml2'] + files_devel = ['include/libxml2', '%(libdir)s/pkgconfig/libxml-2.0.pc', 'bin/xmllint%(bext)s'] + + def post_install(self): + LibtoolLibrary(self.name, 2, 11, 6, + self.config.libdir, self.config.target_platform, + deps=['z'], + static_only=self.library_type == LibraryType.STATIC).save() + super().post_install() diff --git a/recipes/libxml2/0001-Add-Meson-build.patch b/recipes/libxml2/0001-Add-Meson-build.patch new file mode 100644 index 00000000..dcde568c --- /dev/null +++ b/recipes/libxml2/0001-Add-Meson-build.patch @@ -0,0 +1,537 @@ +From 089ef2cf86b2f7b5266a07b6b538799c82e89abe Mon Sep 17 00:00:00 2001 +From: "L. E. Segovia" +Date: Wed, 21 Feb 2024 11:02:25 -0300 +Subject: [PATCH 1/1] Add Meson build + +Source: https://wrapdb.mesonbuild.com/v2/libxml2_2.11.6-3/libxml2.wrap +--- + LICENSE.build | 19 ++ + include/libxml/meson.build | 55 +++++ + meson.build | 397 +++++++++++++++++++++++++++++++++++++ + meson_options.txt | 1 + + win32/meson.build | 13 ++ + 5 files changed, 485 insertions(+) + create mode 100644 LICENSE.build + create mode 100644 include/libxml/meson.build + create mode 100644 meson.build + create mode 100644 meson_options.txt + create mode 100644 win32/meson.build + +diff --git a/LICENSE.build b/LICENSE.build +new file mode 100644 +index 0000000..b59833d +--- /dev/null ++++ b/LICENSE.build +@@ -0,0 +1,19 @@ ++Copyright (c) 2021 The Meson development team ++ ++Permission is hereby granted, free of charge, to any person obtaining a copy ++of this software and associated documentation files (the "Software"), to deal ++in the Software without restriction, including without limitation the rights ++to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ++copies of the Software, and to permit persons to whom the Software is ++furnished to do so, subject to the following conditions: ++ ++The above copyright notice and this permission notice shall be included in all ++copies or substantial portions of the Software. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ++OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ++SOFTWARE. +diff --git a/include/libxml/meson.build b/include/libxml/meson.build +new file mode 100644 +index 0000000..22e5637 +--- /dev/null ++++ b/include/libxml/meson.build +@@ -0,0 +1,55 @@ ++configure_file( ++ input: 'xmlversion.h.in', ++ output: 'xmlversion.h', ++ configuration: withcdata, ++ install_dir: get_option('includedir') / 'libxml2' / 'libxml', ++) ++ ++libxml_headers = files( ++ 'HTMLparser.h', ++ 'HTMLtree.h', ++ 'SAX.h', ++ 'SAX2.h', ++ 'c14n.h', ++ 'catalog.h', ++ 'chvalid.h', ++ 'debugXML.h', ++ 'dict.h', ++ 'encoding.h', ++ 'entities.h', ++ 'globals.h', ++ 'hash.h', ++ 'list.h', ++ 'nanoftp.h', ++ 'nanohttp.h', ++ 'parser.h', ++ 'parserInternals.h', ++ 'pattern.h', ++ 'relaxng.h', ++ 'schemasInternals.h', ++ 'schematron.h', ++ 'threads.h', ++ 'tree.h', ++ 'uri.h', ++ 'valid.h', ++ 'xinclude.h', ++ 'xlink.h', ++ 'xmlIO.h', ++ 'xmlautomata.h', ++ 'xmlerror.h', ++ 'xmlexports.h', ++ 'xmlmemory.h', ++ 'xmlmodule.h', ++ 'xmlreader.h', ++ 'xmlregexp.h', ++ 'xmlsave.h', ++ 'xmlschemas.h', ++ 'xmlschemastypes.h', ++ 'xmlstring.h', ++ 'xmlunicode.h', ++ 'xmlwriter.h', ++ 'xpath.h', ++ 'xpathInternals.h', ++ 'xpointer.h', ++) ++install_headers(libxml_headers, subdir: 'libxml2/libxml') +diff --git a/meson.build b/meson.build +new file mode 100644 +index 0000000..99b7cfe +--- /dev/null ++++ b/meson.build +@@ -0,0 +1,397 @@ ++project( ++ 'libxml2', ++ 'c', ++ version: '2.11.6', ++ meson_version: '>=0.54.1', ++ license: 'MIT', ++) ++ ++add_project_arguments('-D_GNU_SOURCE', language: 'c') ++ ++cc = meson.get_compiler('c') ++if host_machine.system() == 'windows' ++ if cc.get_argument_syntax() == 'gcc' ++ #hack to get rand_r working on windows ++ add_project_arguments('-D_POSIX_THREAD_SAFE_FUNCTIONS', language: 'c') ++ else ++ add_project_arguments('-D_CRT_SECURE_NO_WARNINGS', cc.get_supported_arguments('-Wno-deprecated-declarations'), language: 'c') ++ endif ++endif ++ ++cdata = configuration_data() ++ ++cdata.set('PACKAGE', meson.project_name()) ++cdata.set('PACKAGE_NAME', meson.project_name()) ++cdata.set('PACKAGE_TARNAME', meson.project_name()) ++cdata.set('PACKAGE_STRING', '@0@ @1@'.format(meson.project_name(), meson.project_version())) ++cdata.set('PACKAGE_URL', 'https://gitlab.gnome.org/GNOME/libxml2') ++cdata.set('PACKAGE_BUGREPORT', 'xml@gnome.org') ++cdata.set('PACKAGE_VERSION', meson.project_version()) ++cdata.set('VERSION', meson.project_version()) ++ ++if cc.has_function_attribute('destructor') ++ cdata.set('ATTRIBUTE_DESTRUCTOR', '__attribute__((destructor))') ++endif ++ ++if cc.has_header_symbol('sys/socket.h', 'AF_INET6') or cc.has_header_symbol('winsock2.h', 'AF_INET6') ++ cdata.set('SUPPORT_IP6', 1) ++endif ++ ++if cc.compiles('#include void a(va_list*) {}int main(){va_list ap1,ap2;a(&ap1);ap2=(va_list)ap1;return 0;}') ++ cdata.set('VA_LIST_IS_ARRAY', 1) ++endif ++ ++if cc.compiles('#include int main(){send(1,(const char*)"",1,1);}') or cc.compiles('#include int main(){send(1,(const char*)"",1,1);}') ++ cdata.set('SEND_ARG2_CAST', '/**/') ++else ++ cdata.set('SEND_ARG2_CAST', '(char *)') ++endif ++ ++if cc.compiles('#include int main(){gethostbyname((const char*)"");}') or cc.compiles('#include int main(){gethostbyname((const char*)"");}') ++ cdata.set('GETHOSTBYNAME_ARG_CAST', '/**/') ++else ++ cdata.set('GETHOSTBYNAME_ARG_CAST', '(char *)') ++endif ++ ++if cc.has_header_symbol('stdlib.h', 'rand_r', args: '-D_POSIX_THREAD_SAFE_FUNCTIONS') ++ cdata.set('HAVE_RAND_R', 1) ++endif ++ ++if cc.has_header_symbol('stdarg.h', 'va_copy') ++ cdata.set('HAVE_VA_COPY', 1) ++endif ++ ++if cc.has_header_symbol('stdarg.h', '__va_copy') ++ cdata.set('HAVE___VA_COPY', 1) ++endif ++ ++deps = [] ++ ++if meson.version().version_compare('>= 0.62') ++ dl_lib = dependency('dl', disabler: true, required: false) ++else ++ dl_lib = cc.find_library('dl', disabler: true, required: false) ++endif ++if dl_lib.found() ++ cdata.set('HAVE_DLOPEN', 1) ++ cdata.set('HAVE_DLFCN_H', 1) ++ deps += dl_lib ++endif ++ ++math_lib = cc.find_library('m', required: false) ++if math_lib.found() ++ deps += math_lib ++endif ++ ++if meson.version().version_compare('>= 0.60') ++ iconv_lib = dependency('iconv', required: get_option('iconv')) ++else ++ if get_option('iconv').disabled() ++ iconv_lib = dependency('', required: false) ++ else ++ iconv_check = ''' ++ #include ++ int main() { ++ iconv_open("", ""); ++ } ++ ''' ++ if cc.links(iconv_check, name: 'iconv_open') ++ iconv_lib = declare_dependency() ++ else ++ iconv_lib = cc.find_library('iconv', required: false) ++ if not cc.links(iconv_check, name: 'iconv_open in libiconv', dependencies: iconv_lib) ++ iconv_lib = dependency('', required: false) ++ if get_option('iconv').enabled() ++ error('iconv enabled and not found') ++ endif ++ endif ++ endif ++ endif ++endif ++if iconv_lib.found() ++ deps += iconv_lib ++endif ++ ++if host_machine.system() == 'windows' ++ pthread_dep = disabler() ++ with_threads = true ++else ++ pthread_dep = dependency('threads', disabler: true, required: false) ++ with_threads = pthread_dep.found() ++ if with_threads ++ deps += pthread_dep ++ endif ++endif ++ ++lzma_dep = dependency('liblzma', required: false) ++if lzma_dep.found() ++ cdata.set('HAVE_LIBLZMA', 1) ++ deps += lzma_dep ++endif ++ ++zlib_dep = dependency('zlib', disabler: true, required: false) ++if zlib_dep.found() ++ cdata.set('HAVE_LIBZ', 1) ++ cdata.set('HAVE_ZLIB_H', 1) ++ deps += zlib_dep ++endif ++ ++readline_lib = cc.find_library('readline', required: false) ++if cc.has_header('readline/readline.h', dependencies: readline_lib) ++ cdata.set('HAVE_LIBREADLINE', 1) ++ deps += readline_lib ++endif ++ ++history_lib = cc.find_library('history', required: false) ++if cc.has_header('readline/history.h', dependencies: history_lib) ++ cdata.set('HAVE_LIBHISTORY', 1) ++ deps += history_lib ++endif ++ ++ws2_dep = cc.find_library('ws2_32', required: host_machine.system() == 'windows') ++if ws2_dep.found() ++ deps += ws2_dep ++endif ++ ++foreach t : ['socklen_t', 'size_t', 'int'] ++ if cc.compiles('#include int main(){getsockopt(1,1,1,0,(@0@*)0);}'.format(t)) ++ cdata.set('XML_SOCKLEN_T', t) ++ break ++ endif ++ if cc.compiles('#include int main(){getsockopt(1,1,1,0,(@0@*)0);}'.format(t), dependencies: ws2_dep) ++ cdata.set('XML_SOCKLEN_T', t) ++ break ++ endif ++endforeach ++ ++checked_headers = { ++ 'arpa/inet.h': [], ++ 'arpa/nameser.h': [], ++ 'dl.h': [], ++ 'fcntl.h': [], ++ 'float.h': [], ++ 'inttypes.h': [], ++ 'netdb.h': [], ++ 'netinet/in.h': [], ++ 'poll.h': [], ++ 'pthread.h': pthread_dep, ++ 'resolv.h': [], ++ 'stdint.h': [], ++ 'sys/mman.h': [], ++ 'sys/select.h': [], ++ 'sys/socket.h': [], ++ 'sys/stat.h': [], ++ 'sys/time.h': [], ++ 'sys/timeb.h': [], ++ 'sys/types.h': [], ++ 'unistd.h': [], ++} ++ ++foreach h, d : checked_headers ++ if cc.has_header(h, dependencies: d) ++ cdata.set('HAVE_@0@'.format(h.underscorify().to_upper()), 1) ++ endif ++endforeach ++ ++checked_funcs = { ++ 'ftime': [], ++ 'getaddrinfo': ws2_dep, ++ 'gettimeofday': [], ++ 'isascii': [], ++ 'mmap': [], ++ 'munmap': [], ++ 'putenv': [], ++ 'stat': [], ++} ++ ++foreach f, d : checked_funcs ++ if cc.has_function(f, dependencies: d) ++ cdata.set('HAVE_@0@'.format(f.underscorify().to_upper()), 1) ++ endif ++endforeach ++ ++cdata.set('LT_OBJDIR', '.libs/') ++ ++configure_file( ++ input: 'config.h.cmake.in', ++ output: 'config.h', ++ format: 'cmake@', ++ configuration: cdata, ++) ++ ++withcdata = configuration_data() ++withcdata.set10('HAVE_LIBLZMA', lzma_dep.found()) ++version = meson.project_version() ++version_array = version.split('.') ++major = version_array[0].to_int() ++minor = version_array[1].to_int() ++micro = version_array[2].to_int() ++version_number = major * 10000 + minor * 100 + micro ++withcdata.set('VERSION', version) ++withcdata.set('LIBXML_VERSION_NUMBER', version_number) ++withcdata.set('LIBXML_VERSION_STRING', '@0@'.format(version_number)) ++withcdata.set('LIBXML_VERSION_EXTRA', '') ++ ++need_trio = false ++foreach f : ['printf', 'sprintf', 'fprintf', 'snprintf', 'vfprintf', 'vsprintf', 'vsnprintf', 'sscanf'] ++ if not cc.has_function(f, prefix: '#include ') ++ need_trio = true ++ break ++ endif ++endforeach ++withcdata.set10('WITH_TRIO', need_trio) ++ ++withcdata.set10('WITH_THREADS', with_threads) ++withcdata.set10('WITH_THREAD_ALLOC', false) ++withcdata.set10('WITH_TREE', true) ++withcdata.set10('WITH_OUTPUT', true) ++withcdata.set10('WITH_PUSH', true) ++withcdata.set10('WITH_READER', true) ++withcdata.set10('WITH_PATTERN', true) ++withcdata.set10('WITH_WRITER', true) ++withcdata.set10('WITH_SAX1', true) ++withcdata.set10('WITH_FTP', false) ++withcdata.set10('WITH_HTTP', true) ++withcdata.set10('WITH_VALID', true) ++withcdata.set10('WITH_HTML', true) ++withcdata.set10('WITH_LEGACY', false) ++withcdata.set10('WITH_C14N', true) ++withcdata.set10('WITH_CATALOG', true) ++withcdata.set10('WITH_DOCB', true) ++withcdata.set10('WITH_XPATH', true) ++withcdata.set10('WITH_XPTR', true) ++withcdata.set10('WITH_XPTR_LOCS', false) ++withcdata.set10('WITH_XINCLUDE', true) ++withcdata.set10('WITH_ICONV', iconv_lib.found()) ++withcdata.set10('WITH_ICU', false) ++withcdata.set10('WITH_ISO8859X', true) ++withcdata.set10('WITH_DEBUG', true) ++withcdata.set10('WITH_MEM_DEBUG', false) ++withcdata.set10('WITH_RUN_DEBUG', false) ++withcdata.set10('WITH_REGEXPS', true) ++withcdata.set10('WITH_SCHEMAS', true) ++withcdata.set10('WITH_SCHEMATRON', true) ++withcdata.set10('WITH_MODULES', dl_lib.found()) ++ ++system = target_machine.system() ++if system == 'cygwin' ++ module_ext = '.cygdll' ++elif system == 'darwin' ++ module_ext = '.bundle' ++elif system == 'windows' ++ module_ext = '.dll' ++else ++ module_ext = '.so' ++endif ++ ++withcdata.set('MODULE_EXTENSION', module_ext) ++ ++withcdata.set10('WITH_ZLIB', zlib_dep.found()) ++withcdata.set10('WITH_LZMA', lzma_dep.found()) ++ ++subdir('include/libxml') ++ ++sources = files( ++ 'HTMLparser.c', ++ 'HTMLtree.c', ++ 'SAX.c', ++ 'SAX2.c', ++ 'buf.c', ++ 'c14n.c', ++ 'catalog.c', ++ 'chvalid.c', ++ 'debugXML.c', ++ 'dict.c', ++ 'encoding.c', ++ 'entities.c', ++ 'error.c', ++ 'globals.c', ++ 'hash.c', ++ 'legacy.c', ++ 'list.c', ++ 'nanoftp.c', ++ 'nanohttp.c', ++ 'parser.c', ++ 'parserInternals.c', ++ 'pattern.c', ++ 'relaxng.c', ++ 'schematron.c', ++ 'threads.c', ++ 'tree.c', ++ 'uri.c', ++ 'valid.c', ++ 'xinclude.c', ++ 'xlink.c', ++ 'xmlIO.c', ++ 'xmlmemory.c', ++ 'xmlmodule.c', ++ 'xmlreader.c', ++ 'xmlregexp.c', ++ 'xmlsave.c', ++ 'xmlschemas.c', ++ 'xmlschemastypes.c', ++ 'xmlstring.c', ++ 'xmlunicode.c', ++ 'xmlwriter.c', ++ 'xpath.c', ++ 'xpointer.c', ++ 'xzlib.c', ++) ++ ++if need_trio ++ sources += files('trio.c', 'trionan.c', 'triostr.c') ++endif ++ ++if host_machine.system() == 'windows' ++ subdir('win32') ++endif ++ ++cargs = with_threads ? ['-D_REENTRANT'] : [] ++cargs += get_option('default_library') == 'static' ? '-DLIBXML_STATIC' : [] ++ ++link_args = cc.get_supported_link_arguments( ++ [ ++ # lld 16 defaults to --no-undefined-version but the version script ++ # can contain symbols disabled by configuration options. ++ '-Wl,--undefined-version', ++ '-Wl,--version-script=@0@'.format(meson.current_source_dir() / 'libxml2.syms') ++ ] ++) ++ ++incdir = include_directories('include') ++xml2lib = library( ++ 'xml2', ++ sources, ++ c_args: cargs, ++ link_args: link_args, ++ include_directories: incdir, ++ dependencies: deps, ++ version: meson.project_version(), ++ gnu_symbol_visibility: 'default', ++ install: true, ++) ++ ++libxml2_dep = declare_dependency( ++ link_with: xml2lib, ++ include_directories: incdir, ++ dependencies: deps, ++ variables: 'modules=@0@'.format(withcdata.get('WITH_MODULES')), ++ compile_args: get_option('default_library') == 'static' ? '-DLIBXML_STATIC' : [], ++) ++ ++pkg = import('pkgconfig') ++pkg.generate( ++ xml2lib, ++ name: 'libXML', ++ description: 'libXML library version2.', ++ filebase: 'libxml-2.0', ++ subdirs: 'libxml2', ++ variables: 'modules=@0@'.format(withcdata.get('WITH_MODULES')), ++ extra_cflags: get_option('default_library') == 'static' ? '-DLIBXML_STATIC' : [], ++) ++ ++executable('xmllint', 'xmllint.c', dependencies: libxml2_dep, install: true) ++ ++dictexe = executable('testdict', 'testdict.c', dependencies: libxml2_dep) ++ ++test('dict', dictexe) +diff --git a/meson_options.txt b/meson_options.txt +new file mode 100644 +index 0000000..4545f8e +--- /dev/null ++++ b/meson_options.txt +@@ -0,0 +1 @@ ++option('iconv', type: 'feature', description: 'Build with iconv support') +diff --git a/win32/meson.build b/win32/meson.build +new file mode 100644 +index 0000000..db16c9f +--- /dev/null ++++ b/win32/meson.build +@@ -0,0 +1,13 @@ ++rcvdata = configuration_data() ++rcvdata.set('LIBXML_MAJOR_VERSION', major) ++rcvdata.set('LIBXML_MINOR_VERSION', minor) ++rcvdata.set('LIBXML_MICRO_VERSION', micro) ++rcvdata.set_quoted('LIBXML_DOTTED_VERSION', meson.project_version()) ++configure_file( ++ output: 'rcVersion.h', ++ configuration: rcvdata, ++) ++ ++rcfile = configure_file(input: 'libxml2.rc', output: 'libxml2.rc', copy: true) ++windows = import('windows') ++sources += windows.compile_resources(rcfile) +-- +2.42.0.windows.2 + diff --git a/recipes/libxml2/0001-Enable-windows-cross-compilation.patch b/recipes/libxml2/0001-Enable-windows-cross-compilation.patch deleted file mode 100644 index 9bd33cac..00000000 --- a/recipes/libxml2/0001-Enable-windows-cross-compilation.patch +++ /dev/null @@ -1,85 +0,0 @@ -From ff87370625a68b73d0e1351bc735ef510c26d051 Mon Sep 17 00:00:00 2001 -From: Andoni Morales Alastruey -Date: Fri, 9 Mar 2012 18:18:48 +0100 -Subject: [PATCH 1/5] Enable windows cross-compilation - ---- - configure.ac | 21 ++++++++++++++++++++- - python/Makefile.am | 1 + - 2 files changed, 21 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 14ac0a8..c3985f2 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -811,6 +811,21 @@ dnl - dnl check for python - dnl - -+case "$host" in -+ *-*-mingw*|*-*-cygwin*) -+ platform_win32=yes -+ ;; -+ *) -+ platform_win32=no -+ ;; -+esac -+ -+if test "x$platform_win32" = "xyes" ; then -+AM_CONDITIONAL(WITH_PYTHON, test "$PYTHON_INCLUDES" != "") -+pythondir=$am_cv_python_pythondir -+PYTHON_SUBDIR=python -+PYTHON=`which python` -+else - PYTHON_VERSION= - PYTHON_INCLUDES= - PYTHON_SITE_PACKAGES= -@@ -905,6 +920,7 @@ then - else - PYTHON_SUBDIR= - fi -+fi - AC_SUBST(pythondir) - AC_SUBST(PYTHON_SUBDIR) - AC_SUBST(PYTHON_LIBS) -@@ -1574,6 +1590,7 @@ WIN32_EXTRA_LDFLAGS= - CYGWIN_EXTRA_LDFLAGS= - CYGWIN_EXTRA_PYTHON_LIBADD= - WIN32_EXTRA_PYTHON_LIBADD= -+WIN32_EXTRA_PYTHON_CFLAGS= - case "$host" in - *-*-mingw*) - CPPFLAGS="$CPPFLAGS -DWIN32" -@@ -1582,7 +1599,8 @@ case "$host" in - AC_DEFINE([_WINSOCKAPI_],1,[Using the Win32 Socket implementation]) - if test "${PYTHON}" != "" - then -- WIN32_EXTRA_PYTHON_LIBADD="-L${pythondir}/../../libs -lpython$(echo ${PYTHON_VERSION} | tr -d .)" -+ WIN32_EXTRA_PYTHON_LIBADD="${PYTHON_LIBS}" -+ WIN32_EXTRA_PYTHON_CFLAGS="${PYTHON_INCLUDES}" - fi - ;; - *-*-cygwin*) -@@ -1596,6 +1614,7 @@ esac - AC_SUBST(WIN32_EXTRA_LIBADD) - AC_SUBST(WIN32_EXTRA_LDFLAGS) - AC_SUBST(WIN32_EXTRA_PYTHON_LIBADD) -+AC_SUBST(WIN32_EXTRA_PYTHON_CFLAGS) - AC_SUBST(CYGWIN_EXTRA_LDFLAGS) - AC_SUBST(CYGWIN_EXTRA_PYTHON_LIBADD) - -diff --git a/python/Makefile.am b/python/Makefile.am -index 34aed96..8744cc7 100644 ---- a/python/Makefile.am -+++ b/python/Makefile.am -@@ -24,6 +24,7 @@ AM_CPPFLAGS = \ - python_LTLIBRARIES = libxml2mod.la - - libxml2mod_la_SOURCES = libxml.c libxml_wrap.h libxml2-py.h libxml2-py.c types.c -+libxml2mod_la_CFLAGS = $(WIN32_EXTRA_PYTHON_CFLAGS) - libxml2mod_la_LDFLAGS = $(CYGWIN_EXTRA_LDFLAGS) $(WIN32_EXTRA_LDFLAGS) -module -avoid-version \ - $(top_builddir)/libxml2.la $(CYGWIN_EXTRA_PYTHON_LIBADD) $(WIN32_EXTRA_PYTHON_LIBADD) $(PYTHON_LIBS) - --- -2.1.0 - diff --git a/recipes/libxml2/0002-makefiles-disable-tests.patch b/recipes/libxml2/0002-makefiles-disable-tests.patch deleted file mode 100644 index 7738c59f..00000000 --- a/recipes/libxml2/0002-makefiles-disable-tests.patch +++ /dev/null @@ -1,32 +0,0 @@ -From b67767a901ec31a0ddc1e2dff5c4f5d21241661f Mon Sep 17 00:00:00 2001 -From: Andoni Morales Alastruey -Date: Mon, 28 Oct 2013 18:05:43 +0100 -Subject: [PATCH 2/5] makefiles: disable tests - ---- - Makefile.am | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 70720f3..a2881a3 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -10,10 +10,11 @@ AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/include - - AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS) $(LZMA_CFLAGS) - --noinst_PROGRAMS=testSchemas testRelax testSAX testHTML testXPath testURI \ -- testThreads testC14N testAutomata testRegexp \ -- testReader testapi testModule runtest runsuite testchar \ -- testdict runxmlconf testrecurse testlimits -+noinst_PROGRAMS= -+#noinst_PROGRAMS=testSchemas testRelax testSAX testHTML testXPath testURI \ -+# testThreads testC14N testAutomata testRegexp \ -+# testReader testapi testModule runtest runsuite testchar \ -+# testdict runxmlconf testrecurse testlimits - - bin_PROGRAMS = xmllint xmlcatalog - --- -2.1.0 - diff --git a/recipes/libxml2/0003-configure-fix-python-dir-prefix.patch b/recipes/libxml2/0003-configure-fix-python-dir-prefix.patch deleted file mode 100644 index d12f0af7..00000000 --- a/recipes/libxml2/0003-configure-fix-python-dir-prefix.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 5a75153014bd1c0669415bda1ee899c0ae9c3aad Mon Sep 17 00:00:00 2001 -From: Andoni Morales Alastruey -Date: Mon, 28 Oct 2013 18:07:07 +0100 -Subject: [PATCH 3/5] configure: fix python dir prefix - ---- - configure.ac | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/configure.ac b/configure.ac -index c3985f2..e5dbc15 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -908,6 +908,7 @@ if test "$with_python" != "no" ; then - fi - fi - fi -+ PYTHON_SITE_PACKAGES='$(prefix)/lib/python$(PYTHON_VERSION)/site-packages' - pythondir='$(PYTHON_SITE_PACKAGES)' - PYTHON_LIBS=`python$PYTHON_VERSION-config --ldflags` - else --- -2.1.0 - -- cgit v1.2.3