commit:     41c32ee395dd63146eac41cdcfff14522ef1c91d
Author:     Ian Stakenvicius <axs <AT> gentoo <DOT> org>
AuthorDate: Wed Jul  5 20:26:37 2017 +0000
Commit:     Ian Stakenvicius <axs <AT> gentoo <DOT> org>
CommitDate: Wed Jul  5 20:27:04 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41c32ee3

sys-libs/ldb: bump to v1.1.31

Package-Manager: Portage-2.3.6, Repoman-2.3.1

 sys-libs/ldb/Manifest                              |   1 +
 ....31-fix_PKGCONFIGDIR-when-python-disabled.patch |  17 ++++
 .../ldb/files/ldb-1.1.31-optional_packages.patch   |  57 +++++++++++
 .../files/ldb-1.1.31-talloc-disable-python.patch   |  34 +++++++
 sys-libs/ldb/ldb-1.1.31.ebuild                     | 104 +++++++++++++++++++++
 5 files changed, 213 insertions(+)

diff --git a/sys-libs/ldb/Manifest b/sys-libs/ldb/Manifest
index bda4f36f9b3..995fee1b1e7 100644
--- a/sys-libs/ldb/Manifest
+++ b/sys-libs/ldb/Manifest
@@ -2,3 +2,4 @@ DIST ldb-1.1.24.tar.gz 1258405 SHA256 
45e9f52473f0d013f0ea090cce35d6836a6e67e8d4
 DIST ldb-1.1.26.tar.gz 1262660 SHA256 
8843c7a72b980d9413ba6c494c039bccd10c524b37fda2917afb147745d8b2e6 SHA512 
484689c5b87f223820e3613c056de5528a87736baef7b884df506fc47a3412b35ba2ef8e85f62e2d3da803fdab6b37bb328d4347a20bfc8fef8ed557646b6bbe
 WHIRLPOOL 
eb72c85faaf4aaf5fa647c084f9ceb8938e940390618b1dfc486b6bc8f344d1296314cb4f07770a04de3c6597798420347fdb90ede380db9e29a04a35c88bfcb
 DIST ldb-1.1.27.tar.gz 1270356 SHA256 
cdb8269cba09006ddf3766eb7721192b52ae3fdc8a6b95f4318b6b740b9d35ac SHA512 
7c68425252964c7563a0c7da77687afed07c5a30f472f86d270372ac613c9f73776acbe1e9609fe9c5b3d1e560ac9e7c28076133d5c1cfa4637bdd114f955ce5
 WHIRLPOOL 
3cb04691ac9cda5ce0cb3c404446b3775161d8304dba38c3b7194b1195976805a453fe995eb0d9653c7578c3717c55b012fb4373693c62f240d35a34dc6d2a42
 DIST ldb-1.1.29.tar.gz 1277551 SHA256 
59d84f9a5b799f519ba7b2685bb46f5a26f1bbf05b7a144b2f5e017d01d80f97 SHA512 
d37bbe84358e05d17483e2e963b8477da5ea351b855b454142c94af35f7987bede0f19faeaff17779efe04e3bb37c510437fcc59be99a17c826620fc25fd659c
 WHIRLPOOL 
57370e31249d7df8a23a7162eed9ed45d625f11edb1d57df8bd42c687bb80531e74ddf7399bd5411a1546460378903f27506a4cd56685e8fc533dfc2014086fd
+DIST ldb-1.1.31.tar.gz 1337586 SHA256 
04d53e2ab5b35688f5ed7a4471f5b273da121016e1af0630b36a36506afaeb46 SHA512 
49ccd57000cbcc6d828160f4457236b28853d766d641841471f61226156b6103fe563c43c950577b038ea3c0a54506bca94c640d3d5f912a3b8af95eb9ef2824
 WHIRLPOOL 
8c368317ed7efe218e66b8dac9722552a6d9346daed87788d78a07263491977402a442f950b437022bc6473b3d4452e3f47c23209abef78c1a47372e2455af99

