diff options
Diffstat (limited to 'sci-physics')
-rw-r--r-- | sci-physics/reduze/Manifest | 1 | ||||
-rw-r--r-- | sci-physics/reduze/files/reduze-2.2-db.patch | 6 | ||||
-rw-r--r-- | sci-physics/reduze/files/reduze-2.4-cmake.patch | 81 | ||||
-rw-r--r-- | sci-physics/reduze/reduze-2.4.ebuild | 58 |
4 files changed, 143 insertions, 3 deletions
diff --git a/sci-physics/reduze/Manifest b/sci-physics/reduze/Manifest index b83b647d5cd7..d1d42971baeb 100644 --- a/sci-physics/reduze/Manifest +++ b/sci-physics/reduze/Manifest @@ -1 +1,2 @@ DIST reduze-2.2.tar.gz 669858 BLAKE2B 52c48f5547055087dc2969fe5a7a42281519cf1d9a454a675ea54741f3d5912cd9b135816994241fa206585038d683ba5a3849308ff0403f1d3507ec9b77fe00 SHA512 ca4ed6f754fc75511b0916e8c2eea26a69e0e30c604a714af76995038a8e11dc3b129157bf1a170e639ea0fc39f9f5102bba4ad503874f044ac91855d9a95dab +DIST reduze-2.4.tar.gz 671780 BLAKE2B f401c9b50df0801b0b3305a8b77c3fd3f82b7f36419f4b76a28994c4db1f1a267dc40f91b42ee11ec5c911f6fab0a39eaf9f5cb2e099aa08e6489cea05760795 SHA512 06d5fbd371a4c5e88b6b77ddab5231438dae288c58122a6060e09c525deecf013b664a016d916b10e29373cefbc1f13af708a0a71a1f8da4204a63074424f6c1 diff --git a/sci-physics/reduze/files/reduze-2.2-db.patch b/sci-physics/reduze/files/reduze-2.2-db.patch index 671cd5565e0a..a43de911be7a 100644 --- a/sci-physics/reduze/files/reduze-2.2-db.patch +++ b/sci-physics/reduze/files/reduze-2.2-db.patch @@ -1,6 +1,6 @@ -diff -r -U2 reduze-2.2.orig/reduze/CMakeLists.txt reduze-2.2/reduze/CMakeLists.txt ---- reduze-2.2.orig/reduze/CMakeLists.txt 2017-11-17 14:11:58.000000000 +0700 -+++ reduze-2.2/reduze/CMakeLists.txt 2017-12-19 20:27:17.508528174 +0700 +diff -r -U2 a/reduze/CMakeLists.txt b/reduze/CMakeLists.txt +--- a/reduze/CMakeLists.txt 2017-11-17 14:11:58.000000000 +0700 ++++ b/reduze/CMakeLists.txt 2017-12-19 20:27:17.508528174 +0700 @@ -84,9 +84,8 @@ message (STATUS "Building with Berkeley DB support") find_path(DB_INCLUDE_PATH NAMES dbstl_common.h diff --git a/sci-physics/reduze/files/reduze-2.4-cmake.patch b/sci-physics/reduze/files/reduze-2.4-cmake.patch new file mode 100644 index 000000000000..d45af23374b5 --- /dev/null +++ b/sci-physics/reduze/files/reduze-2.4-cmake.patch @@ -0,0 +1,81 @@ +From a64b26c6e5c6c49e5842280a8690ec0d31832ce8 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <asturm@gentoo.org> +Date: Sun, 7 Mar 2021 18:20:11 +0100 +Subject: [PATCH] Use GNUInstallDirs, add ENABLE_EXAMPLES option + +--- + CMakeLists.txt | 17 +++++++++++------ + reduze/CMakeLists.txt | 2 +- + tools/reduze1to2/CMakeLists.txt | 2 +- + 3 files changed, 13 insertions(+), 8 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e6207bd..a0cab4b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -29,11 +29,10 @@ + # - 'make package_source' creates the source tarball + # - 'make doc' creates the source code documentation using Doxygen + +-message (STATUS "Configuring package Reduze") +-cmake_minimum_required (VERSION 2.6) ++cmake_minimum_required (VERSION 2.8.12) + + project (Reduze) +-list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules") ++set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules") + include (GetGitRevisionDescription) + #git_describe_new (GIT_TAG) + git_describe(GIT_TAG) +@@ -76,6 +75,9 @@ if (NOT HAVE_TUTORIAL_PDF) + message (FATAL_ERROR "File ${TUTORIAL_PDF} not found") + endif (NOT HAVE_TUTORIAL_PDF) + ++include(GNUInstallDirs) ++ ++option (ENABLE_EXAMPLES "Install tools, examples" ON) + + # include configured file with git tag in source package + # NOTE1: make sure to build before pack (make; make package_source) ! +@@ -89,9 +91,12 @@ add_subdirectory ("reduze") + add_subdirectory ("tools/reduze1to2") + add_subdirectory ("check") + add_subdirectory ("doc/code") +-install (FILES "doc/tutorial/reduze2-tutorial.pdf" DESTINATION share/reduze/tutorial) +-install (FILES "tools/reduze-mma.m" DESTINATION share/reduze/tools) +-install (DIRECTORY "example" DESTINATION share/reduze PATTERN ".git" EXCLUDE) ++install (FILES "doc/tutorial/reduze2-tutorial.pdf" DESTINATION ${CMAKE_INSTALL_DOCDIR}) ++ ++if (ENABLE_EXAMPLES) ++ install (FILES "tools/reduze-mma.m" DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples) ++ install (DIRECTORY "example" DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples PATTERN ".git" EXCLUDE) ++endif () + + include (CPack) + +diff --git a/reduze/CMakeLists.txt b/reduze/CMakeLists.txt +index b296081..a76c307 100644 +--- a/reduze/CMakeLists.txt ++++ b/reduze/CMakeLists.txt +@@ -201,5 +201,5 @@ target_link_libraries (reduze yaml-cpp) + # installation + #------------------------------------------------------------------------------ + +-install (TARGETS reduze DESTINATION bin) ++install (TARGETS reduze DESTINATION ${CMAKE_INSTALL_BINDIR}) + +diff --git a/tools/reduze1to2/CMakeLists.txt b/tools/reduze1to2/CMakeLists.txt +index d1d4bd5..4822910 100644 +--- a/tools/reduze1to2/CMakeLists.txt ++++ b/tools/reduze1to2/CMakeLists.txt +@@ -9,6 +9,6 @@ add_executable (reduze1to2 ${reduze1to2_SOURCES}) + + set (CMAKE_CXX_FLAGS "-Wall -pedantic -Wno-long-long") + +-install (TARGETS reduze1to2 DESTINATION bin) ++install (TARGETS reduze1to2 DESTINATION ${CMAKE_INSTALL_BINDIR}) + + message (STATUS "Added build target 'reduze1to2'") +-- +2.30.1 + diff --git a/sci-physics/reduze/reduze-2.4.ebuild b/sci-physics/reduze/reduze-2.4.ebuild new file mode 100644 index 000000000000..c7ea66e3ee54 --- /dev/null +++ b/sci-physics/reduze/reduze-2.4.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +DESCRIPTION="Program for reducing Feynman integrals" +HOMEPAGE="https://reduze.hepforge.org/" +SRC_URI="https://reduze.hepforge.org/download/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="berkdb doc examples mpi" + +RDEPEND=" + >=sci-mathematics/ginac-1.4.1 + berkdb? ( sys-libs/db:6.0[cxx] ) + mpi? ( virtual/mpi )" +DEPEND="${RDEPEND}" +BDEPEND=" + virtual/pkgconfig + doc? ( app-doc/doxygen )" + +PATCHES=( + "${FILESDIR}"/${P}-cmake.patch + "${FILESDIR}"/${PN}-2.2-db.patch +) + +# remove bundled yaml-cpp +# no: it does not build. is it patched? +# sed -i -e '/add_subdirectory ("yaml")/d' CMakeLists.txt || die + +src_configure() { + local mycmakeargs=( + -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON # no thanks + -DUSE_HASH_TABLE=ON + -DUSE_DATABASE=$(usex berkdb) + -DENABLE_EXAMPLES=$(usex examples) + -DUSE_MPI=$(usex mpi) + ) + cmake_src_configure +} + +src_compile() { + cmake_src_compile all $(usev doc) +} + +src_test() { + cmake_build check + use mpi && cmake_build check_mpi +} + +src_install() { + use doc && local HTML_DOCS+=( "${BUILD_DIR}"/doc/code/html/. ) + cmake_src_install +} |