Skip to content

Commit

Permalink
update mpfr to 4.0.2 and fix build on osx (microsoft#8324)
Browse files Browse the repository at this point in the history
* update mpfr to 4.0.2
  • Loading branch information
TheScarfix authored and Rastaban committed Sep 24, 2019
1 parent de53bb8 commit 45e70a9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 18 deletions.
8 changes: 2 additions & 6 deletions ports/mpfr/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.3.0)

project(MPFR VERSION 3.1.5 LANGUAGES C)
project(MPFR VERSION 4.0.2 LANGUAGES C)

# Find GMP (or MPIR)
find_library(GMP_LIBRARY NAMES gmp mpir)
Expand Down Expand Up @@ -254,15 +254,11 @@ add_library(mpfr ${SRCS})
# target_compile_definitions(mpfr PRIVATE HAVE_CONFIG_H)
target_compile_definitions(mpfr PRIVATE __MPFR_WITHIN_MPFR)
target_compile_definitions(mpfr PRIVATE HAVE_STDINT_H)
target_compile_definitions(mpfr PRIVATE HAVE_STDARG)
if(BUILD_SHARED_LIBS)
target_compile_definitions(mpfr PRIVATE __GMP_LIBGMP_DLL)
endif()

try_compile(I_HAVE_STDARG ${CMAKE_BINARY_DIR} ${PROJECT_SOURCE_DIR}/test_stdarg.c)
if (I_HAVE_STDARG)
target_compile_definitions(mpfr PRIVATE HAVE_STDARG)
endif (I_HAVE_STDARG)

target_link_libraries(mpfr ${GMP_LIBRARIES})

target_include_directories(mpfr PUBLIC ${GMP_INCLUDE_DIRS})
Expand Down
2 changes: 1 addition & 1 deletion ports/mpfr/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: mpfr
Version: 4.0.1
Version: 4.0.2-1
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
9 changes: 4 additions & 5 deletions ports/mpfr/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mpfr-4.0.1)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mpfr-4.0.2)
vcpkg_download_distfile(ARCHIVE
URLS "http://www.mpfr.org/mpfr-4.0.1/mpfr-4.0.1.tar.xz"
FILENAME "mpfr-4.0.1.tar.xz"
SHA512 137ad68bc1e33a155edc1247fcdba27f999cf48ed526773136584090ddf2cfdfc9ea79fbf74ea1943b835b4b1ff29b05087114738c6ad3b485848540f30cac4f
URLS "http://www.mpfr.org/mpfr-4.0.2/mpfr-4.0.2.tar.xz"
FILENAME "mpfr-4.0.2.tar.xz"
SHA512 d583555d08863bf36c89b289ae26bae353d9a31f08ee3894520992d2c26e5683c4c9c193d7ad139632f71c0a476d85ea76182702a98bf08dde7b6f65a54f8b88
)

vcpkg_extract_source_archive(${ARCHIVE})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/test_stdarg.c DESTINATION ${SOURCE_PATH})

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
Expand Down
6 changes: 0 additions & 6 deletions ports/mpfr/test_stdarg.c

This file was deleted.

0 comments on commit 45e70a9

Please sign in to comment.