aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/utfz/CONTROL3
-rw-r--r--ports/utfz/portfile.cmake23
2 files changed, 26 insertions, 0 deletions
diff --git a/ports/utfz/CONTROL b/ports/utfz/CONTROL
new file mode 100644
index 000000000..26344d928
--- /dev/null
+++ b/ports/utfz/CONTROL
@@ -0,0 +1,3 @@
+Source: utfz
+Version: 1.2
+Description: A tiny C++ library for parsing and encoding utf-8
diff --git a/ports/utfz/portfile.cmake b/ports/utfz/portfile.cmake
new file mode 100644
index 000000000..27b5d17c4
--- /dev/null
+++ b/ports/utfz/portfile.cmake
@@ -0,0 +1,23 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO IMQS/utfz
+ REF v1.2
+ SHA512 286a7a79fe860df8c5a4e1fc75f56460026fe9fbcd2f0ea3e70ecf78e4c5de73442a008339a90c2bd4ef94d5a89c0ed2fb537b91927f11aaa1aa5876d36a628b
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+# Copy the include file
+file(COPY ${SOURCE_PATH}/utfz.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/utfz)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/utfz/license ${CURRENT_PACKAGES_DIR}/share/utfz/copyright)