aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Pastor <dg0yt@darc.de>2021-05-19 08:03:54 +0200
committerGitHub <noreply@github.com>2021-05-18 23:03:54 -0700
commit5554e3f268e295392a68b60290ec12e924f08fa9 (patch)
treedb815656e53011657f9348acf22a99df3a5681f7
parent5e7278a224f26c598a34cc57695cc81eb1b726b3 (diff)
downloadvcpkg-5554e3f268e295392a68b60290ec12e924f08fa9.tar.gz
vcpkg-5554e3f268e295392a68b60290ec12e924f08fa9.zip
[libxml2] Improve pc file (#17747)
* Use rcVersion.h.in from PORT_DIR directly * Inject static linking deps into pc file * x-add-version * Insert requires pc modules directly * x-add-version
-rw-r--r--ports/libxml2/CMakeLists.txt9
-rw-r--r--ports/libxml2/portfile.cmake5
-rw-r--r--ports/libxml2/vcpkg.json2
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/l-/libxml2.json5
5 files changed, 19 insertions, 4 deletions
diff --git a/ports/libxml2/CMakeLists.txt b/ports/libxml2/CMakeLists.txt
index da1fcd7fc..372111771 100644
--- a/ports/libxml2/CMakeLists.txt
+++ b/ports/libxml2/CMakeLists.txt
@@ -138,7 +138,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsSt
_WINSOCK_DEPRECATED_NO_WARNINGS
)
target_sources(libxml2 PRIVATE win32/libxml2.rc)
- configure_file(rcVersion.h.in include/rcVersion.h @ONLY)
+ configure_file("${PORT_DIR}/rcVersion.h.in" include/rcVersion.h @ONLY)
endif()
target_compile_definitions(libxml2 PRIVATE
@@ -166,6 +166,13 @@ install(TARGETS libxml2
)
# pkgconfig
+if(NOT Iconv_IS_BUILT_IN)
+ set(ICONV_LIBS "-liconv")
+endif()
+if(UNIX)
+ set(M_LIBS "-lm")
+ set(THREAD_LIBS "-pthread")
+endif()
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix "\${prefix}")
set(libdir ${prefix}/${CMAKE_INSTALL_LIBDIR})
diff --git a/ports/libxml2/portfile.cmake b/ports/libxml2/portfile.cmake
index dc1d6d174..fdd4ac0e9 100644
--- a/ports/libxml2/portfile.cmake
+++ b/ports/libxml2/portfile.cmake
@@ -7,7 +7,6 @@ vcpkg_from_github(
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
-file(COPY ${CMAKE_CURRENT_LIST_DIR}/rcVersion.h.in DESTINATION ${SOURCE_PATH})
if (VCPKG_TARGET_IS_UWP)
message(WARNING "Feature network couldn't be enabled on UWP, disable http and ftp automatically.")
@@ -35,6 +34,10 @@ if(VCPKG_TARGET_IS_WINDOWS)
endif()
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libxml-2.0.pc" "-lxml2" "-llibxml2")
endif ()
+if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libxml-2.0.pc" "\nRequires:\n" "\nRequires.private: liblzma zlib\n")
+endif()
+vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libxml-2.0.pc" "\nRequires:\n" "\nRequires.private: liblzma zlib\n")
vcpkg_fixup_pkgconfig()
vcpkg_copy_pdbs()
diff --git a/ports/libxml2/vcpkg.json b/ports/libxml2/vcpkg.json
index c50456d60..617e3a4a5 100644
--- a/ports/libxml2/vcpkg.json
+++ b/ports/libxml2/vcpkg.json
@@ -1,7 +1,7 @@
{
"name": "libxml2",
"version-semver": "2.9.10",
- "port-version": 6,
+ "port-version": 7,
"description": "Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform).",
"homepage": "https://xmlsoft.org/",
"dependencies": [
diff --git a/versions/baseline.json b/versions/baseline.json
index 5342dd1b9..83da3e997 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -3666,7 +3666,7 @@
},
"libxml2": {
"baseline": "2.9.10",
- "port-version": 6
+ "port-version": 7
},
"libxmlmm": {
"baseline": "0.6.0",
diff --git a/versions/l-/libxml2.json b/versions/l-/libxml2.json
index 16c3ee61f..3675ab518 100644
--- a/versions/l-/libxml2.json
+++ b/versions/l-/libxml2.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "f86ba7081b940af77e935875fbdf9cbf69446b9f",
+ "version-semver": "2.9.10",
+ "port-version": 7
+ },
+ {
"git-tree": "306378bea94b3a4b3c5992510b992b3690b87f52",
"version-semver": "2.9.10",
"port-version": 6