aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrusader-mike <crusader.mike@gmail.com>2019-08-06 12:31:03 -0500
committerCurtis J Bezault <curtbezault@gmail.com>2019-08-06 13:31:03 -0400
commit26a7e9ad34c6116a398da3e1c834018924393520 (patch)
tree58d5f9e843af7926c33d4ffe1ad65c3b763a0d5b
parent5c0c5adc6463830ed7847d3e0ce9912504848a3a (diff)
downloadvcpkg-26a7e9ad34c6116a398da3e1c834018924393520.tar.gz
vcpkg-26a7e9ad34c6116a398da3e1c834018924393520.zip
[xercec-c] no symlinks in static build (#7490) (#7500)
-rw-r--r--ports/xerces-c/no-symlinks-in-static-build.patch31
-rw-r--r--ports/xerces-c/portfile.cmake1
2 files changed, 32 insertions, 0 deletions
diff --git a/ports/xerces-c/no-symlinks-in-static-build.patch b/ports/xerces-c/no-symlinks-in-static-build.patch
new file mode 100644
index 000000000..34bd732d3
--- /dev/null
+++ b/ports/xerces-c/no-symlinks-in-static-build.patch
@@ -0,0 +1,31 @@
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index c29aa25..3106d77 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -1285,15 +1285,17 @@ if(MSVC)
+ set_target_properties(xerces-c PROPERTIES RUNTIME_OUTPUT_NAME "xerces-c_${INTERFACE_VERSION_U}")
+ set_target_properties(xerces-c PROPERTIES DEBUG_POSTFIX "D")
+ elseif(UNIX)
+- # For strict libtool compatibility on Unix. It's a horrible hack to
+- # set the version in the filename, and create the symlink at install
+- # time. Note: could be dropped when the SONAME is updated and
+- # libtool compatibility is no longer required.
+- set_target_properties(xerces-c PROPERTIES OUTPUT_NAME "xerces-c-${INTERFACE_VERSION_D}")
+- file(GENERATE
+- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/InstallLibrarySymlink.cmake"
+- CONTENT "execute_process(COMMAND ln -sf \"$<TARGET_FILE_NAME:xerces-c>\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBDIR}/libxerces-c.so\")")
+- install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/InstallLibrarySymlink.cmake")
++ if(BUILD_SHARED_LIBS)
++ # For strict libtool compatibility on Unix. It's a horrible hack to
++ # set the version in the filename, and create the symlink at install
++ # time. Note: could be dropped when the SONAME is updated and
++ # libtool compatibility is no longer required.
++ set_target_properties(xerces-c PROPERTIES OUTPUT_NAME "xerces-c-${INTERFACE_VERSION_D}")
++ file(GENERATE
++ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/InstallLibrarySymlink.cmake"
++ CONTENT "execute_process(COMMAND ln -sf \"$<TARGET_FILE_NAME:xerces-c>\" \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_LIBDIR}/libxerces-c.so\")")
++ install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/InstallLibrarySymlink.cmake")
++ endif()
+ else()
+ # Not used for the common cases, though this would be the default if
+ # not for libtool compatibility.
diff --git a/ports/xerces-c/portfile.cmake b/ports/xerces-c/portfile.cmake
index 5f8fa4c11..0350d53ed 100644
--- a/ports/xerces-c/portfile.cmake
+++ b/ports/xerces-c/portfile.cmake
@@ -9,6 +9,7 @@ vcpkg_from_github(
PATCHES
disable-tests.patch
remove-dll-export-macro.patch
+ no-symlinks-in-static-build.patch
)
set(DISABLE_ICU ON)