blob: c78f24cf915dd53b6fe596c52700a9235e0151c1 (
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
|
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
if [[ ${PV} == *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/Dobiasd/FunctionalPlus.git"
else
SRC_URI="https://github.com/Dobiasd/FunctionalPlus/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
fi
DESCRIPTION="Functional Programming Library for C++"
HOMEPAGE="
https://www.editgym.com/fplus-api-search/
https://github.com/Dobiasd/FunctionalPlus
"
LICENSE="Boost-1.0"
SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"
DEPEND="test? ( dev-cpp/doctest )"
S="${WORKDIR}/FunctionalPlus-${PV}"
fplus_test_wrapper() {
local BUILD_DIR="${WORKDIR}/${P}_build/test"
local CMAKE_USE_DIR="${S}/test"
$@
}
src_prepare() {
# avoid -Werror, bug 926538
sed -i 's/-Werror//' cmake/warnings.cmake || die
cmake_src_prepare
}
src_configure() {
cmake_src_configure
use test && fplus_test_wrapper cmake_src_configure
}
src_compile() {
cmake_src_compile
use test && fplus_test_wrapper cmake_src_compile
}
src_test() {
fplus_test_wrapper cmake_src_test
}
|