diff --git 
a/sys-libs/ldb/files/ldb-1.1.31-fix_PKGCONFIGDIR-when-python-disabled.patch 
b/sys-libs/ldb/files/ldb-1.1.31-fix_PKGCONFIGDIR-when-python-disabled.patch
new file mode 100644
index 00000000000..c45b13feba9
--- /dev/null
+++ b/sys-libs/ldb/files/ldb-1.1.31-fix_PKGCONFIGDIR-when-python-disabled.patch
@@ -0,0 +1,17 @@
+--- a/wscript  2017-07-05 15:35:52.178964698 -0400
++++ b/wscript  2017-07-05 15:49:20.137977649 -0400
+@@ -208,6 +208,14 @@
+         ldb_headers = ('include/ldb.h include/ldb_errors.h '
+                        'include/ldb_module.h include/ldb_handlers.h')
+ 
++        # we're not currently linking against the ldap libs, but ldb.pc.in
++        # has @LDAP_LIBS@
++        bld.env.LDAP_LIBS = ''
++
++        if not 'PACKAGE_VERSION' in bld.env:
++            bld.env.PACKAGE_VERSION = VERSION
++            bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
++
+         bld.SAMBA_LIBRARY('ldb',
+                           COMMON_SRC + ' ' + LDB_MAP_SRC,
+                           deps='tevent LIBLDB_MAIN replace',

diff --git a/sys-libs/ldb/files/ldb-1.1.31-optional_packages.patch 
b/sys-libs/ldb/files/ldb-1.1.31-optional_packages.patch
new file mode 100644
index 00000000000..1e9b5177357
--- /dev/null
+++ b/sys-libs/ldb/files/ldb-1.1.31-optional_packages.patch
@@ -0,0 +1,57 @@
+--- ldb-1.1.27/wscript
++++ ldb-1.1.27/wscript
+@@ -5,6 +5,7 @@
+ 
+ blddir = 'bin'
+ 
++import Logs
+ import sys, os
+ 
+ # find the buildtools directory
+@@ -13,7 +14,7 @@
+     srcdir = srcdir + '/..'
+ sys.path.insert(0, srcdir + '/buildtools/wafsamba')
+ 
+-import wafsamba, samba_dist, Utils
++import wafsamba, samba_dist, Utils, Options
+ 
+ samba_dist.DIST_DIRS('''lib/ldb:. lib/replace:lib/replace 
lib/talloc:lib/talloc
+                         lib/tdb:lib/tdb lib/tdb:lib/tdb lib/tevent:lib/tevent
+@@ -28,8 +29,21 @@
+     opt.RECURSE('lib/tevent')
+     opt.RECURSE('lib/replace')
+     opt.tool_options('python') # options for disabling pyc or pyo compilation
++    if opt.IN_LAUNCH_DIR():
++        opt.add_option('--disable-python',
++        help=("disable the pyldb modules"),
++        action="store_true", dest='disable_python', default=False)
++    if opt.IN_LAUNCH_DIR():
++        opt.add_option('--disable-ldap',
++        help=("disable ldap support"),
++        action="store_true", dest='disable_ldap', default=False)
+ 
+ def configure(conf):
++    conf.env.standalone_ldb = conf.IN_LAUNCH_DIR()
++
++    conf.env.disable_python = getattr(Options.options, 'disable_python', 
False)
++    conf.env.disable_ldap = getattr(Options.options, 'disable_ldap', False)
++
+     conf.RECURSE('lib/tdb')
+     conf.RECURSE('lib/tevent')
+ 
+@@ -67,9 +81,12 @@
+     if conf.env.standalone_ldb:
+         conf.CHECK_XSLTPROC_MANPAGES()
+ 
+-        # we need this for the ldap backend
+-        if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber 
ldap', headers='lber.h ldap.h'):
+-            conf.env.ENABLE_LDAP_BACKEND = True
++        if not conf.env.disable_ldap:
++          # we need this for the ldap backend
++          if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber 
ldap', headers='lber.h ldap.h'):
++              conf.env.ENABLE_LDAP_BACKEND = True
++        else:
++          conf.env.ENABLE_LDAP_BACKEND = False
+ 
+         # we don't want any libraries or modules to rely on runtime
+         # resolution of symbols

diff --git a/sys-libs/ldb/files/ldb-1.1.31-talloc-disable-python.patch 
b/sys-libs/ldb/files/ldb-1.1.31-talloc-disable-python.patch
new file mode 100644
index 00000000000..6ef45eb37fb
--- /dev/null
+++ b/sys-libs/ldb/files/ldb-1.1.31-talloc-disable-python.patch
@@ -0,0 +1,34 @@
+--- a/lib/talloc/wscript       2017-04-28 04:57:26.000000000 -0400
++++ b/lib/talloc/wscript       2017-07-05 14:30:42.700580464 -0400
+@@ -74,19 +74,22 @@
+                                      implied_deps='replace'):
+             conf.define('USING_SYSTEM_TALLOC', 1)
+ 
+-        using_system_pytalloc_util = True
+-        if not conf.CHECK_BUNDLED_SYSTEM_PKG('pytalloc-util', 
minversion=VERSION,
+-                                             implied_deps='talloc replace'):
++        if conf.env.disable_python:
+             using_system_pytalloc_util = False
+-
+-        # We need to get a pytalloc-util for all the python versions
+-        # we are building for
+-        if conf.env['EXTRA_PYTHON']:
+-            name = 'pytalloc-util' + 
conf.all_envs['extrapython']['PYTHON_SO_ABI_FLAG']
+-            if not conf.CHECK_BUNDLED_SYSTEM_PKG(name, minversion=VERSION,
++        else:
++            using_system_pytalloc_util = True
++            if not conf.CHECK_BUNDLED_SYSTEM_PKG('pytalloc-util', 
minversion=VERSION,
+                                                  implied_deps='talloc 
replace'):
+                 using_system_pytalloc_util = False
+ 
++            # We need to get a pytalloc-util for all the python versions
++            # we are building for
++            if conf.env['EXTRA_PYTHON']:
++                name = 'pytalloc-util' + 
conf.all_envs['extrapython']['PYTHON_SO_ABI_FLAG']
++                if not conf.CHECK_BUNDLED_SYSTEM_PKG(name, minversion=VERSION,
++                                                     implied_deps='talloc 
replace'):
++                    using_system_pytalloc_util = False
++
+         if using_system_pytalloc_util:
+             conf.define('USING_SYSTEM_PYTALLOC_UTIL', 1)
+ 

diff --git a/sys-libs/ldb/ldb-1.1.31.ebuild b/sys-libs/ldb/ldb-1.1.31.ebuild
new file mode 100644
index 00000000000..4faedc10611
--- /dev/null
+++ b/sys-libs/ldb/ldb-1.1.31.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="threads"
+
+inherit python-single-r1 waf-utils multilib-minimal eutils
+
+DESCRIPTION="An LDAP-like embedded database"
+HOMEPAGE="http://ldb.samba.org";
+SRC_URI="http://www.samba.org/ftp/pub/${PN}/${P}.tar.gz";
+
+LICENSE="LGPL-3"
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh 
~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="doc +ldap +python"
+
+RDEPEND="!elibc_FreeBSD? ( dev-libs/libbsd[${MULTILIB_USEDEP}] )
+       dev-libs/popt[${MULTILIB_USEDEP}]
+       >=dev-util/cmocka-1.1.1[${MULTILIB_USEDEP}]
+       >=sys-libs/talloc-2.1.8[python?,${MULTILIB_USEDEP}]
+       >=sys-libs/tevent-0.9.31[python(+)?,${MULTILIB_USEDEP}]
+       >=sys-libs/tdb-1.3.12[python?,${MULTILIB_USEDEP}]
+       !!<net-fs/samba-3.6.0[ldb]
+       !!>=net-fs/samba-4.0.0[ldb]
+       python? ( ${PYTHON_DEPS} )
+       ldap? ( net-nds/openldap )
+       "
+
+DEPEND="dev-libs/libxslt
+       doc? ( app-doc/doxygen )
+       virtual/pkgconfig
+       ${PYTHON_DEPS}
+       ${RDEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+WAF_BINARY="${S}/buildtools/bin/waf"
+
+MULTILIB_WRAPPED_HEADERS=( /usr/include/pyldb.h )
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.1.31-optional_packages.patch
+       "${FILESDIR}"/${PN}-1.1.31-talloc-disable-python.patch
+       "${FILESDIR}"/${PN}-1.1.31-fix_PKGCONFIGDIR-when-python-disabled.patch
+)
+
+pkg_setup() {
+       python-single-r1_pkg_setup
+}
+
+src_prepare() {
+       default
+       multilib_copy_sources
+}
+
+multilib_src_configure() {
+       local myconf=(
+               $(usex ldap '' --disable-ldap) \
+               --disable-rpath \
+               --disable-rpath-install --bundled-libraries=NONE \
+               --with-modulesdir="${EPREFIX}"/usr/$(get_libdir)/samba \
+               --builtin-libraries=NONE
+       )
+       if ! multilib_is_native_abi; then
+               myconf+=( --disable-python )
+       else
+               use python || myconf+=( --disable-python )
+       fi
+       waf-utils_src_configure "${myconf[@]}"
+}
+
+multilib_src_compile(){
+       waf-utils_src_compile
+       multilib_is_native_abi && use doc && doxygen Doxyfile
+}
+
+multilib_src_test() {
+       if multilib_is_native_abi; then
+               WAF_MAKE=1 \
+               
PATH=buildtools/bin:../../../buildtools/bin:$PATH:"${BUILD_DIR}"/bin/shared/private/
 \
+               
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"${BUILD_DIR}"/bin/shared/private/:"${BUILD_DIR}"/bin/shared
 \
+               waf test || die
+       fi
+}
+
+multilib_src_install() {
+       waf-utils_src_install
+
+       if multilib_is_native_abi && use doc; then
+               doman  apidocs/man/man3/*.3
+               docinto html
+               dodoc -r apidocs/html/*
+       fi
+}
+
+pkg_postinst() {
+       if has_version sys-auth/sssd; then
+               ewarn "You have sssd installed. It is known to break after ldb 
upgrades,"
+               ewarn "so please try to rebuild it before reporting bugs."
+               ewarn "See https://bugs.gentoo.org/404281";
+       fi
+}

Reply via email to