diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-04-28 20:21:43 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-04-28 20:21:43 +0100 |
commit | 40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 (patch) | |
tree | 758c221bad35c9288d0bd6df9c7dfc226728e52c /sci-mathematics/flint | |
parent | 8d5dbd847cbc704a6a06405856e94b461011afe3 (diff) |
gentoo resync : 28.04.2021
Diffstat (limited to 'sci-mathematics/flint')
-rw-r--r-- | sci-mathematics/flint/Manifest | 3 | ||||
-rw-r--r-- | sci-mathematics/flint/files/flint-2.7.1-fix-cmake-findgmp.patch | 152 | ||||
-rw-r--r-- | sci-mathematics/flint/flint-2.7.1-r1.ebuild (renamed from sci-mathematics/flint/flint-2.7.1.ebuild) | 5 |
3 files changed, 157 insertions, 3 deletions
diff --git a/sci-mathematics/flint/Manifest b/sci-mathematics/flint/Manifest index c7089d589e86..e5035955746f 100644 --- a/sci-mathematics/flint/Manifest +++ b/sci-mathematics/flint/Manifest @@ -2,11 +2,12 @@ AUX flint-2.5.2-memory_message.patch 504 BLAKE2B ff8ddc685c973f75a133f36eb1284d8 AUX flint-2.5.2-pie.patch 3126 BLAKE2B 730b11cd1a47c476e7e12003a6a493fd019cd9fab7dcd5c691212bf23243378821b52c39bb0c1d0526e912aa6ae6b0d10939a155947932e6ba3df631df4cbf6c SHA512 58e11ac02c861f570887dcf61b1014fcb35e1b47104099a30511ad0ceab9340e4866b72b83f753421d8f33b611b59dbbe3156438789df69e0b3237320884d687 AUX flint-2.5.2-utf8.patch 625 BLAKE2B ab76e01125f0f483b09c22a30656019963a98629c36e24f85c96800fe587dafaf2dbd2d26d4e319a97a29a6618ce9caa3078da5101a3ac6613f380596855a08d SHA512 cb0bdddd3de1077c01d118b0c9e7052d8510c1be976c44be0465bcaae41e02d6da80f78854e1bbff9ef47584c604b39181a2066dc0630e5effc7c77282d2352a AUX flint-2.6.0-multilib-strict.patch 622 BLAKE2B d383ce45fb82fabd62530cc15a8bda65f1b088a115985469cd5bfd13d96d0bb9a21d9a073d78aa7ee98f08bd3f75f81445f274777562bca8f317b553cb8483cd SHA512 d360d3d57427d66dedb2f12b2dad03dbbe8530b0bec4184829eed7d8ba534eb8d6e24b302b149dfb852e0415d2612ec9e6312f8f2ac6f0f6a264b8a1f0a66a78 +AUX flint-2.7.1-fix-cmake-findgmp.patch 5711 BLAKE2B c8191a307f8d6fb545cdee06acc1d84f4a8eb43ff96dc32be9f28dd0336e4f4130e0d59b2b446638c7f29f0b9da9407d675b9bf223addf9d584eb6177aef3b36 SHA512 825ce6f102ab3e4506ad691cbe0cf596176dd6262746d053181ed54afbcd980b8cdfd33fda7e690cd4c764a0a6df60af0cec58cd82baaeb60d9c381333bedd11 AUX flintxx-include.patch 507 BLAKE2B 250e54de1ab5b70cffdac7348b78db543cbdb366efa419dea62ffed2b0b5f95b787019e96fb95b9253b5289d58a2322b41f660f1719516e410e4245b09accb7b SHA512 144dc23d8706e22c6ac5d50bc2ce6c9e2eb8016155bec48a809bceec435d07781105c073b669302132963f063ab1c311e7381f78cc29a0141ca78eceb25aa0dc DIST flint-2.5.2.tar.gz 2212242 BLAKE2B 36b9b1f2acb1d79534d85884d755fddba3b8b40efbe92aeeecd7d1526cd21f0849054c30d23c565c6a13c609992cf22f56f5b640da15e1c7e6ba6840fc710d47 SHA512 cce36947b558aabecaf780171b4bbc0e1330c3b1a7e3580717584be5cab4991d33b190531c7995b224a3a440e28c4a610d6f781901e29f48ced12a9c5ba960a2 DIST flint-2.6.3.tar.gz 4526340 BLAKE2B d663b44166cd857f83c2752eb4d4f6dc45eb8de535089e5dbe9939ac1464f1d69f66b62184644fff1ecd1d171f389d5ab874873def670c702733a0eba17bfd13 SHA512 8e71570364c789b1d4eaaa5f5adf10212cab47bf1a9f45c333211035ed021a86bb7b1de1feec51e83b2e113e8168853e370f127d2d2b1e941a12aec71fe8ae9e DIST flint-2.7.1.tar.gz 4945081 BLAKE2B 9dcc4b0062be08778cd8ada1794a73237ea091a7bff4a4673aa59eac9b414ed90e0291b9547bdf72aa30e48da11f98ff983267ea2e3dd1d75fcec00b24c86ca9 SHA512 abea97228e91089d82a9a44714e719064bef261c45f5f5b24700955bb841cc98a8182e04e6054fcbcaa3bd92f2f95a82bd5d168ec2171af6a58d4f71eb0a479a EBUILD flint-2.5.2-r1.ebuild 1714 BLAKE2B e1e6770c375f95ac1bb5d4284ffc205ba4a95d9933799718862ab31a12c87c3da9ed0c46509b808856a3663eef1d4bbd0c7334d9b1f76a192d66e196a2eb1683 SHA512 4ee441362d871807a93a9e9ab8d5a4d261f1c87ae0802525a780855ceb93666f3ca721a0fcbfc7d341522a0c8d81e3b28765ba6a1246a3535881e35e20ec24dd EBUILD flint-2.6.3-r1.ebuild 1170 BLAKE2B 48d562711cbc2dc0fb758b9f24679a9529e912ccf0008fbeb46d639f099798f69189266e2bda1a6b4c7337dd6dbd82f6fddd9db6a4b1cf7639c4e0d1b5ae3372 SHA512 891e482a3182179ffad15aeced9d8232c8b85b8ff399c3f396c7c36a053746a9e5cdbfb7633d60aa0f6935f41434f1001eb19445ea9dbd9740b8d5a1a901998e -EBUILD flint-2.7.1.ebuild 1319 BLAKE2B 0e271b4fd9653f99dd6943f68cf8b994659aa48475f09030121b3effa0b049f9b2fd63151af61c0c683215e068beb202bb81cd6b12163744d3605c3692ab81b4 SHA512 91855546b21c7ab90ac22f1923524e964fc1ba6b1485274ad2219c8ce09ced3ef32618dab426874d62253e9652d6312968dbff2521d94286eb87199f50b7dd7f +EBUILD flint-2.7.1-r1.ebuild 1374 BLAKE2B ff8a236d2cbf6b916636aa34a6ccf05373b84e36ad59eb3188214ab55b91fbdc12be435c742e4b7d34545f6eff1e0bfe26c1a092604ff3ede46cfd0006ada66b SHA512 9e2a7aa019698d4fc2e72f251cb3377c159b75ce73144feb8131ce1f065dd0ed6ae1d9f88bd2e094f5c64580e02f6aa98a176405019c3adf4fd3c43bd64c88f7 MISC metadata.xml 852 BLAKE2B 9d4e42cbf30d12f45eee522daebfa264095ecc7da2a031a0c7676066f2dadb18e71d7c53fd1f5c7220c78276029532999e44ccacad31903fb174ce2bf36ae3d0 SHA512 f05df1daaf10afa63535a1db4bf5a75185e9523aced9329d90df59e5ca5d1eeee23b30dfe3fab6a11bdcc95b1b5e9a8b1012a19457c66e3dccbdab5a6e303e4d diff --git a/sci-mathematics/flint/files/flint-2.7.1-fix-cmake-findgmp.patch b/sci-mathematics/flint/files/flint-2.7.1-fix-cmake-findgmp.patch new file mode 100644 index 000000000000..d94d65c08d7e --- /dev/null +++ b/sci-mathematics/flint/files/flint-2.7.1-fix-cmake-findgmp.patch @@ -0,0 +1,152 @@ +From 9f1ef23f34a7ceca1063606cfc749e4d32bef81c Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky <michael@orlitzky.com> +Date: Mon, 19 Apr 2021 16:56:54 -0400 +Subject: [PATCH 1/1] CMake/FindGMP.cmake: compile a test program to check the + gmp version. + +The existing GMP version check consists of grepping the contents of +the gmp.h header to parse out a few constants. This test fails, at +least, on Gentoo, where the usual header file is a wrapper that +includes the true header (to allow for simultaneous 32/64-bit +support). + +This commit updates the FindGMP check to compile a test program +against gmp.h that compares the version bounds within C, and reports +success or failure as the return value from main(). +--- + CMake/FindGMP.cmake | 97 +++++++++++++++++++++++++-------------------- + 1 file changed, 53 insertions(+), 44 deletions(-) + +diff --git a/CMake/FindGMP.cmake b/CMake/FindGMP.cmake +index ce4df70f5..bd2871ca3 100644 +--- a/CMake/FindGMP.cmake ++++ b/CMake/FindGMP.cmake +@@ -2,28 +2,23 @@ + # https://gmplib.org/ + # + # This module supports requiring a minimum version, e.g. you can do +-# find_package(GMP 6.0.0) +-# to require version 6.0.0 to newer of GMP. ++# find_package(GMP 6.2.1) ++# to require version 6.2.1 to newer of GMP. + # + # Once done this will define + # + # GMP_FOUND - system has GMP lib with correct version + # GMP_INCLUDE_DIRS - the GMP include directory + # GMP_LIBRARIES - the GMP library +-# GMP_VERSION - GMP version + # +-# Copyright (c) 2016 Jack Poulson, <jack.poulson@gmail.com> +-# Redistribution and use is allowed according to the terms of the BSD license. + +-find_path(GMP_INCLUDE_DIRS NAMES gmp.h PATHS $ENV{GMPDIR} ${INCLUDE_INSTALL_DIR}) +- +-# Set GMP_FIND_VERSION to 5.1.0 if no minimum version is specified ++# Set GMP_FIND_VERSION to 6.0.0 if no minimum version is specified + if(NOT GMP_FIND_VERSION) + if(NOT GMP_FIND_VERSION_MAJOR) +- set(GMP_FIND_VERSION_MAJOR 5) ++ set(GMP_FIND_VERSION_MAJOR 6) + endif() + if(NOT GMP_FIND_VERSION_MINOR) +- set(GMP_FIND_VERSION_MINOR 1) ++ set(GMP_FIND_VERSION_MINOR 0) + endif() + if(NOT GMP_FIND_VERSION_PATCH) + set(GMP_FIND_VERSION_PATCH 0) +@@ -32,43 +27,57 @@ if(NOT GMP_FIND_VERSION) + "${GMP_FIND_VERSION_MAJOR}.${GMP_FIND_VERSION_MINOR}.${GMP_FIND_VERSION_PATCH}") + endif() + +-if(GMP_INCLUDE_DIRS) +- # Since the GMP version macros may be in a file included by gmp.h of the form +- # gmp-.*[_]?.*.h (e.g., gmp-x86_64.h), we search each of them. +- file(GLOB GMP_HEADERS "${GMP_INCLUDE_DIRS}/gmp.h" "${GMP_INCLUDE_DIRS}/gmp-*.h" +- "${GMP_INCLUDE_DIRS}/x86*/gmp.h") +- foreach(gmp_header_filename ${GMP_HEADERS}) +- file(READ "${gmp_header_filename}" _gmp_version_header) +- string(REGEX MATCH +- "define[ \t]+__GNU_MP_VERSION[ \t]+([0-9]+)" _gmp_major_version_match +- "${_gmp_version_header}") +- if(_gmp_major_version_match) +- set(GMP_MAJOR_VERSION "${CMAKE_MATCH_1}") +- string(REGEX MATCH "define[ \t]+__GNU_MP_VERSION_MINOR[ \t]+([0-9]+)" +- _gmp_minor_version_match "${_gmp_version_header}") +- set(GMP_MINOR_VERSION "${CMAKE_MATCH_1}") +- string(REGEX MATCH "define[ \t]+__GNU_MP_VERSION_PATCHLEVEL[ \t]+([0-9]+)" +- _gmp_patchlevel_version_match "${_gmp_version_header}") +- set(GMP_PATCHLEVEL_VERSION "${CMAKE_MATCH_1}") +- set(GMP_VERSION +- ${GMP_MAJOR_VERSION}.${GMP_MINOR_VERSION}.${GMP_PATCHLEVEL_VERSION}) +- endif() +- endforeach() ++find_path(GMP_INCLUDE_DIRS ++ NAMES gmp.h ++ PATHS $ENV{GMPDIR} ${INCLUDE_INSTALL_DIR}) + +- # Check whether found version exists and exceeds the minimum requirement +- if(NOT GMP_VERSION) +- set(GMP_VERSION_OK FALSE) +- message(STATUS "GMP version was not detected") +- elseif(${GMP_VERSION} VERSION_LESS ${GMP_FIND_VERSION}) +- set(GMP_VERSION_OK FALSE) +- message(STATUS "GMP version ${GMP_VERSION} found in ${GMP_INCLUDE_DIRS}, " +- "but at least version ${GMP_FIND_VERSION} is required") +- else() +- set(GMP_VERSION_OK TRUE) +- endif() ++find_library(GMP_LIBRARIES ++ gmp ++ PATHS $ENV{GMPDIR} ${LIB_INSTALL_DIR}) ++ ++if(GMP_INCLUDE_DIRS AND GMP_LIBRARIES) ++ ++ # Return "1" if the version is OK, or "0" otherwise. This is ++ # opposite the usual C program conventions, but makes the purpose of ++ # the result variable semantically clear. We create an integer using ++ # a few basic GMP functions to ensure that we can actually link against ++ # the GMP library. ++ file(WRITE ${PROJECT_BINARY_DIR}/gmp-version-check.c "" ++ "#include <gmp.h>\n" ++ "\n" ++ "int main(int argc, char **argv) {\n" ++ " mpz_t x;\n" ++ " mpz_init_set_str(x, \"7612058254738945\", 10);\n" ++ " mpz_clear(x);\n" ++ " if (__GNU_MP_VERSION < ${GMP_FIND_VERSION_MAJOR}) {\n" ++ " return 0;\n" ++ " }\n" ++ " else {\n" ++ " if (__GNU_MP_VERSION_MINOR < ${GMP_FIND_VERSION_MINOR}) {\n" ++ " return 0;\n" ++ " }\n" ++ " else {\n" ++ " if (__GNU_MP_VERSION_PATCHLEVEL < ${GMP_FIND_VERSION_PATCH}) {\n" ++ " return 0;\n" ++ " }\n" ++ " }\n" ++ " }\n" ++ " return 1;\n" ++ "}\n") ++ ++ # Try to run the test program above with the appropriate version ++ # strings substituted in. ++ try_run(GMP_VERSION_OK ++ GMP_VERSION_COMPILE_OK ++ "${PROJECT_BINARY_DIR}" ++ "${PROJECT_BINARY_DIR}/gmp-version-check.c" ++ CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${GMP_INCLUDE_DIRS}" ++ LINK_LIBRARIES "${GMP_LIBRARIES}") + endif() + +-find_library(GMP_LIBRARIES gmp PATHS $ENV{GMPDIR} ${LIB_INSTALL_DIR}) ++if(NOT GMP_VERSION_OK) ++ message(STATUS "No sufficient GMP version detected") ++endif() + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(GMP DEFAULT_MSG +-- +2.26.3 + diff --git a/sci-mathematics/flint/flint-2.7.1.ebuild b/sci-mathematics/flint/flint-2.7.1-r1.ebuild index 6557576cf7d8..912adc940b12 100644 --- a/sci-mathematics/flint/flint-2.7.1.ebuild +++ b/sci-mathematics/flint/flint-2.7.1-r1.ebuild @@ -3,6 +3,8 @@ EAPI=7 +# ninja doesn't like "-lcblas" so using make. +CMAKE_MAKEFILE_GENERATOR="emake" PYTHON_COMPAT=( python3_{7..9} ) inherit cmake python-any-r1 @@ -34,8 +36,7 @@ DEPEND="dev-libs/gmp:= virtual/cblas" RDEPEND="${DEPEND}" -# ninja doesn't like "-lcblas" so using make. -CMAKE_MAKEFILE_GENERATOR="emake" +PATCHES=( "${FILESDIR}/${P}-fix-cmake-findgmp.patch" ) src_configure() { local mycmakeargs=( |