libnl-1.1.4.ebuild 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils multilib toolchain-funcs
  5. DESCRIPTION="Libraries providing APIs to netlink protocol based Linux kernel interfaces"
  6. HOMEPAGE="http://www.infradead.org/~tgr/libnl/"
  7. SRC_URI="http://www.infradead.org/~tgr/libnl/files/${P}.tar.gz"
  8. LICENSE="LGPL-2.1"
  9. SLOT="1.1"
  10. KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux"
  11. IUSE="doc static-libs"
  12. DEPEND="doc? ( app-doc/doxygen )"
  13. DOCS=( ChangeLog )
  14. src_prepare() {
  15. epatch \
  16. "${FILESDIR}"/${PN}-1.1-vlan-header.patch \
  17. "${FILESDIR}"/${PN}-1.1-flags.patch \
  18. "${FILESDIR}"/${PN}-1.1.3-offsetof.patch
  19. sed -i \
  20. -e '/@echo/d' \
  21. Makefile.rules {lib,src,tests}/Makefile || die
  22. sed -i \
  23. -e 's|-g ||g' \
  24. Makefile.opts.in || die
  25. if ! use static-libs; then
  26. sed -i lib/Makefile -e '/OUT_AR/d' || die
  27. fi
  28. rm -f lib/libnl.a
  29. }
  30. src_compile() {
  31. emake AR=$(tc-getAR)
  32. if use doc ; then
  33. cd "${S}/doc"
  34. emake gendoc || die
  35. fi
  36. }
  37. src_install() {
  38. default
  39. if use doc ; then
  40. cd "${S}/doc"
  41. dohtml -r html/*
  42. fi
  43. }