efivar-30.ebuild 954 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit flag-o-matic toolchain-funcs
  5. DESCRIPTION="Tools and library to manipulate EFI variables"
  6. HOMEPAGE="https://github.com/rhinstaller/efivar"
  7. SRC_URI="https://github.com/rhinstaller/efivar/releases/download/${PV}/${P}.tar.bz2"
  8. LICENSE="GPL-2"
  9. SLOT="0/1"
  10. KEYWORDS="amd64 ~arm64 ia64 x86"
  11. RDEPEND="dev-libs/popt"
  12. DEPEND="${RDEPEND}
  13. >=sys-kernel/linux-headers-3.18
  14. virtual/pkgconfig
  15. "
  16. src_prepare() {
  17. default
  18. sed -i -e s/-Werror// gcc.specs || die
  19. }
  20. src_configure() {
  21. tc-export CC
  22. # https://github.com/rhinstaller/efivar/issues/64
  23. append-cflags -flto
  24. tc-ld-disable-gold
  25. export libdir="/usr/$(get_libdir)"
  26. unset LIBS # Bug 562004
  27. }
  28. src_compile() {
  29. # Avoid building static binary/libs
  30. opts=(
  31. BINTARGETS=efivar
  32. STATICLIBTARGETS=
  33. )
  34. emake "${opts[@]}"
  35. }
  36. src_install() {
  37. emake "${opts[@]}" DESTDIR="${D}" install
  38. }