diff options
Diffstat (limited to 'ports/bigint')
| -rw-r--r-- | ports/bigint/CONTROL | 3 | ||||
| -rw-r--r-- | ports/bigint/fix-osx-usage.patch | 39 | ||||
| -rw-r--r-- | ports/bigint/portfile.cmake | 5 | ||||
| -rw-r--r-- | ports/bigint/usage | 5 | ||||
| -rw-r--r-- | ports/bigint/vcpkg-cmake-wrapper.cmake | 10 |
5 files changed, 59 insertions, 3 deletions
diff --git a/ports/bigint/CONTROL b/ports/bigint/CONTROL index b47401c79..d6291ac68 100644 --- a/ports/bigint/CONTROL +++ b/ports/bigint/CONTROL @@ -1,4 +1,5 @@ Source: bigint
-Version: 2010.04.30-4
+Version: 2010.04.30
+Port-Version: 5
Homepage: https://mattmccutchen.net/bigint
Description: C++ Big Integer Library
diff --git a/ports/bigint/fix-osx-usage.patch b/ports/bigint/fix-osx-usage.patch new file mode 100644 index 000000000..f387d7b29 --- /dev/null +++ b/ports/bigint/fix-osx-usage.patch @@ -0,0 +1,39 @@ +diff --git a/BigUnsigned.hh b/BigUnsigned.hh +index adf1c00..9228753 100644 +--- a/BigUnsigned.hh ++++ b/BigUnsigned.hh +@@ -20,7 +20,7 @@ public: + typedef unsigned long Blk; + + typedef NumberlikeArray<Blk>::Index Index; +- NumberlikeArray<Blk>::N; ++ using NumberlikeArray<Blk>::N; + + protected: + // Creates a BigUnsigned with a capacity; for internal use. +@@ -84,8 +84,8 @@ public: + // BIT/BLOCK ACCESSORS + + // Expose these from NumberlikeArray directly. +- NumberlikeArray<Blk>::getCapacity; +- NumberlikeArray<Blk>::getLength; ++ using NumberlikeArray<Blk>::getCapacity; ++ using NumberlikeArray<Blk>::getLength; + + /* Returns the requested block, or 0 if it is beyond the length (as if + * the number had 0s infinitely to the left). */ +diff --git a/BigUnsignedInABase.hh b/BigUnsignedInABase.hh +index 8f9bdce..0ea89c6 100644 +--- a/BigUnsignedInABase.hh ++++ b/BigUnsignedInABase.hh +@@ -100,8 +100,8 @@ public: + Base getBase() const { return base; } + + // Expose these from NumberlikeArray directly. +- NumberlikeArray<Digit>::getCapacity; +- NumberlikeArray<Digit>::getLength; ++ using NumberlikeArray<Digit>::getCapacity; ++ using NumberlikeArray<Digit>::getLength; + + /* Returns the requested digit, or 0 if it is beyond the length (as if + * the number had 0s infinitely to the left). */ diff --git a/ports/bigint/portfile.cmake b/ports/bigint/portfile.cmake index 2a0a22adb..07c43836f 100644 --- a/ports/bigint/portfile.cmake +++ b/ports/bigint/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_download_distfile(ARCHIVE @@ -11,6 +9,7 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} + PATCHES fix-osx-usage.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -23,4 +22,6 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +configure_file(${CURRENT_PORT_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY) +file(INSTALL ${CURRENT_PORT_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/bigint RENAME copyright) diff --git a/ports/bigint/usage b/ports/bigint/usage new file mode 100644 index 000000000..cf9dc6474 --- /dev/null +++ b/ports/bigint/usage @@ -0,0 +1,5 @@ +The package @PORT@:@TARGET_TRIPLET@ provides CMake targets:
+
+ find_package(@PORT@ CONFIG REQUIRED)
+ target_include_directories(main PRIVATE ${BIGINT_INCLUDE_DIRS})
+ target_link_libraries(main PRIVATE ${BIGINT_LIBRARIES})
diff --git a/ports/bigint/vcpkg-cmake-wrapper.cmake b/ports/bigint/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..92972c09f --- /dev/null +++ b/ports/bigint/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,10 @@ +include(SelectLibraryConfigurations)
+
+find_path(BIGINT_INCLUDE_DIR BigInteger.hh PATH_SUFFIXES bigint)
+find_library(BIGINT_LIBRARY_DEBUG NAMES bigint NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED)
+find_library(BIGINT_LIBRARY_RELEASE NAMES bigint NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED)
+
+select_library_configurations(BIGINT)
+
+set(BIGINT_INCLUDE_DIRS ${BIGINT_INCLUDE_DIR})
+set(BIGINT_LIBRARIES ${BIGINT_LIBRARY})
|
