commit:     3dbcad77d52ac33cdb4c6732db29305d9cf31a33
Author:     Sven Wegener <swegener <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  3 11:31:49 2016 +0000
Commit:     Sven Wegener <swegener <AT> gentoo <DOT> org>
CommitDate: Wed Aug  3 11:35:21 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3dbcad77

sys-firmware/sigrok-firmware-fx2lafw: Make binary USE flag apply to non-live 
ebuilds only

Package-Manager: portage-2.2.28
Signed-off-by: Sven Wegener <swegener <AT> gentoo.org>

 .../sigrok-firmware-fx2lafw-9999.ebuild              | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git 
a/sys-firmware/sigrok-firmware-fx2lafw/sigrok-firmware-fx2lafw-9999.ebuild 
b/sys-firmware/sigrok-firmware-fx2lafw/sigrok-firmware-fx2lafw-9999.ebuild
index 156ad5b..e2847a4 100644
--- a/sys-firmware/sigrok-firmware-fx2lafw/sigrok-firmware-fx2lafw-9999.ebuild
+++ b/sys-firmware/sigrok-firmware-fx2lafw/sigrok-firmware-fx2lafw-9999.ebuild
@@ -4,13 +4,18 @@
 
 EAPI="6"
 
+SDCC_DEPEND=">=dev-embedded/sdcc-2.9.0[device-lib(+),mcs51(+)]"
+
 if [[ ${PV} == "9999" ]]; then
        EGIT_REPO_URI="git://sigrok.org/${PN}"
+       IUSE=""
        inherit git-r3 autotools
 else
        SRC_URI="binary? ( 
http://sigrok.org/download/binary/${PN}/${PN}-bin-${PV}.tar.gz )
                !binary? ( http://sigrok.org/download/source/${PN}/${P}.tar.gz 
)"
        KEYWORDS="~amd64 ~x86"
+       IUSE="binary"
+       SDCC_DEPEND="!binary? ( ${SDCC_DEPEND} )"
 fi
 
 DESCRIPTION="open-source firmware for Cypress FX2 chips which makes them 
usable as simple logic analyzer hardware"
@@ -18,16 +23,19 @@ HOMEPAGE="http://sigrok.org/wiki/Fx2lafw";
 
 LICENSE="GPL-2+"
 SLOT="0"
-IUSE="binary"
 
 RDEPEND=""
 DEPEND="${RDEPEND}
-       !binary? ( >=dev-embedded/sdcc-2.9.0[device-lib(+),mcs51(+)] )"
+       ${SDCC_DEPEND}"
 
 src_unpack() {
-       [[ ${PV} == "9999" ]] && git-r3_src_unpack || default
-       # The binary & source dirs are slightly diff.
-       use binary && S="${WORKDIR}/${PN}-bin-${PV}"
+       if [[ ${PV} == "9999" ]]; then
+               git-r3_src_unpack
+       else
+               default
+               # The binary & source dirs are slightly diff.
+               use binary && S="${WORKDIR}/${PN}-bin-${PV}"
+       fi
 }
 
 src_prepare() {
@@ -36,7 +44,7 @@ src_prepare() {
 }
 
 src_install() {
-       if use binary ; then
+       if [[ ${PV} != "9999" ]] && use binary ; then
                insinto /usr/share/sigrok-firmware
                doins *.fw
                dodoc ChangeLog NEWS README

Reply via email to