aboutsummaryrefslogtreecommitdiff
path: root/ports/gmp
diff options
context:
space:
mode:
authorAlexander Neumann <30894796+Neumann-A@users.noreply.github.com>2021-01-25 08:01:16 +0100
committerGitHub <noreply@github.com>2021-01-24 23:01:16 -0800
commitf2ec6c5a7cf8441ae30a857c938694c4bfff424f (patch)
treedc0abf0efc350f936d1c8c629cbfe680a7e701de /ports/gmp
parent051b33d36cfdde9e027ff456491d1704159864af (diff)
downloadvcpkg-f2ec6c5a7cf8441ae30a857c938694c4bfff424f.tar.gz
vcpkg-f2ec6c5a7cf8441ae30a857c938694c4bfff424f.zip
[mpc/mpfr] Add new port / update mpfr (#13081)
* [mpc] add mpc port * [mpfr] update mpfr to use make. * [gmp] fix preprocessor define for dlls. * more fixes * fix mpfr regression on !windows * install autoconf-archive in provisioning script * change indent of patches Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * fix merge error * update PR * update baseline Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com> Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com> Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
Diffstat (limited to 'ports/gmp')
-rw-r--r--ports/gmp/adddef.patch12
-rw-r--r--ports/gmp/portfile.cmake12
-rw-r--r--ports/gmp/vcpkg.json3
3 files changed, 24 insertions, 3 deletions
diff --git a/ports/gmp/adddef.patch b/ports/gmp/adddef.patch
new file mode 100644
index 000000000..c2276ffc1
--- /dev/null
+++ b/ports/gmp/adddef.patch
@@ -0,0 +1,12 @@
+diff --git a/SMP/libgmp.def b/SMP/libgmp.def
+index 289f0e2d1..632274ab2 100644
+--- a/SMP/libgmp.def
++++ b/SMP/libgmp.def
+@@ -16,6 +16,7 @@ __gmp_randclear
+ __gmp_urandomb_ui
+ __gmp_urandomm_ui
+ __gmp_asprintf
++__gmp_vasprintf
+ __gmp_fprintf
+ __gmp_printf
+ __gmp_snprintf
diff --git a/ports/gmp/portfile.cmake b/ports/gmp/portfile.cmake
index d78d4cc30..e57ec4607 100644
--- a/ports/gmp/portfile.cmake
+++ b/ports/gmp/portfile.cmake
@@ -9,9 +9,10 @@ if(VCPKG_TARGET_IS_WINDOWS)
REF 0018c44e8dfcc3b64b43e0aea4b3f419f0b65fd0 #v6.2.1-2
SHA512 2405e2536ca9fe0b890f44f54c936ac0e4b5a9ebe6a19e1c48a9c21b7211d2a1b45865852e3c65a98a6735216a4e27bea75c0fd6e52efeed4baecd95da9895a5
HEAD_REF master
- PATCHES
+ PATCHES
vs.build.patch
runtime.patch
+ adddef.patch
)
include(${CURRENT_INSTALLED_DIR}/share/yasm-tool-helper/yasm-tool-helper.cmake)
@@ -80,6 +81,11 @@ if(VCPKG_TARGET_IS_WINDOWS)
configure_file("${SOURCE_PATH}/gmp.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gmp.pc" @ONLY)
configure_file("${SOURCE_PATH}/gmpxx.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gmpxx.pc" @ONLY)
vcpkg_fixup_pkgconfig()
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/gmp.h"
+ "#if defined(DLL_EXPORT) && defined(NO_ASM)"
+ "#if 1")
+ endif()
else()
vcpkg_download_distfile(
ARCHIVE
@@ -97,6 +103,7 @@ else()
vcpkg_configure_make(
SOURCE_PATH ${SOURCE_PATH}
AUTOCONFIG
+ OPTIONS ${OPTIONS}
)
vcpkg_install_make()
@@ -104,5 +111,6 @@ else()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share/")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+ # # Handle copyright
file(INSTALL "${SOURCE_PATH}/COPYINGv3" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
-endif()
+endif() \ No newline at end of file
diff --git a/ports/gmp/vcpkg.json b/ports/gmp/vcpkg.json
index 19f916179..f19d55d43 100644
--- a/ports/gmp/vcpkg.json
+++ b/ports/gmp/vcpkg.json
@@ -1,6 +1,7 @@
{
"name": "gmp",
- "version-string": "6.2.1-2",
+ "version-string": "6.2.1",
+ "port-version": 3,
"description": "The GNU Multiple Precision Arithmetic Library",
"homepage": "https://gmplib.org",
"supports": "windows & !(arm | arm64)",