summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Konotopov <ykonotopov@gnome.org>2019-10-09 20:35:37 +0400
committerJoonas Niilola <juippis@gentoo.org>2019-10-13 19:55:14 +0300
commit007100cba977c7ababdb6f42ca4d7603c1c0dd80 (patch)
treeeafde4ace5e01c9a517134842b0046f8584f336b /dev-util/distro-info/distro-info-0.22.ebuild
parentnet-misc/httpie: Bump to version 1.0.3 (diff)
downloadgentoo-007100cba977c7ababdb6f42ca4d7603c1c0dd80.tar.gz
gentoo-007100cba977c7ababdb6f42ca4d7603c1c0dd80.tar.bz2
gentoo-007100cba977c7ababdb6f42ca4d7603c1c0dd80.zip
dev-util/distro-info: version bump to 0.22
Closes: https://bugs.gentoo.org/696450 Package-Manager: Portage-2.3.76, Repoman-2.3.16 Signed-off-by: Yuri Konotopov <ykonotopov@gnome.org> Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'dev-util/distro-info/distro-info-0.22.ebuild')
-rw-r--r--dev-util/distro-info/distro-info-0.22.ebuild95
1 files changed, 95 insertions, 0 deletions
diff --git a/dev-util/distro-info/distro-info-0.22.ebuild b/dev-util/distro-info/distro-info-0.22.ebuild
new file mode 100644
index 000000000000..5eb8469e6df8
--- /dev/null
+++ b/dev-util/distro-info/distro-info-0.22.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{5,6,7} )
+DISTUTILS_OPTIONAL=true
+
+inherit distutils-r1
+
+DESCRIPTION="Provides information about the Debian distributions' releases"
+HOMEPAGE="https://debian.org"
+SRC_URI="mirror://debian/pool/main/d/${PN}/${PN}_${PV}.tar.xz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="python test"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+COMMON_DEPEND="dev-lang/perl:=
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="${COMMON_DEPEND}
+ python? ( dev-python/setuptools[${PYTHON_USEDEP}] )
+ test? (
+ dev-util/shunit2
+ dev-python/pylint[${PYTHON_USEDEP}]
+ )"
+RDEPEND="${COMMON_DEPEND}
+ dev-util/distro-info-data"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ default
+
+ # 1. Gentoo do not provides dpkg vendor information
+ # 2. Strip *FLAGS
+ # 3. Strip predefined CFLAGS
+ # 4. Point to correct perl's vendorlib
+ # 5. Remove python tests - python eclass will be used instead
+ sed -e "/cd python && python/d" \
+ -e "/VENDOR/d" \
+ -e "/dpkg-buildflags/d" \
+ -e "s/-g -O2//g" \
+ -e "s:\$(PREFIX)/share/perl5/Debian:\$(PERL_VENDORLIB)/Debian:g" \
+ -e "/pyversions/d" \
+ -i "${S}"/Makefile || die
+}
+
+src_configure() {
+ default
+
+ if use python; then
+ pushd ./python > /dev/null || die
+ distutils-r1_src_configure
+ popd > /dev/null || die
+ fi
+}
+
+src_compile() {
+ default
+
+ if use python; then
+ pushd ./python > /dev/null || die
+ distutils-r1_src_compile
+ popd > /dev/null || die
+ fi
+}
+
+src_install() {
+ emake PERL_VENDORLIB=$(perl -e 'require Config; print "$Config::Config{'vendorlib'}\n";') \
+ DESTDIR="${D}" install
+
+ if use python; then
+ pushd ./python > /dev/null || die
+ distutils-r1_src_install
+ popd > /dev/null || die
+ fi
+}
+
+src_test() {
+ TZ=UTC default
+
+ if use python; then
+ python_test() {
+ esetup.py test
+ }
+
+ pushd ./python > /dev/null || die
+ distutils-r1_src_test
+ popd > /dev/null || die
+ fi
+}