Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/
Date: Thu, 23 Apr 2020 14:44:40
Message-Id: 1587653063.266adc0dd4ef16721ec51ffdc69df7325f6824fb.whissi@gentoo
1 commit: 266adc0dd4ef16721ec51ffdc69df7325f6824fb
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 23 14:44:23 2020 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 23 14:44:23 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=266adc0d
7
8 dev-db/sqlite: security cleanup
9
10 Bug: https://bugs.gentoo.org/711526
11 Package-Manager: Portage-2.3.99, Repoman-2.3.22
12 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
13
14 dev-db/sqlite/Manifest | 6 -
15 dev-db/sqlite/sqlite-3.29.0.ebuild | 395 -------------------------------------
16 dev-db/sqlite/sqlite-3.30.1.ebuild | 388 ------------------------------------
17 3 files changed, 789 deletions(-)
18
19 diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
20 index af34cd48900..a5126e72a2e 100644
21 --- a/dev-db/sqlite/Manifest
22 +++ b/dev-db/sqlite/Manifest
23 @@ -1,9 +1,3 @@
24 -DIST sqlite-autoconf-3290000.tar.gz 2833613 BLAKE2B b68a4f9bfe90653f5ce9dbf94b44cecc843fbb639883a7be9dd40150749f8d2eca0c231b215137d2f8da78d33356d72640a943ba06516c6d7c10ebd04cae4766 SHA512 85dcaa72cc2476c628e801d4ce46cf10ed8997f56cb0334062df5553f18c29d607883a1049bf75258204f2f53a29a02a01f014dcca383b05dfac1e2123778024
25 -DIST sqlite-autoconf-3300100.tar.gz 2848951 BLAKE2B 3a541a2b07ebbaf7ddca4693b71765e2ecd11974dd64b4a7a19eaee4eea8a17a6004c69f3b2163213fe7568480152709745e029107711813d4bdd41052763cd1 SHA512 9ec0283c417fb0323b0e43550af2a49e9a63988e4212c27ea62cc9da3534caa6faf5bdc7e051b6772c4ce61560a433b3d3288b68e05e9ba8495f61a3bcebda3e
26 DIST sqlite-autoconf-3310100.tar.gz 2887243 BLAKE2B ef5d40b6e6c59a51ae95368eb9f6a938188813f89d5328ea1c1180ef35f124c14b3e83b0832ae5c2fa24cc2df352f1b0ea5f20b64d0762d50a700d9895f9a12e SHA512 d85250ba5f78f0c918880f663741709aba662192f04888b2324a0df17affdf5b8540e8428c6c7315119806e7adad758ea281c9b403c0ad94ac6a9bd1b93fd617
27 -DIST sqlite-doc-3290000.zip 9415641 BLAKE2B 97fef1f01d3e7730e5220541ad9ccdf9f8538aa43939c0f513919c8505b3a4f4b4c89eb2e04fddae80b7eeed440eb0f06f7cfd93cd56f0539bd6fdd5f47e1ff7 SHA512 ca856cf250e395d9c7e9817337adb5a16b1d96a20548a4010f5137188d35bb9d49a4a6da47bf2a696deffa68d2976dbb35a036adce19b8320e0e286876ac094f
28 -DIST sqlite-doc-3300100.zip 9485342 BLAKE2B bf5e3909a327c773106d4990b3e3be5dd63db2dbc1a7f8a7c1bd16f39bec83a6b2a98c4c56ded3b58f4087dcdcc934e542db36e142bf338a411ed7115d67d6b3 SHA512 373e843015307071443a0db5fb930f9120718f6118cc2e21b506fdc8535fbe6996e9889e8b5809ffb91257addfe778bdf3412a81e11f6bced2c5e0330337d00d
29 DIST sqlite-doc-3310100.zip 9600405 BLAKE2B 324fb7a0a38bc56476e41504c14996e9d5d83ac659403991515413d49f5ee3aad064ccece25f52b6041ef26bf23f320a9be1b6b02c5fbe96c36372107f54fc2e SHA512 5572e2c2dac30c014ef9cd60a620b7a7bb610f91a47e2890c0641540d39b9d5ce0e914ee697583130317633918b7827e2612a7cbc024f5bd6aa22ad28a78b56b
30 -DIST sqlite-src-3290000.zip 12557725 BLAKE2B b1aeb80734a2cb7d45c6f2e278bad2996b56ecaf792a8f26322bf50aeaa430eea267f23edb1721bb80ecb6e0c8e14c7a5d8f26178d056fd23efb52f496cc03e1 SHA512 575398fbe20c6471ee2abcbde170b8d48efbb3cb2716a65f42f05c52429a45d14e8046e50c59bbf75bfe2d8f151c34abd50b440c50af571f19e19f3290b230df
31 -DIST sqlite-src-3300100.zip 12648162 BLAKE2B bb239bac9115c74778de0347b4f4e24a82f149f55fe7dea8b89eb859bfe4cf6f6c2f065f5e1741c40624bb88ecd395140064a41d475a1c64a0188990fd6248e7 SHA512 f40236d0bb25f3ea01a1192dace3b6732fb671fbdabb7cfa8d0cc2b99d21aef00ae380999fdee904501cb03304644cddfb2506951f36a2f6a83693f311c3c11d
32 DIST sqlite-src-3310100.zip 12510166 BLAKE2B a856695e8552b8b4dcb28452fdbd48305fdb9072f9d6587f4b1f4445daf386e920eb936dcb50fdfe41a49f84b26a7c5fedcffea5acf3ba3fa935c36695d4b8ee SHA512 af92a00877bcd90372d6f83a27fea12b4fe8d1155b223a6bccbccc31bb8e3d2269cd9e68f329bc55f70d1068ccbf220ff5abccea6f593fd7a3a4bdd732d1cdbe
33
34 diff --git a/dev-db/sqlite/sqlite-3.29.0.ebuild b/dev-db/sqlite/sqlite-3.29.0.ebuild
35 deleted file mode 100644
36 index b85b5aea728..00000000000
37 --- a/dev-db/sqlite/sqlite-3.29.0.ebuild
38 +++ /dev/null
39 @@ -1,395 +0,0 @@
40 -# Copyright 1999-2020 Gentoo Authors
41 -# Distributed under the terms of the GNU General Public License v2
42 -
43 -EAPI="7"
44 -
45 -inherit autotools flag-o-matic multilib-minimal toolchain-funcs
46 -
47 -if [[ "${PV}" != "9999" ]]; then
48 - SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))"
49 - DOC_PV="${SRC_PV}"
50 - # DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))"
51 -fi
52 -
53 -DESCRIPTION="SQL database engine"
54 -HOMEPAGE="https://sqlite.org/"
55 -if [[ "${PV}" == "9999" ]]; then
56 - SRC_URI=""
57 -else
58 - SRC_URI="doc? ( https://sqlite.org/2019/${PN}-doc-${DOC_PV}.zip )
59 - tcl? ( https://sqlite.org/2019/${PN}-src-${SRC_PV}.zip )
60 - test? ( https://sqlite.org/2019/${PN}-src-${SRC_PV}.zip )
61 - tools? ( https://sqlite.org/2019/${PN}-src-${SRC_PV}.zip )
62 - !tcl? ( !test? ( !tools? ( https://sqlite.org/2019/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
63 -fi
64 -
65 -LICENSE="public-domain"
66 -SLOT="3"
67 -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
68 -IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
69 -if [[ "${PV}" == "9999" ]]; then
70 - PROPERTIES="live"
71 -fi
72 -RESTRICT="!test? ( test )"
73 -
74 -if [[ "${PV}" == "9999" ]]; then
75 - BDEPEND=">=dev-lang/tcl-8.6:0
76 - dev-vcs/fossil"
77 -else
78 - BDEPEND="doc? ( app-arch/unzip )
79 - tcl? (
80 - app-arch/unzip
81 - >=dev-lang/tcl-8.6:0
82 - )
83 - test? (
84 - app-arch/unzip
85 - >=dev-lang/tcl-8.6:0
86 - )
87 - tools? (
88 - app-arch/unzip
89 - >=dev-lang/tcl-8.6:0
90 - )"
91 -fi
92 -RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
93 - icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
94 - readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
95 - tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
96 - tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
97 -DEPEND="${RDEPEND}
98 - test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )"
99 -
100 -full_archive() {
101 - [[ "${PV}" == "9999" ]] || use tcl || use test || use tools
102 -}
103 -
104 -pkg_setup() {
105 - if [[ "${PV}" == "9999" ]]; then
106 - S="${WORKDIR}/${PN}"
107 - else
108 - if full_archive; then
109 - S="${WORKDIR}/${PN}-src-${SRC_PV}"
110 - else
111 - S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
112 - fi
113 - fi
114 -}
115 -
116 -src_unpack() {
117 - if [[ "${PV}" == "9999" ]]; then
118 - local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
119 - addwrite "${distdir}"
120 - mkdir -p "${distdir}/fossil-src/${PN}" || die
121 -
122 - mkdir "${WORKDIR}/${PN}" || die
123 - pushd "${WORKDIR}/${PN}" > /dev/null || die
124 - if [[ ! -f "${distdir}/fossil-src/${PN}/sqlite.fossil" ]]; then
125 - einfo fossil clone --verbose https://sqlite.org/src sqlite.fossil
126 - fossil clone --verbose https://sqlite.org/src sqlite.fossil || die
127 - echo
128 - else
129 - cp -p "${distdir}/fossil-src/${PN}/sqlite.fossil" . || die
130 - einfo fossil pull --repository sqlite.fossil --verbose https://sqlite.org/src
131 - fossil pull --repository sqlite.fossil --verbose https://sqlite.org/src || die
132 - echo
133 - fi
134 - cp -p sqlite.fossil "${distdir}/fossil-src/${PN}" || die
135 - einfo fossil open --quiet sqlite.fossil
136 - fossil open --quiet sqlite.fossil || die
137 - echo
138 - popd > /dev/null || die
139 -
140 - if use doc; then
141 - mkdir "${WORKDIR}/${PN}-doc" || die
142 - pushd "${WORKDIR}/${PN}-doc" > /dev/null || die
143 - if [[ ! -f "${distdir}/fossil-src/${PN}/sqlite-doc.fossil" ]]; then
144 - einfo fossil clone --verbose https://sqlite.org/docsrc sqlite-doc.fossil
145 - fossil clone --verbose https://sqlite.org/docsrc sqlite-doc.fossil || die
146 - echo
147 - else
148 - cp -p "${distdir}/fossil-src/${PN}/sqlite-doc.fossil" . || die
149 - einfo fossil pull --repository sqlite-doc.fossil --verbose https://sqlite.org/docsrc
150 - fossil pull --repository sqlite-doc.fossil --verbose https://sqlite.org/docsrc || die
151 - echo
152 - fi
153 - cp -p sqlite-doc.fossil "${distdir}/fossil-src/${PN}" || die
154 - einfo fossil open --quiet sqlite-doc.fossil
155 - fossil open --quiet sqlite-doc.fossil || die
156 - echo
157 - popd > /dev/null || die
158 - fi
159 - else
160 - default
161 - fi
162 -}
163 -
164 -src_prepare() {
165 - if full_archive; then
166 - eapply "${FILESDIR}/${PN}-3.29.0-full_archive-build.patch"
167 - eapply "${FILESDIR}/${PN}-3.29.0-full_archive-tests.patch"
168 -
169 - eapply_user
170 -
171 - # Fix AC_CHECK_FUNCS.
172 - # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
173 - sed -e "s/AC_CHECK_FUNCS(.*)/AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])/" -i configure.ac || die "sed failed"
174 - else
175 - eapply "${FILESDIR}/${PN}-3.25.0-nonfull_archive-build.patch"
176 -
177 - eapply_user
178 -
179 - # Fix AC_CHECK_FUNCS.
180 - # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
181 - sed \
182 - -e "s/AC_CHECK_FUNCS(\[fdatasync.*/AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])/" \
183 - -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
184 - -i configure.ac || die "sed failed"
185 - fi
186 -
187 - eautoreconf
188 -
189 - multilib_copy_sources
190 -}
191 -
192 -multilib_src_configure() {
193 - local -x CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}"
194 - local options=()
195 -
196 - options+=(
197 - --enable-$(full_archive && echo load-extension || echo dynamic-extensions)
198 - --enable-threadsafe
199 - )
200 - if ! full_archive; then
201 - options+=(--disable-static-shell)
202 - fi
203 -
204 - # Support detection of misuse of SQLite API.
205 - # https://sqlite.org/compile.html#enable_api_armor
206 - append-cppflags -DSQLITE_ENABLE_API_ARMOR
207 -
208 - # Support column metadata functions.
209 - # https://sqlite.org/c3ref/column_database_name.html
210 - append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
211 -
212 - # Support sqlite_dbpage virtual table.
213 - # https://sqlite.org/compile.html#enable_dbpage_vtab
214 - append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
215 -
216 - # Support dbstat virtual table.
217 - # https://sqlite.org/dbstat.html
218 - append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
219 -
220 - # Support sqlite3_serialize() and sqlite3_deserialize() functions.
221 - # https://sqlite.org/compile.html#enable_deserialize
222 - # https://sqlite.org/c3ref/serialize.html
223 - # https://sqlite.org/c3ref/deserialize.html
224 - append-cppflags -DSQLITE_ENABLE_DESERIALIZE
225 -
226 - # Support comments in output of EXPLAIN.
227 - # https://sqlite.org/compile.html#enable_explain_comments
228 - append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
229 -
230 - # Support Full-Text Search versions 3, 4 and 5.
231 - # https://sqlite.org/fts3.html
232 - # https://sqlite.org/fts5.html
233 - append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
234 - options+=(--enable-fts5)
235 -
236 - # Support hidden columns.
237 - append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
238 -
239 - # Support JSON1 extension.
240 - # https://sqlite.org/json1.html
241 - append-cppflags -DSQLITE_ENABLE_JSON1
242 -
243 - # Support memsys5 memory allocator.
244 - # https://sqlite.org/malloc.html#memsys5
245 - append-cppflags -DSQLITE_ENABLE_MEMSYS5
246 -
247 - # Support sqlite3_normalized_sql() function.
248 - # https://sqlite.org/c3ref/expanded_sql.html
249 - append-cppflags -DSQLITE_ENABLE_NORMALIZE
250 -
251 - # Support sqlite_offset() function.
252 - # https://sqlite.org/lang_corefunc.html#sqlite_offset
253 - append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
254 -
255 - # Support pre-update hook functions.
256 - # https://sqlite.org/c3ref/preupdate_count.html
257 - append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
258 -
259 - # Support Resumable Bulk Update extension.
260 - # https://sqlite.org/rbu.html
261 - append-cppflags -DSQLITE_ENABLE_RBU
262 -
263 - # Support R*Trees.
264 - # https://sqlite.org/rtree.html
265 - # https://sqlite.org/geopoly.html
266 - append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY
267 -
268 - # Support scan status functions.
269 - # https://sqlite.org/c3ref/stmt_scanstatus.html
270 - # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
271 - append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
272 -
273 - # Support sqlite_stmt virtual table.
274 - # https://sqlite.org/stmt.html
275 - append-cppflags -DSQLITE_ENABLE_STMTVTAB
276 -
277 - # Support Session extension.
278 - # https://sqlite.org/sessionintro.html
279 - options+=(--enable-session)
280 -
281 - # Support unknown() function.
282 - # https://sqlite.org/compile.html#enable_unknown_sql_function
283 - append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
284 -
285 - # Support unlock notification.
286 - # https://sqlite.org/unlock_notify.html
287 - append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
288 -
289 - # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
290 - # https://sqlite.org/compile.html#enable_update_delete_limit
291 - append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
292 -
293 - # Support PRAGMA function_list, PRAGMA module_list and PRAGMA pragma_list statements.
294 - # https://sqlite.org/pragma.html#pragma_function_list
295 - # https://sqlite.org/pragma.html#pragma_module_list
296 - # https://sqlite.org/pragma.html#pragma_pragma_list
297 - append-cppflags -DSQLITE_INTROSPECTION_PRAGMAS
298 -
299 - # Support soundex() function.
300 - # https://sqlite.org/lang_corefunc.html#soundex
301 - append-cppflags -DSQLITE_SOUNDEX
302 -
303 - # Support URI filenames.
304 - # https://sqlite.org/uri.html
305 - append-cppflags -DSQLITE_USE_URI
306 -
307 - # debug USE flag.
308 - if full_archive; then
309 - options+=($(use_enable debug))
310 - else
311 - if use debug; then
312 - append-cppflags -DSQLITE_DEBUG
313 - else
314 - append-cppflags -DNDEBUG
315 - fi
316 - fi
317 -
318 - # icu USE flag.
319 - if use icu; then
320 - # Support ICU extension.
321 - # https://sqlite.org/compile.html#enable_icu
322 - append-cppflags -DSQLITE_ENABLE_ICU
323 - if full_archive; then
324 - sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
325 - else
326 - sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
327 - fi
328 - fi
329 -
330 - # readline USE flag.
331 - options+=(
332 - --disable-editline
333 - $(use_enable readline)
334 - )
335 - if full_archive && use readline; then
336 - options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
337 - fi
338 -
339 - # secure-delete USE flag.
340 - if use secure-delete; then
341 - # Enable secure_delete pragma by default.
342 - # https://sqlite.org/pragma.html#pragma_secure_delete
343 - append-cppflags -DSQLITE_SECURE_DELETE
344 - fi
345 -
346 - # static-libs USE flag.
347 - options+=($(use_enable static-libs static))
348 -
349 - # tcl, test, tools USE flags.
350 - if full_archive; then
351 - options+=(--enable-tcl)
352 - fi
353 -
354 - if [[ "${CHOST}" == *-mint* ]]; then
355 - append-cppflags -DSQLITE_OMIT_WAL
356 - fi
357 -
358 - if [[ "${ABI}" == "x86" ]]; then
359 - if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
360 - append-cflags -mfpmath=sse
361 - else
362 - append-cflags -ffloat-store
363 - fi
364 - fi
365 -
366 - econf "${options[@]}"
367 -}
368 -
369 -multilib_src_compile() {
370 - emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
371 -
372 - if use tools && multilib_is_native_abi; then
373 - emake changeset dbdump dbhash dbtotxt index_usage rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
374 - fi
375 -}
376 -
377 -multilib_src_test() {
378 - if [[ "${EUID}" -eq 0 ]]; then
379 - ewarn "Skipping tests due to root permissions"
380 - return
381 - fi
382 -
383 - local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}"
384 -
385 - emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
386 -}
387 -
388 -multilib_src_install() {
389 - emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
390 -
391 - if use tools && multilib_is_native_abi; then
392 - install_tool() {
393 - if [[ -f ".libs/${1}" ]]; then
394 - newbin ".libs/${1}" "${2}"
395 - else
396 - newbin "${1}" "${2}"
397 - fi
398 - }
399 -
400 - install_tool changeset sqlite3-changeset
401 - install_tool dbdump sqlite3-db-dump
402 - install_tool dbhash sqlite3-db-hash
403 - install_tool dbtotxt sqlite3-db-to-txt
404 - install_tool index_usage sqlite3-index-usage
405 - install_tool rbu sqlite3-rbu
406 - install_tool scrub sqlite3-scrub
407 - install_tool showdb sqlite3-show-db
408 - install_tool showjournal sqlite3-show-journal
409 - install_tool showshm sqlite3-show-shm
410 - install_tool showstat4 sqlite3-show-stat4
411 - install_tool showwal sqlite3-show-wal
412 - install_tool sqldiff sqlite3-diff
413 - install_tool sqlite3_analyzer sqlite3-analyzer
414 - install_tool sqlite3_checker sqlite3-checker
415 - install_tool sqlite3_expert sqlite3-expert
416 - install_tool sqltclsh sqlite3-tclsh
417 -
418 - unset -f install_tool
419 - fi
420 -}
421 -
422 -multilib_src_install_all() {
423 - find "${D}" -name "*.la" -type f -delete || die
424 -
425 - doman sqlite3.1
426 -
427 - if use doc; then
428 - rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt} || die
429 - (
430 - docinto html
431 - dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
432 - )
433 - fi
434 -}
435
436 diff --git a/dev-db/sqlite/sqlite-3.30.1.ebuild b/dev-db/sqlite/sqlite-3.30.1.ebuild
437 deleted file mode 100644
438 index 554790b13d0..00000000000
439 --- a/dev-db/sqlite/sqlite-3.30.1.ebuild
440 +++ /dev/null
441 @@ -1,388 +0,0 @@
442 -# Copyright 1999-2020 Gentoo Authors
443 -# Distributed under the terms of the GNU General Public License v2
444 -
445 -EAPI="7"
446 -
447 -inherit autotools flag-o-matic multilib-minimal toolchain-funcs
448 -
449 -if [[ "${PV}" != "9999" ]]; then
450 - SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))"
451 - DOC_PV="${SRC_PV}"
452 - # DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))"
453 -fi
454 -
455 -DESCRIPTION="SQL database engine"
456 -HOMEPAGE="https://sqlite.org/"
457 -if [[ "${PV}" == "9999" ]]; then
458 - SRC_URI=""
459 -else
460 - SRC_URI="doc? ( https://sqlite.org/2019/${PN}-doc-${DOC_PV}.zip )
461 - tcl? ( https://sqlite.org/2019/${PN}-src-${SRC_PV}.zip )
462 - test? ( https://sqlite.org/2019/${PN}-src-${SRC_PV}.zip )
463 - tools? ( https://sqlite.org/2019/${PN}-src-${SRC_PV}.zip )
464 - !tcl? ( !test? ( !tools? ( https://sqlite.org/2019/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
465 -fi
466 -
467 -LICENSE="public-domain"
468 -SLOT="3"
469 -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
470 -IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
471 -if [[ "${PV}" == "9999" ]]; then
472 - PROPERTIES="live"
473 -fi
474 -RESTRICT="!test? ( test )"
475 -
476 -if [[ "${PV}" == "9999" ]]; then
477 - BDEPEND=">=dev-lang/tcl-8.6:0
478 - dev-vcs/fossil"
479 -else
480 - BDEPEND="doc? ( app-arch/unzip )
481 - tcl? (
482 - app-arch/unzip
483 - >=dev-lang/tcl-8.6:0
484 - )
485 - test? (
486 - app-arch/unzip
487 - >=dev-lang/tcl-8.6:0
488 - )
489 - tools? (
490 - app-arch/unzip
491 - >=dev-lang/tcl-8.6:0
492 - )"
493 -fi
494 -RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
495 - icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
496 - readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
497 - tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
498 - tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
499 -DEPEND="${RDEPEND}
500 - test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )"
501 -
502 -full_archive() {
503 - [[ "${PV}" == "9999" ]] || use tcl || use test || use tools
504 -}
505 -
506 -pkg_setup() {
507 - if [[ "${PV}" == "9999" ]]; then
508 - S="${WORKDIR}/${PN}"
509 - else
510 - if full_archive; then
511 - S="${WORKDIR}/${PN}-src-${SRC_PV}"
512 - else
513 - S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
514 - fi
515 - fi
516 -}
517 -
518 -src_unpack() {
519 - if [[ "${PV}" == "9999" ]]; then
520 - local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
521 - addwrite "${distdir}"
522 - mkdir -p "${distdir}/fossil-src/${PN}" || die
523 -
524 - mkdir "${WORKDIR}/${PN}" || die
525 - pushd "${WORKDIR}/${PN}" > /dev/null || die
526 - if [[ ! -f "${distdir}/fossil-src/${PN}/sqlite.fossil" ]]; then
527 - einfo fossil clone --verbose https://sqlite.org/src sqlite.fossil
528 - fossil clone --verbose https://sqlite.org/src sqlite.fossil || die
529 - echo
530 - else
531 - cp -p "${distdir}/fossil-src/${PN}/sqlite.fossil" . || die
532 - einfo fossil pull --repository sqlite.fossil --verbose https://sqlite.org/src
533 - fossil pull --repository sqlite.fossil --verbose https://sqlite.org/src || die
534 - echo
535 - fi
536 - cp -p sqlite.fossil "${distdir}/fossil-src/${PN}" || die
537 - einfo fossil open --quiet sqlite.fossil
538 - fossil open --quiet sqlite.fossil || die
539 - echo
540 - popd > /dev/null || die
541 -
542 - if use doc; then
543 - mkdir "${WORKDIR}/${PN}-doc" || die
544 - pushd "${WORKDIR}/${PN}-doc" > /dev/null || die
545 - if [[ ! -f "${distdir}/fossil-src/${PN}/sqlite-doc.fossil" ]]; then
546 - einfo fossil clone --verbose https://sqlite.org/docsrc sqlite-doc.fossil
547 - fossil clone --verbose https://sqlite.org/docsrc sqlite-doc.fossil || die
548 - echo
549 - else
550 - cp -p "${distdir}/fossil-src/${PN}/sqlite-doc.fossil" . || die
551 - einfo fossil pull --repository sqlite-doc.fossil --verbose https://sqlite.org/docsrc
552 - fossil pull --repository sqlite-doc.fossil --verbose https://sqlite.org/docsrc || die
553 - echo
554 - fi
555 - cp -p sqlite-doc.fossil "${distdir}/fossil-src/${PN}" || die
556 - einfo fossil open --quiet sqlite-doc.fossil
557 - fossil open --quiet sqlite-doc.fossil || die
558 - echo
559 - popd > /dev/null || die
560 - fi
561 - else
562 - default
563 - fi
564 -}
565 -
566 -src_prepare() {
567 - if full_archive; then
568 - eapply "${FILESDIR}/${PN}-3.29.0-full_archive-build.patch"
569 -
570 - eapply_user
571 -
572 - # Fix AC_CHECK_FUNCS.
573 - # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
574 - sed -e "s/AC_CHECK_FUNCS(.*)/AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])/" -i configure.ac || die "sed failed"
575 - else
576 - eapply "${FILESDIR}/${PN}-3.25.0-nonfull_archive-build.patch"
577 -
578 - eapply_user
579 -
580 - # Fix AC_CHECK_FUNCS.
581 - # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
582 - sed \
583 - -e "s/AC_CHECK_FUNCS(\[fdatasync.*/AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])/" \
584 - -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
585 - -i configure.ac || die "sed failed"
586 - fi
587 -
588 - eautoreconf
589 -
590 - multilib_copy_sources
591 -}
592 -
593 -multilib_src_configure() {
594 - local -x CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}"
595 - local options=()
596 -
597 - options+=(
598 - --enable-$(full_archive && echo load-extension || echo dynamic-extensions)
599 - --enable-threadsafe
600 - )
601 - if ! full_archive; then
602 - options+=(--disable-static-shell)
603 - fi
604 -
605 - # Support detection of misuse of SQLite API.
606 - # https://sqlite.org/compile.html#enable_api_armor
607 - append-cppflags -DSQLITE_ENABLE_API_ARMOR
608 -
609 - # Support column metadata functions.
610 - # https://sqlite.org/c3ref/column_database_name.html
611 - append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
612 -
613 - # Support sqlite_dbpage virtual table.
614 - # https://sqlite.org/compile.html#enable_dbpage_vtab
615 - append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
616 -
617 - # Support dbstat virtual table.
618 - # https://sqlite.org/dbstat.html
619 - append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
620 -
621 - # Support sqlite3_serialize() and sqlite3_deserialize() functions.
622 - # https://sqlite.org/compile.html#enable_deserialize
623 - # https://sqlite.org/c3ref/serialize.html
624 - # https://sqlite.org/c3ref/deserialize.html
625 - append-cppflags -DSQLITE_ENABLE_DESERIALIZE
626 -
627 - # Support comments in output of EXPLAIN.
628 - # https://sqlite.org/compile.html#enable_explain_comments
629 - append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
630 -
631 - # Support Full-Text Search versions 3, 4 and 5.
632 - # https://sqlite.org/fts3.html
633 - # https://sqlite.org/fts5.html
634 - append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
635 - options+=(--enable-fts5)
636 -
637 - # Support hidden columns.
638 - append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
639 -
640 - # Support JSON1 extension.
641 - # https://sqlite.org/json1.html
642 - append-cppflags -DSQLITE_ENABLE_JSON1
643 -
644 - # Support memsys5 memory allocator.
645 - # https://sqlite.org/malloc.html#memsys5
646 - append-cppflags -DSQLITE_ENABLE_MEMSYS5
647 -
648 - # Support sqlite3_normalized_sql() function.
649 - # https://sqlite.org/c3ref/expanded_sql.html
650 - append-cppflags -DSQLITE_ENABLE_NORMALIZE
651 -
652 - # Support sqlite_offset() function.
653 - # https://sqlite.org/lang_corefunc.html#sqlite_offset
654 - append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
655 -
656 - # Support pre-update hook functions.
657 - # https://sqlite.org/c3ref/preupdate_count.html
658 - append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
659 -
660 - # Support Resumable Bulk Update extension.
661 - # https://sqlite.org/rbu.html
662 - append-cppflags -DSQLITE_ENABLE_RBU
663 -
664 - # Support R*Trees.
665 - # https://sqlite.org/rtree.html
666 - # https://sqlite.org/geopoly.html
667 - append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY
668 -
669 - # Support scan status functions.
670 - # https://sqlite.org/c3ref/stmt_scanstatus.html
671 - # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
672 - append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
673 -
674 - # Support sqlite_stmt virtual table.
675 - # https://sqlite.org/stmt.html
676 - append-cppflags -DSQLITE_ENABLE_STMTVTAB
677 -
678 - # Support Session extension.
679 - # https://sqlite.org/sessionintro.html
680 - options+=(--enable-session)
681 -
682 - # Support unknown() function.
683 - # https://sqlite.org/compile.html#enable_unknown_sql_function
684 - append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
685 -
686 - # Support unlock notification.
687 - # https://sqlite.org/unlock_notify.html
688 - append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
689 -
690 - # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
691 - # https://sqlite.org/compile.html#enable_update_delete_limit
692 - append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
693 -
694 - # Support soundex() function.
695 - # https://sqlite.org/lang_corefunc.html#soundex
696 - append-cppflags -DSQLITE_SOUNDEX
697 -
698 - # Support URI filenames.
699 - # https://sqlite.org/uri.html
700 - append-cppflags -DSQLITE_USE_URI
701 -
702 - # debug USE flag.
703 - if full_archive; then
704 - options+=($(use_enable debug))
705 - else
706 - if use debug; then
707 - append-cppflags -DSQLITE_DEBUG
708 - else
709 - append-cppflags -DNDEBUG
710 - fi
711 - fi
712 -
713 - # icu USE flag.
714 - if use icu; then
715 - # Support ICU extension.
716 - # https://sqlite.org/compile.html#enable_icu
717 - append-cppflags -DSQLITE_ENABLE_ICU
718 - if full_archive; then
719 - sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
720 - else
721 - sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
722 - fi
723 - fi
724 -
725 - # readline USE flag.
726 - options+=(
727 - --disable-editline
728 - $(use_enable readline)
729 - )
730 - if full_archive && use readline; then
731 - options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
732 - fi
733 -
734 - # secure-delete USE flag.
735 - if use secure-delete; then
736 - # Enable secure_delete pragma by default.
737 - # https://sqlite.org/pragma.html#pragma_secure_delete
738 - append-cppflags -DSQLITE_SECURE_DELETE
739 - fi
740 -
741 - # static-libs USE flag.
742 - options+=($(use_enable static-libs static))
743 -
744 - # tcl, test, tools USE flags.
745 - if full_archive; then
746 - options+=(--enable-tcl)
747 - fi
748 -
749 - if [[ "${CHOST}" == *-mint* ]]; then
750 - append-cppflags -DSQLITE_OMIT_WAL
751 - fi
752 -
753 - if [[ "${ABI}" == "x86" ]]; then
754 - if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
755 - append-cflags -mfpmath=sse
756 - else
757 - append-cflags -ffloat-store
758 - fi
759 - fi
760 -
761 - econf "${options[@]}"
762 -}
763 -
764 -multilib_src_compile() {
765 - emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
766 -
767 - if use tools && multilib_is_native_abi; then
768 - emake changeset dbdump dbhash dbtotxt index_usage rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
769 - fi
770 -}
771 -
772 -multilib_src_test() {
773 - if [[ "${EUID}" -eq 0 ]]; then
774 - ewarn "Skipping tests due to root permissions"
775 - return
776 - fi
777 -
778 - local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}"
779 -
780 - emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
781 -}
782 -
783 -multilib_src_install() {
784 - emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
785 -
786 - if use tools && multilib_is_native_abi; then
787 - install_tool() {
788 - if [[ -f ".libs/${1}" ]]; then
789 - newbin ".libs/${1}" "${2}"
790 - else
791 - newbin "${1}" "${2}"
792 - fi
793 - }
794 -
795 - install_tool changeset sqlite3-changeset
796 - install_tool dbdump sqlite3-db-dump
797 - install_tool dbhash sqlite3-db-hash
798 - install_tool dbtotxt sqlite3-db-to-txt
799 - install_tool index_usage sqlite3-index-usage
800 - install_tool rbu sqlite3-rbu
801 - install_tool scrub sqlite3-scrub
802 - install_tool showdb sqlite3-show-db
803 - install_tool showjournal sqlite3-show-journal
804 - install_tool showshm sqlite3-show-shm
805 - install_tool showstat4 sqlite3-show-stat4
806 - install_tool showwal sqlite3-show-wal
807 - install_tool sqldiff sqlite3-diff
808 - install_tool sqlite3_analyzer sqlite3-analyzer
809 - install_tool sqlite3_checker sqlite3-checker
810 - install_tool sqlite3_expert sqlite3-expert
811 - install_tool sqltclsh sqlite3-tclsh
812 -
813 - unset -f install_tool
814 - fi
815 -}
816 -
817 -multilib_src_install_all() {
818 - find "${D}" -name "*.la" -type f -delete || die
819 -
820 - doman sqlite3.1
821 -
822 - if use doc; then
823 - rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt} || die
824 - (
825 - docinto html
826 - dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
827 - )
828 - fi
829 -}