talloc-2.1.8.ebuild 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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 )
  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. pkg_setup() {
  28. # try to turn off distcc and ccache for people that have a problem with it
  29. export DISTCC_DISABLE=1
  30. export CCACHE_DISABLE=1
  31. python-single-r1_pkg_setup
  32. }
  33. src_prepare() {
  34. default
  35. # what would you expect of waf? i won't even waste time trying.
  36. multilib_copy_sources
  37. }
  38. multilib_src_configure() {
  39. local extra_opts=()
  40. use compat && extra_opts+=( --enable-talloc-compat1 )
  41. if ! multilib_is_native_abi || ! use python; then
  42. extra_opts+=( --disable-python )
  43. fi
  44. waf-utils_src_configure \
  45. "${extra_opts[@]}"
  46. }
  47. multilib_src_compile() {
  48. waf-utils_src_compile
  49. }
  50. multilib_src_install() {
  51. waf-utils_src_install
  52. # waf is stupid, and no, we can't fix the build-system, since it's provided
  53. # as a brilliant binary blob thats decompressed on the fly
  54. if [[ ${CHOST} == *-darwin* ]] ; then
  55. install_name_tool \
  56. -id "${EPREFIX}"/usr/$(get_libdir)/libtalloc.2.dylib \
  57. "${ED}"/usr/$(get_libdir)/libtalloc.2.0.5.dylib || die
  58. if use python ; then
  59. install_name_tool \
  60. -id "${EPREFIX}"/usr/$(get_libdir)/libpytalloc-util.2.dylib \
  61. "${ED}"/usr/$(get_libdir)/libpytalloc-util.2.0.5.dylib || die
  62. install_name_tool \
  63. -change "${S}/bin/default/libtalloc.dylib" \
  64. "${EPREFIX}"/usr/$(get_libdir)/libtalloc.2.dylib \
  65. "${ED}"/usr/$(get_libdir)/libpytalloc-util.2.0.5.dylib || die
  66. install_name_tool \
  67. -change "${S}/bin/default/libtalloc.dylib" \
  68. "${EPREFIX}"/usr/$(get_libdir)/libtalloc.2.dylib \
  69. "${D}"$(python_get_sitedir)/talloc.bundle || die
  70. fi
  71. fi
  72. }