Skip to content
Snippets Groups Projects
Commit 429e8c2a authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

contribs: Add libxml2

parent e5c45899
No related branches found
No related tags found
No related merge requests found
078afa65229de4f23e6538767253fb4f9f61d96cb72e445179c71d536b224d54922f22972a2b71434796f83f8c99f6a46c3b8813cb4582ad9fca696d141e0abb libxml2-2.9.3.tar.gz
--- libxml2/Makefile.am.orig 2013-08-20 13:57:37.911178174 +0200
+++ libxml2/Makefile.am 2013-08-20 13:57:44.543177895 +0200
@@ -2,7 +2,7 @@
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = include . doc example xstc $(PYTHON_SUBDIR)
+SUBDIRS = include . xstc $(PYTHON_SUBDIR)
DIST_SUBDIRS = include . doc example python xstc
@@ -15,7 +15,7 @@
# testReader testapi testModule runtest runsuite testchar \
# testdict runxmlconf testrecurse testlimits
-bin_PROGRAMS = xmllint xmlcatalog
+bin_PROGRAMS =
bin_SCRIPTS=xml2-config
--- libxml2-2.9.0/Makefile.am.orig 2012-11-01 18:55:04.214524833 +0100
+++ libxml2-2.9.0/Makefile.am 2012-11-01 18:55:56.838557494 +0100
@@ -10,10 +10,10 @@
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=testSchemas testRelax testSAX testHTML testXPath testURI \
+# testThreads testC14N testAutomata testRegexp \
+# testReader testapi testModule runtest runsuite testchar \
+# testdict runxmlconf testrecurse testlimits
bin_PROGRAMS = xmllint xmlcatalog
--- libxml2/xmlIO.c.orig 2016-05-03 11:27:32.110248362 +0200
+++ libxml2/xmlIO.c 2016-05-03 11:27:55.310675774 +0200
@@ -3810,44 +3810,7 @@
*/
char *
xmlParserGetDirectory(const char *filename) {
- char *ret = NULL;
- char dir[1024];
- char *cur;
-
-#ifdef _WIN32_WCE /* easy way by now ... wince does not have dirs! */
return NULL;
-#endif
-
- if (xmlInputCallbackInitialized == 0)
- xmlRegisterDefaultInputCallbacks();
-
- if (filename == NULL) return(NULL);
-
-#if defined(WIN32) && !defined(__CYGWIN__)
-# define IS_XMLPGD_SEP(ch) ((ch=='/')||(ch=='\\'))
-#else
-# define IS_XMLPGD_SEP(ch) (ch=='/')
-#endif
-
- strncpy(dir, filename, 1023);
- dir[1023] = 0;
- cur = &dir[strlen(dir)];
- while (cur > dir) {
- if (IS_XMLPGD_SEP(*cur)) break;
- cur --;
- }
- if (IS_XMLPGD_SEP(*cur)) {
- if (cur == dir) dir[1] = 0;
- else *cur = 0;
- ret = xmlMemStrdup(dir);
- } else {
- if (getcwd(dir, 1024) != NULL) {
- dir[1023] = 0;
- ret = xmlMemStrdup(dir);
- }
- }
- return(ret);
-#undef IS_XMLPGD_SEP
}
/****************************************************************
--- libxml2-2.9.2/configure.ac 2015-01-21 10:40:13.706152933 +0100
+++ libxml2-2.9.2/configure.ac.new 2015-01-21 10:39:36.014876563 +0100
@@ -1049,12 +1049,17 @@
dnl Use pthread by default in other cases
if test -z "$THREADS_W32"; then
if test "$with_threads" = "pthread" || test "$with_threads" = "" || test "$with_threads" = "yes" ; then
+ LIBS_saved="$LIBS"
AC_CHECK_HEADER(pthread.h,
- AC_CHECK_LIB(pthread, pthread_join,[
- THREAD_LIBS="-lpthread"
+ AC_SEARCH_LIBS(pthread_join, pthread,[
+ THREAD_LIBS="$ac_cv_search_pthread_join"
+ if test "$THREAD_LIBS" = "none required"; then
+ THREAD_LIBS=""
+ fi
AC_DEFINE([HAVE_LIBPTHREAD], [], [Define if pthread library is there (-lpthread)])
AC_DEFINE([HAVE_PTHREAD_H], [], [Define if <pthread.h> is there])
WITH_THREADS="1"]))
+ LIBS="$LIBS_saved"
fi
fi
# libxml2
LIBXML2_VERSION := 2.9.3
LIBXML2_URL := http://xmlsoft.org/sources/libxml2-$(LIBXML2_VERSION).tar.gz
PKGS += libxml2
ifeq ($(call need_pkg,"libxml-2.0"),)
PKGS_FOUND += libxml2
endif
$(TARBALLS)/libxml2-$(LIBXML2_VERSION).tar.gz:
$(call download_pkg,$(LIBXML2_URL),libxml2)
.sum-libxml2: libxml2-$(LIBXML2_VERSION).tar.gz
XMLCONF = --with-minimal \
--with-catalog \
--with-reader \
--with-tree \
--with-push \
--with-xptr \
--with-valid \
--with-xpath \
--with-xinclude \
--with-sax1 \
--without-zlib \
--without-iconv \
--without-http \
--without-ftp \
--without-debug \
--without-docbook \
--without-regexps \
--without-python
libxml2: libxml2-$(LIBXML2_VERSION).tar.gz .sum-libxml2
$(UNPACK)
$(APPLY) $(SRC)/libxml2/no-tests.patch
$(APPLY) $(SRC)/libxml2/win32.patch
$(APPLY) $(SRC)/libxml2/bins.patch
$(APPLY) $(SRC)/libxml2/pthread.patch
ifdef HAVE_WINSTORE
$(APPLY) $(SRC)/libxml2/nogetcwd.patch
endif
$(MOVE)
.libxml2: libxml2
$(RECONF)
cd $< && $(HOSTVARS) ./configure $(HOSTCONF) CFLAGS="-DLIBXML_STATIC" $(XMLCONF)
cd $< && $(MAKE) install
touch $@
--- libxml2/xmlIO.c.orig 2013-04-22 19:24:23.613036400 +0200
+++ libxml2/xmlIO.c 2013-04-22 19:24:56.249035859 +0200
@@ -726,14 +726,14 @@
xmlInitPlatformSpecificIo(void)
{
static int xmlPlatformIoInitialized = 0;
- OSVERSIONINFO osvi;
+ /*OSVERSIONINFO osvi;*/
if(xmlPlatformIoInitialized)
return;
- osvi.dwOSVersionInfoSize = sizeof(osvi);
+ /*osvi.dwOSVersionInfoSize = sizeof(osvi);*/
- if(GetVersionEx(&osvi) && (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)) {
+ if(1 /*GetVersionEx(&osvi) && (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)*/) {
xmlWrapStat = xmlWrapStatUtf8;
xmlWrapOpen = xmlWrapOpenUtf8;
#ifdef HAVE_ZLIB_H
--- libxml2-2.9.2/configure.ac 2014-10-16 06:06:15.000000000 +0200
+++ libxml2-2.9.2/configure.ac.new 2015-01-21 10:07:09.001484882 +0100
@@ -1041,7 +1041,7 @@
*mingw32*) if test "$with_threads" != "pthread" && test "$with_threads" != "no"; then
WITH_THREADS="1"
THREADS_W32="1"
- THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_WIN32_THREADS"
+ THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_WIN32_THREADS -DHAVE_COMPILER_TLS"
fi
;;
esac
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment