dtc-1.4.1-r1.ebuild 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  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-2
  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="http://devicetree.org/Device_Tree_Compiler"
  14. LICENSE="GPL-2"
  15. SLOT="0"
  16. IUSE="static-libs"
  17. RDEPEND=""
  18. DEPEND="app-arch/xz-utils
  19. sys-devel/flex
  20. sys-devel/bison"
  21. src_prepare() {
  22. epatch "${FILESDIR}"/${P}-missing-syms.patch
  23. epatch "${FILESDIR}"/${P}-echo-n.patch
  24. sed -i \
  25. -e '/^CFLAGS =/s:=:+=:' \
  26. -e '/^CPPFLAGS =/s:=:+=:' \
  27. -e 's:-Werror::' \
  28. -e 's:-g -Os::' \
  29. -e "/^PREFIX =/s:=.*:= ${EPREFIX}/usr:" \
  30. -e "/^LIBDIR =/s:=.*:= \$(PREFIX)/$(get_libdir):" \
  31. Makefile || die
  32. tc-export AR CC
  33. export V=1
  34. }
  35. src_install() {
  36. default
  37. use static-libs || find "${ED}" -name '*.a' -delete
  38. dodoc Documentation/manual.txt
  39. }