talloc-2.1.5.ebuild 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. PYTHON_COMPAT=( python2_7 )
  5. PYTHON_REQ_USE="threads"
  6. inherit waf-utils python-single-r1 multilib multilib-minimal
  7. DESCRIPTION="Samba talloc library"
  8. HOMEPAGE="http://talloc.samba.org/"
  9. SRC_URI="http://samba.org/ftp/${PN}/${P}.tar.gz"
  10. LICENSE="GPL-3 LGPL-3+ LGPL-2"
  11. SLOT="0"
  12. KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~sparc-solaris"
  13. IUSE="compat +python"
  14. REQUIRED_USE="${PYTHON_REQUIRED_USE}"
  15. RDEPEND="python? ( ${PYTHON_DEPS} )
  16. !!<sys-libs/talloc-2.0.5"
  17. DEPEND="${RDEPEND}
  18. sys-devel/gettext
  19. dev-libs/libxslt
  20. ${PYTHON_DEPS}"
  21. WAF_BINARY="${S}/buildtools/bin/waf"
  22. RESTRICT="test"
  23. MULTILIB_WRAPPED_HEADERS=(
  24. # python goes only for native
  25. /usr/include/pytalloc.h
  26. )
  27. src_prepare() {
  28. # what would you expect of waf? i won't even waste time trying.
  29. multilib_copy_sources
  30. }
  31. multilib_src_configure() {
  32. local extra_opts=()
  33. use compat && extra_opts+=( --enable-talloc-compat1 )
  34. if ! multilib_is_native_abi || ! use python; then
  35. extra_opts+=( --disable-python )
  36. fi
  37. waf-utils_src_configure \
  38. "${extra_opts[@]}"
  39. }
  40. multilib_src_compile() {
  41. waf-utils_src_compile
  42. }
  43. multilib_src_install() {
  44. waf-utils_src_install
  45. # waf is stupid, and no, we can't fix the build-system, since it's provided
  46. # as a brilliant binary blob thats decompressed on the fly
  47. if [[ ${CHOST} == *-darwin* ]] ; then
  48. install_name_tool \
  49. -id "${EPREFIX}"/usr/$(get_libdir)/libtalloc.2.dylib \
  50. "${ED}"/usr/$(get_libdir)/libtalloc.2.0.5.dylib || die
  51. if use python ; then
  52. install_name_tool \
  53. -id "${EPREFIX}"/usr/$(get_libdir)/libpytalloc-util.2.dylib \
  54. "${ED}"/usr/$(get_libdir)/libpytalloc-util.2.0.5.dylib || die
  55. install_name_tool \
  56. -change "${S}/bin/default/libtalloc.dylib" \
  57. "${EPREFIX}"/usr/$(get_libdir)/libtalloc.2.dylib \
  58. "${ED}"/usr/$(get_libdir)/libpytalloc-util.2.0.5.dylib || die
  59. install_name_tool \
  60. -change "${S}/bin/default/libtalloc.dylib" \
  61. "${EPREFIX}"/usr/$(get_libdir)/libtalloc.2.dylib \
  62. "${D}"$(python_get_sitedir)/talloc.bundle || die
  63. fi
  64. fi
  65. }