Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sci-physics/hoppet/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DIST hoppet-1.2.0.tgz 575911 BLAKE2B 4d4dc1874b45b7237384ad3955808b5f4995c86b4d44165ef0c4d8b1da21880cdd1a3f1f1537f02ad7928baef5207e950be411465989ab876bcb806f355725cf SHA512 65ceb170cd417f229f8a974aa995138b8ee7ea5ef04538a5382b353181951e9d4489045234cd45c1ea8f88a5faf4755e3a0e246065711f137676bbf726a29f1f
DIST hoppet-2.0.0.gh.tar.gz 13568415 BLAKE2B 4766a649a1ca8162e2a8ed5cc49425add6fe4da244e3b69033da02af5942185bc7c125addce830918bcf7d7f3b3d276b74acfa22da3cbab4c6e3b1dc082a2ca4 SHA512 5c70a00b47c73f9cf3c0018d7217a5cc9ae3f218985eaebde397360a9f7e080306b22dbdcce4b7c190aa44975c7fc3761e9a15f1455363fda2a401daf41241b8
66 changes: 66 additions & 0 deletions sci-physics/hoppet/hoppet-2.0.0.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Copyright 2022-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{11..13} )

inherit cmake fortran-2 python-single-r1

MY_PV=${PV//_/-}
MY_P=${P//_/-}

DESCRIPTION="Higher Order Perturbative Parton Evolution Toolkit"
HOMEPAGE="
https://hoppet.hepforge.org/
https://github.com/gavinsalam/hoppet
"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/hoppet-code/hoppet"
EGIT_BRANCH="master"
else
SRC_URI="https://github.com/hoppet-code/hoppet/archive/refs/tags/${MY_P}.tar.gz -> ${P}.gh.tar.gz"
S="${WORKDIR}/${PN}-${MY_P}"
KEYWORDS="~amd64"
fi

SLOT="0"
LICENSE="GPL-3+"
IUSE="exact-coef examples python test"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RESTRICT="!test? ( test )"
DEPEND="
python? (
${PYTHON_DEPS}
dev-lang/swig
)
"
RDEPEND="${DEPEND}"

pkg_setup() {
use python && python-single-r1_pkg_setup
fortran-2_pkg_setup
}

src_configure() {
local mycmakeargs=(
-DHOPPET_USE_EXACT_COEF=$(usex exact-coef)
-DHOPPET_BUILD_PYINTERFACE=$(usex python)
-DHOPPET_BUILD_EXAMPLES=$(usex examples)
-DHOPPET_ENABLE_TESTING=$(usex test)
-DHOPPET_BUILD_BENCHMARK=OFF
-DHOPPET_ENABLE_DEBUG=OFF
)
cmake_src_configure
}

src_install() {
cmake_src_install
if use examples; then
docinto examples
dodoc -r example/.
docompress -x /usr/share/doc/${PF}/examples
fi
find "${ED}" -name '*.la' -delete || die
}
66 changes: 66 additions & 0 deletions sci-physics/hoppet/hoppet-9999.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Copyright 2022-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{11..13} )

inherit cmake fortran-2 python-single-r1

MY_PV=${PV//_/-}
MY_P=${P//_/-}

DESCRIPTION="Higher Order Perturbative Parton Evolution Toolkit"
HOMEPAGE="
https://hoppet.hepforge.org/
https://github.com/gavinsalam/hoppet
"
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/hoppet-code/hoppet"
EGIT_BRANCH="master"
else
SRC_URI="https://github.com/hoppet-code/hoppet/archive/refs/tags/${MY_P}.tar.gz -> ${P}.gh.tar.gz"
S="${WORKDIR}/${PN}-${MY_P}"
KEYWORDS="~amd64"
fi

SLOT="0"
LICENSE="GPL-3+"
IUSE="exact-coef examples python test"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RESTRICT="!test? ( test )"
DEPEND="
python? (
${PYTHON_DEPS}
dev-lang/swig
)
"
RDEPEND="${DEPEND}"

pkg_setup() {
use python && python-single-r1_pkg_setup
fortran-2_pkg_setup
}

src_configure() {
local mycmakeargs=(
-DHOPPET_USE_EXACT_COEF=$(usex exact-coef)
-DHOPPET_BUILD_PYINTERFACE=$(usex python)
-DHOPPET_BUILD_EXAMPLES=$(usex examples)
-DHOPPET_ENABLE_TESTING=$(usex test)
-DHOPPET_BUILD_BENCHMARK=OFF
-DHOPPET_ENABLE_DEBUG=OFF
)
cmake_src_configure
}

src_install() {
cmake_src_install
if use examples; then
docinto examples
dodoc -r example/.
docompress -x /usr/share/doc/${PF}/examples
fi
find "${ED}" -name '*.la' -delete || die
}
5 changes: 4 additions & 1 deletion sci-physics/hoppet/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
HOPPET is a Fortran 95 package for carrying out DGLAP evolution and other common manipulations of parton distribution functions (PDFs).
</longdescription>
<upstream>
<remote-id type="github">gavinsalam/hoppet</remote-id>
<remote-id type="github">hoppet-code/hoppet</remote-id>
</upstream>
<use>
<flag name="exact-coef"> Use exact coefficient functions </flag>
</use>
</pkgmetadata>