1 |
commit: 896306c12642c3343ef6f3f1375c15858246f2e9 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Sep 6 09:23:17 2016 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 6 09:25:29 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=896306c1 |
7 |
|
8 |
sys-libs/ldb: Revbump to make ldap support optional (bug #506448). |
9 |
|
10 |
Package-Manager: portage-2.3.0 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
.../ldb/files/ldb-1.1.27-optional_packages.patch | 92 ++++++++++++++++++++ |
14 |
sys-libs/ldb/ldb-1.1.27-r1.ebuild | 99 ++++++++++++++++++++++ |
15 |
2 files changed, 191 insertions(+) |
16 |
|
17 |
diff --git a/sys-libs/ldb/files/ldb-1.1.27-optional_packages.patch b/sys-libs/ldb/files/ldb-1.1.27-optional_packages.patch |
18 |
new file mode 100644 |
19 |
index 00000000..92e14c6 |
20 |
--- /dev/null |
21 |
+++ b/sys-libs/ldb/files/ldb-1.1.27-optional_packages.patch |
22 |
@@ -0,0 +1,92 @@ |
23 |
+--- ldb-1.1.27/lib/talloc/wscript |
24 |
++++ ldb-1.1.27/lib/talloc/wscript |
25 |
+@@ -48,7 +48,7 @@ |
26 |
+ if conf.CHECK_BUNDLED_SYSTEM_PKG('talloc', minversion=VERSION, |
27 |
+ implied_deps='replace'): |
28 |
+ conf.define('USING_SYSTEM_TALLOC', 1) |
29 |
+- if conf.CHECK_BUNDLED_SYSTEM_PKG('pytalloc-util', minversion=VERSION, |
30 |
++ if not conf.env.disable_python and conf.CHECK_BUNDLED_SYSTEM_PKG('pytalloc-util', minversion=VERSION, |
31 |
+ implied_deps='talloc replace'): |
32 |
+ conf.define('USING_SYSTEM_PYTALLOC_UTIL', 1) |
33 |
+ |
34 |
+--- ldb-1.1.27/wscript |
35 |
++++ ldb-1.1.27/wscript |
36 |
+@@ -5,6 +5,7 @@ |
37 |
+ |
38 |
+ blddir = 'bin' |
39 |
+ |
40 |
++import Logs |
41 |
+ import sys, os |
42 |
+ |
43 |
+ # find the buildtools directory |
44 |
+@@ -13,7 +14,7 @@ |
45 |
+ srcdir = srcdir + '/..' |
46 |
+ sys.path.insert(0, srcdir + '/buildtools/wafsamba') |
47 |
+ |
48 |
+-import wafsamba, samba_dist, Utils |
49 |
++import wafsamba, samba_dist, Utils, Options |
50 |
+ |
51 |
+ samba_dist.DIST_DIRS('''lib/ldb:. lib/replace:lib/replace lib/talloc:lib/talloc |
52 |
+ lib/tdb:lib/tdb lib/tdb:lib/tdb lib/tevent:lib/tevent |
53 |
+@@ -28,8 +29,21 @@ |
54 |
+ opt.RECURSE('lib/tevent') |
55 |
+ opt.RECURSE('lib/replace') |
56 |
+ opt.tool_options('python') # options for disabling pyc or pyo compilation |
57 |
++ if opt.IN_LAUNCH_DIR(): |
58 |
++ opt.add_option('--disable-python', |
59 |
++ help=("disable the pyldb modules"), |
60 |
++ action="store_true", dest='disable_python', default=False) |
61 |
++ if opt.IN_LAUNCH_DIR(): |
62 |
++ opt.add_option('--disable-ldap', |
63 |
++ help=("disable ldap support"), |
64 |
++ action="store_true", dest='disable_ldap', default=False) |
65 |
+ |
66 |
+ def configure(conf): |
67 |
++ conf.env.standalone_ldb = conf.IN_LAUNCH_DIR() |
68 |
++ |
69 |
++ conf.env.disable_python = getattr(Options.options, 'disable_python', False) |
70 |
++ conf.env.disable_ldap = getattr(Options.options, 'disable_ldap', False) |
71 |
++ |
72 |
+ conf.RECURSE('lib/tdb') |
73 |
+ conf.RECURSE('lib/tevent') |
74 |
+ |
75 |
+@@ -44,16 +58,18 @@ |
76 |
+ conf.RECURSE('lib/replace') |
77 |
+ conf.find_program('python', var='PYTHON') |
78 |
+ conf.find_program('xsltproc', var='XSLTPROC') |
79 |
+- conf.check_tool('python') |
80 |
+- conf.check_python_version((2,4,2)) |
81 |
+- conf.SAMBA_CHECK_PYTHON_HEADERS(mandatory=True) |
82 |
++ |
83 |
++ if not conf.env.disable_python: |
84 |
++ conf.SAMBA_CHECK_PYTHON(mandatory=False, version=(2,4,2)) |
85 |
++ conf.SAMBA_CHECK_PYTHON_HEADERS(mandatory=False) |
86 |
++ if not conf.env.HAVE_PYTHON_H: |
87 |
++ Logs.warn('Disabling pyldb-util as python devel libs not found') |
88 |
++ conf.env.disable_python = True |
89 |
+ |
90 |
+ # where does the default LIBDIR end up? in conf.env somewhere? |
91 |
+ # |
92 |
+ conf.CONFIG_PATH('LDB_MODULESDIR', conf.SUBST_ENV_VAR('MODULESDIR') + '/ldb') |
93 |
+ |
94 |
+- conf.env.standalone_ldb = conf.IN_LAUNCH_DIR() |
95 |
+- |
96 |
+ if not conf.env.standalone_ldb: |
97 |
+ if conf.CHECK_BUNDLED_SYSTEM_PKG('pyldb-util', minversion=VERSION, |
98 |
+ onlyif='talloc tdb tevent', |
99 |
+@@ -67,9 +83,12 @@ |
100 |
+ if conf.env.standalone_ldb: |
101 |
+ conf.CHECK_XSLTPROC_MANPAGES() |
102 |
+ |
103 |
+- # we need this for the ldap backend |
104 |
+- if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'): |
105 |
+- conf.env.ENABLE_LDAP_BACKEND = True |
106 |
++ if not conf.env.disable_ldap: |
107 |
++ # we need this for the ldap backend |
108 |
++ if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'): |
109 |
++ conf.env.ENABLE_LDAP_BACKEND = True |
110 |
++ else: |
111 |
++ conf.env.ENABLE_LDAP_BACKEND = False |
112 |
+ |
113 |
+ # we don't want any libraries or modules to rely on runtime |
114 |
+ # resolution of symbols |
115 |
|
116 |
diff --git a/sys-libs/ldb/ldb-1.1.27-r1.ebuild b/sys-libs/ldb/ldb-1.1.27-r1.ebuild |
117 |
new file mode 100644 |
118 |
index 00000000..e3f70e5 |
119 |
--- /dev/null |
120 |
+++ b/sys-libs/ldb/ldb-1.1.27-r1.ebuild |
121 |
@@ -0,0 +1,99 @@ |
122 |
+# Copyright 1999-2016 Gentoo Foundation |
123 |
+# Distributed under the terms of the GNU General Public License v2 |
124 |
+# $Id$ |
125 |
+ |
126 |
+EAPI=6 |
127 |
+PYTHON_COMPAT=( python2_7 ) |
128 |
+PYTHON_REQ_USE="threads" |
129 |
+ |
130 |
+inherit python-single-r1 waf-utils multilib-minimal eutils |
131 |
+ |
132 |
+DESCRIPTION="An LDAP-like embedded database" |
133 |
+HOMEPAGE="http://ldb.samba.org" |
134 |
+SRC_URI="http://www.samba.org/ftp/pub/${PN}/${P}.tar.gz" |
135 |
+ |
136 |
+LICENSE="LGPL-3" |
137 |
+SLOT="0/${PV}" |
138 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" |
139 |
+IUSE="doc +ldap" |
140 |
+ |
141 |
+RDEPEND="!elibc_FreeBSD? ( dev-libs/libbsd[${MULTILIB_USEDEP}] ) |
142 |
+ dev-libs/popt[${MULTILIB_USEDEP}] |
143 |
+ >=sys-libs/talloc-2.1.8[python,${MULTILIB_USEDEP}] |
144 |
+ >=sys-libs/tevent-0.9.29[python(+),${MULTILIB_USEDEP}] |
145 |
+ >=sys-libs/tdb-1.3.10[python,${MULTILIB_USEDEP}] |
146 |
+ !!<net-fs/samba-3.6.0[ldb] |
147 |
+ !!>=net-fs/samba-4.0.0[ldb] |
148 |
+ ${PYTHON_DEPS} |
149 |
+ ldap? ( net-nds/openldap ) |
150 |
+ " |
151 |
+ |
152 |
+DEPEND="dev-libs/libxslt |
153 |
+ doc? ( app-doc/doxygen ) |
154 |
+ virtual/pkgconfig |
155 |
+ ${RDEPEND}" |
156 |
+ |
157 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
158 |
+ |
159 |
+WAF_BINARY="${S}/buildtools/bin/waf" |
160 |
+ |
161 |
+MULTILIB_WRAPPED_HEADERS=( /usr/include/pyldb.h ) |
162 |
+ |
163 |
+PATCHES=( |
164 |
+ "${FILESDIR}"/${PN}-1.1.27-optional_packages.patch |
165 |
+) |
166 |
+ |
167 |
+pkg_setup() { |
168 |
+ python-single-r1_pkg_setup |
169 |
+} |
170 |
+ |
171 |
+src_prepare() { |
172 |
+ default |
173 |
+ multilib_copy_sources |
174 |
+} |
175 |
+ |
176 |
+multilib_src_configure() { |
177 |
+ local myconf=( |
178 |
+ $(use_enable ldap) \ |
179 |
+ --disable-rpath \ |
180 |
+ --disable-rpath-install --bundled-libraries=NONE \ |
181 |
+ --with-modulesdir="${EPREFIX}"/usr/$(get_libdir)/samba \ |
182 |
+ --builtin-libraries=NONE |
183 |
+ ) |
184 |
+ if ! multilib_is_native_abi; then |
185 |
+ myconf+=( --disable-python ) |
186 |
+ fi |
187 |
+ waf-utils_src_configure "${myconf[@]}" |
188 |
+} |
189 |
+ |
190 |
+multilib_src_compile(){ |
191 |
+ waf-utils_src_compile |
192 |
+ multilib_is_native_abi && use doc && doxygen Doxyfile |
193 |
+} |
194 |
+ |
195 |
+multilib_src_test() { |
196 |
+ if multilib_is_native_abi; then |
197 |
+ WAF_MAKE=1 \ |
198 |
+ PATH=buildtools/bin:../../../buildtools/bin:$PATH:"${BUILD_DIR}"/bin/shared/private/ \ |
199 |
+ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"${BUILD_DIR}"/bin/shared/private/:"${BUILD_DIR}"/bin/shared \ |
200 |
+ waf test || die |
201 |
+ fi |
202 |
+} |
203 |
+ |
204 |
+multilib_src_install() { |
205 |
+ waf-utils_src_install |
206 |
+ |
207 |
+ if multilib_is_native_abi && use doc; then |
208 |
+ doman apidocs/man/man3/*.3 |
209 |
+ docinto html |
210 |
+ dodoc -r apidocs/html/* |
211 |
+ fi |
212 |
+} |
213 |
+ |
214 |
+pkg_postinst() { |
215 |
+ if has_version sys-auth/sssd; then |
216 |
+ ewarn "You have sssd installed. It is known to break after ldb upgrades," |
217 |
+ ewarn "so please try to rebuild it before reporting bugs." |
218 |
+ ewarn "See https://bugs.gentoo.org/404281" |
219 |
+ fi |
220 |
+} |