diff options
Diffstat (limited to 'vcpkg/ports/cppcodec')
| -rw-r--r-- | vcpkg/ports/cppcodec/0001-Fix-62.patch | 28 | ||||
| -rw-r--r-- | vcpkg/ports/cppcodec/portfile.cmake | 24 | ||||
| -rw-r--r-- | vcpkg/ports/cppcodec/vcpkg.json | 16 |
3 files changed, 68 insertions, 0 deletions
diff --git a/vcpkg/ports/cppcodec/0001-Fix-62.patch b/vcpkg/ports/cppcodec/0001-Fix-62.patch new file mode 100644 index 0000000..af12439 --- /dev/null +++ b/vcpkg/ports/cppcodec/0001-Fix-62.patch @@ -0,0 +1,28 @@ +From 9f67d7026d3dee8fc6a0af614d97f9365cee2872 Mon Sep 17 00:00:00 2001 +From: Gabriele_Frau <gabriele.frau@sipalinformatica.it> +Date: Wed, 17 Oct 2018 14:35:54 +0200 +Subject: [PATCH] Fix #62 + +<Windows.h> includes macro definitions named max and min, wrap the call to max and min with parentheses, which prevent the macro expansion +--- + cppcodec/detail/stream_codec.hpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/cppcodec/detail/stream_codec.hpp b/cppcodec/detail/stream_codec.hpp +index d4204bc..4d8d054 100644 +--- a/cppcodec/detail/stream_codec.hpp ++++ b/cppcodec/detail/stream_codec.hpp +@@ -187,8 +187,8 @@ template <typename T> + static CPPCODEC_ALWAYS_INLINE constexpr size_t num_possible_values() + { + return static_cast<size_t>( +- static_cast<intmax_t>(std::numeric_limits<T>::max()) +- - static_cast<intmax_t>(std::numeric_limits<T>::min()) + 1); ++ static_cast<intmax_t>((std::numeric_limits<T>::max)()) ++ - static_cast<intmax_t>((std::numeric_limits<T>::min)()) + 1); + } + + template <typename CodecVariant, alphabet_index_t InvalidIdx, size_t I> +-- +2.32.0.windows.1 + diff --git a/vcpkg/ports/cppcodec/portfile.cmake b/vcpkg/ports/cppcodec/portfile.cmake new file mode 100644 index 0000000..4fad950 --- /dev/null +++ b/vcpkg/ports/cppcodec/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO tplgy/cppcodec
+ REF v0.2
+ SHA512 50c9c81cdb12560c87e513e1fd22c1ad24ea37b7d20a0e3044d43fb887f4c6494c69468e4d0811cd2fc1ae8fdb01b01cfb9f3cfdd8611d4bb0221cbd38cbead3
+ HEAD_REF master
+ PATCHES 0001-Fix-62.patch
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DBUILD_TESTING=OFF
+
+)
+
+vcpkg_cmake_install()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/lib")
+
+file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
+
+
+vcpkg_fixup_pkgconfig()
diff --git a/vcpkg/ports/cppcodec/vcpkg.json b/vcpkg/ports/cppcodec/vcpkg.json new file mode 100644 index 0000000..f22508c --- /dev/null +++ b/vcpkg/ports/cppcodec/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "cppcodec", + "version": "0.2", + "port-version": 4, + "description": "Header-only C++11 library to encode/decode base64, base64url, base32, base32hex and hex (a.k.a. base16) as specified in RFC 4648, plus Crockford's base32.", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |