dev-util/distro-info: version bump to 0.22
authorYuri Konotopov <ykonotopov@gnome.org>
Wed, 9 Oct 2019 16:35:37 +0000 (20:35 +0400)
committerJoonas Niilola <juippis@gentoo.org>
Sun, 13 Oct 2019 16:55:14 +0000 (19:55 +0300)
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>
dev-util/distro-info/Manifest
dev-util/distro-info/distro-info-0.22.ebuild [new file with mode: 0644]

index 357933eb7c511556bed387f9ec404dcb107cc4e7..6fa30436ffd37e379b3d67161106e2825f100591 100644 (file)
@@ -1 +1,2 @@
 DIST distro-info_0.14.tar.xz 26460 BLAKE2B eb34e31514f7acfd283ae9405132884ccae31b77d6cf7af3a8a341ac349d589cbd5d7828e763911fc490d6504edae4c90551b3d3cc3518eec1f47ab1dcc6ac60 SHA512 aa0055f21523e30fc7e9c94c92f87cbd05fc5d082ddc109d092e94dabafac7533ced984197797252eb698232b3d8f512b3c345ed6abef0ae074bf2770224955e
+DIST distro-info_0.22.tar.xz 29104 BLAKE2B 88eab833ea34de9e62f858e1fb9acfb94efb60114d2213b8bbb77a440c114dbac70a1707d1469113c1a98ea94d953ffa36480c132c294fd8e22b816a444b25e1 SHA512 b9d97e469b9173651c1816f39cc2315622b46f1579cbaba29c417a51417425e90a45283e83c7efee35db78621df08997f5395c8c1b0259f69e5cd91dee65793f
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 (file)
index 0000000..5eb8469
--- /dev/null
@@ -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
+}