diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/kaitai-struct-cpp-stl-runtime | |
Diffstat (limited to 'vcpkg/ports/kaitai-struct-cpp-stl-runtime')
3 files changed, 73 insertions, 0 deletions
diff --git a/vcpkg/ports/kaitai-struct-cpp-stl-runtime/portfile.cmake b/vcpkg/ports/kaitai-struct-cpp-stl-runtime/portfile.cmake new file mode 100644 index 0000000..930b6fa --- /dev/null +++ b/vcpkg/ports/kaitai-struct-cpp-stl-runtime/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kaitai-io/kaitai_struct_cpp_stl_runtime + REF ${VERSION} + SHA512 fd537c5d45d4c53de54c31b9286ff1100f74d62458fa2bbfd0d10d9cfedeb638e20c8d89a683b934310244de1de1093dbf79a06ac56a4918032ee31f0b49cbd7 + HEAD_REF master + PATCHES + remove-werror.patch +) + +set(STRING_ENCODING_TYPE "NONE") +if ("iconv" IN_LIST FEATURES) + set(STRING_ENCODING_TYPE "ICONV") +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DSTRING_ENCODING_TYPE=${STRING_ENCODING_TYPE} + -DBUILD_TESTS=OFF +) + +vcpkg_cmake_install() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/vcpkg/ports/kaitai-struct-cpp-stl-runtime/remove-werror.patch b/vcpkg/ports/kaitai-struct-cpp-stl-runtime/remove-werror.patch new file mode 100644 index 0000000..f35a2c5 --- /dev/null +++ b/vcpkg/ports/kaitai-struct-cpp-stl-runtime/remove-werror.patch @@ -0,0 +1,16 @@ +diff --git a/Common.cmake b/Common.cmake +index 31d8116..f46cbc3 100644 +--- a/Common.cmake ++++ b/Common.cmake +@@ -12,9 +12,9 @@ endif() + # + # This method was taken from https://www.pragmaticlinux.com/2022/07/enable-compiler-warnings-with-cmake/ + target_compile_options(${PROJECT_NAME} PRIVATE +- $<$<CXX_COMPILER_ID:MSVC>:/W4 /WX> ++ $<$<CXX_COMPILER_ID:MSVC>:/W4> + $<$<NOT:$<CXX_COMPILER_ID:MSVC>>: +- -Wall -Wextra -Wpedantic -Werror ++ -Wall -Wextra -Wpedantic + + # We're using the `long long` type intentionally. Although it's not part of C++98, in + # practice it is usually supported even by ancient compilers with very limited C++11 diff --git a/vcpkg/ports/kaitai-struct-cpp-stl-runtime/vcpkg.json b/vcpkg/ports/kaitai-struct-cpp-stl-runtime/vcpkg.json new file mode 100644 index 0000000..8d8a0b6 --- /dev/null +++ b/vcpkg/ports/kaitai-struct-cpp-stl-runtime/vcpkg.json @@ -0,0 +1,30 @@ +{ + "name": "kaitai-struct-cpp-stl-runtime", + "version": "0.11", + "description": "Kaitai Struct is a declarative language used for describe various binary data structures, laid out in files or in memory. This library implements Kaitai Struct API for C++ using STL", + "homepage": "http://kaitai.io/", + "documentation": "https://doc.kaitai.io/lang_cpp_stl.html", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ], + "default-features": [ + "iconv" + ], + "features": { + "iconv": { + "description": "Set the way strings have to be encoded to ICONV", + "dependencies": [ + "libiconv" + ] + } + } +} |