aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/msgpack11
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/msgpack11')
-rw-r--r--vcpkg/ports/msgpack11/disable-werror.patch14
-rw-r--r--vcpkg/ports/msgpack11/fix-additerator.patch12
-rw-r--r--vcpkg/ports/msgpack11/msvc.patch19
-rw-r--r--vcpkg/ports/msgpack11/portfile.cmake28
-rw-r--r--vcpkg/ports/msgpack11/vcpkg.json14
5 files changed, 87 insertions, 0 deletions
diff --git a/vcpkg/ports/msgpack11/disable-werror.patch b/vcpkg/ports/msgpack11/disable-werror.patch
new file mode 100644
index 0000000..eb4a17e
--- /dev/null
+++ b/vcpkg/ports/msgpack11/disable-werror.patch
@@ -0,0 +1,14 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 080cefa..b73072a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -9,9 +9,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+ add_library(msgpack11 STATIC msgpack11.cpp)
+ target_include_directories(msgpack11 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
+ target_compile_options(msgpack11 PRIVATE -fno-rtti)
+-if(NOT MSVC)
+- target_compile_options(msgpack11 PRIVATE -Wall -Wextra -Werror)
+-endif()
+ configure_file("msgpack11.pc.in" "msgpack11.pc" @ONLY)
+
+ if (MSGPACK11_BUILD_TESTS)
diff --git a/vcpkg/ports/msgpack11/fix-additerator.patch b/vcpkg/ports/msgpack11/fix-additerator.patch
new file mode 100644
index 0000000..5a6b232
--- /dev/null
+++ b/vcpkg/ports/msgpack11/fix-additerator.patch
@@ -0,0 +1,12 @@
+diff --git a/msgpack11.cpp b/msgpack11.cpp
+index fa572fa..640ba9a 100644
+--- a/msgpack11.cpp
++++ b/msgpack11.cpp
+@@ -10,6 +10,7 @@
+ #include <algorithm>
+ #include <functional>
+ #include <stdexcept>
++#include <iterator>
+
+ namespace msgpack11 {
+
diff --git a/vcpkg/ports/msgpack11/msvc.patch b/vcpkg/ports/msgpack11/msvc.patch
new file mode 100644
index 0000000..b7e0293
--- /dev/null
+++ b/vcpkg/ports/msgpack11/msvc.patch
@@ -0,0 +1,19 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9424838..080cefa 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -6,9 +6,12 @@ option(MSGPACK11_BUILD_TESTS "Build unit tests" ON)
+ set(CMAKE_CXX_STANDARD 11)
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
+-add_library(msgpack11 msgpack11.cpp)
++add_library(msgpack11 STATIC msgpack11.cpp)
+ target_include_directories(msgpack11 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
+-target_compile_options(msgpack11 PRIVATE -fno-rtti -Wall -Wextra -Werror)
++target_compile_options(msgpack11 PRIVATE -fno-rtti)
++if(NOT MSVC)
++ target_compile_options(msgpack11 PRIVATE -Wall -Wextra -Werror)
++endif()
+ configure_file("msgpack11.pc.in" "msgpack11.pc" @ONLY)
+
+ if (MSGPACK11_BUILD_TESTS)
diff --git a/vcpkg/ports/msgpack11/portfile.cmake b/vcpkg/ports/msgpack11/portfile.cmake
new file mode 100644
index 0000000..ae867be
--- /dev/null
+++ b/vcpkg/ports/msgpack11/portfile.cmake
@@ -0,0 +1,28 @@
+vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO ar90n/msgpack11
+ REF v0.0.10
+ SHA512 7b90893f9cdec529789f6e75703f5945c6fc5c946b8708a7a2cb295faf4af111c8cc61265b636f385641031b85181929205be9c5d155f405909445dce85b4ce8
+ HEAD_REF master
+ PATCHES
+ msvc.patch
+ fix-additerator.patch
+ disable-werror.patch
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DMSGPACK11_BUILD_TESTS=OFF
+ -DMSGPACK11_BUILD_EXAMPLES=OFF
+)
+
+
+vcpkg_cmake_install()
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
+
+vcpkg_fixup_pkgconfig()
diff --git a/vcpkg/ports/msgpack11/vcpkg.json b/vcpkg/ports/msgpack11/vcpkg.json
new file mode 100644
index 0000000..dd6d0ab
--- /dev/null
+++ b/vcpkg/ports/msgpack11/vcpkg.json
@@ -0,0 +1,14 @@
+{
+ "name": "msgpack11",
+ "version": "0.0.10",
+ "port-version": 4,
+ "description": "msgpack11 is a tiny MsgPack library for C++11, providing MsgPack parsing and serialization.This library is inspired by json11.The API of msgpack11 is designed to be similar with json11.",
+ "homepage": "https://msgpack.org",
+ "dependencies": [
+ "gtest",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ }
+ ]
+}