aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormyd7349 <myd7349@gmail.com>2019-08-13 05:01:37 +0800
committerGriffin Downs <35574547+grdowns@users.noreply.github.com>2019-08-12 14:01:37 -0700
commitda61a933fc325d99eecc1b39cd29dbe1584e1bf9 (patch)
treed31bb5e6dac3924ae64dcce8849f198694da7787
parent28e510cbcc4a24ee093b1d95ce843c01fa1bb845 (diff)
downloadvcpkg-da61a933fc325d99eecc1b39cd29dbe1584e1bf9.tar.gz
vcpkg-da61a933fc325d99eecc1b39cd29dbe1584e1bf9.zip
[tiny-aes-c] Add new port (#7530)
-rw-r--r--ports/tiny-aes-c/CMakeLists.txt24
-rw-r--r--ports/tiny-aes-c/CONTROL4
-rw-r--r--ports/tiny-aes-c/portfile.cmake30
3 files changed, 58 insertions, 0 deletions
diff --git a/ports/tiny-aes-c/CMakeLists.txt b/ports/tiny-aes-c/CMakeLists.txt
new file mode 100644
index 000000000..6e3222547
--- /dev/null
+++ b/ports/tiny-aes-c/CMakeLists.txt
@@ -0,0 +1,24 @@
+cmake_minimum_required(VERSION 3.14)
+
+project(tiny-aes-c LANGUAGES C ASM)
+
+include(GNUInstallDirs)
+
+add_library(tiny-aes-c aes.c)
+
+target_include_directories(
+ tiny-aes-c
+ PUBLIC
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
+)
+
+install(FILES aes.h aes.hpp DESTINATION include)
+
+install(TARGETS tiny-aes-c EXPORT unofficial-tiny-aes-c-config)
+
+install(
+ EXPORT unofficial-tiny-aes-c-config
+ NAMESPACE unofficial::tiny-aes-c::
+ DESTINATION share/unofficial-tiny-aes-c
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+)
diff --git a/ports/tiny-aes-c/CONTROL b/ports/tiny-aes-c/CONTROL
new file mode 100644
index 000000000..e87499074
--- /dev/null
+++ b/ports/tiny-aes-c/CONTROL
@@ -0,0 +1,4 @@
+Source: tiny-aes-c
+Version: 2019-07-31
+Description: Small portable AES128/192/256 in C
+Homepage: https://github.com/kokke/tiny-AES-c
diff --git a/ports/tiny-aes-c/portfile.cmake b/ports/tiny-aes-c/portfile.cmake
new file mode 100644
index 000000000..e1bb5cb31
--- /dev/null
+++ b/ports/tiny-aes-c/portfile.cmake
@@ -0,0 +1,30 @@
+include(vcpkg_common_functions)
+
+vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO kokke/tiny-AES-c
+ REF ca85e00de963102d3999ea5fa865c0deff6370d3
+ SHA512 538d5d9cee8cecbf801d3553f2425f8a1331b59c652c11ee56c6e46a23450c1e9a59e3e1833f4384b7a4d992a93f30635855a47e2414b9293e0d27c426b6a4f3
+ HEAD_REF master
+)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT})
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# Handle copyright
+configure_file(${SOURCE_PATH}/unlicense.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
+
+# CMake integration test
+vcpkg_test_cmake(PACKAGE_NAME unofficial-${PORT})