aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/aws-c-cal
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/aws-c-cal')
-rw-r--r--vcpkg/ports/aws-c-cal/portfile.cmake38
-rw-r--r--vcpkg/ports/aws-c-cal/remove-libcrypto-messages.patch14
-rw-r--r--vcpkg/ports/aws-c-cal/vcpkg.json22
3 files changed, 74 insertions, 0 deletions
diff --git a/vcpkg/ports/aws-c-cal/portfile.cmake b/vcpkg/ports/aws-c-cal/portfile.cmake
new file mode 100644
index 0000000..5576ce1
--- /dev/null
+++ b/vcpkg/ports/aws-c-cal/portfile.cmake
@@ -0,0 +1,38 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO awslabs/aws-c-cal
+ REF "v${VERSION}"
+ SHA512 50e146a3c3ca62347e68d1a30323c8b095d78e31e5f3d0f3c66f87acac684338fef352225d0af94768b4a4bc182193a1b4d198b78385d97c00933f795869ab47
+ HEAD_REF master
+ PATCHES remove-libcrypto-messages.patch
+)
+
+if (NOT (VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_OSX))
+ set(USE_OPENSSL ON)
+endif()
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ "-DCMAKE_MODULE_PATH=${CURRENT_INSTALLED_DIR}/share/aws-c-common" # use extra cmake files
+ -DBUILD_TESTING=FALSE
+ -DUSE_OPENSSL=${USE_OPENSSL}
+)
+
+vcpkg_cmake_install()
+
+string(REPLACE "dynamic" "shared" subdir "${VCPKG_LIBRARY_LINKAGE}")
+vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}/${subdir}" DO_NOT_DELETE_PARENT_CONFIG_PATH)
+vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
+vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/${PORT}/${PORT}-config.cmake" [[/${type}/]] "/")
+
+file(REMOVE_RECURSE
+ "${CURRENT_PACKAGES_DIR}/debug/include"
+ "${CURRENT_PACKAGES_DIR}/debug/lib/${PORT}"
+ "${CURRENT_PACKAGES_DIR}/debug/share"
+ "${CURRENT_PACKAGES_DIR}/lib/${PORT}"
+)
+
+vcpkg_copy_pdbs()
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
diff --git a/vcpkg/ports/aws-c-cal/remove-libcrypto-messages.patch b/vcpkg/ports/aws-c-cal/remove-libcrypto-messages.patch
new file mode 100644
index 0000000..5a1d5dc
--- /dev/null
+++ b/vcpkg/ports/aws-c-cal/remove-libcrypto-messages.patch
@@ -0,0 +1,14 @@
+diff --git a/cmake/modules/Findcrypto.cmake b/cmake/modules/Findcrypto.cmake
+index fed83bb..9c1ae28 100644
+--- a/cmake/modules/Findcrypto.cmake
++++ b/cmake/modules/Findcrypto.cmake
+@@ -105,9 +105,6 @@ else()
+ set(CRYPTO_FOUND true)
+ set(crypto_FOUND true)
+
+- message(STATUS "LibCrypto Include Dir: ${crypto_INCLUDE_DIR}")
+- message(STATUS "LibCrypto Shared Lib: ${crypto_SHARED_LIBRARY}")
+- message(STATUS "LibCrypto Static Lib: ${crypto_STATIC_LIBRARY}")
+ if (NOT TARGET AWS::crypto AND
+ (EXISTS "${crypto_LIBRARY}")
+ )
diff --git a/vcpkg/ports/aws-c-cal/vcpkg.json b/vcpkg/ports/aws-c-cal/vcpkg.json
new file mode 100644
index 0000000..267942a
--- /dev/null
+++ b/vcpkg/ports/aws-c-cal/vcpkg.json
@@ -0,0 +1,22 @@
+{
+ "name": "aws-c-cal",
+ "version": "0.9.10",
+ "description": "C99 wrapper for cryptography primitives.",
+ "homepage": "https://github.com/awslabs/aws-c-cal",
+ "license": "Apache-2.0",
+ "dependencies": [
+ "aws-c-common",
+ {
+ "name": "openssl",
+ "platform": "!windows & !osx"
+ },
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}