Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/db/
Date: Fri, 30 Oct 2020 17:23:11
Message-Id: 1604078571.8ba76d90f9cfddccfd6935dee71ef442395abd8d.soap@gentoo
1 commit: 8ba76d90f9cfddccfd6935dee71ef442395abd8d
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Fri Oct 30 17:22:51 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Fri Oct 30 17:22:51 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ba76d90
7
8 sys-libs/db: Revbump for --disable-static
9
10 Bug: https://bugs.gentoo.org/378289
11 Closes: https://github.com/gentoo/gentoo/pull/18073
12 Package-Manager: Portage-3.0.8, Repoman-3.0.2
13 Signed-off-by: David Seifert <soap <AT> gentoo.org>
14
15 sys-libs/db/db-4.5.20_p2-r4.ebuild | 194 ++++++++++++++++++++
16 sys-libs/db/db-4.6.21_p4-r3.ebuild | 183 +++++++++++++++++++
17 sys-libs/db/db-4.7.25_p4-r3.ebuild | 190 ++++++++++++++++++++
18 sys-libs/db/db-4.8.30-r4.ebuild | 197 +++++++++++++++++++++
19 .../db/{db-6.1.38.ebuild => db-5.3.28-r5.ebuild} | 123 +++++++------
20 .../db/{db-6.1.38.ebuild => db-6.0.35-r3.ebuild} | 116 ++++++------
21 sys-libs/db/db-6.1.38.ebuild | 4 +
22 sys-libs/db/db-6.2.38.ebuild | 4 +
23 8 files changed, 906 insertions(+), 105 deletions(-)
24
25 diff --git a/sys-libs/db/db-4.5.20_p2-r4.ebuild b/sys-libs/db/db-4.5.20_p2-r4.ebuild
26 new file mode 100644
27 index 00000000000..12148350901
28 --- /dev/null
29 +++ b/sys-libs/db/db-4.5.20_p2-r4.ebuild
30 @@ -0,0 +1,194 @@
31 +# Copyright 1999-2020 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=7
35 +
36 +inherit autotools db flag-o-matic java-pkg-opt-2 multilib
37 +
38 +#Number of official patches
39 +#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
40 +PATCHNO="${PV/*.*.*_p}"
41 +if [[ ${PATCHNO} == "${PV}" ]] ; then
42 + MY_PV="${PV}"
43 + MY_P="${P}"
44 + PATCHNO=0
45 +else
46 + MY_PV="${PV/_p${PATCHNO}}"
47 + MY_P="${PN}-${MY_PV}"
48 +fi
49 +
50 +S="${WORKDIR}/${MY_P}/build_unix"
51 +DESCRIPTION="Oracle Berkeley DB"
52 +HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
53 +SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
54 +for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
55 + export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
56 +done
57 +
58 +LICENSE="Sleepycat"
59 +SLOT="$(ver_cut 1-2)"
60 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
61 +IUSE="tcl java doc cxx"
62 +RESTRICT="!test? ( test )"
63 +
64 +DEPEND="tcl? ( >=dev-lang/tcl-8.4 )
65 + java? ( >=virtual/jdk-1.4 )
66 + >=sys-devel/binutils-2.16.1"
67 +RDEPEND="tcl? ( dev-lang/tcl )
68 + java? ( >=virtual/jre-1.4 )"
69 +
70 +PATCHES=(
71 + "${FILESDIR}"/"${PN}"-4.4-libtool.patch
72 +
73 + # use the includes from the prefix
74 + "${FILESDIR}"/"${PN}"-4.2-jni-check-prefix-first.patch
75 + "${FILESDIR}"/"${PN}"-4.2-listen-to-java-options.patch
76 +)
77 +
78 +# Required to avoid unpack attempt of patches
79 +src_unpack() {
80 + unpack "${MY_P}".tar.gz
81 +}
82 +
83 +src_prepare() {
84 + pushd "${WORKDIR}"/"${MY_P}" &>/dev/null || die
85 + for (( i=1 ; i<=${PATCHNO} ; i++ ))
86 + do
87 + eapply -p0 "${DISTDIR}"/patch."${MY_PV}"."${i}"
88 + done
89 +
90 + default
91 +
92 + sed -e "/^DB_RELEASE_DATE=/s/%B %e, %Y/%Y-%m-%d/" \
93 + -i dist/RELEASE || die
94 +
95 + # Include the SLOT for Java JAR files
96 + # This supersedes the unused jarlocation patches.
97 + sed -r \
98 + -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
99 + -i dist/Makefile.in || die
100 +
101 + # START of 4.5+earlier specific
102 + # Upstream sucks, they normally concat these
103 + local i j
104 + for j in dist/aclocal{,_java} ; do
105 + pushd ${j} &>/dev/null || die
106 + for i in * ; do
107 + ln -s ${i} ${i%.ac}.m4 || die
108 + done
109 + popd &>/dev/null || die
110 + done
111 + # END of 4.5+earlier specific
112 + pushd dist &>/dev/null || die
113 + rm aclocal/libtool.{m4,ac} || die
114 + sed \
115 + -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
116 + -i configure.ac || die
117 + sed \
118 + -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
119 + -i aclocal/programs.m4 || die
120 +
121 + AT_M4DIR="aclocal aclocal_java" eautoreconf
122 +
123 + # Upstream sucks - they do autoconf and THEN replace the version variables.
124 + . ./RELEASE
125 + sed \
126 + -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \
127 + -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \
128 + -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \
129 + -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \
130 + -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \
131 + -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" \
132 + -i configure || die
133 +
134 + popd &>/dev/null || die
135 + popd &>/dev/null || die
136 +}
137 +
138 +src_configure() {
139 + # compilation with -O0 fails on amd64, see bug #171231
140 + if use amd64 ; then
141 + replace-flags -O0 -O2
142 + is-flagq -O[s123] || append-flags -O2
143 + fi
144 +
145 + local myconf=(
146 + --enable-compat185
147 + --enable-o_direct
148 + --without-uniquename
149 + --disable-rpc
150 + --disable-static
151 + --host="${CHOST}"
152 +
153 + $(usex amd64 '--with-mutex=x86/gcc-assembly' '')
154 + $(use_enable cxx)
155 + $(use_enable tcl)
156 + $(usex tcl "--with-tcl=${EPREFIX}/usr/$(get_libdir)" '') #"
157 + $(use_enable java)
158 + )
159 +
160 + if use java; then
161 + myconf+=(
162 + --with-java-prefix="${JAVA_HOME}"
163 + --with-javac-flags="$(java-pkg_javac-args)"
164 + )
165 + fi
166 +
167 + # the entire testsuite needs the TCL functionality
168 + if use tcl && use test ; then
169 + myconf+=( --enable-test )
170 + else
171 + myconf+=( --disable-test )
172 + fi
173 +
174 + # Add linker versions to the symbols. Easier to do, and safer than header file
175 + # mumbo jumbo.
176 + if use userland_GNU; then
177 + append-ldflags -Wl,--default-symver
178 + fi
179 +
180 + ECONF_SOURCE="${S}"/../dist \
181 + econf "${myconf[@]}"
182 +
183 + sed -e "s,\(^STRIP *=\).*,\1\"true\"," -i Makefile || die
184 +}
185 +
186 +src_install() {
187 + emake \
188 + DESTDIR="${D}" \
189 + libdir="${EPREFIX}/usr/$(get_libdir)" \
190 + STRIP="true" \
191 + install
192 +
193 + db_src_install_usrbinslot
194 +
195 + db_src_install_headerslot
196 +
197 + db_src_install_doc
198 +
199 + db_src_install_usrlibcleanup
200 +
201 + dodir /usr/sbin
202 + # This file is not always built, and no longer exists as of db-4.8
203 + if [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] ; then
204 + mv "${ED}"/usr/bin/berkeley_db_svc \
205 + "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
206 + fi
207 +
208 + if use java; then
209 + java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
210 + java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
211 + rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
212 + fi
213 +
214 + # no static libraries
215 + find "${ED}" -name '*.la' -delete || die
216 +}
217 +
218 +pkg_postinst() {
219 + db_fix_so
220 +}
221 +
222 +pkg_postrm() {
223 + db_fix_so
224 +}
225
226 diff --git a/sys-libs/db/db-4.6.21_p4-r3.ebuild b/sys-libs/db/db-4.6.21_p4-r3.ebuild
227 new file mode 100644
228 index 00000000000..7b9ae1bc492
229 --- /dev/null
230 +++ b/sys-libs/db/db-4.6.21_p4-r3.ebuild
231 @@ -0,0 +1,183 @@
232 +# Copyright 1999-2020 Gentoo Authors
233 +# Distributed under the terms of the GNU General Public License v2
234 +
235 +EAPI=7
236 +
237 +inherit autotools db flag-o-matic java-pkg-opt-2 multilib
238 +
239 +#Number of official patches
240 +#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
241 +PATCHNO="${PV/*.*.*_p}"
242 +if [[ ${PATCHNO} == "${PV}" ]] ; then
243 + MY_PV="${PV}"
244 + MY_P="${P}"
245 + PATCHNO=0
246 +else
247 + MY_PV="${PV/_p${PATCHNO}}"
248 + MY_P="${PN}-${MY_PV}"
249 +fi
250 +
251 +S="${WORKDIR}/${MY_P}/build_unix"
252 +DESCRIPTION="Oracle Berkeley DB"
253 +HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
254 +SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
255 +for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
256 + export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
257 +done
258 +
259 +LICENSE="Sleepycat"
260 +SLOT="$(ver_cut 1-2)"
261 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
262 +IUSE="tcl java doc cxx"
263 +RESTRICT="!test? ( test )"
264 +
265 +DEPEND="tcl? ( >=dev-lang/tcl-8.4 )
266 + java? ( >=virtual/jdk-1.4 )
267 + >=sys-devel/binutils-2.16.1"
268 +RDEPEND="tcl? ( dev-lang/tcl )
269 + java? ( >=virtual/jre-1.4 )"
270 +
271 +PATCHES=(
272 + "${FILESDIR}"/"${PN}"-4.4-libtool.patch
273 +
274 + # use the includes from the prefix
275 + "${FILESDIR}"/"${PN}"-"${SLOT}"-jni-check-prefix-first.patch
276 + "${FILESDIR}"/"${PN}"-4.2-listen-to-java-options.patch
277 +)
278 +
279 +# Required to avoid unpack attempt of patches
280 +src_unpack() {
281 + unpack "${MY_P}".tar.gz
282 +}
283 +
284 +src_prepare() {
285 + pushd "${WORKDIR}"/"${MY_P}" &>/dev/null || die
286 + for (( i=1 ; i<=${PATCHNO} ; i++ ))
287 + do
288 + eapply -p0 "${DISTDIR}"/patch."${MY_PV}"."${i}"
289 + done
290 +
291 + default
292 +
293 + sed -e "/^DB_RELEASE_DATE=/s/%B %e, %Y/%Y-%m-%d/" \
294 + -i dist/RELEASE || die
295 +
296 + # Include the SLOT for Java JAR files
297 + # This supersedes the unused jarlocation patches.
298 + sed -r \
299 + -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
300 + -i dist/Makefile.in || die
301 +
302 + pushd dist &>/dev/null || die
303 + rm aclocal/libtool.m4 || die
304 + sed \
305 + -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
306 + -i configure.ac || die
307 + sed \
308 + -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
309 + -i aclocal/programs.m4 || die
310 +
311 + AT_M4DIR="aclocal aclocal_java" eautoreconf
312 +
313 + # Upstream sucks - they do autoconf and THEN replace the version variables.
314 + . ./RELEASE
315 + sed \
316 + -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \
317 + -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \
318 + -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \
319 + -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \
320 + -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \
321 + -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" \
322 + -i configure || die
323 +
324 + popd &>/dev/null || die
325 + popd &>/dev/null || die
326 +}
327 +
328 +src_configure() {
329 + # compilation with -O0 fails on amd64, see bug #171231
330 + if use amd64 ; then
331 + replace-flags -O0 -O2
332 + is-flagq -O[s123] || append-flags -O2
333 + fi
334 +
335 + local myconf=(
336 + --enable-compat185
337 + --enable-o_direct
338 + --without-uniquename
339 + --disable-rpc
340 + --disable-static
341 + --host="${CHOST}"
342 +
343 + $(usex amd64 '--with-mutex=x86/gcc-assembly' '')
344 + $(use_enable cxx)
345 + $(use_enable tcl)
346 + $(usex tcl "--with-tcl=${EPREFIX}/usr/$(get_libdir)" '') #"
347 + $(use_enable java)
348 + )
349 +
350 + if use java; then
351 + myconf+=(
352 + --with-java-prefix="${JAVA_HOME}"
353 + --with-javac-flags="$(java-pkg_javac-args)"
354 + )
355 + fi
356 +
357 + # the entire testsuite needs the TCL functionality
358 + if use tcl && use test ; then
359 + myconf+=( --enable-test )
360 + else
361 + myconf+=( --disable-test )
362 + fi
363 +
364 + # Add linker versions to the symbols. Easier to do, and safer than header file
365 + # mumbo jumbo.
366 + if use userland_GNU; then
367 + append-ldflags -Wl,--default-symver
368 + fi
369 +
370 + ECONF_SOURCE="${S}"/../dist \
371 + econf "${myconf[@]}"
372 +
373 + sed -e "s,\(^STRIP *=\).*,\1\"true\"," -i Makefile || die
374 +}
375 +
376 +src_install() {
377 + emake \
378 + DESTDIR="${D}" \
379 + libdir="${EPREFIX}/usr/$(get_libdir)" \
380 + STRIP="true" \
381 + install
382 +
383 + db_src_install_usrbinslot
384 +
385 + db_src_install_headerslot
386 +
387 + db_src_install_doc
388 +
389 + db_src_install_usrlibcleanup
390 +
391 + dodir /usr/sbin
392 + # This file is not always built, and no longer exists as of db-4.8
393 + if [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] ; then
394 + mv "${ED}"/usr/bin/berkeley_db_svc \
395 + "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
396 + fi
397 +
398 + if use java; then
399 + java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
400 + java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
401 + rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
402 + fi
403 +
404 + # no static libraries
405 + find "${ED}" -name '*.la' -delete || die
406 +}
407 +
408 +pkg_postinst() {
409 + db_fix_so
410 +}
411 +
412 +pkg_postrm() {
413 + db_fix_so
414 +}
415
416 diff --git a/sys-libs/db/db-4.7.25_p4-r3.ebuild b/sys-libs/db/db-4.7.25_p4-r3.ebuild
417 new file mode 100644
418 index 00000000000..482880fbe96
419 --- /dev/null
420 +++ b/sys-libs/db/db-4.7.25_p4-r3.ebuild
421 @@ -0,0 +1,190 @@
422 +# Copyright 1999-2020 Gentoo Authors
423 +# Distributed under the terms of the GNU General Public License v2
424 +
425 +EAPI=7
426 +
427 +inherit autotools db flag-o-matic java-pkg-opt-2 multilib
428 +
429 +#Number of official patches
430 +#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
431 +PATCHNO="${PV/*.*.*_p}"
432 +if [[ ${PATCHNO} == "${PV}" ]] ; then
433 + MY_PV="${PV}"
434 + MY_P="${P}"
435 + PATCHNO=0
436 +else
437 + MY_PV="${PV/_p${PATCHNO}}"
438 + MY_P="${PN}-${MY_PV}"
439 +fi
440 +
441 +RESTRICT="!test? ( test )"
442 +
443 +S="${WORKDIR}/${MY_P}/build_unix"
444 +DESCRIPTION="Oracle Berkeley DB"
445 +HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
446 +SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
447 +for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
448 + export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
449 +done
450 +
451 +LICENSE="Sleepycat"
452 +SLOT="$(ver_cut 1-2)"
453 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sparc ~x86"
454 +IUSE="doc java cxx tcl test"
455 +
456 +# the entire testsuite needs the TCL functionality
457 +DEPEND="tcl? ( >=dev-lang/tcl-8.4 )
458 + test? ( >=dev-lang/tcl-8.4 )
459 + java? ( >=virtual/jdk-1.5 )
460 + >=sys-devel/binutils-2.16.1"
461 +RDEPEND="tcl? ( dev-lang/tcl )
462 + java? ( >=virtual/jre-1.5 )"
463 +
464 +PATCHES=(
465 + "${FILESDIR}"/"${PN}"-4.4-libtool.patch
466 +
467 + # use the includes from the prefix
468 + "${FILESDIR}"/"${PN}"-4.6-jni-check-prefix-first.patch
469 + "${FILESDIR}"/"${PN}"-4.2-listen-to-java-options.patch
470 +)
471 +
472 +# Required to avoid unpack attempt of patches
473 +src_unpack() {
474 + unpack "${MY_P}".tar.gz
475 +}
476 +
477 +src_prepare() {
478 + pushd "${WORKDIR}"/"${MY_P}" &>/dev/null || die
479 + for (( i=1 ; i<=${PATCHNO} ; i++ ))
480 + do
481 + eapply -p0 "${DISTDIR}"/patch."${MY_PV}"."${i}"
482 + done
483 +
484 + default
485 +
486 + sed -e "/^DB_RELEASE_DATE=/s/%B %e, %Y/%Y-%m-%d/" \
487 + -i dist/RELEASE || die
488 +
489 + # Include the SLOT for Java JAR files
490 + # This supersedes the unused jarlocation patches.
491 + sed -r \
492 + -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
493 + -i dist/Makefile.in || die
494 +
495 + pushd dist &>/dev/null || die
496 + rm aclocal/libtool.m4 || die
497 + sed \
498 + -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
499 + -i configure.ac || die
500 + sed \
501 + -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
502 + -i aclocal/programs.m4 || die
503 +
504 + AT_M4DIR="aclocal aclocal_java" eautoreconf
505 +
506 + # Upstream sucks - they do autoconf and THEN replace the version variables.
507 + . ./RELEASE
508 + sed \
509 + -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \
510 + -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \
511 + -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \
512 + -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \
513 + -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \
514 + -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" \
515 + -i configure || die
516 +
517 + popd &>/dev/null || die
518 + popd &>/dev/null || die
519 +}
520 +
521 +src_configure() {
522 + # compilation with -O0 fails on amd64, see bug #171231
523 + if use amd64 ; then
524 + replace-flags -O0 -O2
525 + is-flagq -O[s123] || append-flags -O2
526 + fi
527 +
528 + local myconf=(
529 + --enable-compat185
530 + --enable-o_direct
531 + --without-uniquename
532 + --disable-rpc
533 + --disable-static
534 +
535 + $(usex amd64 '--with-mutex=x86/gcc-assembly' '')
536 + $(use_enable cxx)
537 + $(use_enable tcl)
538 + $(usex tcl "--with-tcl=${EPREFIX}/usr/$(get_libdir)" '') #"
539 + $(use_enable java)
540 + $(use_enable test)
541 + )
542 +
543 + if use java; then
544 + myconf+=(
545 + --with-java-prefix="${JAVA_HOME}"
546 + --with-javac-flags="$(java-pkg_javac-args)"
547 + )
548 + fi
549 +
550 + # Bug #270851: test needs TCL support
551 + if use tcl && use test ; then
552 + myconf+=( --enable-test )
553 + else
554 + myconf+=( --disable-test )
555 + fi
556 +
557 + # Add linker versions to the symbols. Easier to do, and safer than header file
558 + # mumbo jumbo.
559 + if use userland_GNU ; then
560 + append-ldflags -Wl,--default-symver
561 + fi
562 +
563 + ECONF_SOURCE="${S}"/../dist \
564 + STRIP="true" \
565 + econf "${myconf[@]}"
566 +
567 + # The embedded assembly on ARM does not work on newer hardware
568 + # so you CANNOT use --with-mutex=ARM/gcc-assembly anymore.
569 + # Specifically, it uses the SWPB op, which was deprecated:
570 + # http://www.keil.com/support/man/docs/armasm/armasm_dom1361289909499.htm
571 +
572 + # The op ALSO cannot be used in ARM-Thumb mode.
573 + # Trust the compiler instead.
574 + # >=db-6.1 uses LDREX instead.
575 +}
576 +
577 +src_install() {
578 + emake DESTDIR="${D}" install
579 +
580 + db_src_install_usrbinslot
581 +
582 + db_src_install_headerslot
583 +
584 + db_src_install_doc
585 +
586 + db_src_install_usrlibcleanup
587 +
588 + dodir /usr/sbin
589 + # This file is not always built, and no longer exists as of db-4.8
590 + if [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] ; then
591 + mv "${ED}"/usr/bin/berkeley_db_svc \
592 + "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
593 + fi
594 +
595 + if use java; then
596 + java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
597 + java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
598 + rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
599 + fi
600 +
601 + # no static libraries
602 + find "${ED}" -name '*.la' -delete || die
603 +}
604 +
605 +pkg_postinst() {
606 + db_fix_so
607 +}
608 +
609 +pkg_postrm() {
610 + db_fix_so
611 +}
612
613 diff --git a/sys-libs/db/db-4.8.30-r4.ebuild b/sys-libs/db/db-4.8.30-r4.ebuild
614 new file mode 100644
615 index 00000000000..8aa5a58e63b
616 --- /dev/null
617 +++ b/sys-libs/db/db-4.8.30-r4.ebuild
618 @@ -0,0 +1,197 @@
619 +# Copyright 1999-2020 Gentoo Authors
620 +# Distributed under the terms of the GNU General Public License v2
621 +
622 +EAPI=7
623 +
624 +inherit autotools db flag-o-matic java-pkg-opt-2 multilib multilib-minimal toolchain-funcs
625 +
626 +#Number of official patches
627 +#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
628 +PATCHNO="${PV/*.*.*_p}"
629 +if [[ ${PATCHNO} == "${PV}" ]] ; then
630 + MY_PV="${PV}"
631 + MY_P="${P}"
632 + PATCHNO=0
633 +else
634 + MY_PV="${PV/_p${PATCHNO}}"
635 + MY_P="${PN}-${MY_PV}"
636 +fi
637 +
638 +RESTRICT="!test? ( test )"
639 +
640 +S="${WORKDIR}/${MY_P}/build_unix"
641 +DESCRIPTION="Oracle Berkeley DB"
642 +HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
643 +SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
644 +for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
645 + export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
646 +done
647 +
648 +LICENSE="Sleepycat"
649 +SLOT="$(ver_cut 1-2)"
650 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
651 +IUSE="doc java cxx tcl test"
652 +
653 +REQUIRED_USE="test? ( tcl )"
654 +
655 +# the entire testsuite needs the TCL functionality
656 +DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
657 + test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
658 + java? ( >=virtual/jdk-1.5 )
659 + >=sys-devel/binutils-2.16.1"
660 +RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
661 + java? ( >=virtual/jre-1.5 )"
662 +
663 +PATCHES=(
664 + "${FILESDIR}"/${PN}-4.8-libtool.patch
665 + "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch
666 + "${FILESDIR}"/${PN}-4.8.30-rename-atomic-compare-exchange.patch
667 +
668 + # use the includes from the prefix
669 + "${FILESDIR}"/${PN}-4.6-jni-check-prefix-first.patch
670 + "${FILESDIR}"/${PN}-4.2-listen-to-java-options.patch
671 +)
672 +
673 +src_prepare() {
674 + cd "${WORKDIR}"/"${MY_P}" || die
675 + for (( i=1 ; i<=${PATCHNO} ; i++ ))
676 + do
677 + eapply -p0 "${DISTDIR}"/patch."${MY_PV}"."${i}"
678 + done
679 +
680 + default
681 +
682 + sed -e "/^DB_RELEASE_DATE=/s/%B %e, %Y/%Y-%m-%d/" -i dist/RELEASE \
683 + || die
684 +
685 + # Include the SLOT for Java JAR files
686 + # This supersedes the unused jarlocation patches.
687 + sed -r \
688 + -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
689 + -i dist/Makefile.in || die
690 +
691 + cd dist || die
692 + rm aclocal/libtool.m4 || die
693 + sed \
694 + -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
695 + -i configure.ac || die
696 + sed \
697 + -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
698 + -i aclocal/programs.m4 || die
699 +
700 + AT_M4DIR="aclocal aclocal_java" eautoreconf
701 +
702 + # Upstream sucks - they do autoconf and THEN replace the version variables.
703 + . ./RELEASE
704 + sed \
705 + -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \
706 + -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \
707 + -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \
708 + -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \
709 + -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \
710 + -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" \
711 + -i configure || die
712 +}
713 +
714 +multilib_src_configure() {
715 + local myconf=(
716 + --enable-compat185
717 + --enable-o_direct
718 + --without-uniquename
719 + --disable-static
720 + $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly)
721 + $(use_enable cxx)
722 + $(use_enable cxx stl)
723 + $(multilib_native_use_enable java)
724 + $(use_enable test)
725 + )
726 +
727 + tc-ld-disable-gold #470634
728 +
729 + # compilation with -O0 fails on amd64, see bug #171231
730 + if [[ ${ABI} == amd64 ]]; then
731 + local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
732 + replace-flags -O0 -O2
733 + is-flagq -O[s123] || append-flags -O2
734 + fi
735 +
736 + # Add linker versions to the symbols. Easier to do, and safer than header file
737 + # mumbo jumbo.
738 + if use userland_GNU ; then
739 + append-ldflags -Wl,--default-symver
740 + fi
741 +
742 + # use `set` here since the java opts will contain whitespace
743 + if multilib_is_native_abi && use java ; then
744 + myconf+=(
745 + --with-java-prefix="${JAVA_HOME}"
746 + --with-javac-flags="$(java-pkg_javac-args)"
747 + )
748 + fi
749 +
750 + # Bug #270851: test needs TCL support
751 + if use tcl || use test ; then
752 + myconf+=(
753 + --enable-tcl
754 + --with-tcl="${EPREFIX}/usr/$(get_libdir)"
755 + )
756 + else
757 + myconf+=(--disable-tcl )
758 + fi
759 +
760 + ECONF_SOURCE="${S}"/../dist \
761 + STRIP="true" \
762 + econf "${myconf[@]}"
763 +
764 + # The embedded assembly on ARM does not work on newer hardware
765 + # so you CANNOT use --with-mutex=ARM/gcc-assembly anymore.
766 + # Specifically, it uses the SWPB op, which was deprecated:
767 + # http://www.keil.com/support/man/docs/armasm/armasm_dom1361289909499.htm
768 + # The op ALSO cannot be used in ARM-Thumb mode.
769 + # Trust the compiler instead.
770 + # >=db-6.1 uses LDREX instead.
771 +}
772 +
773 +multilib_src_test() {
774 + multilib_is_native_abi || return
775 +
776 + S="${BUILD_DIR}" db_src_test
777 +}
778 +
779 +multilib_src_install() {
780 + emake install DESTDIR="${D}"
781 +
782 + db_src_install_headerslot
783 +
784 + db_src_install_usrlibcleanup
785 +
786 + if multilib_is_native_abi && use java; then
787 + java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
788 + java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
789 + rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
790 + fi
791 +}
792 +
793 +multilib_src_install_all() {
794 + db_src_install_usrbinslot
795 +
796 + db_src_install_doc
797 +
798 + dodir /usr/sbin
799 + # This file is not always built, and no longer exists as of db-4.8
800 + if [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] ; then
801 + mv "${ED}"/usr/bin/berkeley_db_svc \
802 + "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
803 + fi
804 +
805 + # no static libraries
806 + find "${ED}" -name '*.la' -delete || die
807 +}
808 +
809 +pkg_postinst() {
810 + multilib_foreach_abi db_fix_so
811 +}
812 +
813 +pkg_postrm() {
814 + multilib_foreach_abi db_fix_so
815 +}
816
817 diff --git a/sys-libs/db/db-6.1.38.ebuild b/sys-libs/db/db-5.3.28-r5.ebuild
818 similarity index 70%
819 copy from sys-libs/db/db-6.1.38.ebuild
820 copy to sys-libs/db/db-5.3.28-r5.ebuild
821 index 3609e94268b..0bc78d20af9 100644
822 --- a/sys-libs/db/db-6.1.38.ebuild
823 +++ b/sys-libs/db/db-5.3.28-r5.ebuild
824 @@ -1,19 +1,19 @@
825 # Copyright 1999-2020 Gentoo Authors
826 # Distributed under the terms of the GNU General Public License v2
827
828 -EAPI=6
829 -inherit db flag-o-matic java-pkg-opt-2 autotools multilib multilib-minimal eapi7-ver toolchain-funcs
830 +EAPI=7
831 +inherit autotools db flag-o-matic java-pkg-opt-2 multilib multilib-minimal toolchain-funcs
832
833 #Number of official patches
834 #PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
835 -PATCHNO=${PV/*.*.*_p}
836 +PATCHNO="${PV/*.*.*_p}"
837 if [[ ${PATCHNO} == "${PV}" ]] ; then
838 - MY_PV=${PV}
839 - MY_P=${P}
840 + MY_PV="${PV}"
841 + MY_P="${P}"
842 PATCHNO=0
843 else
844 - MY_PV=${PV/_p${PATCHNO}}
845 - MY_P=${PN}-${MY_PV}
846 + MY_PV="${PV/_p${PATCHNO}}"
847 + MY_P="${PN}-${MY_PV}"
848 fi
849
850 RESTRICT="!test? ( test )"
851 @@ -27,8 +27,8 @@ for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
852 export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
853 done
854
855 -LICENSE="AGPL-3"
856 -SLOT="$(get_version_component_range 1-2)"
857 +LICENSE="Sleepycat"
858 +SLOT="$(ver_cut 1-2)"
859 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
860 IUSE="doc java cxx tcl test"
861
862 @@ -43,7 +43,7 @@ RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
863 java? ( >=virtual/jre-1.5 )"
864
865 MULTILIB_WRAPPED_HEADERS=(
866 - /usr/include/db$(ver_cut 1-2)/db.h
867 + /usr/include/db${SLOT}/db.h
868 )
869
870 PATCHES=(
871 @@ -51,24 +51,26 @@ PATCHES=(
872 "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch
873
874 # use the includes from the prefix
875 - "${FILESDIR}"/${PN}-6.2-jni-check-prefix-first.patch
876 + "${FILESDIR}"/${PN}-4.6-jni-check-prefix-first.patch
877 "${FILESDIR}"/${PN}-4.2-listen-to-java-options.patch
878
879 # sqlite configure call has an extra leading ..
880 - # upstreamed:5.2.36, missing in 5.3.x/6.x
881 - # still needs to be patched in 6.0.20
882 - "${FILESDIR}"/${PN}-6.1.19-sqlite-configure-path.patch
883 + # upstreamed:5.2.36, missing in 5.3.x
884 + "${FILESDIR}"/${PN}-5.2.28-sqlite-configure-path.patch
885
886 # The upstream testsuite copies .lib and the binaries for each parallel test
887 # core, ~300MB each. This patch uses links instead, saves a lot of space.
888 "${FILESDIR}"/${PN}-6.0.20-test-link.patch
889 +
890 + # Needed when compiling with clang
891 + "${FILESDIR}"/${PN}-5.1.29-rename-atomic-compare-exchange.patch
892 )
893
894 src_prepare() {
895 - cd "${WORKDIR}"/"${MY_P}"
896 + cd "${S_BASE}" || die
897 for (( i=1 ; i<=${PATCHNO} ; i++ ))
898 do
899 - eapply "${DISTDIR}"/patch."${MY_PV}"."${i}"
900 + eapply -p0 "${DISTDIR}"/patch."${MY_PV}"."${i}"
901 done
902
903 default
904 @@ -78,49 +80,52 @@ src_prepare() {
905 export REAL_DB_RELEASE_DATE="$(awk \
906 '/^DB_VERSION_STRING=/{ gsub(".*\\(|\\).*","",$0); print $0; }' \
907 "${S_BASE}"/dist/configure)"
908 - sed -r -i \
909 + sed -r \
910 -e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
911 - "${S_BASE}"/dist/RELEASE || die
912 + -i dist/RELEASE || die
913
914 # Include the SLOT for Java JAR files
915 # This supersedes the unused jarlocation patches.
916 - sed -r -i \
917 + sed -r \
918 -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
919 - "${S_BASE}"/dist/Makefile.in || die
920 + -i dist/Makefile.in || die
921
922 - cd "${S_BASE}"/dist || die
923 - rm -f aclocal/libtool.m4
924 - sed -i \
925 + cd dist || die
926 + rm aclocal/libtool.m4 || die
927 + sed \
928 -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
929 - configure.ac || die
930 - sed -i \
931 + -i configure.ac || die
932 + sed \
933 -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
934 - aclocal/programs.m4 || die
935 + -i aclocal/programs.m4 || die
936 +
937 AT_M4DIR="aclocal aclocal_java" eautoreconf
938 +
939 # Upstream sucks - they do autoconf and THEN replace the version variables.
940 . ./RELEASE
941 + local v ev
942 for v in \
943 DB_VERSION_{FAMILY,LETTER,RELEASE,MAJOR,MINOR} \
944 DB_VERSION_{PATCH,FULL,UNIQUE_NAME,STRING,FULL_STRING} \
945 DB_VERSION \
946 DB_RELEASE_DATE ; do
947 - local ev="__EDIT_${v}__"
948 - sed -i -e "s/${ev}/${!v}/g" configure || die
949 + ev="__EDIT_${v}__"
950 + sed -e "s/${ev}/${!v}/g" -i configure || die
951 done
952
953 # This is a false positive skip in the tests as the test-reviewer code
954 # looks for 'Skipping\s'
955 - sed -i \
956 + sed \
957 -e '/db_repsite/s,Skipping:,Skipping,g' \
958 - "${S_BASE}"/test/tcl/reputils.tcl || die
959 + -i "${S_BASE}"/test/tcl/reputils.tcl || die
960 }
961
962 multilib_src_configure() {
963 - # sql_compat will cause a collision with sqlite3
964 - # --enable-sql_compat
965 - # Don't --enable-sql* because we don't want to use bundled sqlite.
966 - # See Gentoo bug #605688
967 - local myeconfargs=(
968 + local myconf=(
969 + # sql_compat will cause a collision with sqlite3
970 + #--enable-sql_compat
971 + # Don't --enable-sql* because we don't want to use bundled sqlite.
972 + # See Gentoo bug #605688
973 --enable-compat185
974 --enable-dbm
975 --enable-o_direct
976 @@ -128,7 +133,7 @@ multilib_src_configure() {
977 --disable-sql
978 --disable-sql_codegen
979 --disable-sql_compat
980 - $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly)
981 + --disable-static
982 $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly)
983 $(use_enable cxx)
984 $(use_enable cxx stl)
985 @@ -140,7 +145,7 @@ multilib_src_configure() {
986
987 # compilation with -O0 fails on amd64, see bug #171231
988 if [[ ${ABI} == amd64 ]]; then
989 - local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
990 + local CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
991 replace-flags -O0 -O2
992 is-flagq -O[s123] || append-flags -O2
993 fi
994 @@ -151,9 +156,8 @@ multilib_src_configure() {
995 append-ldflags -Wl,--default-symver
996 fi
997
998 - # use `set` here since the java opts will contain whitespace
999 if multilib_is_native_abi && use java ; then
1000 - myeconfargs+=(
1001 + myconf+=(
1002 --with-java-prefix="${JAVA_HOME}"
1003 --with-javac-flags="$(java-pkg_javac-args)"
1004 )
1005 @@ -161,30 +165,38 @@ multilib_src_configure() {
1006
1007 # Bug #270851: test needs TCL support
1008 if use tcl || use test ; then
1009 - myeconfargs+=(
1010 + myconf+=(
1011 --enable-tcl
1012 --with-tcl="${EPREFIX}/usr/$(get_libdir)"
1013 )
1014 else
1015 - myeconfargs+=(--disable-tcl )
1016 + myconf+=(--disable-tcl )
1017 fi
1018
1019 ECONF_SOURCE="${S_BASE}"/dist \
1020 STRIP="true" \
1021 - econf "${myeconfargs[@]}"
1022 + econf "${myconf[@]}"
1023 +
1024 + # The embedded assembly on ARM does not work on newer hardware
1025 + # so you CANNOT use --with-mutex=ARM/gcc-assembly anymore.
1026 + # Specifically, it uses the SWPB op, which was deprecated:
1027 + # http://www.keil.com/support/man/docs/armasm/armasm_dom1361289909499.htm
1028 + # The op ALSO cannot be used in ARM-Thumb mode.
1029 + # Trust the compiler instead.
1030 + # >=db-6.1 uses LDREX instead.
1031 }
1032
1033 multilib_src_install() {
1034 - emake install DESTDIR="${D}"
1035 + emake DESTDIR="${D}" install
1036
1037 db_src_install_headerslot
1038
1039 db_src_install_usrlibcleanup
1040
1041 if multilib_is_native_abi && use java; then
1042 - java-pkg_regso "${ED%/}"/usr/"$(get_libdir)"/libdb_java*.so
1043 - java-pkg_dojar "${ED%/}"/usr/"$(get_libdir)"/*.jar
1044 - rm -f "${ED%/}"/usr/"$(get_libdir)"/*.jar
1045 + java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
1046 + java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
1047 + rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
1048 fi
1049 }
1050
1051 @@ -195,10 +207,13 @@ multilib_src_install_all() {
1052
1053 dodir /usr/sbin
1054 # This file is not always built, and no longer exists as of db-4.8
1055 - if [[ -f "${ED%/}"/usr/bin/berkeley_db_svc ]] ; then
1056 - mv "${ED%/}"/usr/bin/berkeley_db_svc \
1057 - "${ED%/}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
1058 + if [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] ; then
1059 + mv "${ED}"/usr/bin/berkeley_db_svc \
1060 + "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
1061 fi
1062 +
1063 + # no static libraries
1064 + find "${ED}" -name '*.la' -delete || die
1065 }
1066
1067 pkg_postinst() {
1068 @@ -217,9 +232,9 @@ src_test() {
1069 #sed -ri \
1070 # -e '/set subs/s,multi_repmgr,,g' \
1071 # "${S_BASE}/test/testparams.tcl"
1072 - sed -ri \
1073 + sed -r \
1074 -e '/multi_repmgr/d' \
1075 - "${S_BASE}/test/tcl/test.tcl" || die
1076 + -i "${S_BASE}/test/tcl/test.tcl" || die
1077
1078 # This is the only failure in 5.2.28 so far, and looks like a false positive.
1079 # Repmgr018 (btree): Test of repmgr stats.
1080 @@ -229,10 +244,10 @@ src_test() {
1081 # Rep_test: btree 20 key/data pairs starting at 0
1082 # Rep_test.a: put/get loop
1083 # FAIL:07:05:59 (00:00:00) perm_no_failed_stat: expected 0, got 1
1084 - sed -ri \
1085 + sed -r \
1086 -e '/set parms.*repmgr018/d' \
1087 -e 's/repmgr018//g' \
1088 - "${S_BASE}/test/tcl/test.tcl" || die
1089 + -i "${S_BASE}/test/tcl/test.tcl" || die
1090
1091 multilib-minimal_src_test
1092 }
1093 @@ -240,5 +255,5 @@ src_test() {
1094 multilib_src_test() {
1095 multilib_is_native_abi || return
1096
1097 - S=${BUILD_DIR} db_src_test
1098 + S="${BUILD_DIR}" db_src_test
1099 }
1100
1101 diff --git a/sys-libs/db/db-6.1.38.ebuild b/sys-libs/db/db-6.0.35-r3.ebuild
1102 similarity index 74%
1103 copy from sys-libs/db/db-6.1.38.ebuild
1104 copy to sys-libs/db/db-6.0.35-r3.ebuild
1105 index 3609e94268b..f1c5a7c3c5d 100644
1106 --- a/sys-libs/db/db-6.1.38.ebuild
1107 +++ b/sys-libs/db/db-6.0.35-r3.ebuild
1108 @@ -1,19 +1,19 @@
1109 # Copyright 1999-2020 Gentoo Authors
1110 # Distributed under the terms of the GNU General Public License v2
1111
1112 -EAPI=6
1113 -inherit db flag-o-matic java-pkg-opt-2 autotools multilib multilib-minimal eapi7-ver toolchain-funcs
1114 +EAPI=7
1115 +inherit autotools db flag-o-matic java-pkg-opt-2 multilib multilib-minimal toolchain-funcs
1116
1117 #Number of official patches
1118 #PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
1119 -PATCHNO=${PV/*.*.*_p}
1120 +PATCHNO="${PV/*.*.*_p}"
1121 if [[ ${PATCHNO} == "${PV}" ]] ; then
1122 - MY_PV=${PV}
1123 - MY_P=${P}
1124 + MY_PV="${PV}"
1125 + MY_P="${P}"
1126 PATCHNO=0
1127 else
1128 - MY_PV=${PV/_p${PATCHNO}}
1129 - MY_P=${PN}-${MY_PV}
1130 + MY_PV="${PV/_p${PATCHNO}}"
1131 + MY_P="${PN}-${MY_PV}"
1132 fi
1133
1134 RESTRICT="!test? ( test )"
1135 @@ -28,7 +28,7 @@ for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
1136 done
1137
1138 LICENSE="AGPL-3"
1139 -SLOT="$(get_version_component_range 1-2)"
1140 +SLOT="$(ver_cut 1-2)"
1141 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
1142 IUSE="doc java cxx tcl test"
1143
1144 @@ -43,7 +43,7 @@ RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
1145 java? ( >=virtual/jre-1.5 )"
1146
1147 MULTILIB_WRAPPED_HEADERS=(
1148 - /usr/include/db$(ver_cut 1-2)/db.h
1149 + /usr/include/db${SLOT}/db.h
1150 )
1151
1152 PATCHES=(
1153 @@ -51,13 +51,13 @@ PATCHES=(
1154 "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch
1155
1156 # use the includes from the prefix
1157 - "${FILESDIR}"/${PN}-6.2-jni-check-prefix-first.patch
1158 + "${FILESDIR}"/${PN}-4.6-jni-check-prefix-first.patch
1159 "${FILESDIR}"/${PN}-4.2-listen-to-java-options.patch
1160
1161 # sqlite configure call has an extra leading ..
1162 # upstreamed:5.2.36, missing in 5.3.x/6.x
1163 # still needs to be patched in 6.0.20
1164 - "${FILESDIR}"/${PN}-6.1.19-sqlite-configure-path.patch
1165 + "${FILESDIR}"/${PN}-6.0.35-sqlite-configure-path.patch
1166
1167 # The upstream testsuite copies .lib and the binaries for each parallel test
1168 # core, ~300MB each. This patch uses links instead, saves a lot of space.
1169 @@ -65,10 +65,10 @@ PATCHES=(
1170 )
1171
1172 src_prepare() {
1173 - cd "${WORKDIR}"/"${MY_P}"
1174 + cd "${S_BASE}" || die
1175 for (( i=1 ; i<=${PATCHNO} ; i++ ))
1176 do
1177 - eapply "${DISTDIR}"/patch."${MY_PV}"."${i}"
1178 + eapply -p0 "${DISTDIR}"/patch."${MY_PV}"."${i}"
1179 done
1180
1181 default
1182 @@ -78,49 +78,48 @@ src_prepare() {
1183 export REAL_DB_RELEASE_DATE="$(awk \
1184 '/^DB_VERSION_STRING=/{ gsub(".*\\(|\\).*","",$0); print $0; }' \
1185 "${S_BASE}"/dist/configure)"
1186 - sed -r -i \
1187 + sed -r \
1188 -e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
1189 - "${S_BASE}"/dist/RELEASE || die
1190 + -i dist/RELEASE || die
1191
1192 # Include the SLOT for Java JAR files
1193 # This supersedes the unused jarlocation patches.
1194 - sed -r -i \
1195 + sed -r \
1196 -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
1197 - "${S_BASE}"/dist/Makefile.in || die
1198 + -i dist/Makefile.in || die
1199
1200 - cd "${S_BASE}"/dist || die
1201 - rm -f aclocal/libtool.m4
1202 - sed -i \
1203 + cd dist || die
1204 + rm aclocal/libtool.m4 || die
1205 + sed \
1206 -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
1207 - configure.ac || die
1208 - sed -i \
1209 + -i configure.ac || die
1210 + sed \
1211 -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
1212 - aclocal/programs.m4 || die
1213 + -i aclocal/programs.m4 || die
1214 +
1215 AT_M4DIR="aclocal aclocal_java" eautoreconf
1216 +
1217 # Upstream sucks - they do autoconf and THEN replace the version variables.
1218 . ./RELEASE
1219 + local v ev
1220 for v in \
1221 DB_VERSION_{FAMILY,LETTER,RELEASE,MAJOR,MINOR} \
1222 DB_VERSION_{PATCH,FULL,UNIQUE_NAME,STRING,FULL_STRING} \
1223 DB_VERSION \
1224 DB_RELEASE_DATE ; do
1225 - local ev="__EDIT_${v}__"
1226 - sed -i -e "s/${ev}/${!v}/g" configure || die
1227 + ev="__EDIT_${v}__"
1228 + sed -e "s/${ev}/${!v}/g" -i configure || die
1229 done
1230
1231 # This is a false positive skip in the tests as the test-reviewer code
1232 # looks for 'Skipping\s'
1233 - sed -i \
1234 + sed \
1235 -e '/db_repsite/s,Skipping:,Skipping,g' \
1236 - "${S_BASE}"/test/tcl/reputils.tcl || die
1237 + -i "${S_BASE}"/test/tcl/reputils.tcl || die
1238 }
1239
1240 multilib_src_configure() {
1241 - # sql_compat will cause a collision with sqlite3
1242 - # --enable-sql_compat
1243 - # Don't --enable-sql* because we don't want to use bundled sqlite.
1244 - # See Gentoo bug #605688
1245 - local myeconfargs=(
1246 + local myconf=(
1247 --enable-compat185
1248 --enable-dbm
1249 --enable-o_direct
1250 @@ -128,7 +127,7 @@ multilib_src_configure() {
1251 --disable-sql
1252 --disable-sql_codegen
1253 --disable-sql_compat
1254 - $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly)
1255 + --disable-static
1256 $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly)
1257 $(use_enable cxx)
1258 $(use_enable cxx stl)
1259 @@ -153,7 +152,7 @@ multilib_src_configure() {
1260
1261 # use `set` here since the java opts will contain whitespace
1262 if multilib_is_native_abi && use java ; then
1263 - myeconfargs+=(
1264 + myconf+=(
1265 --with-java-prefix="${JAVA_HOME}"
1266 --with-javac-flags="$(java-pkg_javac-args)"
1267 )
1268 @@ -161,30 +160,42 @@ multilib_src_configure() {
1269
1270 # Bug #270851: test needs TCL support
1271 if use tcl || use test ; then
1272 - myeconfargs+=(
1273 + myconf+=(
1274 --enable-tcl
1275 --with-tcl="${EPREFIX}/usr/$(get_libdir)"
1276 )
1277 else
1278 - myeconfargs+=(--disable-tcl )
1279 + myconf+=(--disable-tcl )
1280 fi
1281
1282 + # sql_compat will cause a collision with sqlite3
1283 + # --enable-sql_compat
1284 + # Don't --enable-sql* because we don't want to use bundled sqlite.
1285 + # See Gentoo bug #605688
1286 ECONF_SOURCE="${S_BASE}"/dist \
1287 STRIP="true" \
1288 - econf "${myeconfargs[@]}"
1289 + econf "${myconf[@]}"
1290 +
1291 + # The embedded assembly on ARM does not work on newer hardware
1292 + # so you CANNOT use --with-mutex=ARM/gcc-assembly anymore.
1293 + # Specifically, it uses the SWPB op, which was deprecated:
1294 + # http://www.keil.com/support/man/docs/armasm/armasm_dom1361289909499.htm
1295 + # The op ALSO cannot be used in ARM-Thumb mode.
1296 + # Trust the compiler instead.
1297 + # >=db-6.1 uses LDREX instead.
1298 }
1299
1300 multilib_src_install() {
1301 - emake install DESTDIR="${D}"
1302 + emake DESTDIR="${D}" install
1303
1304 db_src_install_headerslot
1305
1306 db_src_install_usrlibcleanup
1307
1308 if multilib_is_native_abi && use java; then
1309 - java-pkg_regso "${ED%/}"/usr/"$(get_libdir)"/libdb_java*.so
1310 - java-pkg_dojar "${ED%/}"/usr/"$(get_libdir)"/*.jar
1311 - rm -f "${ED%/}"/usr/"$(get_libdir)"/*.jar
1312 + java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
1313 + java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
1314 + rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
1315 fi
1316 }
1317
1318 @@ -195,10 +206,13 @@ multilib_src_install_all() {
1319
1320 dodir /usr/sbin
1321 # This file is not always built, and no longer exists as of db-4.8
1322 - if [[ -f "${ED%/}"/usr/bin/berkeley_db_svc ]] ; then
1323 - mv "${ED%/}"/usr/bin/berkeley_db_svc \
1324 - "${ED%/}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
1325 + if [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] ; then
1326 + mv "${ED}"/usr/bin/berkeley_db_svc \
1327 + "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
1328 fi
1329 +
1330 + # no static libraries
1331 + find "${ED}" -name '*.la' -delete || die
1332 }
1333
1334 pkg_postinst() {
1335 @@ -214,12 +228,12 @@ src_test() {
1336 # db_repsite is used directly in the setup_site_prog,
1337 # setup_site_prog is called from open_site_prog
1338 # which is called only from tests in the multi_repmgr group.
1339 - #sed -ri \
1340 + #sed -r \
1341 # -e '/set subs/s,multi_repmgr,,g' \
1342 - # "${S_BASE}/test/testparams.tcl"
1343 - sed -ri \
1344 + # -i "${S_BASE}/test/testparams.tcl"
1345 + sed -r \
1346 -e '/multi_repmgr/d' \
1347 - "${S_BASE}/test/tcl/test.tcl" || die
1348 + -i "${S_BASE}/test/tcl/test.tcl" || die
1349
1350 # This is the only failure in 5.2.28 so far, and looks like a false positive.
1351 # Repmgr018 (btree): Test of repmgr stats.
1352 @@ -229,10 +243,10 @@ src_test() {
1353 # Rep_test: btree 20 key/data pairs starting at 0
1354 # Rep_test.a: put/get loop
1355 # FAIL:07:05:59 (00:00:00) perm_no_failed_stat: expected 0, got 1
1356 - sed -ri \
1357 + sed -r \
1358 -e '/set parms.*repmgr018/d' \
1359 -e 's/repmgr018//g' \
1360 - "${S_BASE}/test/tcl/test.tcl" || die
1361 + -i "${S_BASE}/test/tcl/test.tcl" || die
1362
1363 multilib-minimal_src_test
1364 }
1365 @@ -240,5 +254,5 @@ src_test() {
1366 multilib_src_test() {
1367 multilib_is_native_abi || return
1368
1369 - S=${BUILD_DIR} db_src_test
1370 + S="${BUILD_DIR}" db_src_test
1371 }
1372
1373 diff --git a/sys-libs/db/db-6.1.38.ebuild b/sys-libs/db/db-6.1.38.ebuild
1374 index 3609e94268b..11984accc9b 100644
1375 --- a/sys-libs/db/db-6.1.38.ebuild
1376 +++ b/sys-libs/db/db-6.1.38.ebuild
1377 @@ -128,6 +128,7 @@ multilib_src_configure() {
1378 --disable-sql
1379 --disable-sql_codegen
1380 --disable-sql_compat
1381 + --disable-static
1382 $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly)
1383 $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly)
1384 $(use_enable cxx)
1385 @@ -199,6 +200,9 @@ multilib_src_install_all() {
1386 mv "${ED%/}"/usr/bin/berkeley_db_svc \
1387 "${ED%/}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
1388 fi
1389 +
1390 + # no static libraries
1391 + find "${ED}" -name '*.la' -delete || die
1392 }
1393
1394 pkg_postinst() {
1395
1396 diff --git a/sys-libs/db/db-6.2.38.ebuild b/sys-libs/db/db-6.2.38.ebuild
1397 index 965668160fc..091651e008b 100644
1398 --- a/sys-libs/db/db-6.2.38.ebuild
1399 +++ b/sys-libs/db/db-6.2.38.ebuild
1400 @@ -128,6 +128,7 @@ multilib_src_configure() {
1401 --disable-sql
1402 --disable-sql_codegen
1403 --disable-sql_compat
1404 + --disable-static
1405 $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly)
1406 $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly)
1407 $(use_enable cxx)
1408 @@ -199,6 +200,9 @@ multilib_src_install_all() {
1409 mv "${ED%/}"/usr/bin/berkeley_db_svc \
1410 "${ED%/}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
1411 fi
1412 +
1413 + # no static libraries
1414 + find "${ED}" -name '*.la' -delete || die
1415 }
1416
1417 pkg_postinst() {