From 5462f98682bfb8309113d3002820b6c94421b36a Mon Sep 17 00:00:00 2001 From: Alwin Esch Date: Wed, 5 Jan 2022 18:18:56 +0000 Subject: [PATCH 1/2] update depends libxml2 to version 2.9.10 To fix some Windows UWP builds --- depends/common/libxml2/CMakeLists.txt | 457 ++---------------- depends/common/libxml2/libxml2.sha256 | 2 +- depends/common/libxml2/libxml2.txt | 2 +- depends/common/libxml2/win32_io.patch | 20 - .../libxml2/CMakeLists.txt | 39 +- .../libxml2/deps.txt | 0 depends/windows/libxml2/libxml2.sha256 | 1 + depends/windows/libxml2/libxml2.txt | 1 + .../windowsstore/libxml2/01-win32_io.patch | 20 - .../windowsstore/libxml2/02-fix-uwp-api.patch | 156 ------ depends/windowsstore/libxml2/libxml2.sha256 | 1 - depends/windowsstore/libxml2/libxml2.txt | 1 - 12 files changed, 68 insertions(+), 632 deletions(-) delete mode 100644 depends/common/libxml2/win32_io.patch rename depends/{windowsstore => windows}/libxml2/CMakeLists.txt (93%) rename depends/{windowsstore => windows}/libxml2/deps.txt (100%) create mode 100644 depends/windows/libxml2/libxml2.sha256 create mode 100644 depends/windows/libxml2/libxml2.txt delete mode 100644 depends/windowsstore/libxml2/01-win32_io.patch delete mode 100644 depends/windowsstore/libxml2/02-fix-uwp-api.patch delete mode 100644 depends/windowsstore/libxml2/libxml2.sha256 delete mode 100644 depends/windowsstore/libxml2/libxml2.txt diff --git a/depends/common/libxml2/CMakeLists.txt b/depends/common/libxml2/CMakeLists.txt index f9f556d4..d3121b44 100644 --- a/depends/common/libxml2/CMakeLists.txt +++ b/depends/common/libxml2/CMakeLists.txt @@ -1,429 +1,36 @@ -project(xml2) +project(libxml2) -cmake_minimum_required(VERSION 2.6) +cmake_minimum_required(VERSION 3.5) -enable_language(C) +list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}) -find_package(ZLIB REQUIRED) -list(APPEND CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS}) - -if(NOT WIN32) - include(CheckIncludeFile) - include(CheckFunctionExists) - include(CheckStructHasMember) - include(CheckSymbolExists) - - file(READ config.h.in FILE_CONTENT) - string(REPLACE "#undef" "#cmakedefine" MODIFIED_FILE_CONTENT "${FILE_CONTENT}") - file(WRITE config.h.cmake "${MODIFIED_FILE_CONTENT}") - - #/* Type cast for the gethostbyname() argument */ - #undef GETHOSTBYNAME_ARG_CAST - - #/* Define to 1 if you have the header file. */ - check_include_file(ansidecl.h HAVE_ANSIDECL_H) - - #/* Define to 1 if you have the header file. */ - check_include_file(arpa/inet.h HAVE_ARPA_INET_H) - - #/* Define to 1 if you have the header file. */ - check_include_file(arpa/nameser.h HAVE_ARPA_NAMESER_H) - - #/* Whether struct sockaddr::__ss_family exists */ - check_struct_has_member("struct sockaddr" __ss_family sys/socket.h HAVE_BROKEN_SS_FAMILY) - - #/* Define to 1 if you have the `class' function. */ - check_function_exists(class HAVE_CLASS) - - #/* Define to 1 if you have the header file. */ - check_include_file(ctype.h HAVE_CTYPE_H) - - #/* Define to 1 if you have the header file. */ - check_include_file(dirent.h HAVE_DIRENT_H) - - #/* Define to 1 if you have the header file. */ - check_include_file(dlfcn.h HAVE_DLFCN_H) - - #/* Have dlopen based dso */ - #undef HAVE_DLOPEN - - #/* Define to 1 if you have the header file. */ - check_include_file(dl.h HAVE_DL_H) - - #/* Define to 1 if you have the header file. */ - check_include_file(errno.h HAVE_ERRNO_H) - - #/* Define to 1 if you have the header file. */ - check_include_file(fcntl.h HAVE_FCNTL_H) - - #/* Define to 1 if you have the `finite' function. */ - check_function_exists(finite HAVE_FINITE) - - #/* Define to 1 if you have the header file. */ - check_include_file(float.h HAVE_FLOAT_H) - - #/* Define to 1 if you have the `fpclass' function. */ - check_function_exists(fpclass HAVE_FPCLASS) - - #/* Define to 1 if you have the `fprintf' function. */ - check_function_exists(fprintf HAVE_FPRINTF) - - #/* Define to 1 if you have the `fp_class' function. */ - check_function_exists(fp_class HAVE_FP_CLASS) - - #/* Define to 1 if you have the header file. */ - check_include_file(fp_class.h HAVE_FP_CLASS_H) - - #/* Define to 1 if you have the `ftime' function. */ - check_function_exists(ftime HAVE_FTIME) - - #/* Define if getaddrinfo is there */ - check_function_exists(getaddrinfo HAVE_GETADDRINFO) - - #/* Define to 1 if you have the `gettimeofday' function. */ - check_function_exists(gettimeofday HAVE_GETTIMEOFDAY) - - #/* Define to 1 if you have the header file. */ - check_include_file(ieeefp.h HAVE_IEEEFP_H) - - #/* Define to 1 if you have the header file. */ - check_include_file(inttypes.h HAVE_INTTYPES_H) - - #/* Define to 1 if you have the `isascii' function. */ - check_function_exists(isascii HAVE_ISASCII) - - #/* Define if isinf is there */ - check_function_exists(isinf HAVE_ISINF) - - #/* Define if isnan is there */ - check_function_exists(isnan HAVE_ISNAN) - - #/* Define to 1 if you have the `isnand' function. */ - check_function_exists(isnand HAVE_ISNAND) - - #/* Define if history library is there (-lhistory) */ - #undef HAVE_LIBHISTORY - - #/* Have compression library */ - #undef HAVE_LIBLZMA - - #/* Define if pthread library is there (-lpthread) */ - #undef HAVE_LIBPTHREAD - - #/* Define if readline library is there (-lreadline) */ - #undef HAVE_LIBREADLINE - - #/* Have compression library */ - #undef HAVE_LIBZ - - #/* Define to 1 if you have the header file. */ - check_include_file(limits.h HAVE_LIMITS_H) - - #/* Define to 1 if you have the `localtime' function. */ - check_function_exists(localtime HAVE_LOCALTIME) - - #/* Define to 1 if you have the header file. */ - check_include_file(lzma.h HAVE_LZMA_H) - - #/* Define to 1 if you have the header file. */ - check_include_file(malloc.h HAVE_MALLOC_H) - - #/* Define to 1 if you have the header file. */ - check_include_file(math.h HAVE_MATH_H) - - #/* Define to 1 if you have the header file. */ - check_include_file(memory.h HAVE_MEMORY_H) - - #/* Define to 1 if you have the `mmap' function. */ - check_function_exists(mmap HAVE_MMAP) - - #/* Define to 1 if you have the `munmap' function. */ - check_function_exists(munmap HAVE_MUNMAP) - - #/* mmap() is no good without munmap() */ - #if defined(HAVE_MMAP) && !defined(HAVE_MUNMAP) - # undef /**/ HAVE_MMAP - #endif - - #/* Define to 1 if you have the header file. */ - check_include_file(nan.h HAVE_NAN_H) - - #/* Define to 1 if you have the header file, and it defines `DIR'. */ - check_include_file(ndir.h HAVE_NDIR_H) - - #/* Define to 1 if you have the header file. */ - check_include_file(netdb.h HAVE_NETDB_H) - - #/* Define to 1 if you have the header file. */ - check_include_file(netinet/in.h HAVE_NETINET_IN_H) - - #/* Define to 1 if you have the header file. */ - check_include_file(poll.h HAVE_POLL_H) - - #/* Define to 1 if you have the `printf' function. */ - check_function_exists(printf HAVE_PRINTF) - - #/* Define if is there */ - #undef HAVE_PTHREAD_H - - #/* Define to 1 if you have the `putenv' function. */ - check_function_exists(putenv HAVE_PUTENV) - - #/* Define to 1 if you have the `rand' function. */ - check_function_exists(rand HAVE_RAND) - - #/* Define to 1 if you have the `rand_r' function. */ - check_function_exists(rand_r HAVE_RAND_R) - - #/* Define to 1 if you have the header file. */ - check_include_file(resolv.h HAVE_RESOLV_H) - - #/* Have shl_load based dso */ - #undef HAVE_SHLLOAD - - #/* Define to 1 if you have the `signal' function. */ - check_function_exists(signal HAVE_SIGNAL) - - #/* Define to 1 if you have the header file. */ - check_include_file(signal.h HAVE_SIGNAL_H) - - #/* Define to 1 if you have the `snprintf' function. */ - #check_function_exists(snprintf HAVE_SNPRINTF) - check_symbol_exists(snprintf stdio.h HAVE_SNPRINTF) - - #/* Define to 1 if you have the `sprintf' function. */ - check_function_exists(sprintf HAVE_SPRINTF) - - #/* Define to 1 if you have the `srand' function. */ - check_function_exists(srand HAVE_SRAND) - - #/* Define to 1 if you have the `sscanf' function. */ - check_function_exists(sscanf HAVE_SSCANF) - - #/* Define to 1 if you have the `stat' function. */ - check_function_exists(stat HAVE_STAT) - - #/* Define to 1 if you have the header file. */ - check_include_file(stdarg.h HAVE_STDARG_H) - - #/* Define to 1 if you have the header file. */ - check_include_file(stdint.h HAVE_STDINT_H) - - #/* Define to 1 if you have the header file. */ - check_include_file(stdlib.h HAVE_STDLIB_H) - - #/* Define to 1 if you have the `strdup' function. */ - check_function_exists(strdup HAVE_STRDUP) - - #/* Define to 1 if you have the `strerror' function. */ - check_function_exists(strerror HAVE_STRERROR) - - #/* Define to 1 if you have the `strftime' function. */ - check_function_exists(strftime HAVE_STRFTIME) - - #/* Define to 1 if you have the header file. */ - check_include_file(strings.h HAVE_STRINGS_H) - - #/* Define to 1 if you have the header file. */ - check_include_file(string.h HAVE_STRING_H) - - #/* Define to 1 if you have the `strndup' function. */ - check_function_exists(strndup HAVE_STRNDUP) - - #/* Define to 1 if you have the header file, and it defines `DIR'. - # */ - check_include_file(sys/dir.h HAVE_SYS_DIR_H) - - #/* Define to 1 if you have the header file. */ - check_include_file(sys/mman.h HAVE_SYS_MMAN_H) - - #/* Define to 1 if you have the header file, and it defines `DIR'. - # */ - check_include_file(sys/ndir.h HAVE_SYS_NDIR_H) - - #/* Define to 1 if you have the header file. */ - check_include_file(sys/select.h HAVE_SYS_SELECT_H) - - #/* Define to 1 if you have the header file. */ - check_include_file(sys/socket.h HAVE_SYS_SOCKET_H) - - #/* Define to 1 if you have the header file. */ - check_include_file(sys/stat.h HAVE_SYS_STAT_H) - - #/* Define to 1 if you have the header file. */ - check_include_file(sys/timeb.h HAVE_SYS_TIMEB_H) - - #/* Define to 1 if you have the header file. */ - check_include_file(sys/time.h HAVE_SYS_TIME_H) - - #/* Define to 1 if you have the header file. */ - check_include_file(sys/types.h HAVE_SYS_TYPES_H) - - #/* Define to 1 if you have the `time' function. */ - check_function_exists(time HAVE_TIME) - - #/* Define to 1 if you have the header file. */ - check_include_file(time.h HAVE_TIME_H) - - #/* Define to 1 if you have the header file. */ - check_include_file(unistd.h HAVE_UNISTD_H) - - #/* Whether va_copy() is available */ - check_symbol_exists(va_copy stdarg.h HAVE_VA_COPY) - - #/* Define to 1 if you have the `vfprintf' function. */ - check_function_exists(vfprintf HAVE_VFPRINTF) - - #/* Define to 1 if you have the `vsnprintf' function. */ - check_function_exists(vsnprintf HAVE_VSNPRINTF) - - #/* Define to 1 if you have the `vsprintf' function. */ - check_function_exists(vsprintf HAVE_VSPRINTF) - - #/* Define to 1 if you have the header file. */ - check_include_file(zlib.h HAVE_ZLIB_H) - - #/* Define to 1 if you have the `_stat' function. */ - check_function_exists(_stat HAVE__STAT) - - #/* Whether __va_copy() is available */ - check_symbol_exists(__va_copy stdarg.h HAVE___VA_COPY) - - #/* Define as const if the declaration of iconv() needs const. */ - #undef ICONV_CONST - set(ICONV_CONST const) - - #/* Define to the sub-directory where libtool stores uninstalled libraries. */ - #undef LT_OBJDIR - - #/* Name of package */ - #undef PACKAGE - - #/* Define to the address where bug reports for this package should be sent. */ - #undef PACKAGE_BUGREPORT - - #/* Define to the full name of this package. */ - #undef PACKAGE_NAME - - #/* Define to the full name and version of this package. */ - #undef PACKAGE_STRING - - #/* Define to the one symbol short name of this package. */ - #undef PACKAGE_TARNAME - - #/* Define to the home page for this package. */ - #undef PACKAGE_URL - - #/* Define to the version of this package. */ - #undef PACKAGE_VERSION - - #/* Type cast for the send() function 2nd arg */ - #undef SEND_ARG2_CAST - - #/* Define to 1 if you have the ANSI C header files. */ - #undef STDC_HEADERS - - #/* Support for IPv6 */ - #undef SUPPORT_IP6 - - #/* Define if va_list is an array type */ - check_c_source_compiles("#include \n int main() {va_list list1, list2; list1 = list2;}" NOT_VA_LIST_IS_ARRAY) - if(NOT NOT_VA_LIST_IS_ARRAY) - set(VA_LIST_IS_ARRAY 1) - endif() - - #/* Version number of package */ - #undef VERSION - - #/* Determine what socket length (socklen_t) data type is */ - #undef XML_SOCKLEN_T - - #/* Define for Solaris 2.5.1 so the uint32_t typedef from , - # , or is not used. If the typedef were allowed, the - #define below would cause a syntax error. */ - #undef _UINT32_T - - #/* Using the Win32 Socket implementation */ - #undef _WINSOCKAPI_ - - #/* ss_family is not defined here, use __ss_family instead */ - #undef ss_family - - #/* Define to the type of an unsigned integer type of width exactly 32 bits if - # such a type exists and the standard includes do not define it. */ - #undef uint32_t -endif() - -set(LIBXML_MAJOR_VERSION 2) -set(LIBXML_MINOR_VERSION 9) -set(LIBXML_MICRO_VERSION 3) -set(LIBXML_MICRO_VERSION_SUFFIX) -set(LIBXML_VERSION ${LIBXML_MAJOR_VERSION}.${LIBXML_MINOR_VERSION}.${LIBXML_MICRO_VERSION}${LIBXML_MICRO_VERSION_SUFFIX}) -math(EXPR LIBXML_VERSION_INFO "${LIBXML_MAJOR_VERSION} + ${LIBXML_MINOR_VERSION}") -set(LIBXML_VERSION_INFO ${LIBXML_VERSION_INFO}:${LIBXML_MICRO_VERSION}:${LIBXML_MINOR_VERSION}) -math(EXPR LIBXML_VERSION_NUMBER "${LIBXML_MAJOR_VERSION} * 10000 + ${LIBXML_MINOR_VERSION} * 100 + ${LIBXML_MICRO_VERSION}") -set(VERSION ${LIBXML_VERSION}) -set(LIBXML_VERSION_EXTRA) - -set(WITH_TRIO 0) -set(WITH_THREADS 0) -set(WITH_THREAD_ALLOC 0) -set(WITH_TREE 1) -set(WITH_OUTPUT 1) -set(WITH_PUSH 1) -set(WITH_READER 1) -set(WITH_PATTERN 0) -set(WITH_WRITER 0) -set(WITH_SAX1 0) -set(WITH_FTP 0) -set(WITH_HTTP 0) -set(WITH_VALID 0) -set(WITH_HTML 1) -set(WITH_LEGACY 0) -set(WITH_C14N 0) -set(WITH_CATALOG 0) -set(WITH_DOCB 0) -set(WITH_XPATH 0) -set(WITH_XPTR 0) -set(WITH_XINCLUDE 0) -set(WITH_ICONV 0) -set(WITH_ICU 0) -set(WITH_ISO8859X 1) -set(WITH_DEBUG 0) -set(WITH_MEM_DEBUG 0) -set(WITH_RUN_DEBUG 0) -set(WITH_REGEXPS 0) -set(WITH_SCHEMAS 0) -set(WITH_SCHEMATRON 0) -set(WITH_MODULES 0) -set(MODULE_EXTENSION 0) -set(WITH_ZLIB 1) -set(WITH_LZMA 0) - -if(NOT WIN32) - configure_file(config.h.cmake ${PROJECT_SOURCE_DIR}/config.h) -else() - file(COPY include/win32config.h DESTINATION ${PROJECT_SOURCE_DIR}) - file(RENAME win32/VC10/config.h config.h) +if (APPLE) + # For some reason libxml2 requires this flag or it will create an insane amout of log output on compile + list(APPEND libxml2_conf CFLAGS=-Wno-nullability-completeness) endif() - -configure_file(include/libxml/xmlversion.h.in ${PROJECT_SOURCE_DIR}/include/libxml/xmlversion.h) - -include_directories(${ZLIB_INCLUDE_DIRS} include) -file(GLOB SOURCES *.c) - -file(GLOB SOURCES_EXCLUDE test*.c runsuite.c runtest.c runxmlconf.c trio*.c xmlcatalog.c) -list(REMOVE_ITEM SOURCES ${SOURCES_EXCLUDE}) - -add_library(xml2 STATIC ${SOURCES}) -target_link_libraries(xml2 ${ZLIB_LIBRARIES}) - -if(NOT WIN32) - set_target_properties(xml2 PROPERTIES COMPILE_FLAGS "-fPIC") -else() - add_definitions(-DHAVE_ZLIB_H -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE) - set_target_properties(xml2 PROPERTIES COMPILE_FLAGS "/W1") -endif() - -install(TARGETS xml2 DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) -install(DIRECTORY include/libxml DESTINATION ${CMAKE_INSTALL_PREFIX}/include) +list(APPEND libxml2_conf CPPFLAGS=-I${CMAKE_INSTALL_PREFIX}/include) +list(APPEND libxml2_conf LDFLAGS=-L${CMAKE_INSTALL_PREFIX}/lib) + +include(ExternalProject) +externalproject_add(libxml2 + SOURCE_DIR ${CMAKE_SOURCE_DIR} + CONFIGURE_COMMAND /configure + --prefix=${CMAKE_INSTALL_PREFIX} + --without-python + --without-iconv + --without-http + --without-ftp + --without-catalog + --without-modules + --disable-shared + --with-pic + ${libxml2_conf}) + +externalproject_add_step(libxml2 + RunSedCommand + COMMAND echo "Removing executable from makefile.in using BBB sed ${CMAKE_CURRENT_SOURCE_DIR}" + COMMAND bash -c "sed -ie 's|runtest$(EXEEXT)||' ${CMAKE_CURRENT_SOURCE_DIR}/Makefile.in" + COMMAND bash -c "sed -ie 's|testrecurse$(EXEEXT)||' ${CMAKE_CURRENT_SOURCE_DIR}/Makefile.in" + DEPENDERS configure) + +install(CODE "Message(Done)") diff --git a/depends/common/libxml2/libxml2.sha256 b/depends/common/libxml2/libxml2.sha256 index f2e6c184..98a6d4b1 100644 --- a/depends/common/libxml2/libxml2.sha256 +++ b/depends/common/libxml2/libxml2.sha256 @@ -1 +1 @@ -ffb911191e509b966deb55de705387f14156e1a56b21824357cdf0053233633c +aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f diff --git a/depends/common/libxml2/libxml2.txt b/depends/common/libxml2/libxml2.txt index addb633b..61551cc0 100644 --- a/depends/common/libxml2/libxml2.txt +++ b/depends/common/libxml2/libxml2.txt @@ -1 +1 @@ -libxml2 http://xmlsoft.org/sources/libxml2-2.9.4.tar.gz +libxml2 http://xmlsoft.org/sources/libxml2-2.9.10.tar.gz diff --git a/depends/common/libxml2/win32_io.patch b/depends/common/libxml2/win32_io.patch deleted file mode 100644 index d5ccf810..00000000 --- a/depends/common/libxml2/win32_io.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- /xmlIO.c 2015-11-03 07:36:33.000000000 -0500 -+++ /xmlIO_new.c 2016-03-20 21:32:59.960019300 -0400 -@@ -2319,7 +2319,7 @@ - return; - - #if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__) -- xmlInitPlatformSpecificIo(); -+// xmlInitPlatformSpecificIo(); - #endif - - xmlRegisterInputCallbacks(xmlFileMatch, xmlFileOpen, -@@ -2357,7 +2357,7 @@ - return; - - #if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__) -- xmlInitPlatformSpecificIo(); -+// xmlInitPlatformSpecificIo(); - #endif - - xmlRegisterOutputCallbacks(xmlFileMatch, xmlFileOpenW, diff --git a/depends/windowsstore/libxml2/CMakeLists.txt b/depends/windows/libxml2/CMakeLists.txt similarity index 93% rename from depends/windowsstore/libxml2/CMakeLists.txt rename to depends/windows/libxml2/CMakeLists.txt index 8aa0a9d7..aa2d9ec2 100644 --- a/depends/windowsstore/libxml2/CMakeLists.txt +++ b/depends/windows/libxml2/CMakeLists.txt @@ -1,7 +1,6 @@ +cmake_minimum_required(VERSION 3.5) project(xml2) -cmake_minimum_required(VERSION 2.6) - enable_language(C) find_package(ZLIB REQUIRED) @@ -377,7 +376,7 @@ set(WITH_WRITER 0) set(WITH_SAX1 0) set(WITH_FTP 0) set(WITH_HTTP 0) -set(WITH_VALID 0) +set(WITH_VALID 1) set(WITH_HTML 1) set(WITH_LEGACY 0) set(WITH_C14N 0) @@ -392,7 +391,7 @@ set(WITH_ISO8859X 1) set(WITH_DEBUG 0) set(WITH_MEM_DEBUG 0) set(WITH_RUN_DEBUG 0) -set(WITH_REGEXPS 0) +set(WITH_REGEXPS 1) set(WITH_SCHEMAS 0) set(WITH_SCHEMATRON 0) set(WITH_MODULES 0) @@ -404,10 +403,35 @@ if(NOT WIN32) configure_file(config.h.cmake ${PROJECT_SOURCE_DIR}/config.h) else() file(COPY include/win32config.h DESTINATION ${PROJECT_SOURCE_DIR}) - file(RENAME win32/VC10/config.h config.h) + file(COPY win32/VC10/config.h DESTINATION ${PROJECT_SOURCE_DIR}) endif() +set(prefix ${CMAKE_INSTALL_PREFIX}) +set(exec_prefix "$") +set(exec_prefix "${exec_prefix}{") +set(exec_prefix "${exec_prefix}prefix") +set(exec_prefix "${exec_prefix}}") + +set(libdir "$") +set(libdir "${libdir}{") +set(libdir "${libdir}exec_prefix") +set(libdir "${libdir}}/lib") + +set(includedir "$") +set(includedir "${includedir}{") +set(includedir "${includedir}prefix") +set(includedir "${includedir}}/include") + +set(XML_INCLUDEDIR "-I$") +set(XML_INCLUDEDIR "${XML_INCLUDEDIR}{") +set(XML_INCLUDEDIR "${XML_INCLUDEDIR}includedir") +set(XML_INCLUDEDIR "${XML_INCLUDEDIR}}/libxml2") + +set(Z_LIBS "-lz") +set(ICONV_LIBS "-liconv") + configure_file(include/libxml/xmlversion.h.in ${PROJECT_SOURCE_DIR}/include/libxml/xmlversion.h) +configure_file(libxml-2.0.pc.in ${PROJECT_SOURCE_DIR}/libxml-2.0.pc) include_directories(${ZLIB_INCLUDE_DIRS} include) file(GLOB SOURCES *.c) @@ -421,9 +445,10 @@ target_link_libraries(xml2 ${ZLIB_LIBRARIES}) if(NOT WIN32) set_target_properties(xml2 PROPERTIES COMPILE_FLAGS "-fPIC") else() - add_definitions(-DHAVE_ZLIB_H -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_STDC_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS) + add_definitions(-DHAVE_ZLIB_H -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE) set_target_properties(xml2 PROPERTIES COMPILE_FLAGS "/W1") endif() install(TARGETS xml2 DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) -install(DIRECTORY include/libxml DESTINATION ${CMAKE_INSTALL_PREFIX}/include) +install(DIRECTORY include/libxml DESTINATION ${CMAKE_INSTALL_PREFIX}/include/libxml2/) +install(FILES libxml-2.0.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig) diff --git a/depends/windowsstore/libxml2/deps.txt b/depends/windows/libxml2/deps.txt similarity index 100% rename from depends/windowsstore/libxml2/deps.txt rename to depends/windows/libxml2/deps.txt diff --git a/depends/windows/libxml2/libxml2.sha256 b/depends/windows/libxml2/libxml2.sha256 new file mode 100644 index 00000000..98a6d4b1 --- /dev/null +++ b/depends/windows/libxml2/libxml2.sha256 @@ -0,0 +1 @@ +aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f diff --git a/depends/windows/libxml2/libxml2.txt b/depends/windows/libxml2/libxml2.txt new file mode 100644 index 00000000..61551cc0 --- /dev/null +++ b/depends/windows/libxml2/libxml2.txt @@ -0,0 +1 @@ +libxml2 http://xmlsoft.org/sources/libxml2-2.9.10.tar.gz diff --git a/depends/windowsstore/libxml2/01-win32_io.patch b/depends/windowsstore/libxml2/01-win32_io.patch deleted file mode 100644 index d5ccf810..00000000 --- a/depends/windowsstore/libxml2/01-win32_io.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- /xmlIO.c 2015-11-03 07:36:33.000000000 -0500 -+++ /xmlIO_new.c 2016-03-20 21:32:59.960019300 -0400 -@@ -2319,7 +2319,7 @@ - return; - - #if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__) -- xmlInitPlatformSpecificIo(); -+// xmlInitPlatformSpecificIo(); - #endif - - xmlRegisterInputCallbacks(xmlFileMatch, xmlFileOpen, -@@ -2357,7 +2357,7 @@ - return; - - #if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__) -- xmlInitPlatformSpecificIo(); -+// xmlInitPlatformSpecificIo(); - #endif - - xmlRegisterOutputCallbacks(xmlFileMatch, xmlFileOpenW, diff --git a/depends/windowsstore/libxml2/02-fix-uwp-api.patch b/depends/windowsstore/libxml2/02-fix-uwp-api.patch deleted file mode 100644 index 88496191..00000000 --- a/depends/windowsstore/libxml2/02-fix-uwp-api.patch +++ /dev/null @@ -1,156 +0,0 @@ -diff --git a/catalog.c b/catalog.c -index 6dfdfbb..a5655f0 100644 ---- a/catalog.c -+++ b/catalog.c -@@ -77,6 +77,9 @@ - #endif - - #if defined(_WIN32) && defined(_MSC_VER) -+#if defined(WINAPI_FAMILY) && WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP -+# define getenv(x) NULL -+#endif - #undef XML_XML_DEFAULT_CATALOG - static char XML_XML_DEFAULT_CATALOG[256] = "file:///etc/xml/catalog"; - #if defined(_WIN32_WCE) -@@ -3122,6 +3125,7 @@ xmlInitializeCatalog(void) { - if (catalogs == NULL) - #if defined(_WIN32) && defined(_MSC_VER) - { -+#if (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) - void* hmodule; - hmodule = GetModuleHandleA("libxml2.dll"); - if (hmodule == NULL) -@@ -3144,6 +3148,7 @@ xmlInitializeCatalog(void) { - } - } - } -+#endif - catalogs = XML_XML_DEFAULT_CATALOG; - } - #else -diff --git a/include/libxml/xmlversion.h b/include/libxml/xmlversion.h -index dd7d71c..e232c0a 100644 ---- a/include/libxml/xmlversion.h -+++ b/include/libxml/xmlversion.h -@@ -174,7 +174,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); - * - * Whether the FTP support is configured in - */ --#if 1 -+#if 0 - #define LIBXML_FTP_ENABLED - #endif - -@@ -183,7 +183,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); - * - * Whether the HTTP support is configured in - */ --#if 1 -+#if 0 - #define LIBXML_HTTP_ENABLED - #endif - -diff --git a/nanoftp.c b/nanoftp.c -index 2135ab9..2b2225d 100644 ---- a/nanoftp.c -+++ b/nanoftp.c -@@ -108,6 +108,10 @@ - #endif - #endif - -+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) -+# define getenv(x) NULL -+#endif -+ - #ifndef XML_SOCKLEN_T - #define XML_SOCKLEN_T unsigned int - #endif -diff --git a/nanohttp.c b/nanohttp.c -index e109ad7..2782b3d 100644 ---- a/nanohttp.c -+++ b/nanohttp.c -@@ -113,6 +113,10 @@ - #define XML_SOCKLEN_T unsigned int - #endif - -+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) -+# define getenv(x) NULL -+#endif -+ - #ifdef STANDALONE - #define DEBUG_HTTP - #define xmlStrncasecmp(a, b, n) strncasecmp((char *)a, (char *)b, n) -diff --git a/xmlIO.c b/xmlIO.c -index 1a79c09..9d8bd15 100644 ---- a/xmlIO.c -+++ b/xmlIO.c -@@ -99,6 +99,10 @@ - #include "buf.h" - #include "enc.h" - -+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) -+#include -+#endif -+ - /* #define VERBOSE_FAILURE */ - /* #define DEBUG_EXTERNAL_ENTITIES */ - /* #define DEBUG_INPUT */ -@@ -733,7 +737,11 @@ xmlInitPlatformSpecificIo(void) - - osvi.dwOSVersionInfoSize = sizeof(osvi); - -+#if (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) - if(GetVersionEx(&osvi) && (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)) { -+#else -+ if (1) { -+#endif - xmlWrapStat = xmlWrapStatUtf8; - xmlWrapOpen = xmlWrapOpenUtf8; - #ifdef HAVE_ZLIB_H -@@ -3841,7 +3849,7 @@ xmlParserGetDirectory(const char *filename) { - else *cur = 0; - ret = xmlMemStrdup(dir); - } else { -- if (getcwd(dir, 1024) != NULL) { -+ if (_getcwd(dir, 1024) != NULL) { - dir[1023] = 0; - ret = xmlMemStrdup(dir); - } -diff --git a/xmlmemory.c b/xmlmemory.c -index f08c8c3..8b9c35e 100644 ---- a/xmlmemory.c -+++ b/xmlmemory.c -@@ -56,6 +56,10 @@ static xmlMutexPtr xmlMemMutex = NULL; - - void xmlMallocBreakpoint(void); - -+#if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_APP -+# define getenv(x) NULL -+#endif -+ - /************************************************************************ - * * - * Macros, variables and associated types * -diff --git a/xmlmodule.c b/xmlmodule.c -index 50ed666..be21bcc 100644 ---- a/xmlmodule.c -+++ b/xmlmodule.c -@@ -308,7 +308,14 @@ xmlModulePlatformSymbol(void *handle, const char *name, void **symbol) - static void * - xmlModulePlatformOpen(const char *name) - { -- return LoadLibraryA(name); -+#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) -+ return LoadLibraryA(name); -+#else -+ wchar_t* nameW = (wchar_t*)malloc(strlen(name)+1); -+ mbstowcs(nameW, name, strlen(name)); -+ return LoadPackagedLibrary(nameW, 0); -+ free(nameW); -+#endif - } - - /* --- -2.13.2.windows.1 - diff --git a/depends/windowsstore/libxml2/libxml2.sha256 b/depends/windowsstore/libxml2/libxml2.sha256 deleted file mode 100644 index f2e6c184..00000000 --- a/depends/windowsstore/libxml2/libxml2.sha256 +++ /dev/null @@ -1 +0,0 @@ -ffb911191e509b966deb55de705387f14156e1a56b21824357cdf0053233633c diff --git a/depends/windowsstore/libxml2/libxml2.txt b/depends/windowsstore/libxml2/libxml2.txt deleted file mode 100644 index addb633b..00000000 --- a/depends/windowsstore/libxml2/libxml2.txt +++ /dev/null @@ -1 +0,0 @@ -libxml2 http://xmlsoft.org/sources/libxml2-2.9.4.tar.gz From 654a3bb3e27cadbc560e409374e61352fd294d48 Mon Sep 17 00:00:00 2001 From: Alwin Esch Date: Wed, 5 Jan 2022 17:52:06 +0000 Subject: [PATCH 2/2] increase version to 20.2.1 --- pvr.stalker/addon.xml.in | 2 +- pvr.stalker/changelog.txt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pvr.stalker/addon.xml.in b/pvr.stalker/addon.xml.in index a2d7f21e..064b94b2 100644 --- a/pvr.stalker/addon.xml.in +++ b/pvr.stalker/addon.xml.in @@ -1,7 +1,7 @@ @ADDON_DEPENDS@ diff --git a/pvr.stalker/changelog.txt b/pvr.stalker/changelog.txt index 42636e03..320c0672 100644 --- a/pvr.stalker/changelog.txt +++ b/pvr.stalker/changelog.txt @@ -1,3 +1,7 @@ +v20.2.1 +- Updated depends libxml2 to version 2.9.10 + - To fix some Windows UWP builds + v20.2.0 - Translation updates by Weblate - Kodi main API update to version 2.0.0