aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Harper <rogojin@gmail.com>2017-06-08 17:23:16 +0200
committerBen Harper <rogojin@gmail.com>2017-06-10 13:06:35 +0200
commit1c7a52a42a68d6ffba4e6a6b94273191ae49e11a (patch)
tree96a7380a15033c3a6ada5fb1bee04ec2fa30137d
parent676f55ddda709b24e4f2df9a3e3b52404b7c04ec (diff)
downloadvcpkg-1c7a52a42a68d6ffba4e6a6b94273191ae49e11a.tar.gz
vcpkg-1c7a52a42a68d6ffba4e6a6b94273191ae49e11a.zip
Add utfz to ports
utfz is a UTF-8 decoding library. It is notably different from utfcpp because it doesn't use exceptions.
-rw-r--r--ports/utfz/CONTROL3
-rw-r--r--ports/utfz/portfile.cmake22
2 files changed, 25 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..924e4a4b3
--- /dev/null
+++ b/ports/utfz/portfile.cmake
@@ -0,0 +1,22 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/utfz-1.2)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/IMQS/utfz/archive/v1.2.zip"
+ FILENAME "utfz-1.2.zip"
+ SHA512 a3bef8f769c7eb15fbd3a4c3c64f2e70666bfd305ad3c24ef676c7f5a428d95fdb8dcfe18cb5bfa072069e9368a29bf375848f9a775e60bec2eae7ffa5662b55
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+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)