diff options
Diffstat (limited to 'sci-libs/symengine')
-rw-r--r-- | sci-libs/symengine/Manifest | 5 | ||||
-rw-r--r-- | sci-libs/symengine/files/symengine-0.7.0-cmake-build-type.patch | 25 | ||||
-rw-r--r-- | sci-libs/symengine/metadata.xml | 2 | ||||
-rw-r--r-- | sci-libs/symengine/symengine-0.7.0.ebuild | 86 |
4 files changed, 116 insertions, 2 deletions
diff --git a/sci-libs/symengine/Manifest b/sci-libs/symengine/Manifest index 95c6511b6601..c77186b86b9a 100644 --- a/sci-libs/symengine/Manifest +++ b/sci-libs/symengine/Manifest @@ -1,3 +1,6 @@ +AUX symengine-0.7.0-cmake-build-type.patch 1234 BLAKE2B b416e9b83db5eb6689bb9e18682d8f36f6ec13a4fe368004d2c3f961945cb0d1ec94081cb2c99bb16656439214cfd127a21cad2844a4752cd5c2fa6f40f3a3dc SHA512 d5e09a9603fab4caa9d9b091a0636be5ab8eddea6cb5b37b184ff7a65ac9707536f1a71e1893e0b5f795efb33396ae653d2745487aa863f7a239c63e42d22032 DIST symengine-0.6.0.tar.gz 763481 BLAKE2B 37fe94ad08463b31c7387ab296b201a4dda821ba59dfa548d0c42e70d23958bae24df3f035bd3fffb46cc08cc010d13a25e607a9e0644e9b3c0602fa0eb363b3 SHA512 cc6f0468534e5bcd466a810d44f9884b17858ca6c7151cdcadb3af0f7d8faf0d96697d5887ab65fc9094de80df825f8243dabc54e3f5c387be544880f49b482b +DIST symengine-0.7.0.tar.gz 802307 BLAKE2B de207f565f179deae37479eec82dfced3d83bfb7e643b4e6969135e10130dd05c888f34aa75c76c238ff1babfd0864f3329c3deee126b84ec33c4937c11dc20c SHA512 fd3198bc4a05ca2b9b8a58039cc21af65b44457f295362a1a9b8dbf9c6e3df5186c0c84b289bc9fe85d9efd5ac1a683f6b7ba9a661fb6d913d6ceefb14ee2348 EBUILD symengine-0.6.0.ebuild 2205 BLAKE2B 4bbd97357a16e4bbad1fcfdf26034dc51f5bd6718369f709978d0f9a7b399b473ea776ac6562979d29e1accc2f84f897ef8f58d116d0331e4092da5ba0278abb SHA512 403bb10352daad01d3665f06858400dd03875802817e0e1a8a8bf936fbd6a3cdd191ea4523aa056d6f19874125ad9949cea3b950a75c6dca75688848ed107c76 -MISC metadata.xml 1265 BLAKE2B f91a4783ae464dee61dbca5f532bb73a217600b49633f0c80ee46f7650f27f2e37e32cd4f5e14e171e6a47eb4c612d686f883034378afb73520ed0c22862d564 SHA512 f2a634346a9f703565959b48d7648df6abb088a479819aa3f9818ae941df168dbfa3cb1867f48673fce9f24dc890d05134689d93edb0d6761f2a54f4c802037e +EBUILD symengine-0.7.0.ebuild 2247 BLAKE2B 145b95b6ef29a24208147cb12aaefd595de1cd3af3a3ffe462e1e7bf1301d257f5ee30cef84857e0d8371e95968cb14a0fc6daa31c1f44ecb45dad0f53be97a2 SHA512 dcabb24fb7157bbdb92d3afdbfc6b47601f5a2d1629a690c407374604bda35315e03ed41df1233165f414aa8d6d453285bb7461b63d7523983d9d10fb8fd95af +MISC metadata.xml 1265 BLAKE2B 17511088cb7ab73232d65437c7eb1e980e13689a46a73f11ccd0b6cdd9c8e1cb0cc986c49a814a927bcc1e4badada87e57632f1ba209913b19989cadeb202c2c SHA512 52e2f32d0385f7b91c987539e8cfaf89d2daa1c8383b25eb651db12c050f733cceab6608d900d3d2464a8fedcdd5414bdaca506ca7420e1223b74703adbd322c diff --git a/sci-libs/symengine/files/symengine-0.7.0-cmake-build-type.patch b/sci-libs/symengine/files/symengine-0.7.0-cmake-build-type.patch new file mode 100644 index 000000000000..f490521f5c92 --- /dev/null +++ b/sci-libs/symengine/files/symengine-0.7.0-cmake-build-type.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cf1d213..3067481 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -17,11 +17,6 @@ if (NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Release + CACHE STRING "Build type (Debug, Release)" FORCE) + endif () +-if (NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR +- CMAKE_BUILD_TYPE STREQUAL "Release")) +- message("${CMAKE_BUILD_TYPE}") +- message(FATAL_ERROR "CMAKE_BUILD_TYPE must be one of: Debug, Release (current value: '${CMAKE_BUILD_TYPE}')") +-endif () + + set(BUILD_FOR_DISTRIBUTION no + CACHE BOOL "Building SymEngine for a distribution") +@@ -138,7 +133,7 @@ endif() + try_compile(HAVE_SYMENGINE_STD_TO_STRING "${CMAKE_CURRENT_BINARY_DIR}/cxx" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/checkstdtostring.cpp" + CMAKE_FLAGS "-DCOMPILE_DEFINITIONS=${CMAKE_CXX_FLAGS}") + +-if ((CMAKE_CXX_COMPILER_ID MATCHES Clang) AND (CMAKE_BUILD_TYPE STREQUAL "Release")) ++if ((CMAKE_CXX_COMPILER_ID MATCHES Clang) AND (NOT(CMAKE_BUILD_TYPE STREQUAL "Debug"))) + try_compile(CHECK_CLANG "${CMAKE_CURRENT_BINARY_DIR}/cxx" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/checkclang.cpp") + if (NOT ${CHECK_CLANG}) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__extern_always_inline=inline" ) diff --git a/sci-libs/symengine/metadata.xml b/sci-libs/symengine/metadata.xml index 759e5c9c0a48..53c407a4e64b 100644 --- a/sci-libs/symengine/metadata.xml +++ b/sci-libs/symengine/metadata.xml @@ -1,4 +1,4 @@ -<?xml version='1.0' encoding='UTF-8'?> +<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> diff --git a/sci-libs/symengine/symengine-0.7.0.ebuild b/sci-libs/symengine/symengine-0.7.0.ebuild new file mode 100644 index 000000000000..5a026514ef68 --- /dev/null +++ b/sci-libs/symengine/symengine-0.7.0.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake flag-o-matic toolchain-funcs + +DESCRIPTION="Fast symbolic manipulation library, written in C++" +HOMEPAGE="https://github.com/sympy/symengine" +SRC_URI="https://github.com/sympy/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0/0.4" +KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux" +IUSE="arb benchmarks boost debug doc ecm flint llvm mpc mpfr openmp test tcmalloc threads" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-libs/gmp:= + sys-libs/binutils-libs:= + arb? ( sci-mathematics/arb:= ) + boost? ( dev-libs/boost:= ) + ecm? ( sci-mathematics/gmp-ecm ) + flint? ( sci-mathematics/flint:= ) + mpc? ( dev-libs/mpc:= ) + tcmalloc? ( dev-util/google-perftools ) +" +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen[dot] ) +" + +PATCHES=( + "${FILESDIR}/${PN}-0.7.0-cmake-build-type.patch" +) + +pkg_pretend() { + use openmp && [[ ${MERGE_TYPE} != binary ]] && tc-check-openmp +} + +src_prepare() { + cmake_src_prepare + sed -e "s|DESTINATION doc| DESTINATION share/doc/${PF}/html|" \ + -e "s|/lib|/$(get_libdir)|g" \ + -e "s|lib/|$(get_libdir)/|g" \ + -e "/DESTINATION/s|lib|$(get_libdir)|g" \ + -i CMakeLists.txt symengine/CMakeLists.txt \ + symengine/utilities/teuchos/CMakeLists.txt || die +} + +src_configure() { + # not in portage yet: piranha + local int_class + + if use arb || use flint; then + int_class=flint + elif use mpfr; then + int_class=gmpxx + elif use boost; then + int_class=boostmp + else + int_class=gmp + fi + + local mycmakeargs=( + -DINTEGER_CLASS="${int_class}" + -DBUILD_BENCHMARKS="$(usex benchmarks)" + -DBUILD_DOXYGEN="$(usex doc)" + -DBUILD_TESTS="$(usex test)" + -DWITH_ARB="$(usex arb)" + -DWITH_BFD="$(usex debug)" + -DWITH_SYMENGINE_ASSERT="$(usex debug)" + -DWITH_SYMENGINE_THREAD_SAFE="$(usex threads)" + -DWITH_FLINT="$(usex flint)" + -DWITH_OPENMP="$(usex openmp)" + -DWITH_MPFR="$(usex mpfr)" + -DWITH_MPC="$(usex mpc)" + -DWITH_LLVM="$(usex llvm)" + -DWITH_PTHREAD="$(usex threads)" + -DWITH_TCMALLOC="$(usex tcmalloc)" + -DWITH_ECM="$(usex ecm)" + ) + use arb && mycmakeargs+=( -DARB_INCLUDE_DIR="${EPREFIX}/usr/include" ) + + test-flag-CXX -std=c++11 && append-cxxflags -std=c++11 + cmake_src_configure +} |