blob: 3c0713e8e1633b50d074d6958a1f016a3870324d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit cmake-utils
DESCRIPTION="Program for reducing Feynman integrals"
HOMEPAGE="http://reduze.hepforge.org/"
SRC_URI="http://reduze.hepforge.org/download/${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE="berkdb doc mpi"
RDEPEND=">=sci-mathematics/ginac-1.4.1
berkdb? ( sys-libs/db[cxx] )
mpi? ( virtual/mpi )"
DEPEND="${RDEPEND}
virtual/pkgconfig
doc? ( app-doc/doxygen )"
DOCS=( ChangeLog README )
src_prepare() {
epatch "${FILESDIR}"/${P}-gcc6.patch
# gentoo doc directory
sed -i \
-e "s:share/reduze:share/doc/${PF}:g" \
CMakeLists.txt || die
use doc || sed -i -e '/share/d' CMakeLists.txt
# prefix fix
sed -i \
-e "s:/usr:${EPREFIX}/usr:g" \
reduze/CMakeLists.txt || die
# 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=(
-DUSE_HASH_TABLE=ON
$(cmake-utils_use berkdb USE_DATABASE)
$(cmake-utils_use mpi USE_MPI)
)
cmake-utils_src_configure
}
src_compile() {
cmake-utils_src_compile all $(use doc && echo doc)
}
src_test() {
cd "${CMAKE_BUILD_DIR}"
emake check
use mpi && emake check_mpi
}
src_install() {
cmake-utils_src_install
use doc && dohtml -r "${CMAKE_BUILD_DIR}"/doc/code/html/*
}
|