sys-cluster/genders: ebuild maintenance

Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2021-09-27 08:54:01 +02:00
parent 77d434b9b2
commit 06a1feea9d

View File

@@ -1,32 +1,24 @@
# Copyright 1999-2020 Gentoo Authors
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EAPI=8
PYTHON_COMPAT=( python3_{7..9} )
DISTUTILS_USE_SETUPTOOLS=no
MY_PV="$(ver_rs 1-2 -)"
MY_P="${PN}-${MY_PV}"
PYTHON_COMPAT=( python3_{8..10} pypy3 )
inherit autotools distutils-r1 perl-module java-pkg-opt-2 flag-o-matic
if [[ ${PV} = 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/chaos/${PN}.git"
else
MY_PV="$(ver_rs 1-2 -)"
MY_P="${PN}-${MY_PV}"
SRC_URI="https://github.com/chaos/${PN}/archive/${MY_P}.tar.gz"
KEYWORDS="~amd64"
S="${WORKDIR}/${PN}-${MY_P}"
fi
inherit distutils-r1 perl-module java-pkg-opt-2 flag-o-matic
DESCRIPTION="Static cluster configuration database used for cluster configuration management."
HOMEPAGE="https://github.com/chaos/genders"
SRC_URI="https://github.com/chaos/${PN}/archive/${MY_P}.tar.gz"
S="${WORKDIR}/${PN}-${MY_P}"
KEYWORDS="~amd64"
LICENSE="GPL-2"
SLOT="0"
IUSE="cxx java perl python"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
DOCS=( README TUTORIAL NEWS )
CDEPEND="
perl? ( dev-lang/perl:= )
@@ -41,6 +33,9 @@ RDEPEND="
java? ( virtual/jre:1.8 )
"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
DOCS=( README TUTORIAL NEWS )
src_prepare() {
sed -i "s|perl python||" src/extensions/Makefile.am
sed -i "s|\$(DESTDIR)\$(docdir)-\$(VERSION)-javadoc|\$(DESTDIR)\$(docdir)/html/javadoc|" src/extensions/java/Makefile.am
@@ -67,41 +62,45 @@ src_compile() {
default
if use perl ; then
cd "${S}/src/extensions/perl"
pushd "${S}/src/extensions/perl" || die
perl-module_src_configure
perl-module_src_compile
popd || die
fi
if use python; then
cd "${S}/src/extensions/python"
pushd "${S}/src/extensions/python" || die
cp genderssetup.py setup.py
distutils-r1_src_compile
popd || die
fi
}
src_test() {
cd src/testsuite
pushd src/testsuite || die
default
cd ../..
popd || die
}
src_install() {
default
if use perl ; then
cd "${S}/src/extensions/perl"
pushd "${S}/src/extensions/perl" || die
unset DOCS
myinst=( DESTDIR="${D}" )
perl-module_src_install
popd || die
fi
if use python; then
cd "${S}/src/extensions/python"
pushd "${S}/src/extensions/python" || die
unset DOCS
python_install() {
distutils-r1_python_install
}
distutils-r1_src_install
popd || die
fi
find "${ED}" -name '*.la' -delete || die