dtc-1.4.2.ebuild 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit multilib toolchain-funcs eutils
  5. if [[ ${PV} == "9999" ]] ; then
  6. EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/dtc/dtc.git"
  7. inherit git-r3
  8. else
  9. SRC_URI="mirror://kernel/software/utils/${PN}/${P}.tar.xz"
  10. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
  11. fi
  12. DESCRIPTION="Open Firmware device tree compiler"
  13. HOMEPAGE="https://devicetree.org/ https://git.kernel.org/cgit/utils/dtc/dtc.git/"
  14. LICENSE="GPL-2"
  15. SLOT="0"
  16. IUSE="static-libs"
  17. DEPEND="
  18. sys-devel/bison
  19. sys-devel/flex
  20. "
  21. DOCS="
  22. Documentation/manual.txt
  23. "
  24. src_prepare() {
  25. default
  26. sed -i \
  27. -e '/^CFLAGS =/s:=:+=:' \
  28. -e '/^CPPFLAGS =/s:=:+=:' \
  29. -e 's:-Werror::' \
  30. -e 's:-g -Os::' \
  31. -e "/^PREFIX =/s:=.*:= ${EPREFIX}/usr:" \
  32. -e "/^LIBDIR =/s:=.*:= \$(PREFIX)/$(get_libdir):" \
  33. Makefile || die
  34. tc-export AR CC
  35. export V=1
  36. }
  37. src_install() {
  38. default
  39. use static-libs || find "${ED}" -name '*.a' -delete
  40. }