From c9c4edea07ac15e9742774b877a200f67cae899a Mon Sep 17 00:00:00 2001 From: Jeroen Roovers Date: Tue, 4 Feb 2020 09:52:16 +0100 Subject: net-misc/packETH: Add USE="cli gtk" Package-Manager: Portage-2.3.87, Repoman-2.3.20 Closes: https://bugs.gentoo.org/708190 Signed-off-by: Jeroen Roovers --- net-misc/packETH/packETH-2.1.ebuild | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) (limited to 'net-misc/packETH/packETH-2.1.ebuild') diff --git a/net-misc/packETH/packETH-2.1.ebuild b/net-misc/packETH/packETH-2.1.ebuild index be593baac9e6..1bfcc33114eb 100644 --- a/net-misc/packETH/packETH-2.1.ebuild +++ b/net-misc/packETH/packETH-2.1.ebuild @@ -11,15 +11,21 @@ SRC_URI="https://github.com/jemcek/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" LICENSE="GPL-3" SLOT="0" KEYWORDS="~amd64 ~x86" +IUSE="cli +gtk" +REQUIRED_USE=" + || ( cli gtk ) +" RDEPEND=" - dev-libs/glib:2 - x11-libs/gdk-pixbuf - x11-libs/gtk+:2 + gtk? ( + dev-libs/glib:2 + x11-libs/gdk-pixbuf + x11-libs/gtk+:2 + ) " DEPEND=" - virtual/pkgconfig ${RDEPEND} + gtk? ( virtual/pkgconfig ) " PATCHES=( "${FILESDIR}"/${PN}-1.8.1-libs-and-flags.patch @@ -29,5 +35,24 @@ DOCS=( AUTHORS CHANGELOG README ) src_prepare() { default - eautoreconf + use gtk && eautoreconf +} + +src_configure() { + use gtk && default +} + +src_compile() { + use gtk && default + use cli && emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" -C cli +} + +src_install() { + use gtk && default + + if use cli; then + dobin cli/${PN}cli + local i + for i in NEWS README TODO; do newdoc cli/${i} ${i}.cli; done + fi } -- cgit v1.2.3-65-gdbad