diff --git a/ports/stc/add-pkg-conf.patch b/ports/stc/add-pkg-conf.patch new file mode 100644 index 0000000000..7a4caed2cd --- /dev/null +++ b/ports/stc/add-pkg-conf.patch @@ -0,0 +1,18 @@ +diff --git a/meson.build b/meson.build +index 9633c63..12a803f 100644 +--- a/meson.build ++++ b/meson.build +@@ -66,6 +66,13 @@ else + ) + endif + ++import('pkgconfig').generate( ++ stc_lib, ++ name: 'stc', ++ description: 'A modern, user friendly, generic, type-safe and fast C99 container library.', ++ url: 'https://github.com/stclib/STC', ++) ++ + install_headers( + 'include/stc/algorithm.h', + 'include/stc/arc.h', diff --git a/ports/stc/portfile.cmake b/ports/stc/portfile.cmake new file mode 100644 index 0000000000..0f77a1804e --- /dev/null +++ b/ports/stc/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO stclib/STC + REF "v${VERSION}" + SHA512 99ac97d4849e548c54d564e822cec36be6436b976546af1e8f12757764831c14229f958e7064ab8802e74131831a0016cc28649df24088c415ab4cdc65dad076 + HEAD_REF master + PATCHES + # TODO: remove this patch when new version is released + add-pkg-conf.patch +) + +vcpkg_configure_meson( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${BUILD_OPTIONS} + -Dcheckscoped=disabled + -Dtests=disabled + -Dexamples=disabled +) +vcpkg_install_meson() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/stc/vcpkg.json b/ports/stc/vcpkg.json new file mode 100644 index 0000000000..cf535472fb --- /dev/null +++ b/ports/stc/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "stc", + "version": "5.0", + "description": "A modern, user friendly, generic, type-safe and fast C99 container library.", + "homepage": "https://github.com/stclib/STC", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-tool-meson", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index d0186ccf1c..479bf9d619 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -9108,6 +9108,10 @@ "baseline": "2024-07-29", "port-version": 1 }, + "stc": { + "baseline": "5.0", + "port-version": 0 + }, "stdexec": { "baseline": "2024-06-16", "port-version": 2 diff --git a/versions/s-/stc.json b/versions/s-/stc.json new file mode 100644 index 0000000000..60bc97b785 --- /dev/null +++ b/versions/s-/stc.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "0cb2c396876c756ee480e7d8ec09d007b309a08a", + "version": "5.0", + "port-version": 0 + } + ] +}