From 6403c56e7ce5546240532c4afdb76f0d2c725cb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mahni=C4=8D?= Date: Thu, 2 Jan 2020 22:40:50 +0100 Subject: [PATCH] [argumentum] Add new port (#9478) * [argumentum] Add new port * Remove testing code from portfile * Use a new release that respects build_static_libs - add vcpkg_check_linkage * Use the new repository name * Add homepage to control file * Fix the portfile as suggested in PR #9478 * Disable some platforms as suggested in PR #9478 We will try to fix the build on these platforms in a future release. * Use release 0.2.2 with fixed header preparation * (wip) check which platforms are failing * Reenable all ports for argumentum in ci.baseline * Fix argumentum version in control file --- ports/argumentum/CONTROL | 4 ++++ ports/argumentum/portfile.cmake | 27 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100755 ports/argumentum/CONTROL create mode 100755 ports/argumentum/portfile.cmake diff --git a/ports/argumentum/CONTROL b/ports/argumentum/CONTROL new file mode 100755 index 000000000..055a42337 --- /dev/null +++ b/ports/argumentum/CONTROL @@ -0,0 +1,4 @@ +Source: argumentum +Version: 0.2.2 +Description: A C++17 command line argument parser inspired by Python argparse +Homepage: https://github.com/mmahnic/argumentum diff --git a/ports/argumentum/portfile.cmake b/ports/argumentum/portfile.cmake new file mode 100755 index 000000000..7d8ffae7a --- /dev/null +++ b/ports/argumentum/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mmahnic/argumentum + REF v0.2.2 + SHA512 750a26d021cdf243479a20d01924007cdca717a53f34e4969d2df6c2c10c2f41a4df4bcd0a9fdf3d75928290d31195fa490fe13d4f2cba391c9dbad48aa98184 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DARGUMENTUM_BUILD_EXAMPLES=OFF + -DARGUMENTUM_BUILD_TESTS=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Argumentum) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright)