diff --git a/CMakeLists.txt b/CMakeLists.txt index 5cb9481c..2baf855e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,8 +13,9 @@ include_directories( ${LIBXML2_INCLUDE_DIR} ${JSONCPP_INCLUDE_DIRS}) -if(WIN32) +if(MSVC) add_compile_options(/wd4996) + add_compile_definitions(LIBXML_STATIC) endif() add_subdirectory(lib/libstalkerclient) diff --git a/depends/common/libxml2/0001-check-about-readline-lib-also-presence-of-header.patch b/depends/common/libxml2/0001-check-about-readline-lib-also-presence-of-header.patch new file mode 100644 index 00000000..1edeba2f --- /dev/null +++ b/depends/common/libxml2/0001-check-about-readline-lib-also-presence-of-header.patch @@ -0,0 +1,14 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -151,7 +151,10 @@ + check_include_files(inttypes.h HAVE_INTTYPES_H) + check_function_exists(isascii HAVE_ISASCII) + check_library_exists(history append_history "" HAVE_LIBHISTORY) +- check_library_exists(readline readline "" HAVE_LIBREADLINE) ++ check_library_exists(readline readline "" HAVE_LIBREADLINE_LIB) ++ if (HAVE_LIBREADLINE_LIB) ++ check_include_files(readline/readline.h HAVE_LIBREADLINE) ++ endif() + check_function_exists(mmap HAVE_MMAP) + check_function_exists(munmap HAVE_MUNMAP) + check_include_files(netdb.h HAVE_NETDB_H) diff --git a/depends/common/libxml2/0002-disable-docs.patch b/depends/common/libxml2/0002-disable-docs.patch new file mode 100644 index 00000000..046984c9 --- /dev/null +++ b/depends/common/libxml2/0002-disable-docs.patch @@ -0,0 +1,19 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -574,16 +574,6 @@ + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libxml2.py DESTINATION ${LIBXML2_PYTHON_INSTALL_DIR} COMPONENT runtime) + endif() + +-install(FILES doc/xml2-config.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 COMPONENT documentation) +-install(FILES doc/xmlcatalog.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 COMPONENT documentation) +-install(FILES doc/xmllint.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 COMPONENT documentation) +-install(DIRECTORY doc/ DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT documentation +- PATTERN "Makefile.*" EXCLUDE +- PATTERN "*.1" EXCLUDE +- PATTERN "*.py" EXCLUDE +- PATTERN "*.res" EXCLUDE +- PATTERN "*.xml" EXCLUDE +- PATTERN "*.xsl" EXCLUDE) + + configure_package_config_file( + libxml2-config.cmake.cmake.in libxml2-config.cmake diff --git a/depends/common/libxml2/0003-fix_cmakelist.patch b/depends/common/libxml2/0003-fix_cmakelist.patch new file mode 100644 index 00000000..f0ca4418 --- /dev/null +++ b/depends/common/libxml2/0003-fix_cmakelist.patch @@ -0,0 +1,106 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -396,15 +396,15 @@ + if(LIBXML2_WITH_ICU) + target_link_libraries(LibXml2 PRIVATE ICU::data ICU::i18n ICU::uc) + if(WIN32) +- set(ICU_LIBS "-licudt -licuin -licuuc") ++ set(ICU_LIBS "icu-i18n") + else() +- set(ICU_LIBS "-licudata -licui18n -licuuc") ++ set(ICU_LIBS "icu-i18n") + endif() + endif() + + if(LIBXML2_WITH_LZMA) + target_link_libraries(LibXml2 PRIVATE LibLZMA::LibLZMA) +- set(LZMA_LIBS "-llzma") ++ set(LZMA_LIBS "liblzma") + endif() + + if(LIBXML2_WITH_THREADS) +@@ -414,7 +414,7 @@ + + if(LIBXML2_WITH_ZLIB) + target_link_libraries(LibXml2 PRIVATE ZLIB::ZLIB) +- set(Z_LIBS "-lz") ++ set(Z_LIBS "zlib") + endif() + + set_target_properties( +@@ -428,23 +428,11 @@ + SOVERSION ${LIBXML_MAJOR_VERSION} + ) + ++set(XML_LIB_NAME xml2) + if(MSVC) +- if(BUILD_SHARED_LIBS) +- set_target_properties( +- LibXml2 +- PROPERTIES +- DEBUG_POSTFIX d +- ) +- else() +- set_target_properties( +- LibXml2 +- PROPERTIES +- DEBUG_POSTFIX sd +- MINSIZEREL_POSTFIX s +- RELEASE_POSTFIX s +- RELWITHDEBINFO_POSTFIX s +- ) +- endif() ++ add_definitions(-D_CRT_SECURE_NO_DEPRECATE) ++ add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) ++ set(XML_LIB_NAME libxml2) + endif() + + install(FILES ${LIBXML2_HDRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libxml2/libxml COMPONENT development) +@@ -577,30 +565,30 @@ + + configure_package_config_file( + libxml2-config.cmake.cmake.in libxml2-config.cmake +- INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2-${PROJECT_VERSION} ++ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2 + ) + + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/libxml2-config.cmake +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2-${PROJECT_VERSION} ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2 + COMPONENT development + ) + + write_basic_package_version_file( + ${CMAKE_CURRENT_BINARY_DIR}/libxml2-config-version.cmake + VERSION ${PROJECT_VERSION} +- COMPATIBILITY ExactVersion ++ COMPATIBILITY SameMinorVersion + ) + + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/libxml2-config-version.cmake +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2-${PROJECT_VERSION} ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2 + COMPONENT development + ) + + install( + EXPORT LibXml2 +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2-${PROJECT_VERSION} ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2 + NAMESPACE LibXml2:: + FILE libxml2-export.cmake + COMPONENT development +--- a/libxml-2.0.pc.in ++++ b/libxml-2.0.pc.in +@@ -8,6 +8,7 @@ + Version: @VERSION@ + Description: libXML library version2. + Requires: +-Libs: -L${libdir} @XML_LIBS@ +-Libs.private: @XML_PRIVATE_LIBS@ @LIBS@ ++Requires.private: @ICU_LIBS@ @Z_LIBS@ @LZMA_LIBS@ ++Libs: -L${libdir} -l@XML_LIB_NAME@ ++Libs.private: @THREAD_LIBS@ @ICONV_LIBS@ @LIBM@ @WINSOCK_LIBS@ @LIBS@ + Cflags: @XML_INCLUDEDIR@ @XML_CFLAGS@ diff --git a/depends/common/libxml2/CMakeLists.txt b/depends/common/libxml2/CMakeLists.txt deleted file mode 100644 index 7bd1b96c..00000000 --- a/depends/common/libxml2/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ -cmake_minimum_required(VERSION 3.5) - -project(libxml2 VERSION 2.9.10) - -list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}) - -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() -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/darwin_embedded-deps.txt b/depends/common/libxml2/darwin_embedded-deps.txt new file mode 100644 index 00000000..225c7a07 --- /dev/null +++ b/depends/common/libxml2/darwin_embedded-deps.txt @@ -0,0 +1,2 @@ +xz-utils +zlib diff --git a/depends/common/libxml2/flags.txt b/depends/common/libxml2/flags.txt new file mode 100644 index 00000000..47daa983 --- /dev/null +++ b/depends/common/libxml2/flags.txt @@ -0,0 +1 @@ +-DLIBXML2_WITH_PYTHON=OFF -DLIBXML2_WITH_ICONV=OFF -DLIBXML2_WITH_HTTP=OFF -DLIBXML2_WITH_FTP=OFF -DLIBXML2_WITH_CATALOG=OFF -DLIBXML2_WITH_MODULES=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DLIBXML2_WITH_PYTHON=OFF -DLIBXML2_WITH_TESTS=OFF -DLIBXML2_WITH_PROGRAMS=OFF $<$:-DLIBXML2_WITH_LZMA=OFF> diff --git a/depends/common/libxml2/libxml2.sha256 b/depends/common/libxml2/libxml2.sha256 index 98a6d4b1..45510f32 100644 --- a/depends/common/libxml2/libxml2.sha256 +++ b/depends/common/libxml2/libxml2.sha256 @@ -1 +1 @@ -aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f +2fb6259e907c916c2c07bde24a13f460f2f07e43bc6470d658dfdcfa08b1ace5 diff --git a/depends/common/libxml2/libxml2.txt b/depends/common/libxml2/libxml2.txt index 61551cc0..fda29cd0 100644 --- a/depends/common/libxml2/libxml2.txt +++ b/depends/common/libxml2/libxml2.txt @@ -1 +1 @@ -libxml2 http://xmlsoft.org/sources/libxml2-2.9.10.tar.gz +libxml2 https://github.com/GNOME/libxml2/archive/refs/tags/v2.11.7.tar.gz diff --git a/depends/windows/libxml2/CMakeLists.txt b/depends/windows/libxml2/CMakeLists.txt deleted file mode 100644 index 46a8beb7..00000000 --- a/depends/windows/libxml2/CMakeLists.txt +++ /dev/null @@ -1,97 +0,0 @@ -cmake_minimum_required(VERSION 3.5) - -project(xml2 VERSION 2.9.10 LANGUAGES C) - -find_package(ZLIB REQUIRED) -list(APPEND CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS}) - -set(LIBXML_MAJOR_VERSION 2) -set(LIBXML_MINOR_VERSION 9) -set(LIBXML_MICRO_VERSION 10) -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 1) -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 1) -set(WITH_SCHEMAS 0) -set(WITH_SCHEMATRON 0) -set(WITH_MODULES 0) -set(MODULE_EXTENSION 0) -set(WITH_ZLIB 1) -set(WITH_LZMA 0) - -file(COPY include/win32config.h DESTINATION ${PROJECT_SOURCE_DIR}) -file(COPY win32/VC10/config.h DESTINATION ${PROJECT_SOURCE_DIR}) - -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") - -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) - -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}) - -add_definitions(-DHAVE_ZLIB_H -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE) -set_target_properties(xml2 PROPERTIES COMPILE_FLAGS "/W1") - -install(TARGETS xml2 DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) -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/windows/libxml2/deps.txt b/depends/windows/libxml2/deps.txt deleted file mode 100644 index f22003e8..00000000 --- a/depends/windows/libxml2/deps.txt +++ /dev/null @@ -1 +0,0 @@ -zlib diff --git a/depends/windows/libxml2/libxml2.sha256 b/depends/windows/libxml2/libxml2.sha256 deleted file mode 100644 index 98a6d4b1..00000000 --- a/depends/windows/libxml2/libxml2.sha256 +++ /dev/null @@ -1 +0,0 @@ -aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f diff --git a/depends/windows/libxml2/libxml2.txt b/depends/windows/libxml2/libxml2.txt deleted file mode 100644 index 61551cc0..00000000 --- a/depends/windows/libxml2/libxml2.txt +++ /dev/null @@ -1 +0,0 @@ -libxml2 http://xmlsoft.org/sources/libxml2-2.9.10.tar.gz diff --git a/pvr.stalker/addon.xml.in b/pvr.stalker/addon.xml.in index e601a100..8b06262c 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 f7696a7a..3943915a 100644 --- a/pvr.stalker/changelog.txt +++ b/pvr.stalker/changelog.txt @@ -1,3 +1,6 @@ +v21.1.1 +- Update libxml2 v2.11.7, which should also fix msix installer + v21.1.0 - Move to new settings format and support PVR multi-instance - Note that only the first portal will be migrated in settings, the other portal will need to be set up manually