Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[restclient-cpp] new port #6936

Merged
merged 4 commits into from
Jun 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions ports/restclient-cpp/0001_fix_cmake_linking.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 45fc887..8b90048 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,7 +39,7 @@ find_package(Threads REQUIRED)
find_package(CURL REQUIRED)
find_package(jsoncpp)

-add_library(restclient-cpp SHARED
+add_library(restclient-cpp
source/restclient.cc
source/connection.cc
source/helpers.cc
4 changes: 4 additions & 0 deletions ports/restclient-cpp/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Source: restclient-cpp
Version: 0.5.1
Build-Depends: curl
Description: Binn is a binary data serialization format designed to be compact, fast and easy to use.
30 changes: 30 additions & 0 deletions ports/restclient-cpp/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
include(vcpkg_common_functions)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO mrtazz/restclient-cpp
REF 0.5.1
SHA512 d5e17a984af44f863bc7cdc7307c2b06cae9252f86c6c6c2377cdb317f61b6419d8e9aedc5e5ccdb08fd1ee13848ec3b9ef8067a8d26dcf438a5c8793b5a2ce3
HEAD_REF master
PATCHES
0001_fix_cmake_linking.patch
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)

vcpkg_install_cmake()

vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/restclient-cpp)

# Remove includes in debug
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/bin)

# Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/restclient-cpp)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/restclient-cpp/LICENSE ${CURRENT_PACKAGES_DIR}/share/restclient-cpp/copyright)

# Copy pdb files
vcpkg_copy_pdbs()