Skip to content

Commit

Permalink
Merge pull request #226 from phunkyfish/update-libxml
Browse files Browse the repository at this point in the history
Update libxml2 v2.11.7
  • Loading branch information
phunkyfish authored Jul 15, 2024
2 parents f98b760 + 690b526 commit b6badfa
Show file tree
Hide file tree
Showing 15 changed files with 150 additions and 140 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
19 changes: 19 additions & 0 deletions depends/common/libxml2/0002-disable-docs.patch
Original file line number Diff line number Diff line change
@@ -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
106 changes: 106 additions & 0 deletions depends/common/libxml2/0003-fix_cmakelist.patch
Original file line number Diff line number Diff line change
@@ -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@
36 changes: 0 additions & 36 deletions depends/common/libxml2/CMakeLists.txt

This file was deleted.

2 changes: 2 additions & 0 deletions depends/common/libxml2/darwin_embedded-deps.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
xz-utils
zlib
1 change: 1 addition & 0 deletions depends/common/libxml2/flags.txt
Original file line number Diff line number Diff line change
@@ -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 $<$<BOOL:${WINDOWS}>:-DLIBXML2_WITH_LZMA=OFF>
2 changes: 1 addition & 1 deletion depends/common/libxml2/libxml2.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f
2fb6259e907c916c2c07bde24a13f460f2f07e43bc6470d658dfdcfa08b1ace5
2 changes: 1 addition & 1 deletion depends/common/libxml2/libxml2.txt
Original file line number Diff line number Diff line change
@@ -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
97 changes: 0 additions & 97 deletions depends/windows/libxml2/CMakeLists.txt

This file was deleted.

1 change: 0 additions & 1 deletion depends/windows/libxml2/deps.txt

This file was deleted.

1 change: 0 additions & 1 deletion depends/windows/libxml2/libxml2.sha256

This file was deleted.

1 change: 0 additions & 1 deletion depends/windows/libxml2/libxml2.txt

This file was deleted.

2 changes: 1 addition & 1 deletion pvr.stalker/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.stalker"
version="21.1.0"
version="21.1.1"
name="Stalker Client"
provider-name="Jamal Edey">
<requires>@ADDON_DEPENDS@</requires>
Expand Down
3 changes: 3 additions & 0 deletions pvr.stalker/changelog.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit b6badfa

Please sign in to comment.