aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/c89stringutils
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/c89stringutils
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/c89stringutils')
-rw-r--r--vcpkg/ports/c89stringutils/no_flags.patch17
-rw-r--r--vcpkg/ports/c89stringutils/portfile.cmake23
-rw-r--r--vcpkg/ports/c89stringutils/usage4
-rw-r--r--vcpkg/ports/c89stringutils/vcpkg.json17
4 files changed, 61 insertions, 0 deletions
diff --git a/vcpkg/ports/c89stringutils/no_flags.patch b/vcpkg/ports/c89stringutils/no_flags.patch
new file mode 100644
index 0000000..b95f040
--- /dev/null
+++ b/vcpkg/ports/c89stringutils/no_flags.patch
@@ -0,0 +1,17 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9e3c005..75dee3f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -24,12 +24,6 @@ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15")
+ # the BUILD_INTERFACE genex
+ set(gcc_like "$<COMPILE_LANG_AND_ID:C,CXX,ARMClang,AppleClang,Clang,GNU,LCC>")
+ set(msvc "$<COMPILE_LANG_AND_ID:C,CXX,MSVC>")
+- target_compile_options(
+- "${PROJECT_NAME}_compiler_flags"
+- INTERFACE
+- "$<${gcc_like}:$<BUILD_INTERFACE:-Wshadow;-Wformat=2;-Wall;-pedantic>>"
+- "$<${msvc}:$<BUILD_INTERFACE:-W3;-WX;-Zi;-permissive->>"
+- )
+ endif (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15")
+ # Set the build directories
+ if (CMAKE_SYSTEM_NAME STREQUAL "Windows"
diff --git a/vcpkg/ports/c89stringutils/portfile.cmake b/vcpkg/ports/c89stringutils/portfile.cmake
new file mode 100644
index 0000000..d97fa0f
--- /dev/null
+++ b/vcpkg/ports/c89stringutils/portfile.cmake
@@ -0,0 +1,23 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO offscale/c89stringutils
+ REF "${VERSION}"
+ SHA512 82edb341d5566c42eaffcd5c87d4fbd82a4e47b9c31a8533b08d28b9e1311ced281b59b3b6103e274355a82117095fcff1cb5f9c29eecc9563dc3cd962a37773
+ HEAD_REF master
+ PATCHES
+ no_flags.patch
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DBUILD_TESTING=OFF
+)
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup()
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE-APACHE" "${SOURCE_PATH}/LICENSE-MIT")
diff --git a/vcpkg/ports/c89stringutils/usage b/vcpkg/ports/c89stringutils/usage
new file mode 100644
index 0000000..ed8b429
--- /dev/null
+++ b/vcpkg/ports/c89stringutils/usage
@@ -0,0 +1,4 @@
+c89stringutils provides CMake targets:
+
+ find_package(c89stringutils CONFIG REQUIRED)
+ target_link_libraries(main PRIVATE c89stringutils)
diff --git a/vcpkg/ports/c89stringutils/vcpkg.json b/vcpkg/ports/c89stringutils/vcpkg.json
new file mode 100644
index 0000000..ebed5c7
--- /dev/null
+++ b/vcpkg/ports/c89stringutils/vcpkg.json
@@ -0,0 +1,17 @@
+{
+ "name": "c89stringutils",
+ "version": "0.0.2",
+ "description": "string functions from newer standards / common non-standards for C89",
+ "homepage": "https://github.com/offscale/c89stringutils",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}