summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Stakenvicius <axs@gentoo.org>2017-02-14 10:00:56 -0500
committerIan Stakenvicius <axs@gentoo.org>2017-02-14 15:42:02 -0500
commit94612023ec479de3b509eb6c67309481f3638582 (patch)
treefe43aa7d5a2de2056ef6ec4c5224b3ec9e74afed /sys-libs
parentnet-fs/samba-4.6.0_rc3: bump, python useflag, disable tests, etc (diff)
downloadgentoo-94612023ec479de3b509eb6c67309481f3638582.tar.gz
gentoo-94612023ec479de3b509eb6c67309481f3638582.tar.bz2
gentoo-94612023ec479de3b509eb6c67309481f3638582.zip
sys-libs/ldb: make python optional, bug 603602
Package-Manager: portage-2.3.3
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/ldb/files/ldb-1.1.29-disable-python.patch48
-rw-r--r--sys-libs/ldb/ldb-1.1.29-r1.ebuild103
2 files changed, 151 insertions, 0 deletions
diff --git a/sys-libs/ldb/files/ldb-1.1.29-disable-python.patch b/sys-libs/ldb/files/ldb-1.1.29-disable-python.patch
new file mode 100644
index 000000000000..bc4120e8acf6
--- /dev/null
+++ b/sys-libs/ldb/files/ldb-1.1.29-disable-python.patch
@@ -0,0 +1,48 @@
+--- a/lib/tdb/wscript 2016-11-30 09:56:00.000000000 -0500
++++ b/lib/tdb/wscript 2017-02-08 16:37:49.160987205 -0500
+@@ -77,16 +77,16 @@
+ conf.env.standalone_tdb = conf.IN_LAUNCH_DIR()
+ conf.env.building_tdb = True
+
++ conf.env.disable_python = getattr(Options.options, 'disable_python', False)
++
+ if not conf.env.standalone_tdb:
+ if conf.CHECK_BUNDLED_SYSTEM_PKG('tdb', minversion=VERSION,
+ implied_deps='replace'):
+ conf.define('USING_SYSTEM_TDB', 1)
+ conf.env.building_tdb = False
+- if conf.CHECK_BUNDLED_SYSTEM_PYTHON('pytdb', 'tdb', minversion=VERSION):
++ if not conf.env.disable_python and conf.CHECK_BUNDLED_SYSTEM_PYTHON('pytdb', 'tdb', minversion=VERSION):
+ conf.define('USING_SYSTEM_PYTDB', 1)
+
+- conf.env.disable_python = getattr(Options.options, 'disable_python', False)
+-
+ if (conf.CONFIG_SET('HAVE_ROBUST_MUTEXES') and
+ conf.env.building_tdb and
+ not conf.env.disable_tdb_mutex_locking):
+--- a/lib/tevent/wscript 2016-10-07 00:45:35.000000000 -0400
++++ b/lib/tevent/wscript 2017-02-08 16:39:22.478733175 -0500
+@@ -34,11 +34,13 @@
+
+ conf.env.standalone_tevent = conf.IN_LAUNCH_DIR()
+
++ conf.env.disable_python = getattr(Options.options, 'disable_python', False)
++
+ if not conf.env.standalone_tevent:
+ if conf.CHECK_BUNDLED_SYSTEM_PKG('tevent', minversion=VERSION,
+ onlyif='talloc', implied_deps='replace talloc'):
+ conf.define('USING_SYSTEM_TEVENT', 1)
+- if conf.CHECK_BUNDLED_SYSTEM_PYTHON('pytevent', 'tevent', minversion=VERSION):
++ if not conf.env.disable_python and conf.CHECK_BUNDLED_SYSTEM_PYTHON('pytevent', 'tevent', minversion=VERSION):
+ conf.define('USING_SYSTEM_PYTEVENT', 1)
+
+ if conf.CHECK_FUNCS('epoll_create', headers='sys/epoll.h'):
+@@ -61,8 +63,6 @@
+ if not conf.CONFIG_SET('USING_SYSTEM_TEVENT'):
+ conf.DEFINE('TEVENT_NUM_SIGNALS', tevent_num_signals)
+
+- conf.env.disable_python = getattr(Options.options, 'disable_python', False)
+-
+ if not conf.env.disable_python:
+ # also disable if we don't have the python libs installed
+ conf.find_program('python', var='PYTHON')
diff --git a/sys-libs/ldb/ldb-1.1.29-r1.ebuild b/sys-libs/ldb/ldb-1.1.29-r1.ebuild
new file mode 100644
index 000000000000..41bdfeea4e1b
--- /dev/null
+++ b/sys-libs/ldb/ldb-1.1.29-r1.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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}]
+ >=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.27-optional_packages.patch
+ "${FILESDIR}"/${P}-disable-python.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
+ myconf+=( $(usex python '' '--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
+}