diff options
| author | NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> | 2021-07-27 01:59:27 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-26 10:59:27 -0700 |
| commit | be01bbc3e1bd99d212225168c6c41329b5dbc969 (patch) | |
| tree | b1c6d79d7604e9b78d9d44fea6e068995a1f7933 | |
| parent | 1a2931b8ccf0b7eab716be56a3d1c7bcf92d50f2 (diff) | |
| download | vcpkg-be01bbc3e1bd99d212225168c6c41329b5dbc969.tar.gz vcpkg-be01bbc3e1bd99d212225168c6c41329b5dbc969.zip | |
[libsigcpp] Fix usage in static build (#18944)
* [libsigcpp] Fix usage in static build
* Update version files
* Apply review suggestions
* Update versions/l-/libsigcpp.json
Co-authored-by: Billy Robert ONeal III <bion@microsoft.com>
| -rw-r--r-- | ports/libsigcpp/fix-usage-in-static-build.patch | 29 | ||||
| -rw-r--r-- | ports/libsigcpp/portfile.cmake | 7 | ||||
| -rw-r--r-- | ports/libsigcpp/vcpkg.json | 1 | ||||
| -rw-r--r-- | versions/baseline.json | 2 | ||||
| -rw-r--r-- | versions/l-/libsigcpp.json | 5 |
5 files changed, 42 insertions, 2 deletions
diff --git a/ports/libsigcpp/fix-usage-in-static-build.patch b/ports/libsigcpp/fix-usage-in-static-build.patch new file mode 100644 index 000000000..378f1f96a --- /dev/null +++ b/ports/libsigcpp/fix-usage-in-static-build.patch @@ -0,0 +1,29 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f54e830..972d0dc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -53,6 +53,10 @@ set (PROJECT_SOURCE_DIR "${sigc++_SOURCE_DIR}/sigc++") + include_directories (${sigc++_SOURCE_DIR}) + include_directories (${sigc++_BINARY_DIR}) + ++if(BUILD_SHARED_LIBS) ++ add_compile_options(-DBUILD_SHARED) ++endif() ++ + configure_file (sigc++config.h.cmake sigc++config.h) + + set (prefix ${CMAKE_INSTALL_PREFIX}) +diff --git a/sigc++config.h.cmake b/sigc++config.h.cmake +index 74d348a..43a99c5 100644 +--- a/sigc++config.h.cmake ++++ b/sigc++config.h.cmake +@@ -16,7 +16,9 @@ + # if defined(_MSC_VER) + # define SIGC_MSC 1 + # define SIGC_WIN32 1 ++# ifdef BUILD_SHARED + # define SIGC_DLL 1 ++# endif + # elif defined(__CYGWIN__) + # define SIGC_CONFIGURE 1 + # elif defined(__MINGW32__) diff --git a/ports/libsigcpp/portfile.cmake b/ports/libsigcpp/portfile.cmake index 7dceaa2f4..2328d3562 100644 --- a/ports/libsigcpp/portfile.cmake +++ b/ports/libsigcpp/portfile.cmake @@ -7,6 +7,7 @@ vcpkg_from_github( PATCHES
disable_tests_enable_static_build.patch
version.patch
+ fix-usage-in-static-build.patch
)
vcpkg_configure_cmake(
@@ -17,5 +18,9 @@ vcpkg_copy_pdbs() vcpkg_fixup_pkgconfig()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sigc++-3 TARGET_PATH share/sigc++-3)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/sigc++-3.0/include/sigc++config.h" "ifdef BUILD_SHARED" "if 1")
+endif()
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
-file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
+file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
diff --git a/ports/libsigcpp/vcpkg.json b/ports/libsigcpp/vcpkg.json index bf94085c5..780711131 100644 --- a/ports/libsigcpp/vcpkg.json +++ b/ports/libsigcpp/vcpkg.json @@ -1,6 +1,7 @@ { "name": "libsigcpp", "version": "3.0.3", + "port-version": 1, "description": "Typesafe callback framework for C++", "homepage": "https://libsigcplusplus.github.io/libsigcplusplus/" } diff --git a/versions/baseline.json b/versions/baseline.json index 14cddecf3..f98b67ca2 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3566,7 +3566,7 @@ }, "libsigcpp": { "baseline": "3.0.3", - "port-version": 0 + "port-version": 1 }, "libsigcpp-3": { "baseline": "3.0.3", diff --git a/versions/l-/libsigcpp.json b/versions/l-/libsigcpp.json index 52173cb90..bf0f60e47 100644 --- a/versions/l-/libsigcpp.json +++ b/versions/l-/libsigcpp.json @@ -1,6 +1,11 @@ { "versions": [ { + "git-tree": "462e27cfc4abccd4d3157b2ae8b22c4bb6b82c67", + "version": "3.0.3", + "port-version": 1 + }, + { "git-tree": "398cf35cc5235b326dda845e568295841aecc461", "version": "3.0.3", "port-version": 0 |
