diff options
| author | Kai Pastor <dg0yt@darc.de> | 2021-04-23 20:06:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-23 11:06:50 -0700 |
| commit | 30274be0ba97eb442dfef38911b3878e98d913f7 (patch) | |
| tree | c50f07d5a0f181264bf55dbdd5464109b756b0e2 | |
| parent | 22273d82ff2576f0e1be37e57cfff36f09ac3af1 (diff) | |
| download | vcpkg-30274be0ba97eb442dfef38911b3878e98d913f7.tar.gz vcpkg-30274be0ba97eb442dfef38911b3878e98d913f7.zip | |
[libxml2] Pass version to rc via configured file (#17389)
* [libxml2] Pass version to rc via configured file
This change fixes quotation issues with the dotted version string on
mingw/Windows.
* x-add-version
| -rw-r--r-- | ports/libxml2/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | ports/libxml2/RemoveIncludeFromWindowsRcFile.patch | 10 | ||||
| -rw-r--r-- | ports/libxml2/portfile.cmake | 5 | ||||
| -rw-r--r-- | ports/libxml2/rcVersion.h.in | 4 | ||||
| -rw-r--r-- | ports/libxml2/vcpkg.json | 2 | ||||
| -rw-r--r-- | versions/baseline.json | 2 | ||||
| -rw-r--r-- | versions/l-/libxml2.json | 5 |
7 files changed, 15 insertions, 17 deletions
diff --git a/ports/libxml2/CMakeLists.txt b/ports/libxml2/CMakeLists.txt index 2c11f0db4..da1fcd7fc 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) - set_source_files_properties(win32/libxml2.rc PROPERTIES COMPILE_FLAGS "-DLIBXML_MAJOR_VERSION=${LIBXML_MAJOR_VERSION} -DLIBXML_MINOR_VERSION=${LIBXML_MINOR_VERSION} -DLIBXML_MICRO_VERSION=${LIBXML_MICRO_VERSION} -DLIBXML_DOTTED_VERSION=\\\"${VERSION}\\\"") + configure_file(rcVersion.h.in include/rcVersion.h @ONLY) endif() target_compile_definitions(libxml2 PRIVATE @@ -173,4 +173,4 @@ set(includedir ${prefix}/${CMAKE_INSTALL_INCLUDEDIR}) set(XML_INCLUDEDIR "-I\"\${includedir}\"") configure_file(libxml-2.0.pc.in libxml-2.0.pc @ONLY) -install(FILES ${CMAKE_BINARY_DIR}/libxml-2.0.pc DESTINATION lib/pkgconfig)
\ No newline at end of file +install(FILES ${CMAKE_BINARY_DIR}/libxml-2.0.pc DESTINATION lib/pkgconfig) diff --git a/ports/libxml2/RemoveIncludeFromWindowsRcFile.patch b/ports/libxml2/RemoveIncludeFromWindowsRcFile.patch deleted file mode 100644 index ce5a3fcbe..000000000 --- a/ports/libxml2/RemoveIncludeFromWindowsRcFile.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff --git a/win32/libxml2.rc b/win32/libxml2.rc -index c774a5ee..08e2da1e 100644 ---- a/win32/libxml2.rc -+++ b/win32/libxml2.rc -@@ -1,5 +1,4 @@ - #include <winver.h> --#include "rcVersion.h" - - VS_VERSION_INFO VERSIONINFO - FILEVERSION LIBXML_MAJOR_VERSION,LIBXML_MINOR_VERSION,LIBXML_MICRO_VERSION,0 diff --git a/ports/libxml2/portfile.cmake b/ports/libxml2/portfile.cmake index a5708fe02..dc1d6d174 100644 --- a/ports/libxml2/portfile.cmake +++ b/ports/libxml2/portfile.cmake @@ -4,11 +4,10 @@ vcpkg_from_github( REF v2.9.10 SHA512 de8d7c6c90f9d0441747deec320c4887faee1fd8aff9289115caf7ce51ab73b6e2c4628ae7eaad4a33a64561d23a92fd5e8a5afa7fa74183bdcd9a7b06bc67f1 HEAD_REF master - PATCHES - RemoveIncludeFromWindowsRcFile.patch ) 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.") @@ -45,4 +44,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") endif() file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -file(INSTALL ${SOURCE_PATH}/Copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
\ No newline at end of file +file(INSTALL ${SOURCE_PATH}/Copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libxml2/rcVersion.h.in b/ports/libxml2/rcVersion.h.in new file mode 100644 index 000000000..0ef94b97e --- /dev/null +++ b/ports/libxml2/rcVersion.h.in @@ -0,0 +1,4 @@ +#define LIBXML_MAJOR_VERSION @LIBXML_MAJOR_VERSION@
+#define LIBXML_MINOR_VERSION @LIBXML_MINOR_VERSION@
+#define LIBXML_MICRO_VERSION @LIBXML_MICRO_VERSION@
+#define LIBXML_DOTTED_VERSION "@VERSION@"
diff --git a/ports/libxml2/vcpkg.json b/ports/libxml2/vcpkg.json index ac7957af2..c50456d60 100644 --- a/ports/libxml2/vcpkg.json +++ b/ports/libxml2/vcpkg.json @@ -1,7 +1,7 @@ { "name": "libxml2", "version-semver": "2.9.10", - "port-version": 5, + "port-version": 6, "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 c00c00c8c..740c55427 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3634,7 +3634,7 @@ }, "libxml2": { "baseline": "2.9.10", - "port-version": 5 + "port-version": 6 }, "libxmlmm": { "baseline": "0.6.0", diff --git a/versions/l-/libxml2.json b/versions/l-/libxml2.json index b30af6564..16c3ee61f 100644 --- a/versions/l-/libxml2.json +++ b/versions/l-/libxml2.json @@ -1,6 +1,11 @@ { "versions": [ { + "git-tree": "306378bea94b3a4b3c5992510b992b3690b87f52", + "version-semver": "2.9.10", + "port-version": 6 + }, + { "git-tree": "2908a3c4c0454f12d4e14aa954952cb2824bf508", "version-semver": "2.9.10", "port-version": 5 |
