aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Karatarakis <alex@karatarakis.com>2017-09-04 01:10:26 -0700
committerGitHub <noreply@github.com>2017-09-04 01:10:26 -0700
commit8a9cfa193ac454b9c02d321c53fcb2e611e0fecb (patch)
tree446d634088533bbbfbff2657a2e50fd3d53e6a77
parent583c79c51fd809e292ea7bc2fe16981a6eefb98b (diff)
parent84dbcb72c0e19d811d12636f21d43408514e33f1 (diff)
downloadvcpkg-8a9cfa193ac454b9c02d321c53fcb2e611e0fecb.tar.gz
vcpkg-8a9cfa193ac454b9c02d321c53fcb2e611e0fecb.zip
Merge pull request #1767 from atkawa7/bigint
[bigint] init port
-rw-r--r--ports/bigint/CMakeLists.txt40
-rw-r--r--ports/bigint/CONTROL3
-rw-r--r--ports/bigint/portfile.cmake27
3 files changed, 70 insertions, 0 deletions
diff --git a/ports/bigint/CMakeLists.txt b/ports/bigint/CMakeLists.txt
new file mode 100644
index 000000000..cb62597ef
--- /dev/null
+++ b/ports/bigint/CMakeLists.txt
@@ -0,0 +1,40 @@
+cmake_minimum_required(VERSION 3.8.0)
+project(bigint)
+
+if(MSVC)
+ add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS)
+endif()
+
+include_directories(".")
+
+set(
+ bigint_srcs
+ BigUnsigned.cc
+ BigInteger.cc
+ BigIntegerAlgorithms.cc
+ BigUnsignedInABase.cc
+ BigIntegerUtils.cc
+)
+
+set(
+ bigint_hh
+ NumberlikeArray.hh
+ BigUnsigned.hh
+ BigInteger.hh
+ BigIntegerAlgorithms.hh
+ BigUnsignedInABase.hh
+ BigIntegerLibrary.hh
+)
+
+add_library(bigint ${bigint_srcs})
+
+install(
+ TARGETS bigint
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+if(NOT DISABLE_INSTALL_HEADERS)
+ install(FILES ${bigint_hh} DESTINATION include/bigint)
+endif()
diff --git a/ports/bigint/CONTROL b/ports/bigint/CONTROL
new file mode 100644
index 000000000..50f7bea65
--- /dev/null
+++ b/ports/bigint/CONTROL
@@ -0,0 +1,3 @@
+Source: bigint
+Version: 2010.04.30
+Description: C++ Big Integer Library
diff --git a/ports/bigint/portfile.cmake b/ports/bigint/portfile.cmake
new file mode 100644
index 000000000..8a710aa54
--- /dev/null
+++ b/ports/bigint/portfile.cmake
@@ -0,0 +1,27 @@
+include(vcpkg_common_functions)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ message(WARNING "Dynamic not supported building static")
+ set(VCPKG_LIBRARY_LINKAGE static)
+endif()
+
+
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/bigint-2010.04.30)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://mattmccutchen.net/bigint/bigint-2010.04.30.tar.bz2"
+ FILENAME "bigint-2010.04.30.tar.bz2"
+ SHA512 bb64380e51991f97a2489c04801ab4372f795b5e23870ad12d71087f1a2afba9b32f74dcdbdcb5228ebf0dd74a37185285bac7653dd3c62d6118d63c298689af
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
+)
+
+vcpkg_install_cmake()
+
+file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/bigint RENAME copyright)