Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions ports/gmp/adddef.patch
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions ports/gmp/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ if(VCPKG_TARGET_IS_WINDOWS)
vs.build.patch
runtime.patch
prefix.patch
adddef.patch
)
vcpkg_find_acquire_program(YASM)
get_filename_component(YASM_DIR "${YASM}" DIRECTORY)
Expand Down Expand Up @@ -81,6 +82,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
Expand Down
2 changes: 1 addition & 1 deletion ports/gmp/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gmp",
"version-string": "6.2.0",
"port-version": 3,
"port-version": 4,
"description": "The GNU Multiple Precision Arithmetic Library",
"homepage": "https://gmplib.org",
"dependencies": [
Expand Down
5 changes: 5 additions & 0 deletions ports/mpc/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Source: mpc
Version: 1.2.0
Homepage: http://www.multiprecision.org/mpc/
Description: GNU MPC is a C library for the arithmetic of complex numbers with arbitrarily high precision and correct rounding of the result.
Build-Depends: gmp, mpfr
15 changes: 15 additions & 0 deletions ports/mpc/gmpd.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/configure.ac b/configure.ac
index ab3da6092..2533df1d8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -151,7 +151,9 @@ AC_CHECK_FUNCS([dup dup2],,

AC_CHECK_LIB([gmp], [__gmpz_init],
[LIBS="-lgmp $LIBS"],
- [AC_MSG_ERROR([libgmp not found or uses a different ABI (including static vs shared).])])
+ [AC_CHECK_LIB([gmpd], [__gmpz_init],
+ [LIBS="-lgmpd $LIBS"],
+ [AC_MSG_ERROR([libgmp not found or uses a different ABI (including static vs shared).])])])

AC_MSG_CHECKING(for MPFR)
LIBS="-lmpfr $LIBS"
27 changes: 27 additions & 0 deletions ports/mpc/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
vcpkg_download_distfile(ARCHIVE
URLS "https://ftp.gnu.org/gnu/mpc/mpc-1.2.0.tar.gz"
FILENAME "mpc-1.2.0.tar.gz"
SHA512 84fa3338f51d369111456a63ad040256a1beb70699e21e2a932c779aa1c3bd08b201412c1659ecbb58403ea0548faacc35996d94f88f0639549269b7563c61b7
)

vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES gmpd.patch
)

vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
AUTOCONFIG
)

vcpkg_install_make()

vcpkg_fixup_pkgconfig()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)

# # Handle copyright
file(INSTALL "${SOURCE_PATH}/COPYING.LESSER" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

281 changes: 0 additions & 281 deletions ports/mpfr/CMakeLists.txt

This file was deleted.

4 changes: 2 additions & 2 deletions ports/mpfr/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: mpfr
Version: 4.0.2-2
Version: 4.1.0
Homepage: https://www.mpfr.org
Description: The MPFR library is a C library for multiple-precision floating-point computations with correct rounding
Build-Depends: mpir
Build-Depends: gmp
13 changes: 13 additions & 0 deletions ports/mpfr/dll.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/configure.ac b/configure.ac
index fdee5978d..0791b2528 100644
--- a/configure.ac
+++ b/configure.ac
@@ -593,7 +593,7 @@ case $host in
AC_MSG_CHECKING(for DLL/static GMP)
if test "$enable_shared" = yes; then
MPFR_LDFLAGS="$MPFR_LDFLAGS -no-undefined"
- LIBMPFR_LDFLAGS="$LIBMPFR_LDFLAGS -Wl,--output-def,.libs/libmpfr-6.dll.def"
+ LIBMPFR_LDFLAGS="$LIBMPFR_LDFLAGS -W1,--no-undefined"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include "gmp.h"
#if !__GMP_LIBGMP_DLL
Loading