Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/
Date: Sun, 24 May 2020 19:07:49
Message-Id: 1590347243.df401c888693da5b3d295e0e0bfc15d20c88b798.floppym@gentoo
1 commit: df401c888693da5b3d295e0e0bfc15d20c88b798
2 Author: Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
3 AuthorDate: Sat May 23 10:24:31 2020 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Sun May 24 19:07:23 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df401c88
7
8 dev-db/sqlite: version bump to 3.32.0
9
10 Closes: https://bugs.gentoo.org/724644
11 Bug: https://bugs.gentoo.org/716748
12 Package-Manager: Portage-2.3.99, Repoman-2.3.22
13 Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
14 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
15 Closes: https://github.com/gentoo/gentoo/pull/15922
16
17 dev-db/sqlite/Manifest | 3 +
18 dev-db/sqlite/sqlite-3.32.0.ebuild | 388 +++++++++++++++++++++++++++++++++++++
19 2 files changed, 391 insertions(+)
20
21 diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
22 index a5126e72a2e..239e8f5349e 100644
23 --- a/dev-db/sqlite/Manifest
24 +++ b/dev-db/sqlite/Manifest
25 @@ -1,3 +1,6 @@
26 DIST sqlite-autoconf-3310100.tar.gz 2887243 BLAKE2B ef5d40b6e6c59a51ae95368eb9f6a938188813f89d5328ea1c1180ef35f124c14b3e83b0832ae5c2fa24cc2df352f1b0ea5f20b64d0762d50a700d9895f9a12e SHA512 d85250ba5f78f0c918880f663741709aba662192f04888b2324a0df17affdf5b8540e8428c6c7315119806e7adad758ea281c9b403c0ad94ac6a9bd1b93fd617
27 +DIST sqlite-autoconf-3320000.tar.gz 2902505 BLAKE2B 7460e088d2714599ea284c258c09f376c6e4f3c5f2c932d18905941dabfc74baead3df39a522fab99059417129a16a72094d53457da506f12e37eb6b821cb811 SHA512 bb0f73d63658c3e31daa7919ea621d1a8add8d430fe4385947555f0a334038750630eb1240f28d1709c69d45d12c1cc04ed081ecfe421c594ed29b6ac80b0a5f
28 DIST sqlite-doc-3310100.zip 9600405 BLAKE2B 324fb7a0a38bc56476e41504c14996e9d5d83ac659403991515413d49f5ee3aad064ccece25f52b6041ef26bf23f320a9be1b6b02c5fbe96c36372107f54fc2e SHA512 5572e2c2dac30c014ef9cd60a620b7a7bb610f91a47e2890c0641540d39b9d5ce0e914ee697583130317633918b7827e2612a7cbc024f5bd6aa22ad28a78b56b
29 +DIST sqlite-doc-3320000.zip 9718952 BLAKE2B 0bb9620c353f2f8c91d31f9112e765feb8c77c73906bd6eecdefe28f11a83aa87605889b3ded992e604865a6a06b396613b98c7c7ec2caa11c0d7c445529a0b1 SHA512 8733bad1e8dda2967e7fadaf1a541bea338d3a14dcc0ab7fe25525e422ea8d61eb21b07648d29fe8b30ace2891ec3150800ec50f3eff121280b47db1439e915c
30 DIST sqlite-src-3310100.zip 12510166 BLAKE2B a856695e8552b8b4dcb28452fdbd48305fdb9072f9d6587f4b1f4445daf386e920eb936dcb50fdfe41a49f84b26a7c5fedcffea5acf3ba3fa935c36695d4b8ee SHA512 af92a00877bcd90372d6f83a27fea12b4fe8d1155b223a6bccbccc31bb8e3d2269cd9e68f329bc55f70d1068ccbf220ff5abccea6f593fd7a3a4bdd732d1cdbe
31 +DIST sqlite-src-3320000.zip 12525021 BLAKE2B 77ce7ce8429b395669842442757f90160ccf7e8b333af0527dae47131ea32b9dcd8902da4dd38e285aa8fcc66b5003e101ccd609851606b89c0149ae5df41b82 SHA512 ea915648bc7c364da9ad153c758e36b8cd4cc678958a5449824282844bc45963bd3602d30f731e4865f30c17a3249474127b911992cb13f46be35d646d288c29
32
33 diff --git a/dev-db/sqlite/sqlite-3.32.0.ebuild b/dev-db/sqlite/sqlite-3.32.0.ebuild
34 new file mode 100644
35 index 00000000000..912a741d6d6
36 --- /dev/null
37 +++ b/dev-db/sqlite/sqlite-3.32.0.ebuild
38 @@ -0,0 +1,388 @@
39 +# Copyright 1999-2020 Gentoo Authors
40 +# Distributed under the terms of the GNU General Public License v2
41 +
42 +EAPI="7"
43 +
44 +inherit autotools flag-o-matic multilib-minimal toolchain-funcs
45 +
46 +if [[ "${PV}" != "9999" ]]; then
47 + SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))"
48 + DOC_PV="${SRC_PV}"
49 + # DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))"
50 +fi
51 +
52 +DESCRIPTION="SQL database engine"
53 +HOMEPAGE="https://sqlite.org/"
54 +if [[ "${PV}" == "9999" ]]; then
55 + SRC_URI=""
56 +else
57 + SRC_URI="doc? ( https://sqlite.org/2020/${PN}-doc-${DOC_PV}.zip )
58 + tcl? ( https://sqlite.org/2020/${PN}-src-${SRC_PV}.zip )
59 + test? ( https://sqlite.org/2020/${PN}-src-${SRC_PV}.zip )
60 + tools? ( https://sqlite.org/2020/${PN}-src-${SRC_PV}.zip )
61 + !tcl? ( !test? ( !tools? ( https://sqlite.org/2020/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
62 +fi
63 +
64 +LICENSE="public-domain"
65 +SLOT="3"
66 +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"
67 +IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
68 +if [[ "${PV}" == "9999" ]]; then
69 + PROPERTIES="live"
70 +fi
71 +RESTRICT="!test? ( test )"
72 +
73 +if [[ "${PV}" == "9999" ]]; then
74 + BDEPEND=">=dev-lang/tcl-8.6:0
75 + dev-vcs/fossil"
76 +else
77 + BDEPEND="doc? ( app-arch/unzip )
78 + tcl? (
79 + app-arch/unzip
80 + >=dev-lang/tcl-8.6:0
81 + )
82 + test? (
83 + app-arch/unzip
84 + >=dev-lang/tcl-8.6:0
85 + )
86 + tools? (
87 + app-arch/unzip
88 + >=dev-lang/tcl-8.6:0
89 + )"
90 +fi
91 +RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
92 + icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
93 + readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
94 + tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
95 + tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
96 +DEPEND="${RDEPEND}
97 + test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )"
98 +
99 +full_archive() {
100 + [[ "${PV}" == "9999" ]] || use tcl || use test || use tools
101 +}
102 +
103 +pkg_setup() {
104 + if [[ "${PV}" == "9999" ]]; then
105 + S="${WORKDIR}/${PN}"
106 + else
107 + if full_archive; then
108 + S="${WORKDIR}/${PN}-src-${SRC_PV}"
109 + else
110 + S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
111 + fi
112 + fi
113 +}
114 +
115 +src_unpack() {
116 + if [[ "${PV}" == "9999" ]]; then
117 + local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
118 + addwrite "${distdir}"
119 + mkdir -p "${distdir}/fossil-src/${PN}" || die
120 +
121 + mkdir "${WORKDIR}/${PN}" || die
122 + pushd "${WORKDIR}/${PN}" > /dev/null || die
123 + if [[ ! -f "${distdir}/fossil-src/${PN}/sqlite.fossil" ]]; then
124 + einfo fossil clone --verbose https://sqlite.org/src sqlite.fossil
125 + fossil clone --verbose https://sqlite.org/src sqlite.fossil || die
126 + echo
127 + else
128 + cp -p "${distdir}/fossil-src/${PN}/sqlite.fossil" . || die
129 + einfo fossil pull --repository sqlite.fossil --verbose https://sqlite.org/src
130 + fossil pull --repository sqlite.fossil --verbose https://sqlite.org/src || die
131 + echo
132 + fi
133 + cp -p sqlite.fossil "${distdir}/fossil-src/${PN}" || die
134 + einfo fossil open --quiet sqlite.fossil
135 + fossil open --quiet sqlite.fossil || die
136 + echo
137 + popd > /dev/null || die
138 +
139 + if use doc; then
140 + mkdir "${WORKDIR}/${PN}-doc" || die
141 + pushd "${WORKDIR}/${PN}-doc" > /dev/null || die
142 + if [[ ! -f "${distdir}/fossil-src/${PN}/sqlite-doc.fossil" ]]; then
143 + einfo fossil clone --verbose https://sqlite.org/docsrc sqlite-doc.fossil
144 + fossil clone --verbose https://sqlite.org/docsrc sqlite-doc.fossil || die
145 + echo
146 + else
147 + cp -p "${distdir}/fossil-src/${PN}/sqlite-doc.fossil" . || die
148 + einfo fossil pull --repository sqlite-doc.fossil --verbose https://sqlite.org/docsrc
149 + fossil pull --repository sqlite-doc.fossil --verbose https://sqlite.org/docsrc || die
150 + echo
151 + fi
152 + cp -p sqlite-doc.fossil "${distdir}/fossil-src/${PN}" || die
153 + einfo fossil open --quiet sqlite-doc.fossil
154 + fossil open --quiet sqlite-doc.fossil || die
155 + echo
156 + popd > /dev/null || die
157 + fi
158 + else
159 + default
160 + fi
161 +}
162 +
163 +src_prepare() {
164 + if full_archive; then
165 + eapply "${FILESDIR}/${PN}-3.31.0-full_archive-build.patch"
166 +
167 + eapply_user
168 +
169 + # Fix AC_CHECK_FUNCS.
170 + # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
171 + 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"
172 + else
173 + eapply "${FILESDIR}/${PN}-3.25.0-nonfull_archive-build.patch"
174 +
175 + eapply_user
176 +
177 + # Fix AC_CHECK_FUNCS.
178 + # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
179 + sed \
180 + -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])/" \
181 + -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
182 + -i configure.ac || die "sed failed"
183 + fi
184 +
185 + eautoreconf
186 +
187 + multilib_copy_sources
188 +}
189 +
190 +multilib_src_configure() {
191 + local -x CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}"
192 + local options=()
193 +
194 + options+=(
195 + --enable-$(full_archive && echo load-extension || echo dynamic-extensions)
196 + --enable-threadsafe
197 + )
198 + if ! full_archive; then
199 + options+=(--disable-static-shell)
200 + fi
201 +
202 + # Support detection of misuse of SQLite API.
203 + # https://sqlite.org/compile.html#enable_api_armor
204 + append-cppflags -DSQLITE_ENABLE_API_ARMOR
205 +
206 + # Support column metadata functions.
207 + # https://sqlite.org/c3ref/column_database_name.html
208 + append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
209 +
210 + # Support sqlite_dbpage virtual table.
211 + # https://sqlite.org/compile.html#enable_dbpage_vtab
212 + append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
213 +
214 + # Support dbstat virtual table.
215 + # https://sqlite.org/dbstat.html
216 + append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
217 +
218 + # Support sqlite3_serialize() and sqlite3_deserialize() functions.
219 + # https://sqlite.org/compile.html#enable_deserialize
220 + # https://sqlite.org/c3ref/serialize.html
221 + # https://sqlite.org/c3ref/deserialize.html
222 + append-cppflags -DSQLITE_ENABLE_DESERIALIZE
223 +
224 + # Support comments in output of EXPLAIN.
225 + # https://sqlite.org/compile.html#enable_explain_comments
226 + append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
227 +
228 + # Support Full-Text Search versions 3, 4 and 5.
229 + # https://sqlite.org/fts3.html
230 + # https://sqlite.org/fts5.html
231 + append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
232 + options+=(--enable-fts5)
233 +
234 + # Support hidden columns.
235 + append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
236 +
237 + # Support JSON1 extension.
238 + # https://sqlite.org/json1.html
239 + append-cppflags -DSQLITE_ENABLE_JSON1
240 +
241 + # Support memsys5 memory allocator.
242 + # https://sqlite.org/malloc.html#memsys5
243 + append-cppflags -DSQLITE_ENABLE_MEMSYS5
244 +
245 + # Support sqlite3_normalized_sql() function.
246 + # https://sqlite.org/c3ref/expanded_sql.html
247 + append-cppflags -DSQLITE_ENABLE_NORMALIZE
248 +
249 + # Support sqlite_offset() function.
250 + # https://sqlite.org/lang_corefunc.html#sqlite_offset
251 + append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
252 +
253 + # Support pre-update hook functions.
254 + # https://sqlite.org/c3ref/preupdate_count.html
255 + append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
256 +
257 + # Support Resumable Bulk Update extension.
258 + # https://sqlite.org/rbu.html
259 + append-cppflags -DSQLITE_ENABLE_RBU
260 +
261 + # Support R*Trees.
262 + # https://sqlite.org/rtree.html
263 + # https://sqlite.org/geopoly.html
264 + append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY
265 +
266 + # Support scan status functions.
267 + # https://sqlite.org/c3ref/stmt_scanstatus.html
268 + # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
269 + append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
270 +
271 + # Support sqlite_stmt virtual table.
272 + # https://sqlite.org/stmt.html
273 + append-cppflags -DSQLITE_ENABLE_STMTVTAB
274 +
275 + # Support Session extension.
276 + # https://sqlite.org/sessionintro.html
277 + options+=(--enable-session)
278 +
279 + # Support unknown() function.
280 + # https://sqlite.org/compile.html#enable_unknown_sql_function
281 + append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
282 +
283 + # Support unlock notification.
284 + # https://sqlite.org/unlock_notify.html
285 + append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
286 +
287 + # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
288 + # https://sqlite.org/compile.html#enable_update_delete_limit
289 + append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
290 +
291 + # Support soundex() function.
292 + # https://sqlite.org/lang_corefunc.html#soundex
293 + append-cppflags -DSQLITE_SOUNDEX
294 +
295 + # Support URI filenames.
296 + # https://sqlite.org/uri.html
297 + append-cppflags -DSQLITE_USE_URI
298 +
299 + # debug USE flag.
300 + if full_archive; then
301 + options+=($(use_enable debug))
302 + else
303 + if use debug; then
304 + append-cppflags -DSQLITE_DEBUG
305 + else
306 + append-cppflags -DNDEBUG
307 + fi
308 + fi
309 +
310 + # icu USE flag.
311 + if use icu; then
312 + # Support ICU extension.
313 + # https://sqlite.org/compile.html#enable_icu
314 + append-cppflags -DSQLITE_ENABLE_ICU
315 + if full_archive; then
316 + sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
317 + else
318 + sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
319 + fi
320 + fi
321 +
322 + # readline USE flag.
323 + options+=(
324 + --disable-editline
325 + $(use_enable readline)
326 + )
327 + if full_archive && use readline; then
328 + options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
329 + fi
330 +
331 + # secure-delete USE flag.
332 + if use secure-delete; then
333 + # Enable secure_delete pragma by default.
334 + # https://sqlite.org/pragma.html#pragma_secure_delete
335 + append-cppflags -DSQLITE_SECURE_DELETE
336 + fi
337 +
338 + # static-libs USE flag.
339 + options+=($(use_enable static-libs static))
340 +
341 + # tcl, test, tools USE flags.
342 + if full_archive; then
343 + options+=(--enable-tcl)
344 + fi
345 +
346 + if [[ "${CHOST}" == *-mint* ]]; then
347 + append-cppflags -DSQLITE_OMIT_WAL
348 + fi
349 +
350 + if [[ "${ABI}" == "x86" ]]; then
351 + if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
352 + append-cflags -mfpmath=sse
353 + else
354 + append-cflags -ffloat-store
355 + fi
356 + fi
357 +
358 + econf "${options[@]}"
359 +}
360 +
361 +multilib_src_compile() {
362 + emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
363 +
364 + if use tools && multilib_is_native_abi; then
365 + emake changeset dbdump dbhash dbtotxt index_usage rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
366 + fi
367 +}
368 +
369 +multilib_src_test() {
370 + if [[ "${EUID}" -eq 0 ]]; then
371 + ewarn "Skipping tests due to root permissions"
372 + return
373 + fi
374 +
375 + local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}"
376 +
377 + emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
378 +}
379 +
380 +multilib_src_install() {
381 + emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
382 +
383 + if use tools && multilib_is_native_abi; then
384 + install_tool() {
385 + if [[ -f ".libs/${1}" ]]; then
386 + newbin ".libs/${1}" "${2}"
387 + else
388 + newbin "${1}" "${2}"
389 + fi
390 + }
391 +
392 + install_tool changeset sqlite3-changeset
393 + install_tool dbdump sqlite3-db-dump
394 + install_tool dbhash sqlite3-db-hash
395 + install_tool dbtotxt sqlite3-db-to-txt
396 + install_tool index_usage sqlite3-index-usage
397 + install_tool rbu sqlite3-rbu
398 + install_tool scrub sqlite3-scrub
399 + install_tool showdb sqlite3-show-db
400 + install_tool showjournal sqlite3-show-journal
401 + install_tool showshm sqlite3-show-shm
402 + install_tool showstat4 sqlite3-show-stat4
403 + install_tool showwal sqlite3-show-wal
404 + install_tool sqldiff sqlite3-diff
405 + install_tool sqlite3_analyzer sqlite3-analyzer
406 + install_tool sqlite3_checker sqlite3-checker
407 + install_tool sqlite3_expert sqlite3-expert
408 + install_tool sqltclsh sqlite3-tclsh
409 +
410 + unset -f install_tool
411 + fi
412 +}
413 +
414 +multilib_src_install_all() {
415 + find "${D}" -name "*.la" -type f -delete || die
416 +
417 + doman sqlite3.1
418 +
419 + if use doc; then
420 + rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt} || die
421 + (
422 + docinto html
423 + dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
424 + )
425 + fi
426 +}