dtc-1.4.4.ebuild 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Copyright 1999-2017 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/dt-object-internal.txt
  23. Documentation/dts-format.txt
  24. Documentation/manual.txt
  25. "
  26. src_prepare() {
  27. default
  28. sed -i \
  29. -e '/^CFLAGS =/s:=:+=:' \
  30. -e '/^CPPFLAGS =/s:=:+=:' \
  31. -e 's:-Werror::' \
  32. -e 's:-g -Os::' \
  33. -e "/^PREFIX =/s:=.*:= ${EPREFIX}/usr:" \
  34. -e "/^LIBDIR =/s:=.*:= \$(PREFIX)/$(get_libdir):" \
  35. Makefile || die
  36. tc-export AR CC
  37. export V=1
  38. }
  39. src_install() {
  40. default
  41. use static-libs || find "${ED}" -name '*.a' -delete
  42. }