From b5eb35e619f36b166c99786db0baba3e82af1334 Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 1 Apr 2021 19:26:56 +0800 Subject: [PATCH 1/4] [Pistache] update to HEAD --- ports/pistache/CONTROL | 2 +- ports/pistache/fix-debug-empty.patch | 36 ++++++++++++++++++++++++++++ ports/pistache/portfile.cmake | 13 +++++----- 3 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 ports/pistache/fix-debug-empty.patch diff --git a/ports/pistache/CONTROL b/ports/pistache/CONTROL index 307fe019164c12..9b7b704e114917 100644 --- a/ports/pistache/CONTROL +++ b/ports/pistache/CONTROL @@ -1,5 +1,5 @@ Source: pistache -Version: 2019-08-05 +Version: 2021-03-31 Homepage: https://github.com/oktal/pistache Description: Pistache is a modern and elegant HTTP and REST framework for C++. It is entirely written in pure-C++11 and provides a clear and pleasant API. Supports: linux \ No newline at end of file diff --git a/ports/pistache/fix-debug-empty.patch b/ports/pistache/fix-debug-empty.patch new file mode 100644 index 00000000000000..f6a7b97a0cbd8d --- /dev/null +++ b/ports/pistache/fix-debug-empty.patch @@ -0,0 +1,36 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 9aeed1e..7316732 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -48,12 +48,12 @@ if (BUILD_SHARED_LIBS) + add_library(pistache_shared SHARED $) + target_link_libraries(pistache_shared PRIVATE Threads::Threads ${CMAKE_REQUIRED_LIBRARIES}) + target_include_directories(pistache_shared INTERFACE ${PISTACHE_INCLUDE}) +-endif () ++else () + + add_library(pistache_static STATIC $) + target_link_libraries(pistache_static PRIVATE Threads::Threads ${CMAKE_REQUIRED_LIBRARIES}) + target_include_directories(pistache_static INTERFACE ${PISTACHE_INCLUDE}) +- ++endif() + if (PISTACHE_USE_SSL) + target_compile_definitions(pistache PUBLIC PISTACHE_USE_SSL) + target_compile_definitions(pistache_static PUBLIC PISTACHE_USE_SSL) +@@ -72,8 +72,15 @@ if (BUILD_SHARED_LIBS) + OUTPUT_NAME ${Pistache_OUTPUT_NAME}-${VERSION} + SOVERSION ${SONAME_VERSION_MAJOR}.${SONAME_VERSION_MINOR} + ) +-endif () ++else () + + set_target_properties(pistache_static PROPERTIES + OUTPUT_NAME ${Pistache_OUTPUT_NAME} + ) ++endif() ++install( ++ TARGETS pistache ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) diff --git a/ports/pistache/portfile.cmake b/ports/pistache/portfile.cmake index ea7deba191e2ab..1e3b9be694e446 100644 --- a/ports/pistache/portfile.cmake +++ b/ports/pistache/portfile.cmake @@ -1,13 +1,15 @@ -if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") +if(NOT VCPKG_TARGET_IS_LINUX) message(FATAL_ERROR "${PORT} currently only supports Linux platform.") endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO oktal/pistache - REF 4dc9e3ef9a1b953a62e5fadbed88e72b4b3734de - SHA512 427b6a6e7200e5f91ce8737cd1cc5d6cd689025033c85979c96f0ece64ae05d9c6839a936d7d6015b0e1065dc72362f6f70ab588ea7cae7aa718dfe5cd288554 + REPO pistacheio/pistache + REF 9dc080b9ebbe6fc1726b45e9db1550305938313e #2021-03-31 + SHA512 b55c395fb98af85317590ed2502564af5e92e30a35618132568c6ab589a6d0971570ad20ddbd1f49d9dd8cf54692866c69cfc1350c6fdccf9efb039aacf153b4 HEAD_REF master + PATCHES + fix-debug-empty.patch ) vcpkg_configure_cmake( @@ -18,11 +20,10 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) From 7cbea2d187aa6de33bfd8c797e132e5ca2e8552c Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Thu, 1 Apr 2021 19:27:40 +0800 Subject: [PATCH 2/4] update version --- versions/baseline.json | 2 +- versions/p-/pistache.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index 5a417e53cfe0c5..413d0b8ede8799 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4689,7 +4689,7 @@ "port-version": 0 }, "pistache": { - "baseline": "2019-08-05", + "baseline": "2021-03-31", "port-version": 0 }, "pixel": { diff --git a/versions/p-/pistache.json b/versions/p-/pistache.json index 2c9491e148a03e..ea14e944fcbaaf 100644 --- a/versions/p-/pistache.json +++ b/versions/p-/pistache.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "e2978007f7122a5941255c09ec792a00247bb6f0", + "version-string": "2021-03-31", + "port-version": 0 + }, { "git-tree": "63fa37bfa9925b106a2e5a66db9133e381dc499e", "version-string": "2019-08-05", From 3f0bc56d5f6dd24c5dbc8789e6917bbacca667e2 Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Wed, 9 Jun 2021 17:40:19 +0800 Subject: [PATCH 3/4] fix linux Error --- ports/pistache/CONTROL | 5 ----- ports/pistache/portfile.cmake | 5 ++--- ports/pistache/vcpkg.json | 7 +++++++ 3 files changed, 9 insertions(+), 8 deletions(-) delete mode 100644 ports/pistache/CONTROL create mode 100644 ports/pistache/vcpkg.json diff --git a/ports/pistache/CONTROL b/ports/pistache/CONTROL deleted file mode 100644 index 9b7b704e114917..00000000000000 --- a/ports/pistache/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: pistache -Version: 2021-03-31 -Homepage: https://github.com/oktal/pistache -Description: Pistache is a modern and elegant HTTP and REST framework for C++. It is entirely written in pure-C++11 and provides a clear and pleasant API. -Supports: linux \ No newline at end of file diff --git a/ports/pistache/portfile.cmake b/ports/pistache/portfile.cmake index 1e3b9be694e446..409c0e0f663771 100644 --- a/ports/pistache/portfile.cmake +++ b/ports/pistache/portfile.cmake @@ -19,12 +19,11 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/RapidJSON) vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/pistache/vcpkg.json b/ports/pistache/vcpkg.json new file mode 100644 index 00000000000000..30a1bf4ed1f68c --- /dev/null +++ b/ports/pistache/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "pistache", + "version-date": "2021-03-31", + "description": "Pistache is a modern and elegant HTTP and REST framework for C++. It is entirely written in pure-C++11 and provides a clear and pleasant API", + "homepage": "https://github.com/oktal/pistache", + "supports": "linux" +} From 2863b8f8e32af74fdfdb587e6c9ec5a894a4177d Mon Sep 17 00:00:00 2001 From: Jonliu1993 <13720414433@163.com> Date: Wed, 9 Jun 2021 17:42:47 +0800 Subject: [PATCH 4/4] update version --- versions/p-/pistache.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/versions/p-/pistache.json b/versions/p-/pistache.json index ea14e944fcbaaf..68755a316274a6 100644 --- a/versions/p-/pistache.json +++ b/versions/p-/pistache.json @@ -1,8 +1,8 @@ { "versions": [ { - "git-tree": "e2978007f7122a5941255c09ec792a00247bb6f0", - "version-string": "2021-03-31", + "git-tree": "f2c28dea6191ea1f399a862889d095f1d268a3f0", + "version-date": "2021-03-31", "port-version": 0 }, {