commit:     c2b015464d563dae3c8725c97f9bc145a7acbc53
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 11 11:15:52 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Jun 11 11:18:20 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2b01546

sys-libs/ldb: Bump to version 1.4.0

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 sys-libs/ldb/Manifest                              |   1 +
 .../ldb/files/ldb-1.4.0-optional_packages.patch    |  45 +++++++++
 sys-libs/ldb/ldb-1.4.0.ebuild                      | 103 +++++++++++++++++++++
 3 files changed, 149 insertions(+)

diff --git a/sys-libs/ldb/Manifest b/sys-libs/ldb/Manifest
index 871947eabf4..816889cb15e 100644
--- a/sys-libs/ldb/Manifest
+++ b/sys-libs/ldb/Manifest
@@ -5,3 +5,4 @@ DIST ldb-1.2.2.tar.gz 1348041 BLAKE2B 
14521bbe1826af003a98d11d6fcaff115e27f81b98
 DIST ldb-1.2.3.tar.gz 1344513 BLAKE2B 
941174d6e2c51319c8690a8d8a87bea443d4fa4d738bd13243b502fdc9d590ba075fcf4a9920c38bb6fc15564f0b116089cd62d99e7cfe33649dc751910265ad
 SHA512 
500ab069cf6cec39907300e3905d334163b5094087831708acc22c4199b006ef52af3b66aade7558a48fab7cd69be3af7883bda3816a83c576d01b36ab270247
 DIST ldb-1.3.2.tar.gz 1364976 BLAKE2B 
9bffe690a3bb7f2d5d6cb6340e212140409cd86c2148a78200b1bfe39e08ea410a8966655bff9baf280ee8f94fafc8502968312084a9629acab4c9c1f653d37f
 SHA512 
31b29a2a991038910830cb47b02b7f08e1958638d073d5f1602a2657c4005c7e5f5f2c2f7972eeddef462d8c70aaad7f02ddf901cb50f1b1bbafa0c22498973d
 DIST ldb-1.3.3.tar.gz 1370823 BLAKE2B 
1e00dca5cc66fc8677334e79d4e36efebad516775116ac0f06884a08197f9589056acc5bc377d6317dfd67926cb6bccbdfe18e1d259875cda4dde86251779fd5
 SHA512 
ad272a1fd82d5138d9a056c1d81cfcd6167886719852b41447b9e6fb6acd926b137fd76e16f476d68bc0991943142ea1482666dc48155e9a1ef09f13b041c350
+DIST ldb-1.4.0.tar.gz 1415607 BLAKE2B 
1c61264040e5eddee092c95e4cfaeb53b9747b92ea6b2e62ae6a6c74980c4325de5c2aec085bde942eed871541bb90da91e0ac10635d0ca1690200ef922019d1
 SHA512 
95b024b5aceac0d6360f3c98e70e1f649c53fa0e849b0f3dbb7c46cf47fac718fd13c73dd1531cefaec19d3e6b0f6751b372d1fc814dd58dd288a6cf1dc57a6c

diff --git a/sys-libs/ldb/files/ldb-1.4.0-optional_packages.patch 
b/sys-libs/ldb/files/ldb-1.4.0-optional_packages.patch
new file mode 100644
index 00000000000..37813890dcd
--- /dev/null
+++ b/sys-libs/ldb/files/ldb-1.4.0-optional_packages.patch
@@ -0,0 +1,45 @@
+--- ldb-1.4.0/wscript
++++ ldb-1.4.0/wscript
+@@ -31,6 +31,14 @@
+     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)
+ 
+     opt.add_option('--without-ldb-lmdb',
+                    help='disable new LMDB backend for LDB',
+@@ -38,6 +46,11 @@
+ 
+ 
+ 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')
+ 
+@@ -142,9 +155,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/ldb-1.4.0.ebuild b/sys-libs/ldb/ldb-1.4.0.ebuild
new file mode 100644
index 00000000000..2d0e99ba9c8
--- /dev/null
+++ b/sys-libs/ldb/ldb-1.4.0.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2018 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.13[python?,${MULTILIB_USEDEP}]
+       >=sys-libs/tdb-1.3.15[python?,${MULTILIB_USEDEP}]
+       >=sys-libs/tevent-0.9.36[python(+)?,${MULTILIB_USEDEP}]
+       ldap? ( net-nds/openldap )
+       python? ( ${PYTHON_DEPS} )
+"
+
+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.4.0-optional_packages.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