From 2c5b3f22b7ad6ac30f5a77bc5cd2894a0e8d180f Mon Sep 17 00:00:00 2001 From: Thomas Heinrichs <46387399+Thomas1664@users.noreply.github.com> Date: Thu, 28 Apr 2022 16:03:40 +0200 Subject: [PATCH 1/9] [jansson] cleanup --- ports/jansson/portfile.cmake | 34 +++++++++++----------------------- ports/jansson/vcpkg.json | 14 +++++++++++++- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/ports/jansson/portfile.cmake b/ports/jansson/portfile.cmake index 80e6a8bb18e3af..20863a30f16b73 100644 --- a/ports/jansson/portfile.cmake +++ b/ports/jansson/portfile.cmake @@ -6,45 +6,33 @@ vcpkg_from_github( HEAD_REF master ) -if(VCPKG_CRT_LINKAGE STREQUAL static) - set(JANSSON_STATIC_CRT ON) -else() - set(JANSSON_STATIC_CRT OFF) -endif() - - -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(JANSSON_BUILD_SHARED_LIBS ON) -else() - set(JANSSON_BUILD_SHARED_LIBS OFF) -endif() +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" JANSSON_STATIC_CRT) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" JANSSON_BUILD_SHARED_LIBS) # Jansson tries to random-seed its hash table with system-provided entropy. # This is not ported to UWP yet. -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(VCPKG_TARGET_IS_UWP) set(USE_WINDOWS_CRYPTOAPI OFF) else() set(USE_WINDOWS_CRYPTOAPI ON) endif() -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DJANSSON_STATIC_CRT=${JANSSON_STATIC_CRT} -DJANSSON_EXAMPLES=OFF -DJANSSON_WITHOUT_TESTS=ON + -DJANSSON_BUILD_DOCS=OFF -DJANSSON_BUILD_SHARED_LIBS=${JANSSON_BUILD_SHARED_LIBS} -DUSE_WINDOWS_CRYPTOAPI=${USE_WINDOWS_CRYPTOAPI} -DJANSSON_INSTALL_CMAKE_DIR:STRING=share/jansson ) -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets() - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) - +vcpkg_cmake_install() vcpkg_copy_pdbs() - +vcpkg_cmake_config_fixup() vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/jansson/vcpkg.json b/ports/jansson/vcpkg.json index 244dffa2e60df1..cd99df02718c71 100644 --- a/ports/jansson/vcpkg.json +++ b/ports/jansson/vcpkg.json @@ -1,6 +1,18 @@ { "name": "jansson", "version": "2.14", + "port-version": 1, "description": "Jansson is a C library for encoding, decoding and manipulating JSON data", - "homepage": "https://github.com/akheron/jansson" + "homepage": "https://github.com/akheron/jansson", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] } From a65f320c9a16aeb5feb21fafbdc2aa8bbe479815 Mon Sep 17 00:00:00 2001 From: Thomas Heinrichs <46387399+Thomas1664@users.noreply.github.com> Date: Thu, 28 Apr 2022 16:04:26 +0200 Subject: [PATCH 2/9] version --- versions/baseline.json | 2 +- versions/j-/jansson.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index c2cc893f919c15..b596c7a1a876fb 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3014,7 +3014,7 @@ }, "jansson": { "baseline": "2.14", - "port-version": 0 + "port-version": 1 }, "jasper": { "baseline": "2.0.33", diff --git a/versions/j-/jansson.json b/versions/j-/jansson.json index 0d4d12b399c9b4..fbcbb34217f8d4 100644 --- a/versions/j-/jansson.json +++ b/versions/j-/jansson.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "91a1df17464d4f869b3ee4670b41260d72535728", + "version": "2.14", + "port-version": 1 + }, { "git-tree": "1a5c55feab368e4bfb40be993b9ea5a39fc82f51", "version": "2.14", From d2996394ebeae427af5b0f6609a0b493bb58b696 Mon Sep 17 00:00:00 2001 From: Thomas Heinrichs <46387399+Thomas1664@users.noreply.github.com> Date: Thu, 28 Apr 2022 16:15:33 +0200 Subject: [PATCH 3/9] Roll back version --- ports/jansson/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/jansson/portfile.cmake b/ports/jansson/portfile.cmake index 20863a30f16b73..0226ab4741a3b2 100644 --- a/ports/jansson/portfile.cmake +++ b/ports/jansson/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO akheron/jansson - REF 684e18c927e89615c2d501737e90018f4930d6c5 # v2.14 - SHA512 e2cac3567bc860d10d9aa386ce370876cb21ff083a970abeb48112b6586b91cd101694a98cb05a06795fb04498e6bc2df3615fedb86635f5a998b68e5670e5b3 + REF e9ebfa7e77a6bee77df44e096b100e7131044059 # v2.14 + SHA512 88a59c1cf5150699def17c86192ca9bacdfe6669319f770c3fbf14fa8edc48b4bb015a4a634a09db40fba9054320ac7c133c4d156f813af540a636f7825f0610 HEAD_REF master ) From d1264ec8577ad260ea8c2afbad36ac1730dfb3e5 Mon Sep 17 00:00:00 2001 From: Thomas Heinrichs <46387399+Thomas1664@users.noreply.github.com> Date: Thu, 28 Apr 2022 16:15:55 +0200 Subject: [PATCH 4/9] version --- versions/j-/jansson.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/j-/jansson.json b/versions/j-/jansson.json index fbcbb34217f8d4..0d7d8f24b5a3f9 100644 --- a/versions/j-/jansson.json +++ b/versions/j-/jansson.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "91a1df17464d4f869b3ee4670b41260d72535728", + "git-tree": "c66c91ab7beed92891f98c73ec8feafbe7afe735", "version": "2.14", "port-version": 1 }, From 49feb5634f319d7ae316e389e1f1eac688203345 Mon Sep 17 00:00:00 2001 From: Thomas Heinrichs <46387399+Thomas1664@users.noreply.github.com> Date: Thu, 28 Apr 2022 16:23:54 +0200 Subject: [PATCH 5/9] Unsupported on UWP --- ports/jansson/portfile.cmake | 4 ++-- ports/jansson/vcpkg.json | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/jansson/portfile.cmake b/ports/jansson/portfile.cmake index 0226ab4741a3b2..20863a30f16b73 100644 --- a/ports/jansson/portfile.cmake +++ b/ports/jansson/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO akheron/jansson - REF e9ebfa7e77a6bee77df44e096b100e7131044059 # v2.14 - SHA512 88a59c1cf5150699def17c86192ca9bacdfe6669319f770c3fbf14fa8edc48b4bb015a4a634a09db40fba9054320ac7c133c4d156f813af540a636f7825f0610 + REF 684e18c927e89615c2d501737e90018f4930d6c5 # v2.14 + SHA512 e2cac3567bc860d10d9aa386ce370876cb21ff083a970abeb48112b6586b91cd101694a98cb05a06795fb04498e6bc2df3615fedb86635f5a998b68e5670e5b3 HEAD_REF master ) diff --git a/ports/jansson/vcpkg.json b/ports/jansson/vcpkg.json index cd99df02718c71..a4c37c781b7d08 100644 --- a/ports/jansson/vcpkg.json +++ b/ports/jansson/vcpkg.json @@ -5,6 +5,7 @@ "description": "Jansson is a C library for encoding, decoding and manipulating JSON data", "homepage": "https://github.com/akheron/jansson", "license": "MIT", + "supports": "!uwp", "dependencies": [ { "name": "vcpkg-cmake", From 3c8ff85efc3b62288b2fa7d11b0dda3a52f7c060 Mon Sep 17 00:00:00 2001 From: Thomas Heinrichs <46387399+Thomas1664@users.noreply.github.com> Date: Thu, 28 Apr 2022 16:24:09 +0200 Subject: [PATCH 6/9] version --- versions/j-/jansson.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/j-/jansson.json b/versions/j-/jansson.json index 0d7d8f24b5a3f9..cbe31133239e5c 100644 --- a/versions/j-/jansson.json +++ b/versions/j-/jansson.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "c66c91ab7beed92891f98c73ec8feafbe7afe735", + "git-tree": "1d43448c0eb50e449b24e524294e02cbd6c72fb4", "version": "2.14", "port-version": 1 }, From 06a636cdff46f213a98afcbf7c265c5d4a7d84ef Mon Sep 17 00:00:00 2001 From: Thomas Heinrichs <46387399+Thomas1664@users.noreply.github.com> Date: Thu, 28 Apr 2022 17:31:32 +0200 Subject: [PATCH 7/9] patch --- ports/jansson/fix-linker-flags.patch | 13 +++++++++++++ ports/jansson/portfile.cmake | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 ports/jansson/fix-linker-flags.patch diff --git a/ports/jansson/fix-linker-flags.patch b/ports/jansson/fix-linker-flags.patch new file mode 100644 index 00000000000000..57d889005c72dc --- /dev/null +++ b/ports/jansson/fix-linker-flags.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 39b9ad3..ed33e3c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -342,7 +342,7 @@ if(JANSSON_BUILD_SHARED_LIBS) + ) + list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES "-Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/jansson.sym") + if (VSCRIPT_WORKS) +- set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/jansson.sym") ++ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/jansson.sym") + endif() + endif() + diff --git a/ports/jansson/portfile.cmake b/ports/jansson/portfile.cmake index 20863a30f16b73..e6c17c148ae3e2 100644 --- a/ports/jansson/portfile.cmake +++ b/ports/jansson/portfile.cmake @@ -4,6 +4,8 @@ vcpkg_from_github( REF 684e18c927e89615c2d501737e90018f4930d6c5 # v2.14 SHA512 e2cac3567bc860d10d9aa386ce370876cb21ff083a970abeb48112b6586b91cd101694a98cb05a06795fb04498e6bc2df3615fedb86635f5a998b68e5670e5b3 HEAD_REF master + PATCHES + fix-linker-flags.patch ) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" JANSSON_STATIC_CRT) From 97fcd33d6ba8297f2da9821da50835ee977689d2 Mon Sep 17 00:00:00 2001 From: Thomas Heinrichs <46387399+Thomas1664@users.noreply.github.com> Date: Thu, 28 Apr 2022 17:32:46 +0200 Subject: [PATCH 8/9] Remove supports --- ports/jansson/vcpkg.json | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/jansson/vcpkg.json b/ports/jansson/vcpkg.json index a4c37c781b7d08..cd99df02718c71 100644 --- a/ports/jansson/vcpkg.json +++ b/ports/jansson/vcpkg.json @@ -5,7 +5,6 @@ "description": "Jansson is a C library for encoding, decoding and manipulating JSON data", "homepage": "https://github.com/akheron/jansson", "license": "MIT", - "supports": "!uwp", "dependencies": [ { "name": "vcpkg-cmake", From 5431ca972248266bd4aa4e90875f6027aeeecec8 Mon Sep 17 00:00:00 2001 From: Thomas Heinrichs <46387399+Thomas1664@users.noreply.github.com> Date: Thu, 28 Apr 2022 17:33:07 +0200 Subject: [PATCH 9/9] version --- versions/j-/jansson.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/j-/jansson.json b/versions/j-/jansson.json index cbe31133239e5c..50a364af94dcba 100644 --- a/versions/j-/jansson.json +++ b/versions/j-/jansson.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "1d43448c0eb50e449b24e524294e02cbd6c72fb4", + "git-tree": "f284c9aba6b994cb6fe175b675976d34257b4c85", "version": "2.14", "port-version": 1 },