From 40206d8d5b20b75e7990aa5ad3ca62643eb65c63 Mon Sep 17 00:00:00 2001 From: David Guglielmi Date: Sun, 3 Oct 2021 14:26:57 +0200 Subject: [PATCH] sci-mathematics/flint: add version compatible with app-misc/gorsatool --- sci-mathematics/flint/Manifest | 3 + .../files/flint-2.6.0-multilib-strict.patch | 20 ++++++ sci-mathematics/flint/flint-2.6.3.ebuild | 63 +++++++++++++++++++ 3 files changed, 86 insertions(+) create mode 100644 sci-mathematics/flint/Manifest create mode 100644 sci-mathematics/flint/files/flint-2.6.0-multilib-strict.patch create mode 100644 sci-mathematics/flint/flint-2.6.3.ebuild diff --git a/sci-mathematics/flint/Manifest b/sci-mathematics/flint/Manifest new file mode 100644 index 0000000..7c3631f --- /dev/null +++ b/sci-mathematics/flint/Manifest @@ -0,0 +1,3 @@ +AUX flint-2.6.0-multilib-strict.patch 622 BLAKE2B d383ce45fb82fabd62530cc15a8bda65f1b088a115985469cd5bfd13d96d0bb9a21d9a073d78aa7ee98f08bd3f75f81445f274777562bca8f317b553cb8483cd SHA512 d360d3d57427d66dedb2f12b2dad03dbbe8530b0bec4184829eed7d8ba534eb8d6e24b302b149dfb852e0415d2612ec9e6312f8f2ac6f0f6a264b8a1f0a66a78 +DIST flint-2.6.3.tar.gz 4526340 BLAKE2B d663b44166cd857f83c2752eb4d4f6dc45eb8de535089e5dbe9939ac1464f1d69f66b62184644fff1ecd1d171f389d5ab874873def670c702733a0eba17bfd13 SHA512 8e71570364c789b1d4eaaa5f5adf10212cab47bf1a9f45c333211035ed021a86bb7b1de1feec51e83b2e113e8168853e370f127d2d2b1e941a12aec71fe8ae9e +EBUILD flint-2.6.3.ebuild 1153 BLAKE2B 70cf050d9fd6f0e2bea7a7c74e0cce7ba5b6e77eacc577c465f1b124cecc142a875ab566ab0039fd4002aaca69b4b738f7337a93d110bd3e41a7ed3a2c85d5b0 SHA512 2a742666fe9f221d31563d8a9d2dcbbe45ba6cfa0ece09e833b269242cc56987739a7e199566420f778874273002675552efe5b67f5a9d12e24028cda45316d9 diff --git a/sci-mathematics/flint/files/flint-2.6.0-multilib-strict.patch b/sci-mathematics/flint/files/flint-2.6.0-multilib-strict.patch new file mode 100644 index 0000000..84ae3df --- /dev/null +++ b/sci-mathematics/flint/files/flint-2.6.0-multilib-strict.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9d94776..b04fa78 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -293,10 +293,12 @@ if(NOT MSVC) + target_link_libraries(flint PUBLIC m) + endif() + ++include(GNUInstallDirs) ++ + install(TARGETS flint +- RUNTIME DESTINATION bin +- ARCHIVE DESTINATION lib +- LIBRARY DESTINATION lib ++ RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" ++ ARCHIVE DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}" ++ LIBRARY DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}" + ) + + install(FILES ${HEADERS} DESTINATION include/flint) diff --git a/sci-mathematics/flint/flint-2.6.3.ebuild b/sci-mathematics/flint/flint-2.6.3.ebuild new file mode 100644 index 0000000..1ee7eca --- /dev/null +++ b/sci-mathematics/flint/flint-2.6.3.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..9} ) +inherit cmake-utils python-any-r1 + +DESCRIPTION="Fast Library for Number Theory" +HOMEPAGE="http://www.flintlib.org/" +SRC_URI="http://www.flintlib.org/${P}.tar.gz" + +LICENSE="LGPL-2.1+" +SLOT="0/14" +KEYWORDS="amd64 ~arm ~arm64 ppc ~x86" +IUSE="doc ntl test" + +RESTRICT="!test? ( test )" + +BDEPEND="doc? ( + dev-python/sphinx + app-text/texlive-core + dev-texlive/texlive-latex + dev-texlive/texlive-latexextra + ) + ${PYTHON_DEPS}" +DEPEND="dev-libs/gmp:= + dev-libs/mpfr:= + ntl? ( dev-libs/ntl:= )" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-2.6.0-multilib-strict.patch +) + +src_configure() { + local mycmakeargs=( + -DWITH_NTL="$(usex ntl)" + -DBUILD_TESTING="$(usex test)" + -DBUILD_DOCS="$(usex doc)" + ) + + cmake-utils_src_configure + + if use doc ; then + HTML_DOCS="${BUILD_DIR}/html/*" + DOCS=( + "${S}"/README + "${S}"/AUTHORS + "${S}"/NEWS + "${BUILD_DIR}"/latex/Flint.pdf + ) + fi +} + +src_compile() { + cmake-utils_src_compile + + if use doc ; then + cmake-utils_src_make html + cmake-utils_src_make pdf + fi +}