Skip to content

Commit e7e916b

Browse files
committed
sci-physics/hoppet: add 2.0.0_beta1, 9999
Signed-off-by: Alexander Puck Neuwirth <apn-pucky@gentoo.org>
1 parent 7a38826 commit e7e916b

4 files changed

Lines changed: 137 additions & 1 deletion

File tree

sci-physics/hoppet/Manifest

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
DIST hoppet-1.2.0.tgz 575911 BLAKE2B 4d4dc1874b45b7237384ad3955808b5f4995c86b4d44165ef0c4d8b1da21880cdd1a3f1f1537f02ad7928baef5207e950be411465989ab876bcb806f355725cf SHA512 65ceb170cd417f229f8a974aa995138b8ee7ea5ef04538a5382b353181951e9d4489045234cd45c1ea8f88a5faf4755e3a0e246065711f137676bbf726a29f1f
2+
DIST hoppet-2.0.0_beta1.gh.tar.gz 13562550 BLAKE2B 34b5c224f241f7207d9e43b2732a557bbbe9ba07cfe0d4bf6989c59cb17e69b24052b84d2cb9fa69a077b761fb66ff1a6883cea335c167ea68d0ea024bf2491e SHA512 90647bdb889e9b82bef6d7217b7fbdbe34036de265de9371f74ca6717f58e2fb956eab0d0076fbbcdaa196bff67d0e5b7086259ab63608a104b184429714c92b
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Copyright 2022-2024 Gentoo Authors
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
EAPI=8
5+
6+
PYTHON_COMPAT=( python3_{11..13} )
7+
8+
inherit cmake fortran-2 python-single-r1
9+
10+
MY_PV=${PV//_/-}
11+
MY_P=${P//_/-}
12+
13+
DESCRIPTION="Higher Order Perturbative Parton Evolution Toolkit"
14+
HOMEPAGE="
15+
https://hoppet.hepforge.org/
16+
https://github.com/gavinsalam/hoppet
17+
"
18+
if [[ ${PV} == 9999 ]]; then
19+
inherit git-r3
20+
EGIT_REPO_URI="https://github.com/hoppet-code/hoppet"
21+
EGIT_BRANCH="master"
22+
else
23+
SRC_URI="https://github.com/hoppet-code/hoppet/archive/refs/tags/${MY_P}.tar.gz -> ${P}.gh.tar.gz"
24+
S="${WORKDIR}/${PN}-${MY_P}"
25+
KEYWORDS="~amd64"
26+
fi
27+
28+
SLOT="0"
29+
LICENSE="GPL-3+"
30+
IUSE="exact-coef examples python test"
31+
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
32+
RESTRICT="!test? ( test )"
33+
DEPEND="
34+
python? (
35+
${PYTHON_DEPS}
36+
dev-lang/swig
37+
)
38+
"
39+
RDEPEND="${DEPEND}"
40+
41+
pkg_setup() {
42+
use python && python-single-r1_pkg_setup
43+
fortran-2_pkg_setup
44+
}
45+
46+
src_configure() {
47+
local mycmakeargs=(
48+
-DHOPPET_USE_EXACT_COEF=$(usex exact-coef)
49+
-DHOPPET_BUILD_PYINTERFACE=$(usex python)
50+
-DHOPPET_BUILD_EXAMPLES=$(usex examples)
51+
-DHOPPET_ENABLE_TESTING=$(usex test)
52+
-DHOPPET_BUILD_BENCHMARK=OFF
53+
-DHOPPET_ENABLE_DEBUG=OFF
54+
)
55+
cmake_src_configure
56+
}
57+
58+
src_install() {
59+
cmake_src_install
60+
if use examples; then
61+
docinto examples
62+
dodoc -r example/.
63+
docompress -x /usr/share/doc/${PF}/examples
64+
fi
65+
find "${ED}" -name '*.la' -delete || die
66+
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Copyright 2022-2024 Gentoo Authors
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
EAPI=8
5+
6+
PYTHON_COMPAT=( python3_{11..13} )
7+
8+
inherit cmake fortran-2 python-single-r1
9+
10+
MY_PV=${PV//_/-}
11+
MY_P=${P//_/-}
12+
13+
DESCRIPTION="Higher Order Perturbative Parton Evolution Toolkit"
14+
HOMEPAGE="
15+
https://hoppet.hepforge.org/
16+
https://github.com/gavinsalam/hoppet
17+
"
18+
if [[ ${PV} == 9999 ]]; then
19+
inherit git-r3
20+
EGIT_REPO_URI="https://github.com/hoppet-code/hoppet"
21+
EGIT_BRANCH="master"
22+
else
23+
SRC_URI="https://github.com/hoppet-code/hoppet/archive/refs/tags/${MY_P}.tar.gz -> ${P}.gh.tar.gz"
24+
S="${WORKDIR}/${PN}-${MY_P}"
25+
KEYWORDS="~amd64"
26+
fi
27+
28+
SLOT="0"
29+
LICENSE="GPL-3+"
30+
IUSE="exact-coef examples python test"
31+
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
32+
RESTRICT="!test? ( test )"
33+
DEPEND="
34+
python? (
35+
${PYTHON_DEPS}
36+
dev-lang/swig
37+
)
38+
"
39+
RDEPEND="${DEPEND}"
40+
41+
pkg_setup() {
42+
use python && python-single-r1_pkg_setup
43+
fortran-2_pkg_setup
44+
}
45+
46+
src_configure() {
47+
local mycmakeargs=(
48+
-DHOPPET_USE_EXACT_COEF=$(usex exact-coef)
49+
-DHOPPET_BUILD_PYINTERFACE=$(usex python)
50+
-DHOPPET_BUILD_EXAMPLES=$(usex examples)
51+
-DHOPPET_ENABLE_TESTING=$(usex test)
52+
-DHOPPET_BUILD_BENCHMARK=OFF
53+
-DHOPPET_ENABLE_DEBUG=OFF
54+
)
55+
cmake_src_configure
56+
}
57+
58+
src_install() {
59+
cmake_src_install
60+
if use examples; then
61+
docinto examples
62+
dodoc -r example/.
63+
docompress -x /usr/share/doc/${PF}/examples
64+
fi
65+
find "${ED}" -name '*.la' -delete || die
66+
}

sci-physics/hoppet/metadata.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
HOPPET is a Fortran 95 package for carrying out DGLAP evolution and other common manipulations of parton distribution functions (PDFs).
1515
</longdescription>
1616
<upstream>
17-
<remote-id type="github">gavinsalam/hoppet</remote-id>
17+
<remote-id type="github">hoppet-code/hoppet</remote-id>
1818
</upstream>
19+
<use>
20+
<flag name="exact-coef"> Use exact coefficient functions </flag>
21+
</use>
1922
</pkgmetadata>

0 commit comments

Comments
 (0)