sigrok-firmware-fx2lafw-9999.ebuild 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="6"
  4. SDCC_DEPEND=">=dev-embedded/sdcc-2.9.0[device-lib(+),mcs51(+)]"
  5. if [[ ${PV} == "9999" ]]; then
  6. EGIT_REPO_URI="git://sigrok.org/${PN}"
  7. IUSE=""
  8. inherit git-r3 autotools
  9. else
  10. SRC_URI="binary? ( http://sigrok.org/download/binary/${PN}/${PN}-bin-${PV}.tar.gz )
  11. !binary? ( http://sigrok.org/download/source/${PN}/${P}.tar.gz )"
  12. KEYWORDS="~amd64 ~x86"
  13. IUSE="binary"
  14. SDCC_DEPEND="!binary? ( ${SDCC_DEPEND} )"
  15. fi
  16. DESCRIPTION="open-source firmware for Cypress FX2 chips which makes them usable as simple logic analyzer hardware"
  17. HOMEPAGE="http://sigrok.org/wiki/Fx2lafw"
  18. LICENSE="GPL-2+"
  19. SLOT="0"
  20. RDEPEND=""
  21. DEPEND="${RDEPEND}
  22. ${SDCC_DEPEND}"
  23. src_unpack() {
  24. if [[ ${PV} == "9999" ]]; then
  25. git-r3_src_unpack
  26. else
  27. default
  28. # The binary & source dirs are slightly diff.
  29. use binary && S="${WORKDIR}/${PN}-bin-${PV}"
  30. fi
  31. }
  32. src_prepare() {
  33. [[ ${PV} == "9999" ]] && eautoreconf
  34. eapply_user
  35. }
  36. src_install() {
  37. if [[ ${PV} != "9999" ]] && use binary ; then
  38. insinto /usr/share/sigrok-firmware
  39. doins *.fw
  40. dodoc ChangeLog NEWS README
  41. else
  42. default
  43. fi
  44. }