1 |
commit: cee731e54c218a01ec5976211e2d1eb8f3a6cd7c |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Apr 15 12:43:11 2019 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Apr 15 12:43:11 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cee731e5 |
7 |
|
8 |
sys-libs/db: Bump to version 6.1.38 and 6.2.38 |
9 |
|
10 |
Package-Manager: Portage-2.3.62, Repoman-2.3.12 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
sys-libs/db/Manifest | 2 + |
14 |
sys-libs/db/db-6.1.38.ebuild | 242 +++++++++++++++++++++++++++++++++++++++++++ |
15 |
sys-libs/db/db-6.2.38.ebuild | 242 +++++++++++++++++++++++++++++++++++++++++++ |
16 |
3 files changed, 486 insertions(+) |
17 |
|
18 |
diff --git a/sys-libs/db/Manifest b/sys-libs/db/Manifest |
19 |
index 5a22e3cb56a..5ad9aa060e6 100644 |
20 |
--- a/sys-libs/db/Manifest |
21 |
+++ b/sys-libs/db/Manifest |
22 |
@@ -15,7 +15,9 @@ DIST db-5.3.28.tar.gz 35090431 BLAKE2B 5b77a4ec0945fa96ce6c2b452fb4b029295e037fa |
23 |
DIST db-6.0.35.tar.gz 36532251 BLAKE2B 22fbe557ccc13e4b936db8ca7d6ba11ce42e477bbf39f7e472067e06fb5910b1147fa58a44ac944c24a51ea839f1c61edda6bd8f3c450acac0c13d7fdba11e89 SHA512 002db1553def44efa715095b04b2bac2de7450cdc7142586d1d8b5d8ce79ee5e98f824b3bd276cd586ca932dc51ed35a9ffbed95b2b9847264f262cfa092479d |
24 |
DIST db-6.1.29.tar.gz 37521943 BLAKE2B 3f036647337a36cb5f8cf5cc8774bd49d4cdff2d57750f21488183de67e426ab0863ee97d972751adc10b294f6c23e1e5e3f2c7b3fc02616463f971b10f3b15e SHA512 ced40e357acd1214f8b5800ddcf084c65c0ab77ca045a4504ac1a4c864035bd50aa8993cd1232174ff81071a36806314807330aa53dcb18de548c886c2a99e73 |
25 |
DIST db-6.1.36.tar.gz 37526795 BLAKE2B 9334dc66501465acf99f2675dc838a979c03a29b526b1d22fc9f811c6e76c5ecab4fafad4aa7efbc658c0bc64218f22ac4189c34bce866b0a4ffa052525607a6 SHA512 5f63eaaf75cad12c2a9b9f960bf39cb4ba6f8636609472f5909e38dccb65322a20104f0a8641b968c195c1b9a3ac5456c8bdaf3253995c9a4ace222a2e0d6811 |
26 |
+DIST db-6.1.38.tar.gz 37644337 BLAKE2B 32b3f65bef04bb18e45c3c0c9110d5d0bf58f4761bee5bf07949e192f4b9f5fa28117b1696c17863da0affe408bd6c81eeee32c472c46d31c17693519959ff03 SHA512 5760d1e441bea11c371825ac47203b1eb9f188f9cb2ea0e3d547b3d3b15620d27cb0b3333d617eb7b89c53407fb7ed79cad27477d714b5b797869f8bf4b1808b |
27 |
DIST db-6.2.32.tar.gz 45342417 BLAKE2B d3254fba1300d6c7dda5d872c5fa349e8704d71be9c4d37ccf3357782adeb879ce30e066cf083bd97554405c2e94071a96cee16090ad9f797a4fa657ff7e8c46 SHA512 83bdbf18a7b9782409cf4563f8d5f11322d5e564a39946c890604a60440a6ea6361e0236bbc30bd4e8e1de1fa9196b8e815fd126baa035f55c5826c2c6aa3401 |
28 |
+DIST db-6.2.38.tar.gz 41298311 BLAKE2B a04a3344058b1d9982f39628c1114aded8f8c860753853c8b487e9ea14bd69a0391301620396d22204b3c8f25945c3f5485ea4792567e2d903a657541204d297 SHA512 b357932e4a5856b9cf8cf42050a307977eee8483d24a32ad938611545178fb1e6be597c1542a11466b1fb31ef4ef47b519deea1c5310a6460495281539083a19 |
29 |
DIST db.1.85.tar.gz 270953 BLAKE2B 7862979b6fe21a67eac7eb5e0d05093f33fa71fa92f9717a65bd39b366727e6928109c821b86ede85d6d2a8013199f3927e760bed19001a5cfd2270819a3b904 SHA512 03bf3a2b0947efdca4e38719542e96378b5eeb57da64d5030dd23ab710773c1826f1c867032d0bea658b7fdd8272db253e97bbc490d198b9437025ffdf9e880e |
30 |
DIST patch.3.2.9.1 2139 BLAKE2B 7c442311499244d3432a1648294f3b610da827f7d940777de01f98816d6dc8bc50b68cb45900bcc1acf1672207a86009dbc33b6226f8a4fcbefc1bee51961138 SHA512 f410c43ea4af28a39d8ea47f774d38b53bf1183a34abfcf1f27e253eb61b42f4b5e9f0a3a500e174eb796ea342e6dd50a8bb95ff3eb8ee188461489cc994b8f9 |
31 |
DIST patch.3.2.9.2 495 BLAKE2B a29338b8fd1cdd75833fd4dabcca17106a75e4cc49e7f5198ac723422e0b0ed553969109293d5e83517f2e5bf6478ddcc7e0cdf371e721fb3784dc7d8165e4b6 SHA512 cc75fef11a641d480beaa2b62201177c72d10c4eb20376b5f15769db6e9e1a0da41c0365d79772af19b4cacdaa9f91dad049c735de9f95b98dcfc4f0b611b557 |
32 |
|
33 |
diff --git a/sys-libs/db/db-6.1.38.ebuild b/sys-libs/db/db-6.1.38.ebuild |
34 |
new file mode 100644 |
35 |
index 00000000000..4f1b84ebf02 |
36 |
--- /dev/null |
37 |
+++ b/sys-libs/db/db-6.1.38.ebuild |
38 |
@@ -0,0 +1,242 @@ |
39 |
+# Copyright 1999-2019 Gentoo Authors |
40 |
+# Distributed under the terms of the GNU General Public License v2 |
41 |
+ |
42 |
+EAPI=6 |
43 |
+inherit db flag-o-matic java-pkg-opt-2 autotools multilib multilib-minimal eapi7-ver toolchain-funcs |
44 |
+ |
45 |
+#Number of official patches |
46 |
+#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"` |
47 |
+PATCHNO=${PV/*.*.*_p} |
48 |
+if [[ ${PATCHNO} == "${PV}" ]] ; then |
49 |
+ MY_PV=${PV} |
50 |
+ MY_P=${P} |
51 |
+ PATCHNO=0 |
52 |
+else |
53 |
+ MY_PV=${PV/_p${PATCHNO}} |
54 |
+ MY_P=${PN}-${MY_PV} |
55 |
+fi |
56 |
+ |
57 |
+S_BASE="${WORKDIR}/${MY_P}" |
58 |
+S="${S_BASE}/build_unix" |
59 |
+DESCRIPTION="Oracle Berkeley DB" |
60 |
+HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html" |
61 |
+SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz" |
62 |
+for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do |
63 |
+ export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}" |
64 |
+done |
65 |
+ |
66 |
+LICENSE="AGPL-3" |
67 |
+SLOT="$(get_version_component_range 1-2)" |
68 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" |
69 |
+IUSE="doc java cxx tcl test" |
70 |
+ |
71 |
+REQUIRED_USE="test? ( tcl )" |
72 |
+ |
73 |
+# the entire testsuite needs the TCL functionality |
74 |
+DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] ) |
75 |
+ test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] ) |
76 |
+ java? ( >=virtual/jdk-1.5 ) |
77 |
+ >=sys-devel/binutils-2.16.1" |
78 |
+RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] ) |
79 |
+ java? ( >=virtual/jre-1.5 )" |
80 |
+ |
81 |
+MULTILIB_WRAPPED_HEADERS=( |
82 |
+ /usr/include/db$(ver_cut 1-2)/db.h |
83 |
+) |
84 |
+ |
85 |
+PATCHES=( |
86 |
+ # bug #510506 |
87 |
+ "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch |
88 |
+ |
89 |
+ # use the includes from the prefix |
90 |
+ "${FILESDIR}"/${PN}-6.2-jni-check-prefix-first.patch |
91 |
+ "${FILESDIR}"/${PN}-4.3-listen-to-java-options.patch |
92 |
+ |
93 |
+ # sqlite configure call has an extra leading .. |
94 |
+ # upstreamed:5.2.36, missing in 5.3.x/6.x |
95 |
+ # still needs to be patched in 6.0.20 |
96 |
+ "${FILESDIR}"/${PN}-6.1.19-sqlite-configure-path.patch |
97 |
+ |
98 |
+ # The upstream testsuite copies .lib and the binaries for each parallel test |
99 |
+ # core, ~300MB each. This patch uses links instead, saves a lot of space. |
100 |
+ "${FILESDIR}"/${PN}-6.0.20-test-link.patch |
101 |
+) |
102 |
+ |
103 |
+src_prepare() { |
104 |
+ cd "${WORKDIR}"/"${MY_P}" |
105 |
+ for (( i=1 ; i<=${PATCHNO} ; i++ )) |
106 |
+ do |
107 |
+ eapply "${DISTDIR}"/patch."${MY_PV}"."${i}" |
108 |
+ done |
109 |
+ |
110 |
+ default |
111 |
+ |
112 |
+ # Upstream release script grabs the dates when the script was run, so lets |
113 |
+ # end-run them to keep the date the same. |
114 |
+ export REAL_DB_RELEASE_DATE="$(awk \ |
115 |
+ '/^DB_VERSION_STRING=/{ gsub(".*\\(|\\).*","",$0); print $0; }' \ |
116 |
+ "${S_BASE}"/dist/configure)" |
117 |
+ sed -r -i \ |
118 |
+ -e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \ |
119 |
+ "${S_BASE}"/dist/RELEASE || die |
120 |
+ |
121 |
+ # Include the SLOT for Java JAR files |
122 |
+ # This supersedes the unused jarlocation patches. |
123 |
+ sed -r -i \ |
124 |
+ -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \ |
125 |
+ "${S_BASE}"/dist/Makefile.in || die |
126 |
+ |
127 |
+ cd "${S_BASE}"/dist || die |
128 |
+ rm -f aclocal/libtool.m4 |
129 |
+ sed -i \ |
130 |
+ -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \ |
131 |
+ configure.ac || die |
132 |
+ sed -i \ |
133 |
+ -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \ |
134 |
+ aclocal/programs.m4 || die |
135 |
+ AT_M4DIR="aclocal aclocal_java" eautoreconf |
136 |
+ # Upstream sucks - they do autoconf and THEN replace the version variables. |
137 |
+ . ./RELEASE |
138 |
+ for v in \ |
139 |
+ DB_VERSION_{FAMILY,LETTER,RELEASE,MAJOR,MINOR} \ |
140 |
+ DB_VERSION_{PATCH,FULL,UNIQUE_NAME,STRING,FULL_STRING} \ |
141 |
+ DB_VERSION \ |
142 |
+ DB_RELEASE_DATE ; do |
143 |
+ local ev="__EDIT_${v}__" |
144 |
+ sed -i -e "s/${ev}/${!v}/g" configure || die |
145 |
+ done |
146 |
+ |
147 |
+ # This is a false positive skip in the tests as the test-reviewer code |
148 |
+ # looks for 'Skipping\s' |
149 |
+ sed -i \ |
150 |
+ -e '/db_repsite/s,Skipping:,Skipping,g' \ |
151 |
+ "${S_BASE}"/test/tcl/reputils.tcl || die |
152 |
+} |
153 |
+ |
154 |
+multilib_src_configure() { |
155 |
+ # sql_compat will cause a collision with sqlite3 |
156 |
+ # --enable-sql_compat |
157 |
+ # Don't --enable-sql* because we don't want to use bundled sqlite. |
158 |
+ # See Gentoo bug #605688 |
159 |
+ local myeconfargs=( |
160 |
+ --enable-compat185 |
161 |
+ --enable-dbm |
162 |
+ --enable-o_direct |
163 |
+ --without-uniquename |
164 |
+ --disable-sql |
165 |
+ --disable-sql_codegen |
166 |
+ --disable-sql_compat |
167 |
+ $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly) |
168 |
+ $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly) |
169 |
+ $(use_enable cxx) |
170 |
+ $(use_enable cxx stl) |
171 |
+ $(multilib_native_use_enable java) |
172 |
+ $(use_enable test) |
173 |
+ ) |
174 |
+ |
175 |
+ tc-ld-disable-gold #470634 |
176 |
+ |
177 |
+ # compilation with -O0 fails on amd64, see bug #171231 |
178 |
+ if [[ ${ABI} == amd64 ]]; then |
179 |
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS} |
180 |
+ replace-flags -O0 -O2 |
181 |
+ is-flagq -O[s123] || append-flags -O2 |
182 |
+ fi |
183 |
+ |
184 |
+ # Add linker versions to the symbols. Easier to do, and safer than header file |
185 |
+ # mumbo jumbo. |
186 |
+ if use userland_GNU ; then |
187 |
+ append-ldflags -Wl,--default-symver |
188 |
+ fi |
189 |
+ |
190 |
+ # use `set` here since the java opts will contain whitespace |
191 |
+ if multilib_is_native_abi && use java ; then |
192 |
+ myeconfargs+=( |
193 |
+ --with-java-prefix="${JAVA_HOME}" |
194 |
+ --with-javac-flags="$(java-pkg_javac-args)" |
195 |
+ ) |
196 |
+ fi |
197 |
+ |
198 |
+ # Bug #270851: test needs TCL support |
199 |
+ if use tcl || use test ; then |
200 |
+ myeconfargs+=( |
201 |
+ --enable-tcl |
202 |
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)" |
203 |
+ ) |
204 |
+ else |
205 |
+ myeconfargs+=(--disable-tcl ) |
206 |
+ fi |
207 |
+ |
208 |
+ ECONF_SOURCE="${S_BASE}"/dist \ |
209 |
+ STRIP="true" \ |
210 |
+ econf "${myeconfargs[@]}" |
211 |
+} |
212 |
+ |
213 |
+multilib_src_install() { |
214 |
+ emake install DESTDIR="${D}" |
215 |
+ |
216 |
+ db_src_install_headerslot |
217 |
+ |
218 |
+ db_src_install_usrlibcleanup |
219 |
+ |
220 |
+ if multilib_is_native_abi && use java; then |
221 |
+ java-pkg_regso "${ED%/}"/usr/"$(get_libdir)"/libdb_java*.so |
222 |
+ java-pkg_dojar "${ED%/}"/usr/"$(get_libdir)"/*.jar |
223 |
+ rm -f "${ED%/}"/usr/"$(get_libdir)"/*.jar |
224 |
+ fi |
225 |
+} |
226 |
+ |
227 |
+multilib_src_install_all() { |
228 |
+ db_src_install_usrbinslot |
229 |
+ |
230 |
+ db_src_install_doc |
231 |
+ |
232 |
+ dodir /usr/sbin |
233 |
+ # This file is not always built, and no longer exists as of db-4.8 |
234 |
+ if [[ -f "${ED%/}"/usr/bin/berkeley_db_svc ]] ; then |
235 |
+ mv "${ED%/}"/usr/bin/berkeley_db_svc \ |
236 |
+ "${ED%/}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die |
237 |
+ fi |
238 |
+} |
239 |
+ |
240 |
+pkg_postinst() { |
241 |
+ multilib_foreach_abi db_fix_so |
242 |
+} |
243 |
+ |
244 |
+pkg_postrm() { |
245 |
+ multilib_foreach_abi db_fix_so |
246 |
+} |
247 |
+ |
248 |
+src_test() { |
249 |
+ # db_repsite is impossible to build, as upstream strips those sources. |
250 |
+ # db_repsite is used directly in the setup_site_prog, |
251 |
+ # setup_site_prog is called from open_site_prog |
252 |
+ # which is called only from tests in the multi_repmgr group. |
253 |
+ #sed -ri \ |
254 |
+ # -e '/set subs/s,multi_repmgr,,g' \ |
255 |
+ # "${S_BASE}/test/testparams.tcl" |
256 |
+ sed -ri \ |
257 |
+ -e '/multi_repmgr/d' \ |
258 |
+ "${S_BASE}/test/tcl/test.tcl" || die |
259 |
+ |
260 |
+ # This is the only failure in 5.2.28 so far, and looks like a false positive. |
261 |
+ # Repmgr018 (btree): Test of repmgr stats. |
262 |
+ # Repmgr018.a: Start a master. |
263 |
+ # Repmgr018.b: Start a client. |
264 |
+ # Repmgr018.c: Run some transactions at master. |
265 |
+ # Rep_test: btree 20 key/data pairs starting at 0 |
266 |
+ # Rep_test.a: put/get loop |
267 |
+ # FAIL:07:05:59 (00:00:00) perm_no_failed_stat: expected 0, got 1 |
268 |
+ sed -ri \ |
269 |
+ -e '/set parms.*repmgr018/d' \ |
270 |
+ -e 's/repmgr018//g' \ |
271 |
+ "${S_BASE}/test/tcl/test.tcl" || die |
272 |
+ |
273 |
+ multilib-minimal_src_test |
274 |
+} |
275 |
+ |
276 |
+multilib_src_test() { |
277 |
+ multilib_is_native_abi || return |
278 |
+ |
279 |
+ S=${BUILD_DIR} db_src_test |
280 |
+} |
281 |
|
282 |
diff --git a/sys-libs/db/db-6.2.38.ebuild b/sys-libs/db/db-6.2.38.ebuild |
283 |
new file mode 100644 |
284 |
index 00000000000..5552d65746e |
285 |
--- /dev/null |
286 |
+++ b/sys-libs/db/db-6.2.38.ebuild |
287 |
@@ -0,0 +1,242 @@ |
288 |
+# Copyright 1999-2019 Gentoo Authors |
289 |
+# Distributed under the terms of the GNU General Public License v2 |
290 |
+ |
291 |
+EAPI=6 |
292 |
+inherit db flag-o-matic java-pkg-opt-2 autotools multilib multilib-minimal eapi7-ver toolchain-funcs |
293 |
+ |
294 |
+#Number of official patches |
295 |
+#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"` |
296 |
+PATCHNO=${PV/*.*.*_p} |
297 |
+if [[ ${PATCHNO} == "${PV}" ]] ; then |
298 |
+ MY_PV=${PV} |
299 |
+ MY_P=${P} |
300 |
+ PATCHNO=0 |
301 |
+else |
302 |
+ MY_PV=${PV/_p${PATCHNO}} |
303 |
+ MY_P=${PN}-${MY_PV} |
304 |
+fi |
305 |
+ |
306 |
+S_BASE="${WORKDIR}/${MY_P}" |
307 |
+S="${S_BASE}/build_unix" |
308 |
+DESCRIPTION="Oracle Berkeley DB" |
309 |
+HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html" |
310 |
+SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz" |
311 |
+for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do |
312 |
+ export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}" |
313 |
+done |
314 |
+ |
315 |
+LICENSE="AGPL-3" |
316 |
+SLOT="$(get_version_component_range 1-2)" |
317 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" |
318 |
+IUSE="doc java cxx tcl test" |
319 |
+ |
320 |
+REQUIRED_USE="test? ( tcl )" |
321 |
+ |
322 |
+# the entire testsuite needs the TCL functionality |
323 |
+DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] ) |
324 |
+ test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] ) |
325 |
+ java? ( >=virtual/jdk-1.5 ) |
326 |
+ >=sys-devel/binutils-2.16.1" |
327 |
+RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] ) |
328 |
+ java? ( >=virtual/jre-1.5 )" |
329 |
+ |
330 |
+MULTILIB_WRAPPED_HEADERS=( |
331 |
+ /usr/include/db$(ver_cut 1-2)/db.h |
332 |
+) |
333 |
+ |
334 |
+PATCHES=( |
335 |
+ # bug #510506 |
336 |
+ "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch |
337 |
+ |
338 |
+ # use the includes from the prefix |
339 |
+ "${FILESDIR}"/${PN}-6.2.32-jni-check-prefix-first.patch |
340 |
+ "${FILESDIR}"/${PN}-4.3-listen-to-java-options.patch |
341 |
+ |
342 |
+ # sqlite configure call has an extra leading .. |
343 |
+ # upstreamed:5.2.36, missing in 5.3.x/6.x |
344 |
+ # still needs to be patched in 6.0.20 |
345 |
+ "${FILESDIR}"/${PN}-6.1.19-sqlite-configure-path.patch |
346 |
+ |
347 |
+ # The upstream testsuite copies .lib and the binaries for each parallel test |
348 |
+ # core, ~300MB each. This patch uses links instead, saves a lot of space. |
349 |
+ "${FILESDIR}"/${PN}-6.0.20-test-link.patch |
350 |
+) |
351 |
+ |
352 |
+src_prepare() { |
353 |
+ cd "${WORKDIR}"/"${MY_P}" |
354 |
+ for (( i=1 ; i<=${PATCHNO} ; i++ )) |
355 |
+ do |
356 |
+ eapply "${DISTDIR}"/patch."${MY_PV}"."${i}" |
357 |
+ done |
358 |
+ |
359 |
+ default |
360 |
+ |
361 |
+ # Upstream release script grabs the dates when the script was run, so lets |
362 |
+ # end-run them to keep the date the same. |
363 |
+ export REAL_DB_RELEASE_DATE="$(awk \ |
364 |
+ '/^DB_VERSION_STRING=/{ gsub(".*\\(|\\).*","",$0); print $0; }' \ |
365 |
+ "${S_BASE}"/dist/configure)" |
366 |
+ sed -r -i \ |
367 |
+ -e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \ |
368 |
+ "${S_BASE}"/dist/RELEASE || die |
369 |
+ |
370 |
+ # Include the SLOT for Java JAR files |
371 |
+ # This supersedes the unused jarlocation patches. |
372 |
+ sed -r -i \ |
373 |
+ -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \ |
374 |
+ "${S_BASE}"/dist/Makefile.in || die |
375 |
+ |
376 |
+ cd "${S_BASE}"/dist || die |
377 |
+ rm -f aclocal/libtool.m4 |
378 |
+ sed -i \ |
379 |
+ -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \ |
380 |
+ configure.ac || die |
381 |
+ sed -i \ |
382 |
+ -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \ |
383 |
+ aclocal/programs.m4 || die |
384 |
+ AT_M4DIR="aclocal aclocal_java" eautoreconf |
385 |
+ # Upstream sucks - they do autoconf and THEN replace the version variables. |
386 |
+ . ./RELEASE |
387 |
+ for v in \ |
388 |
+ DB_VERSION_{FAMILY,LETTER,RELEASE,MAJOR,MINOR} \ |
389 |
+ DB_VERSION_{PATCH,FULL,UNIQUE_NAME,STRING,FULL_STRING} \ |
390 |
+ DB_VERSION \ |
391 |
+ DB_RELEASE_DATE ; do |
392 |
+ local ev="__EDIT_${v}__" |
393 |
+ sed -i -e "s/${ev}/${!v}/g" configure || die |
394 |
+ done |
395 |
+ |
396 |
+ # This is a false positive skip in the tests as the test-reviewer code |
397 |
+ # looks for 'Skipping\s' |
398 |
+ sed -i \ |
399 |
+ -e '/db_repsite/s,Skipping:,Skipping,g' \ |
400 |
+ "${S_BASE}"/test/tcl/reputils.tcl || die |
401 |
+} |
402 |
+ |
403 |
+multilib_src_configure() { |
404 |
+ # sql_compat will cause a collision with sqlite3 |
405 |
+ # --enable-sql_compat |
406 |
+ # Don't --enable-sql* because we don't want to use bundled sqlite. |
407 |
+ # See Gentoo bug #605688 |
408 |
+ local myeconfargs=( |
409 |
+ --enable-compat185 |
410 |
+ --enable-dbm |
411 |
+ --enable-o_direct |
412 |
+ --without-uniquename |
413 |
+ --disable-sql |
414 |
+ --disable-sql_codegen |
415 |
+ --disable-sql_compat |
416 |
+ $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly) |
417 |
+ $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly) |
418 |
+ $(use_enable cxx) |
419 |
+ $(use_enable cxx stl) |
420 |
+ $(multilib_native_use_enable java) |
421 |
+ $(use_enable test) |
422 |
+ ) |
423 |
+ |
424 |
+ tc-ld-disable-gold #470634 |
425 |
+ |
426 |
+ # compilation with -O0 fails on amd64, see bug #171231 |
427 |
+ if [[ ${ABI} == amd64 ]]; then |
428 |
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS} |
429 |
+ replace-flags -O0 -O2 |
430 |
+ is-flagq -O[s123] || append-flags -O2 |
431 |
+ fi |
432 |
+ |
433 |
+ # Add linker versions to the symbols. Easier to do, and safer than header file |
434 |
+ # mumbo jumbo. |
435 |
+ if use userland_GNU ; then |
436 |
+ append-ldflags -Wl,--default-symver |
437 |
+ fi |
438 |
+ |
439 |
+ # use `set` here since the java opts will contain whitespace |
440 |
+ if multilib_is_native_abi && use java ; then |
441 |
+ myeconfargs+=( |
442 |
+ --with-java-prefix="${JAVA_HOME}" |
443 |
+ --with-javac-flags="$(java-pkg_javac-args)" |
444 |
+ ) |
445 |
+ fi |
446 |
+ |
447 |
+ # Bug #270851: test needs TCL support |
448 |
+ if use tcl || use test ; then |
449 |
+ myeconfargs+=( |
450 |
+ --enable-tcl |
451 |
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)" |
452 |
+ ) |
453 |
+ else |
454 |
+ myeconfargs+=(--disable-tcl ) |
455 |
+ fi |
456 |
+ |
457 |
+ ECONF_SOURCE="${S_BASE}"/dist \ |
458 |
+ STRIP="true" \ |
459 |
+ econf "${myeconfargs[@]}" |
460 |
+} |
461 |
+ |
462 |
+multilib_src_install() { |
463 |
+ emake install DESTDIR="${D}" |
464 |
+ |
465 |
+ db_src_install_headerslot |
466 |
+ |
467 |
+ db_src_install_usrlibcleanup |
468 |
+ |
469 |
+ if multilib_is_native_abi && use java; then |
470 |
+ java-pkg_regso "${ED%/}"/usr/"$(get_libdir)"/libdb_java*.so |
471 |
+ java-pkg_dojar "${ED%/}"/usr/"$(get_libdir)"/*.jar |
472 |
+ rm -f "${ED%/}"/usr/"$(get_libdir)"/*.jar |
473 |
+ fi |
474 |
+} |
475 |
+ |
476 |
+multilib_src_install_all() { |
477 |
+ db_src_install_usrbinslot |
478 |
+ |
479 |
+ db_src_install_doc |
480 |
+ |
481 |
+ dodir /usr/sbin |
482 |
+ # This file is not always built, and no longer exists as of db-4.8 |
483 |
+ if [[ -f "${ED%/}"/usr/bin/berkeley_db_svc ]] ; then |
484 |
+ mv "${ED%/}"/usr/bin/berkeley_db_svc \ |
485 |
+ "${ED%/}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die |
486 |
+ fi |
487 |
+} |
488 |
+ |
489 |
+pkg_postinst() { |
490 |
+ multilib_foreach_abi db_fix_so |
491 |
+} |
492 |
+ |
493 |
+pkg_postrm() { |
494 |
+ multilib_foreach_abi db_fix_so |
495 |
+} |
496 |
+ |
497 |
+src_test() { |
498 |
+ # db_repsite is impossible to build, as upstream strips those sources. |
499 |
+ # db_repsite is used directly in the setup_site_prog, |
500 |
+ # setup_site_prog is called from open_site_prog |
501 |
+ # which is called only from tests in the multi_repmgr group. |
502 |
+ #sed -ri \ |
503 |
+ # -e '/set subs/s,multi_repmgr,,g' \ |
504 |
+ # "${S_BASE}/test/testparams.tcl" |
505 |
+ sed -ri \ |
506 |
+ -e '/multi_repmgr/d' \ |
507 |
+ "${S_BASE}/test/tcl/test.tcl" || die |
508 |
+ |
509 |
+ # This is the only failure in 5.2.28 so far, and looks like a false positive. |
510 |
+ # Repmgr018 (btree): Test of repmgr stats. |
511 |
+ # Repmgr018.a: Start a master. |
512 |
+ # Repmgr018.b: Start a client. |
513 |
+ # Repmgr018.c: Run some transactions at master. |
514 |
+ # Rep_test: btree 20 key/data pairs starting at 0 |
515 |
+ # Rep_test.a: put/get loop |
516 |
+ # FAIL:07:05:59 (00:00:00) perm_no_failed_stat: expected 0, got 1 |
517 |
+ sed -ri \ |
518 |
+ -e '/set parms.*repmgr018/d' \ |
519 |
+ -e 's/repmgr018//g' \ |
520 |
+ "${S_BASE}/test/tcl/test.tcl" || die |
521 |
+ |
522 |
+ multilib-minimal_src_test |
523 |
+} |
524 |
+ |
525 |
+multilib_src_test() { |
526 |
+ multilib_is_native_abi || return |
527 |
+ |
528 |
+ S=${BUILD_DIR} db_src_test |
529 |
+} |