From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0516B13835C for ; Sat, 13 Mar 2021 09:43:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B8F9FE0844; Sat, 13 Mar 2021 09:43:01 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 85E49E0844 for ; Sat, 13 Mar 2021 09:43:01 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E26E4340A5C for ; Sat, 13 Mar 2021 09:42:59 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2F41B59D for ; Sat, 13 Mar 2021 09:42:58 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1615628566.8a9f1302a2520b7f2dc8ec83a5546fb1a8afef0e.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/symengine/, sci-libs/symengine/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-libs/symengine/Manifest sci-libs/symengine/files/symengine-0.7.0-cmake-build-type.patch sci-libs/symengine/symengine-0.7.0.ebuild X-VCS-Directories: sci-libs/symengine/files/ sci-libs/symengine/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 8a9f1302a2520b7f2dc8ec83a5546fb1a8afef0e X-VCS-Branch: master Date: Sat, 13 Mar 2021 09:42:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 09d64169-e3df-4020-85df-673e8f4c6d2b X-Archives-Hash: 527dd8c677ac725d44a3933d3bfd4817 commit: 8a9f1302a2520b7f2dc8ec83a5546fb1a8afef0e Author: Sam James gentoo org> AuthorDate: Sat Mar 13 09:13:39 2021 +0000 Commit: Sam James gentoo org> CommitDate: Sat Mar 13 09:42:46 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a9f1302 sci-libs/symengine: add 0.7.0 Signed-off-by: Sam James gentoo.org> sci-libs/symengine/Manifest | 1 + .../files/symengine-0.7.0-cmake-build-type.patch | 25 +++++++ sci-libs/symengine/symengine-0.7.0.ebuild | 86 ++++++++++++++++++++++ 3 files changed, 112 insertions(+) diff --git a/sci-libs/symengine/Manifest b/sci-libs/symengine/Manifest index bf9e0f69921..8add269cb67 100644 --- a/sci-libs/symengine/Manifest +++ b/sci-libs/symengine/Manifest @@ -1 +1,2 @@ DIST symengine-0.6.0.tar.gz 763481 BLAKE2B 37fe94ad08463b31c7387ab296b201a4dda821ba59dfa548d0c42e70d23958bae24df3f035bd3fffb46cc08cc010d13a25e607a9e0644e9b3c0602fa0eb363b3 SHA512 cc6f0468534e5bcd466a810d44f9884b17858ca6c7151cdcadb3af0f7d8faf0d96697d5887ab65fc9094de80df825f8243dabc54e3f5c387be544880f49b482b +DIST symengine-0.7.0.tar.gz 802307 BLAKE2B de207f565f179deae37479eec82dfced3d83bfb7e643b4e6969135e10130dd05c888f34aa75c76c238ff1babfd0864f3329c3deee126b84ec33c4937c11dc20c SHA512 fd3198bc4a05ca2b9b8a58039cc21af65b44457f295362a1a9b8dbf9c6e3df5186c0c84b289bc9fe85d9efd5ac1a683f6b7ba9a661fb6d913d6ceefb14ee2348 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 00000000000..f490521f5c9 --- /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/symengine-0.7.0.ebuild b/sci-libs/symengine/symengine-0.7.0.ebuild new file mode 100644 index 00000000000..5a026514ef6 --- /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 +}