aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/ctbignum
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/ctbignum')
-rw-r--r--vcpkg/ports/ctbignum/no-boost.patch23
-rw-r--r--vcpkg/ports/ctbignum/portfile.cmake28
-rw-r--r--vcpkg/ports/ctbignum/vcpkg.json17
3 files changed, 68 insertions, 0 deletions
diff --git a/vcpkg/ports/ctbignum/no-boost.patch b/vcpkg/ports/ctbignum/no-boost.patch
new file mode 100644
index 0000000..2df5822
--- /dev/null
+++ b/vcpkg/ports/ctbignum/no-boost.patch
@@ -0,0 +1,23 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a5070b1..b60462b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -19,18 +19,6 @@ cmake_minimum_required(VERSION 3.0.0)
+ ##
+ project(ctbignum VERSION 0.1 LANGUAGES CXX)
+
+-##
+-## INCLUDE
+-##
+-##
+-include(ExternalProject)
+-
+-## External dependencies
+-find_package(Boost 1.61 REQUIRED)
+-if(Boost_FOUND)
+- include_directories(${Boost_INCLUDE_DIRS})
+-endif()
+-
+ ##
+ ## OPTIONS
+ ##
diff --git a/vcpkg/ports/ctbignum/portfile.cmake b/vcpkg/ports/ctbignum/portfile.cmake
new file mode 100644
index 0000000..650ad8e
--- /dev/null
+++ b/vcpkg/ports/ctbignum/portfile.cmake
@@ -0,0 +1,28 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO niekbouman/ctbignum
+ REF cf3233d8b7dcff59f29a7389204959ee2228a4af
+ SHA512 8cd5e187836f48165a088a171c87ce438393e66f7362af1b67a253ae6ef0b17c41468e21e0dfe337094796f2b2a2fa5062cc9a9231afc377f187baf1ead1257e
+ HEAD_REF master
+ PATCHES
+ no-boost.patch
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DCTBIGNUM_BuildTests=OFF
+ -DCTBIGNUM_BuildBenchmarks=OFF
+)
+
+vcpkg_cmake_install()
+
+# Move CMake files to the right place
+vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
+# Remove empty files
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
+
+# Handle copyright
+file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
+
diff --git a/vcpkg/ports/ctbignum/vcpkg.json b/vcpkg/ports/ctbignum/vcpkg.json
new file mode 100644
index 0000000..57e3333
--- /dev/null
+++ b/vcpkg/ports/ctbignum/vcpkg.json
@@ -0,0 +1,17 @@
+{
+ "name": "ctbignum",
+ "version-date": "2019-08-02",
+ "port-version": 5,
+ "description": "This is a header-only template library for fixed-width \"small big-integer\" computations, for use during run-time as well as compile-time.",
+ "homepage": "https://github.com/niekbouman/ctbignum",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}