dev-libs/legousbtower: Revbump for EAPI and eclass
authorBrian Evans <grknight@gentoo.org>
Fri, 19 Jan 2018 15:17:49 +0000 (10:17 -0500)
committerBrian Evans <grknight@gentoo.org>
Fri, 19 Jan 2018 15:17:49 +0000 (10:17 -0500)
Previously, it looked in the linux-mod eclass to check KV_MINOR = 4
as it expected 2.x to still be current.

Now it uses the modern linux-info eclass and compares with kernel_is

Package-Manager: Portage-2.3.19, Repoman-2.3.6

dev-libs/legousbtower/legousbtower-0.5.4-r1.ebuild [moved from dev-libs/legousbtower/legousbtower-0.5.4.ebuild with 71% similarity]

similarity index 71%
rename from dev-libs/legousbtower/legousbtower-0.5.4.ebuild
rename to dev-libs/legousbtower/legousbtower-0.5.4-r1.ebuild
index 4f09ec70ef7fb52704c3c92714eb8a946deaec2d..f8553d8ef6fb1f4a4c3496148c3c055ce888c03c 100644 (file)
@@ -1,7 +1,9 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-inherit linux-mod
+EAPI=6
+
+inherit linux-info
 
 DESCRIPTION="The lego mindstorms usb tower headers and/or modules"
 SRC_URI="mirror://sourceforge/legousb/${P}.tar.gz"
@@ -9,20 +11,24 @@ HOMEPAGE="http://legousb.sourceforge.net/"
 
 SLOT="0"
 LICENSE="MPL-1.0"
-KEYWORDS="amd64 ppc x86"
+KEYWORDS="~amd64 ~ppc ~x86"
 IUSE=""
 
+src_configure() {
+       if kernel_is -lt 2 5 ; then
+               econf
+       fi
+}
 src_compile()
 {
-       if [ ${KV_MINOR} -eq 4 ] ; then
-               econf || die "Configuration failed"
-               emake || die "Compilation failed"
+       if kernel_is -lt 2 5 ; then
+               emake
        fi
 }
 
 src_install() {
-       if [ ${KV_MINOR} -eq 4 ] ; then
-               einstall || die "Make Install Failed"
+       if kernel_is -lt 2 5 ; then
+               einstall
        else
                insinto /usr/include/LegoUSB
                doins include/legousbtower.h
@@ -33,7 +39,7 @@ src_install() {
 }
 
 pkg_postinst() {
-       if [ ${KV_MINOR} -eq 4 ] ; then
+       if kernel_is -lt 2 5 ; then
                elog "You are using the 2.4 kernel series."
                elog "These are unsupported."
        else