From 9108ff785d8e8042a5dd9b3cdc80605c5e73f347 Mon Sep 17 00:00:00 2001 From: hmelder Date: Tue, 18 Jun 2024 20:18:17 -0700 Subject: [PATCH] libxml2: use icu.lib on windows --- patches/libxml2-fix-library-prefix.patch | 12 ----- patches/libxml2-windows-icu.patch | 62 ++++++++++++++---------- 2 files changed, 36 insertions(+), 38 deletions(-) delete mode 100644 patches/libxml2-fix-library-prefix.patch diff --git a/patches/libxml2-fix-library-prefix.patch b/patches/libxml2-fix-library-prefix.patch deleted file mode 100644 index 2a3e30a..0000000 --- a/patches/libxml2-fix-library-prefix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 723e2344..a73c4453 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -433,7 +433,6 @@ set_target_properties( - IMPORT_PREFIX lib - OUTPUT_NAME xml2 - POSITION_INDEPENDENT_CODE ON -- PREFIX lib - VERSION ${PROJECT_VERSION} - SOVERSION ${LIBXML_MAJOR_VERSION} - ) diff --git a/patches/libxml2-windows-icu.patch b/patches/libxml2-windows-icu.patch index 07abb3b..d517718 100644 --- a/patches/libxml2-windows-icu.patch +++ b/patches/libxml2-windows-icu.patch @@ -1,5 +1,38 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 723e2344..c513872e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -102,7 +102,7 @@ if(LIBXML2_WITH_ICONV) + endif() + + if(LIBXML2_WITH_ICU) +- find_package(ICU REQUIRED COMPONENTS data i18n uc) ++ find_package(ICU REQUIRED COMPONENTS i18n uc) + endif() + + if(LIBXML2_WITH_LZMA) +@@ -368,9 +368,9 @@ if(LIBXML2_WITH_ICONV) + endif() + + if(LIBXML2_WITH_ICU) +- target_link_libraries(LibXml2 PRIVATE ICU::data ICU::i18n ICU::uc) ++ target_link_libraries(LibXml2 PRIVATE ICU::i18n ICU::uc) + if(WIN32) +- set(ICU_LDFLAGS "-licudt -licuin -licuuc") ++ set(ICU_LDFLAGS "-licu") + else() + set(ICU_LDFLAGS "-licudata -licui18n -licuuc") + endif() +@@ -433,7 +433,6 @@ set_target_properties( + IMPORT_PREFIX lib + OUTPUT_NAME xml2 + POSITION_INDEPENDENT_CODE ON +- PREFIX lib + VERSION ${PROJECT_VERSION} + SOVERSION ${LIBXML_MAJOR_VERSION} + ) diff --git a/encoding.c b/encoding.c -index 52bc15ac..99232887 100644 +index 04c24e42..74305989 100644 --- a/encoding.c +++ b/encoding.c @@ -45,7 +45,7 @@ @@ -12,10 +45,10 @@ index 52bc15ac..99232887 100644 #define ICU_PIVOT_BUF_SIZE 1024 typedef struct _uconv_t uconv_t; diff --git a/win32/Makefile.msvc b/win32/Makefile.msvc -index 7cc25b84..107c180b 100644 +index ce877a5e..ad9b2197 100644 --- a/win32/Makefile.msvc +++ b/win32/Makefile.msvc -@@ -71,7 +71,7 @@ LIBS = $(LIBS) iconv.lib +@@ -64,7 +64,7 @@ LIBS = $(LIBS) iconv.lib !if "$(STATIC)" == "1" LIBS = $(LIBS) advapi32.lib sicuuc.lib sicuin.lib sicudt.lib !else @@ -24,26 +57,3 @@ index 7cc25b84..107c180b 100644 !endif !endif !if "$(WITH_ZLIB)" == "1" -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 27ddacdc..96bf5e0c 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -99,7 +99,7 @@ if(LIBXML2_WITH_ICONV) - endif() - - if(LIBXML2_WITH_ICU) -- find_package(ICU REQUIRED COMPONENTS data i18n uc) -+ find_package(ICU REQUIRED COMPONENTS i18n uc) - endif() - - if(LIBXML2_WITH_LZMA) -@@ -363,7 +363,7 @@ if(LIBXML2_WITH_ICONV) - endif() - - if(LIBXML2_WITH_ICU) -- target_link_libraries(LibXml2 PRIVATE ICU::data ICU::i18n ICU::uc) -+ target_link_libraries(LibXml2 PRIVATE ICU::i18n ICU::uc) - if(WIN32) - set(ICU_LDFLAGS "-licudt -licuin -licuuc") - else() - \ No newline at end of file