1 |
commit: 5924c18ed130a0522fd2292fc3f00e3ad8dd27d5 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 2 22:26:51 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 2 22:26:51 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5924c18e |
7 |
|
8 |
dev-db/sqlite: add 3.38.2 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
dev-db/sqlite/Manifest | 2 + |
13 |
dev-db/sqlite/sqlite-3.38.2.ebuild | 431 +++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 433 insertions(+) |
15 |
|
16 |
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest |
17 |
index 6ca78ee206c7..eb18013f1513 100644 |
18 |
--- a/dev-db/sqlite/Manifest |
19 |
+++ b/dev-db/sqlite/Manifest |
20 |
@@ -1,6 +1,8 @@ |
21 |
DIST sqlite-doc-3370200.zip 10542395 BLAKE2B 129ae0bac8099eb2571cc31ded186ed6c166c1b31af493047608ffb63ac7a90ccbaa5df733661c92660d2436bab6e3796f92e42ac8bb4154ff15212afc74b9b0 SHA512 02c68a3906aee3fd05a4340549144032a239e5ab885d9b3b09236ed2b74a90c770de373e4ca9f99e72f92df090d0fb6789213fb361e954d9dd6709af20336857 |
22 |
DIST sqlite-doc-3380000.zip 10603776 BLAKE2B f196b00cce01672dc1a27a64d70669ff87c26eacbdb97c76c3c45702cc2c9509507ddcc50180b3a4479afe2991a94dc3a8def59a984d917ad09fba5cbb63da94 SHA512 8e1f77504a1057cd23a8a6c2a285d63c5df50ceaf6ab84054a6f5422286dd868bdb3d5bd9be180b7834caba2b65ca185ffff60455bb504df30801157b62a62ef |
23 |
DIST sqlite-doc-3380100.zip 10615296 BLAKE2B fa3df2458b9c15d5f7ce8abb02eb050dddb618c6e87cd79e1979612649be53de4ed26d2bb3e1230e43d7fb1293e1d5bfa870d211195a9b7c2a11a97d417d1ab6 SHA512 ccdfee3d07f2c43b6dda52a2240fd3e72ada38be5a644d097b23116e1b0c2e21f539bf56afbae30fc4275b9b4a954393f95b0a5272bcf18c98e1538d190ff6bc |
24 |
+DIST sqlite-doc-3380200.zip 10620764 BLAKE2B 81f7e7b9aef37bdae133c4d7dc517d2040d8202a7e0cdf00180d3abe3fb677c80dbc1987e437f0d0f34f47c61f09a7c9d664ba42af976ecfb24555590bb22087 SHA512 b54372ff788aa42b2138c6de91c42c4f6a6440623de3679f08b0519c5c20d9d865c60fa63223c60f4374ff5badb800d6f209e75abb280b9815902757424faf0b |
25 |
DIST sqlite-src-3370200.zip 13145234 BLAKE2B 296eb8ac0e83552c348847ea1d0b06ce1b610ca1f53d8b56fa872196ccdc29c343a3b5cc671716854950c97425f8a5b78968e1b22c137ea1ff3bf386e94d8acc SHA512 2db103965934bb34c8336cf82ff7d77e75dc1ca00fa6324ac5697f3bf4b41bffff355dec7593515a68816449e5c9827a9503f6d7841c4c13981c231d3414ff76 |
26 |
DIST sqlite-src-3380000.zip 13236840 BLAKE2B f303e39a9d913994f0756f986de9d316322b2278b8d2aeb505eb37d1c370c2edbb91f6f56e95b73938137a72b0c22a82fc8a2ceb19ab03271c38f653b66f66ea SHA512 9f4d3c406df5e6290f3f0b5e24b568723ab54bb085cb8cd7621ab42b0b8cd4f76e9784a4a29b42ea8cb0d1b7d759267c3cd980913d490d08e7172df05949131d |
27 |
DIST sqlite-src-3380100.zip 13241298 BLAKE2B 9dbccd5942f146da4c40d6208c491473c191752a74ee18ce131f3dea533976732440974e97906aead460daee39c7d6085ffa0f093d8f17e8f64c813bbb2409ad SHA512 df200916789c15e010a8e62dd8257833f34d4cf3496080a72fdc2330a530c193cda055e3c9ed39a404b87c8001c83a4b187491525ca95b5c5a1dbdd2f41cc222 |
28 |
+DIST sqlite-src-3380200.zip 13242285 BLAKE2B a07f895f57c355e2ec1c96fc857b63d774ff52f7e49c22b1c936b260e6e7787ec656059c02cc6d38845c4368507067d86dac493559541fbb914a3da9cbc67cce SHA512 fd457602db4577b31bc6053fd3cceb220337275e3fd26976f4270fb8a7da4fa047ca23dd18e2795cdfd894d05bad4c53954a81391d71507d359fb224995e420a |
29 |
|
30 |
diff --git a/dev-db/sqlite/sqlite-3.38.2.ebuild b/dev-db/sqlite/sqlite-3.38.2.ebuild |
31 |
new file mode 100644 |
32 |
index 000000000000..c3c343219986 |
33 |
--- /dev/null |
34 |
+++ b/dev-db/sqlite/sqlite-3.38.2.ebuild |
35 |
@@ -0,0 +1,431 @@ |
36 |
+# Copyright 1999-2022 Gentoo Authors |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+ |
39 |
+EAPI="7" |
40 |
+ |
41 |
+inherit autotools flag-o-matic multilib-minimal toolchain-funcs |
42 |
+ |
43 |
+if [[ "${PV}" != "9999" ]]; then |
44 |
+ SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))" |
45 |
+ DOC_PV="${SRC_PV}" |
46 |
+ # DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))" |
47 |
+fi |
48 |
+ |
49 |
+DESCRIPTION="SQL database engine" |
50 |
+HOMEPAGE="https://sqlite.org/" |
51 |
+ |
52 |
+# On version updates, make sure to read the forum (https://sqlite.org/forum/forum) |
53 |
+# for hints regarding test failures, backports, etc. |
54 |
+if [[ "${PV}" == "9999" ]]; then |
55 |
+ SRC_URI="" |
56 |
+else |
57 |
+ SRC_URI="https://sqlite.org/2022/${PN}-src-${SRC_PV}.zip |
58 |
+ doc? ( https://sqlite.org/2022/${PN}-doc-${DOC_PV}.zip )" |
59 |
+fi |
60 |
+ |
61 |
+LICENSE="public-domain" |
62 |
+SLOT="3" |
63 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
64 |
+IUSE="debug doc icu +readline secure-delete static-libs tcl test tools" |
65 |
+if [[ "${PV}" == "9999" ]]; then |
66 |
+ PROPERTIES="live" |
67 |
+fi |
68 |
+RESTRICT="!test? ( test )" |
69 |
+ |
70 |
+if [[ "${PV}" == "9999" ]]; then |
71 |
+ BDEPEND=">=dev-lang/tcl-8.6:0 |
72 |
+ dev-vcs/fossil" |
73 |
+else |
74 |
+ BDEPEND="app-arch/unzip |
75 |
+ >=dev-lang/tcl-8.6:0" |
76 |
+fi |
77 |
+RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}] |
78 |
+ icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] ) |
79 |
+ readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] ) |
80 |
+ tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] ) |
81 |
+ tools? ( dev-lang/tcl:0= )" |
82 |
+DEPEND="${RDEPEND} |
83 |
+ test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )" |
84 |
+ |
85 |
+if [[ "${PV}" == "9999" ]]; then |
86 |
+ S="${WORKDIR}/${PN}" |
87 |
+else |
88 |
+ S="${WORKDIR}/${PN}-src-${SRC_PV}" |
89 |
+fi |
90 |
+ |
91 |
+_fossil_fetch() { |
92 |
+ local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}" |
93 |
+ local repo_id="${1}" |
94 |
+ local repo_uri="${2}" |
95 |
+ |
96 |
+ local -x FOSSIL_HOME="${HOME}" |
97 |
+ |
98 |
+ mkdir -p "${T}/fossil/${repo_id}" || die |
99 |
+ pushd "${T}/fossil/${repo_id}" > /dev/null || die |
100 |
+ |
101 |
+ if [[ -n "${EVCS_OFFLINE}" ]]; then |
102 |
+ if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then |
103 |
+ die "Network activity disabled using EVCS_OFFLINE and clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\"" |
104 |
+ fi |
105 |
+ else |
106 |
+ if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then |
107 |
+ einfo fossil clone --verbose "${repo_uri}" "${repo_id}.fossil" |
108 |
+ fossil clone --verbose "${repo_uri}" "${repo_id}.fossil" || die |
109 |
+ echo |
110 |
+ else |
111 |
+ cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" . || die |
112 |
+ einfo fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}" |
113 |
+ fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}" || die |
114 |
+ echo |
115 |
+ fi |
116 |
+ |
117 |
+ ( |
118 |
+ addwrite "${distdir}" |
119 |
+ mkdir -p "${distdir}/fossil-src/${repo_id}" || die |
120 |
+ cp -p "${repo_id}.fossil" "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" || die |
121 |
+ ) |
122 |
+ fi |
123 |
+ |
124 |
+ popd > /dev/null || die |
125 |
+} |
126 |
+ |
127 |
+_fossil_checkout() { |
128 |
+ local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}" |
129 |
+ local repo_id="${1}" |
130 |
+ local branch_or_commit="${2}" |
131 |
+ local target_directory="${3}" |
132 |
+ |
133 |
+ local -x FOSSIL_HOME="${HOME}" |
134 |
+ |
135 |
+ if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then |
136 |
+ die "Clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\"" |
137 |
+ fi |
138 |
+ |
139 |
+ if [[ ! -f "${T}/fossil/${repo_id}/${repo_id}.fossil" ]]; then |
140 |
+ mkdir -p "${T}/fossil/${repo_id}" || die |
141 |
+ cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" "${T}/fossil/${repo_id}" || die |
142 |
+ fi |
143 |
+ |
144 |
+ mkdir "${target_directory}" || die |
145 |
+ pushd "${target_directory}" > /dev/null || die |
146 |
+ |
147 |
+ einfo fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}" |
148 |
+ fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}" || die |
149 |
+ echo |
150 |
+ |
151 |
+ popd > /dev/null || die |
152 |
+} |
153 |
+ |
154 |
+fossil_fetch() { |
155 |
+ local repo_id="${1}" |
156 |
+ local repo_uri="${2}" |
157 |
+ local target_directory="${3}" |
158 |
+ |
159 |
+ local branch_or_commit="${EFOSSIL_COMMIT:-${EFOSSIL_BRANCH:-trunk}}" |
160 |
+ |
161 |
+ _fossil_fetch "${repo_id}" "${repo_uri}" |
162 |
+ _fossil_checkout "${repo_id}" "${branch_or_commit}" "${target_directory}" |
163 |
+} |
164 |
+ |
165 |
+src_unpack() { |
166 |
+ if [[ "${PV}" == "9999" ]]; then |
167 |
+ fossil_fetch sqlite https://sqlite.org/src "${WORKDIR}/${PN}" |
168 |
+ if use doc; then |
169 |
+ fossil_fetch sqlite-doc https://sqlite.org/docsrc "${WORKDIR}/${PN}-doc" |
170 |
+ fi |
171 |
+ else |
172 |
+ default |
173 |
+ fi |
174 |
+} |
175 |
+ |
176 |
+src_prepare() { |
177 |
+ eapply_user |
178 |
+ |
179 |
+ eautoreconf |
180 |
+ |
181 |
+ multilib_copy_sources |
182 |
+} |
183 |
+ |
184 |
+multilib_src_configure() { |
185 |
+ local -x CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" |
186 |
+ local options=() |
187 |
+ |
188 |
+ options+=( |
189 |
+ --enable-load-extension |
190 |
+ --enable-threadsafe |
191 |
+ ) |
192 |
+ |
193 |
+ # Support detection of misuse of SQLite API. |
194 |
+ # https://sqlite.org/compile.html#enable_api_armor |
195 |
+ append-cppflags -DSQLITE_ENABLE_API_ARMOR |
196 |
+ |
197 |
+ # Support bytecode and tables_used virtual tables. |
198 |
+ # https://sqlite.org/compile.html#enable_bytecode_vtab |
199 |
+ # https://sqlite.org/bytecodevtab.html |
200 |
+ append-cppflags -DSQLITE_ENABLE_BYTECODE_VTAB |
201 |
+ |
202 |
+ # Support column metadata functions. |
203 |
+ # https://sqlite.org/compile.html#enable_column_metadata |
204 |
+ # https://sqlite.org/c3ref/column_database_name.html |
205 |
+ append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA |
206 |
+ |
207 |
+ # Support sqlite_dbpage virtual table. |
208 |
+ # https://sqlite.org/compile.html#enable_dbpage_vtab |
209 |
+ # https://sqlite.org/dbpage.html |
210 |
+ append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB |
211 |
+ |
212 |
+ # Support dbstat virtual table. |
213 |
+ # https://sqlite.org/compile.html#enable_dbstat_vtab |
214 |
+ # https://sqlite.org/dbstat.html |
215 |
+ append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB |
216 |
+ |
217 |
+ # Support sqlite3_serialize() and sqlite3_deserialize() functions. |
218 |
+ # https://sqlite.org/compile.html#enable_deserialize |
219 |
+ # https://sqlite.org/c3ref/serialize.html |
220 |
+ # https://sqlite.org/c3ref/deserialize.html |
221 |
+ append-cppflags -DSQLITE_ENABLE_DESERIALIZE |
222 |
+ |
223 |
+ # Support comments in output of EXPLAIN. |
224 |
+ # https://sqlite.org/compile.html#enable_explain_comments |
225 |
+ append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS |
226 |
+ |
227 |
+ # Support Full-Text Search versions 3, 4 and 5. |
228 |
+ # https://sqlite.org/compile.html#enable_fts3 |
229 |
+ # https://sqlite.org/compile.html#enable_fts3_parenthesis |
230 |
+ # https://sqlite.org/compile.html#enable_fts4 |
231 |
+ # https://sqlite.org/compile.html#enable_fts5 |
232 |
+ # https://sqlite.org/fts3.html |
233 |
+ # https://sqlite.org/fts5.html |
234 |
+ append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4 |
235 |
+ options+=(--enable-fts5) |
236 |
+ |
237 |
+ # Support hidden columns. |
238 |
+ append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS |
239 |
+ |
240 |
+ # Support memsys5 memory allocator. |
241 |
+ # https://sqlite.org/compile.html#enable_memsys5 |
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/compile.html#enable_offset_sql_func |
251 |
+ # https://sqlite.org/lang_corefunc.html#sqlite_offset |
252 |
+ append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC |
253 |
+ |
254 |
+ # Support pre-update hook functions. |
255 |
+ # https://sqlite.org/compile.html#enable_preupdate_hook |
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/compile.html#enable_rbu |
261 |
+ # https://sqlite.org/rbu.html |
262 |
+ append-cppflags -DSQLITE_ENABLE_RBU |
263 |
+ |
264 |
+ # Support R*Trees. |
265 |
+ # https://sqlite.org/compile.html#enable_rtree |
266 |
+ # https://sqlite.org/compile.html#enable_geopoly |
267 |
+ # https://sqlite.org/rtree.html |
268 |
+ # https://sqlite.org/geopoly.html |
269 |
+ append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY |
270 |
+ |
271 |
+ # Support Session extension. |
272 |
+ # https://sqlite.org/compile.html#enable_session |
273 |
+ # https://sqlite.org/sessionintro.html |
274 |
+ append-cppflags -DSQLITE_ENABLE_SESSION |
275 |
+ |
276 |
+ # Support scan status functions. |
277 |
+ # https://sqlite.org/compile.html#enable_stmt_scanstatus |
278 |
+ # https://sqlite.org/c3ref/stmt_scanstatus.html |
279 |
+ # https://sqlite.org/c3ref/stmt_scanstatus_reset.html |
280 |
+ append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS |
281 |
+ |
282 |
+ # Support sqlite_stmt virtual table. |
283 |
+ # https://sqlite.org/compile.html#enable_stmtvtab |
284 |
+ # https://sqlite.org/stmt.html |
285 |
+ append-cppflags -DSQLITE_ENABLE_STMTVTAB |
286 |
+ |
287 |
+ # Support unknown() function. |
288 |
+ # https://sqlite.org/compile.html#enable_unknown_sql_function |
289 |
+ append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION |
290 |
+ |
291 |
+ # Support unlock notification. |
292 |
+ # https://sqlite.org/compile.html#enable_unlock_notify |
293 |
+ # https://sqlite.org/c3ref/unlock_notify.html |
294 |
+ # https://sqlite.org/unlock_notify.html |
295 |
+ append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY |
296 |
+ |
297 |
+ # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements. |
298 |
+ # https://sqlite.org/compile.html#enable_update_delete_limit |
299 |
+ # https://sqlite.org/lang_delete.html#optional_limit_and_order_by_clauses |
300 |
+ # https://sqlite.org/lang_update.html#optional_limit_and_order_by_clauses |
301 |
+ append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT |
302 |
+ |
303 |
+ # Support soundex() function. |
304 |
+ # https://sqlite.org/compile.html#soundex |
305 |
+ # https://sqlite.org/lang_corefunc.html#soundex |
306 |
+ append-cppflags -DSQLITE_SOUNDEX |
307 |
+ |
308 |
+ # Support URI filenames. |
309 |
+ # https://sqlite.org/compile.html#use_uri |
310 |
+ # https://sqlite.org/uri.html |
311 |
+ append-cppflags -DSQLITE_USE_URI |
312 |
+ |
313 |
+ # debug USE flag. |
314 |
+ options+=($(use_enable debug)) |
315 |
+ |
316 |
+ # icu USE flag. |
317 |
+ if use icu; then |
318 |
+ # Support ICU extension. |
319 |
+ # https://sqlite.org/compile.html#enable_icu |
320 |
+ append-cppflags -DSQLITE_ENABLE_ICU |
321 |
+ sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed" |
322 |
+ fi |
323 |
+ |
324 |
+ # readline USE flag. |
325 |
+ options+=( |
326 |
+ --disable-editline |
327 |
+ $(use_enable readline) |
328 |
+ ) |
329 |
+ if use readline; then |
330 |
+ options+=(--with-readline-inc="-I${ESYSROOT}/usr/include/readline") |
331 |
+ fi |
332 |
+ |
333 |
+ # secure-delete USE flag. |
334 |
+ if use secure-delete; then |
335 |
+ # Enable secure_delete pragma by default. |
336 |
+ # https://sqlite.org/compile.html#secure_delete |
337 |
+ # https://sqlite.org/pragma.html#pragma_secure_delete |
338 |
+ append-cppflags -DSQLITE_SECURE_DELETE |
339 |
+ fi |
340 |
+ |
341 |
+ # static-libs USE flag. |
342 |
+ options+=($(use_enable static-libs static)) |
343 |
+ |
344 |
+ # tcl, test, tools USE flags. |
345 |
+ if use tcl || use test || { use tools && multilib_is_native_abi; }; then |
346 |
+ options+=( |
347 |
+ --enable-tcl |
348 |
+ --with-tcl="${ESYSROOT}/usr/$(get_libdir)" |
349 |
+ ) |
350 |
+ else |
351 |
+ options+=(--disable-tcl) |
352 |
+ fi |
353 |
+ |
354 |
+ if [[ "${ABI}" == "x86" ]]; then |
355 |
+ if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then |
356 |
+ append-cflags -mfpmath=sse |
357 |
+ else |
358 |
+ append-cflags -ffloat-store |
359 |
+ fi |
360 |
+ |
361 |
+ # Skip known-broken test for now |
362 |
+ # https://sqlite.org/forum/forumpost/d97caf168f |
363 |
+ # https://sqlite.org/forum/forumpost/50f136d91d |
364 |
+ if use test ; then |
365 |
+ rm test/atof1.test || die |
366 |
+ fi |
367 |
+ fi |
368 |
+ |
369 |
+ econf "${options[@]}" |
370 |
+} |
371 |
+ |
372 |
+multilib_src_compile() { |
373 |
+ emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" |
374 |
+ |
375 |
+ if use tools && multilib_is_native_abi; then |
376 |
+ emake changeset dbdump dbhash dbtotxt index_usage rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh |
377 |
+ fi |
378 |
+ |
379 |
+ if [[ "${PV}" == "9999" ]] && use doc && multilib_is_native_abi; then |
380 |
+ emake tclsqlite3.c |
381 |
+ |
382 |
+ local build_directory="$(pwd)" |
383 |
+ build_directory="${build_directory##*/}" |
384 |
+ |
385 |
+ mkdir "${WORKDIR}/${PN}-doc-build" || die |
386 |
+ pushd "${WORKDIR}/${PN}-doc-build" > /dev/null || die |
387 |
+ |
388 |
+ emake -f "../${PN}-doc/Makefile" -j1 SRC="../${PN}" BLD="../${build_directory}" DOC="../${PN}-doc" CC="$(tc-getBUILD_CC)" TCLINC="" TCLFLAGS="$($(tc-getBUILD_PKG_CONFIG) --libs tcl) -ldl -lm" base doc |
389 |
+ rmdir doc/matrix{/*,} || die |
390 |
+ |
391 |
+ popd > /dev/null || die |
392 |
+ fi |
393 |
+} |
394 |
+ |
395 |
+multilib_src_test() { |
396 |
+ if [[ "${EUID}" -eq 0 ]]; then |
397 |
+ ewarn "Skipping tests due to root permissions" |
398 |
+ return |
399 |
+ fi |
400 |
+ |
401 |
+ local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}" |
402 |
+ |
403 |
+ emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test) |
404 |
+} |
405 |
+ |
406 |
+multilib_src_install() { |
407 |
+ emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install |
408 |
+ |
409 |
+ if use tools && multilib_is_native_abi; then |
410 |
+ install_tool() { |
411 |
+ if [[ -f ".libs/${1}" ]]; then |
412 |
+ newbin ".libs/${1}" "${2}" |
413 |
+ else |
414 |
+ newbin "${1}" "${2}" |
415 |
+ fi |
416 |
+ } |
417 |
+ |
418 |
+ install_tool changeset sqlite3-changeset |
419 |
+ install_tool dbdump sqlite3-db-dump |
420 |
+ install_tool dbhash sqlite3-db-hash |
421 |
+ install_tool dbtotxt sqlite3-db-to-txt |
422 |
+ install_tool index_usage sqlite3-index-usage |
423 |
+ install_tool rbu sqlite3-rbu |
424 |
+ install_tool scrub sqlite3-scrub |
425 |
+ install_tool showdb sqlite3-show-db |
426 |
+ install_tool showjournal sqlite3-show-journal |
427 |
+ install_tool showshm sqlite3-show-shm |
428 |
+ install_tool showstat4 sqlite3-show-stat4 |
429 |
+ install_tool showwal sqlite3-show-wal |
430 |
+ install_tool sqldiff sqlite3-diff |
431 |
+ install_tool sqlite3_analyzer sqlite3-analyzer |
432 |
+ install_tool sqlite3_checker sqlite3-checker |
433 |
+ install_tool sqlite3_expert sqlite3-expert |
434 |
+ install_tool sqltclsh sqlite3-tclsh |
435 |
+ |
436 |
+ unset -f install_tool |
437 |
+ fi |
438 |
+} |
439 |
+ |
440 |
+multilib_src_install_all() { |
441 |
+ find "${ED}" -name "*.la" -delete || die |
442 |
+ |
443 |
+ doman sqlite3.1 |
444 |
+ |
445 |
+ if use doc; then |
446 |
+ if [[ "${PV}" == "9999" ]]; then |
447 |
+ pushd "${WORKDIR}/${PN}-doc-build/doc" > /dev/null || die |
448 |
+ else |
449 |
+ pushd "${WORKDIR}/${PN}-doc-${DOC_PV}" > /dev/null || die |
450 |
+ fi |
451 |
+ |
452 |
+ find "(" -name "*.db" -o -name "*.txt" ")" -delete || die |
453 |
+ if [[ "${PV}" != "9999" ]]; then |
454 |
+ rm search search.d/admin || die |
455 |
+ rmdir search.d || die |
456 |
+ find -name "*~" -delete || die |
457 |
+ fi |
458 |
+ |
459 |
+ ( |
460 |
+ docinto html |
461 |
+ dodoc -r * |
462 |
+ ) |
463 |
+ |
464 |
+ popd > /dev/null || die |
465 |
+ fi |
466 |
+} |