From 03db827306e7b2e260ae99fb7a954a33d648623f Mon Sep 17 00:00:00 2001 From: Dancho <42138976+dzlaus@users.noreply.github.com> Date: Fri, 9 Sep 2022 20:53:46 +0200 Subject: [PATCH] [alpaca] Add port (#26729) * [alpaca] Add port * add comment #header-only library * x-add-version Co-authored-by: Lily Wang <494550702@qq.com> --- ports/alpaca/portfile.cmake | 28 ++++++++++++++++++++++++++++ ports/alpaca/vcpkg.json | 17 +++++++++++++++++ versions/a-/alpaca.json | 9 +++++++++ versions/baseline.json | 4 ++++ 4 files changed, 58 insertions(+) create mode 100644 ports/alpaca/portfile.cmake create mode 100644 ports/alpaca/vcpkg.json create mode 100644 versions/a-/alpaca.json diff --git a/ports/alpaca/portfile.cmake b/ports/alpaca/portfile.cmake new file mode 100644 index 0000000000..78643e9bb6 --- /dev/null +++ b/ports/alpaca/portfile.cmake @@ -0,0 +1,28 @@ +#header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO p-ranav/alpaca + REF v0.2.0 + SHA512 0ac2c1c4f8e0534319bf852bac3852ee3674db7b1a9eda30462821ec4c9ddeeb6ceff09ef5f16eed9131af6c357a09f2cb909a12ea2f135ca7d496d90ff1865d + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DALPACA_BUILD_TESTS=OFF + -DALPACA_BUILD_BENCHMARKS=OFF + -DALPACA_BUILD_SAMPLES=OFF +) + +vcpkg_cmake_install() + +#Copy missing details/types folder from source path +file(COPY "${SOURCE_PATH}/include/alpaca/detail/types" DESTINATION "${CURRENT_PACKAGES_DIR}/include/alpaca/detail/") + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/alpaca PACKAGE_NAME alpaca) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/lib") + +# Handle copyright +configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY) diff --git a/ports/alpaca/vcpkg.json b/ports/alpaca/vcpkg.json new file mode 100644 index 0000000000..9cfb77d80a --- /dev/null +++ b/ports/alpaca/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "alpaca", + "version": "0.2.0", + "description": "Alpaca is a serialization library written in C++17 - Pack C++ structs into a compact byte-array without any macros or boilerplate code", + "homepage": "https://github.com/p-ranav/alpaca", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/versions/a-/alpaca.json b/versions/a-/alpaca.json new file mode 100644 index 0000000000..402a7fdb98 --- /dev/null +++ b/versions/a-/alpaca.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "d8a880634d8e1b510b01820aea947721639c0d14", + "version": "0.2.0", + "port-version": 0 + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 53b0bf52b9..41d24eca42 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -68,6 +68,10 @@ "baseline": "5.2.6.0", "port-version": 2 }, + "alpaca": { + "baseline": "0.2.0", + "port-version": 0 + }, "alsa": { "baseline": "1.2.6.1", "port-version": 0