Gentoo Archives: gentoo-commits

From: Ian Stakenvicius <axs@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/ldb/, sys-libs/ldb/files/
Date: Tue, 14 Feb 2017 20:42:21
Message-Id: 1487104922.94612023ec479de3b509eb6c67309481f3638582.axs@gentoo
1 commit: 94612023ec479de3b509eb6c67309481f3638582
2 Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 14 15:00:56 2017 +0000
4 Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 14 20:42:02 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94612023
7
8 sys-libs/ldb: make python optional, bug 603602
9
10 Package-Manager: portage-2.3.3
11
12 sys-libs/ldb/files/ldb-1.1.29-disable-python.patch | 48 ++++++++++
13 sys-libs/ldb/ldb-1.1.29-r1.ebuild | 103 +++++++++++++++++++++
14 2 files changed, 151 insertions(+)
15
16 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
17 new file mode 100644
18 index 0000000000..bc4120e8ac
19 --- /dev/null
20 +++ b/sys-libs/ldb/files/ldb-1.1.29-disable-python.patch
21 @@ -0,0 +1,48 @@
22 +--- a/lib/tdb/wscript 2016-11-30 09:56:00.000000000 -0500
23 ++++ b/lib/tdb/wscript 2017-02-08 16:37:49.160987205 -0500
24 +@@ -77,16 +77,16 @@
25 + conf.env.standalone_tdb = conf.IN_LAUNCH_DIR()
26 + conf.env.building_tdb = True
27 +
28 ++ conf.env.disable_python = getattr(Options.options, 'disable_python', False)
29 ++
30 + if not conf.env.standalone_tdb:
31 + if conf.CHECK_BUNDLED_SYSTEM_PKG('tdb', minversion=VERSION,
32 + implied_deps='replace'):
33 + conf.define('USING_SYSTEM_TDB', 1)
34 + conf.env.building_tdb = False
35 +- if conf.CHECK_BUNDLED_SYSTEM_PYTHON('pytdb', 'tdb', minversion=VERSION):
36 ++ if not conf.env.disable_python and conf.CHECK_BUNDLED_SYSTEM_PYTHON('pytdb', 'tdb', minversion=VERSION):
37 + conf.define('USING_SYSTEM_PYTDB', 1)
38 +
39 +- conf.env.disable_python = getattr(Options.options, 'disable_python', False)
40 +-
41 + if (conf.CONFIG_SET('HAVE_ROBUST_MUTEXES') and
42 + conf.env.building_tdb and
43 + not conf.env.disable_tdb_mutex_locking):
44 +--- a/lib/tevent/wscript 2016-10-07 00:45:35.000000000 -0400
45 ++++ b/lib/tevent/wscript 2017-02-08 16:39:22.478733175 -0500
46 +@@ -34,11 +34,13 @@
47 +
48 + conf.env.standalone_tevent = conf.IN_LAUNCH_DIR()
49 +
50 ++ conf.env.disable_python = getattr(Options.options, 'disable_python', False)
51 ++
52 + if not conf.env.standalone_tevent:
53 + if conf.CHECK_BUNDLED_SYSTEM_PKG('tevent', minversion=VERSION,
54 + onlyif='talloc', implied_deps='replace talloc'):
55 + conf.define('USING_SYSTEM_TEVENT', 1)
56 +- if conf.CHECK_BUNDLED_SYSTEM_PYTHON('pytevent', 'tevent', minversion=VERSION):
57 ++ if not conf.env.disable_python and conf.CHECK_BUNDLED_SYSTEM_PYTHON('pytevent', 'tevent', minversion=VERSION):
58 + conf.define('USING_SYSTEM_PYTEVENT', 1)
59 +
60 + if conf.CHECK_FUNCS('epoll_create', headers='sys/epoll.h'):
61 +@@ -61,8 +63,6 @@
62 + if not conf.CONFIG_SET('USING_SYSTEM_TEVENT'):
63 + conf.DEFINE('TEVENT_NUM_SIGNALS', tevent_num_signals)
64 +
65 +- conf.env.disable_python = getattr(Options.options, 'disable_python', False)
66 +-
67 + if not conf.env.disable_python:
68 + # also disable if we don't have the python libs installed
69 + conf.find_program('python', var='PYTHON')
70
71 diff --git a/sys-libs/ldb/ldb-1.1.29-r1.ebuild b/sys-libs/ldb/ldb-1.1.29-r1.ebuild
72 new file mode 100644
73 index 0000000000..41bdfeea4e
74 --- /dev/null
75 +++ b/sys-libs/ldb/ldb-1.1.29-r1.ebuild
76 @@ -0,0 +1,103 @@
77 +# Copyright 1999-2017 Gentoo Foundation
78 +# Distributed under the terms of the GNU General Public License v2
79 +# $Id$
80 +
81 +EAPI=6
82 +PYTHON_COMPAT=( python2_7 )
83 +PYTHON_REQ_USE="threads"
84 +
85 +inherit python-single-r1 waf-utils multilib-minimal eutils
86 +
87 +DESCRIPTION="An LDAP-like embedded database"
88 +HOMEPAGE="http://ldb.samba.org"
89 +SRC_URI="http://www.samba.org/ftp/pub/${PN}/${P}.tar.gz"
90 +
91 +LICENSE="LGPL-3"
92 +SLOT="0/${PV}"
93 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
94 +IUSE="doc +ldap +python"
95 +
96 +RDEPEND="!elibc_FreeBSD? ( dev-libs/libbsd[${MULTILIB_USEDEP}] )
97 + dev-libs/popt[${MULTILIB_USEDEP}]
98 + >=sys-libs/talloc-2.1.8[python?,${MULTILIB_USEDEP}]
99 + >=sys-libs/tevent-0.9.31[python(+)?,${MULTILIB_USEDEP}]
100 + >=sys-libs/tdb-1.3.12[python?,${MULTILIB_USEDEP}]
101 + !!<net-fs/samba-3.6.0[ldb]
102 + !!>=net-fs/samba-4.0.0[ldb]
103 + python? ( ${PYTHON_DEPS} )
104 + ldap? ( net-nds/openldap )
105 + "
106 +
107 +DEPEND="dev-libs/libxslt
108 + doc? ( app-doc/doxygen )
109 + virtual/pkgconfig
110 + ${PYTHON_DEPS}
111 + ${RDEPEND}"
112 +
113 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
114 +
115 +WAF_BINARY="${S}/buildtools/bin/waf"
116 +
117 +MULTILIB_WRAPPED_HEADERS=( /usr/include/pyldb.h )
118 +
119 +PATCHES=(
120 + "${FILESDIR}"/${PN}-1.1.27-optional_packages.patch
121 + "${FILESDIR}"/${P}-disable-python.patch
122 +)
123 +
124 +pkg_setup() {
125 + python-single-r1_pkg_setup
126 +}
127 +
128 +src_prepare() {
129 + default
130 + multilib_copy_sources
131 +}
132 +
133 +multilib_src_configure() {
134 + local myconf=(
135 + $(usex ldap '' --disable-ldap) \
136 + --disable-rpath \
137 + --disable-rpath-install --bundled-libraries=NONE \
138 + --with-modulesdir="${EPREFIX}"/usr/$(get_libdir)/samba \
139 + --builtin-libraries=NONE
140 + )
141 + if ! multilib_is_native_abi; then
142 + myconf+=( --disable-python )
143 + else
144 + myconf+=( $(usex python '' '--disable-python') )
145 + fi
146 + waf-utils_src_configure "${myconf[@]}"
147 +}
148 +
149 +multilib_src_compile(){
150 + waf-utils_src_compile
151 + multilib_is_native_abi && use doc && doxygen Doxyfile
152 +}
153 +
154 +multilib_src_test() {
155 + if multilib_is_native_abi; then
156 + WAF_MAKE=1 \
157 + PATH=buildtools/bin:../../../buildtools/bin:$PATH:"${BUILD_DIR}"/bin/shared/private/ \
158 + LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"${BUILD_DIR}"/bin/shared/private/:"${BUILD_DIR}"/bin/shared \
159 + waf test || die
160 + fi
161 +}
162 +
163 +multilib_src_install() {
164 + waf-utils_src_install
165 +
166 + if multilib_is_native_abi && use doc; then
167 + doman apidocs/man/man3/*.3
168 + docinto html
169 + dodoc -r apidocs/html/*
170 + fi
171 +}
172 +
173 +pkg_postinst() {
174 + if has_version sys-auth/sssd; then
175 + ewarn "You have sssd installed. It is known to break after ldb upgrades,"
176 + ewarn "so please try to rebuild it before reporting bugs."
177 + ewarn "See https://bugs.gentoo.org/404281"
178 + fi
179 +}