libnl-3.3.9999.ebuild 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. PYTHON_COMPAT=( python2_7 python3_{4,5} )
  5. DISTUTILS_OPTIONAL=1
  6. inherit autotools distutils-r1 eutils git-r3 libtool multilib multilib-minimal
  7. DESCRIPTION="Libraries providing APIs to netlink protocol based Linux kernel interfaces"
  8. HOMEPAGE="http://www.infradead.org/~tgr/libnl/ https://github.com/thom311/libnl"
  9. EGIT_REPO_URI="
  10. https://github.com/thom311/libnl.git
  11. "
  12. LICENSE="LGPL-2.1 utils? ( GPL-2 )"
  13. SLOT="3"
  14. KEYWORDS=""
  15. IUSE="static-libs python utils"
  16. RDEPEND="
  17. python? ( ${PYTHON_DEPS} )
  18. abi_x86_32? (
  19. !<=app-emulation/emul-linux-x86-baselibs-20140508-r5
  20. !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
  21. )
  22. "
  23. DEPEND="
  24. ${RDEPEND}
  25. python? ( dev-lang/swig )
  26. sys-devel/bison
  27. sys-devel/flex
  28. "
  29. REQUIRED_USE="
  30. python? ( ${PYTHON_REQUIRED_USE} )
  31. "
  32. DOCS=(
  33. ChangeLog
  34. )
  35. MULTILIB_WRAPPED_HEADERS=(
  36. # we do not install CLI stuff for non-native
  37. /usr/include/libnl3/netlink/cli/addr.h
  38. /usr/include/libnl3/netlink/cli/class.h
  39. /usr/include/libnl3/netlink/cli/cls.h
  40. /usr/include/libnl3/netlink/cli/ct.h
  41. /usr/include/libnl3/netlink/cli/exp.h
  42. /usr/include/libnl3/netlink/cli/link.h
  43. /usr/include/libnl3/netlink/cli/neigh.h
  44. /usr/include/libnl3/netlink/cli/qdisc.h
  45. /usr/include/libnl3/netlink/cli/route.h
  46. /usr/include/libnl3/netlink/cli/rule.h
  47. /usr/include/libnl3/netlink/cli/tc.h
  48. /usr/include/libnl3/netlink/cli/utils.h
  49. )
  50. src_prepare() {
  51. default
  52. eautoreconf
  53. if use python; then
  54. cd "${S}"/python || die
  55. distutils-r1_src_prepare
  56. fi
  57. # out-of-source build broken
  58. # https://github.com/thom311/libnl/pull/58
  59. multilib_copy_sources
  60. }
  61. multilib_src_configure() {
  62. econf \
  63. --disable-silent-rules \
  64. $(use_enable static-libs static) \
  65. $(multilib_native_use_enable utils cli)
  66. }
  67. multilib_src_compile() {
  68. default
  69. if multilib_is_native_abi && use python; then
  70. cd python || die
  71. distutils-r1_src_compile
  72. fi
  73. }
  74. multilib_src_install() {
  75. emake DESTDIR="${D}" install
  76. if multilib_is_native_abi && use python; then
  77. # Unset DOCS= since distutils-r1.eclass interferes
  78. local DOCS=()
  79. cd python || die
  80. distutils-r1_src_install
  81. fi
  82. }
  83. multilib_src_install_all() {
  84. einstalldocs
  85. prune_libtool_files --modules
  86. }