diff options
Diffstat (limited to 'dev-db')
-rw-r--r-- | dev-db/Manifest.gz | bin | 16778 -> 16778 bytes | |||
-rw-r--r-- | dev-db/litecli/Manifest | 4 | ||||
-rw-r--r-- | dev-db/litecli/litecli-1.14.4.ebuild (renamed from dev-db/litecli/litecli-1.12.3.ebuild) | 8 | ||||
-rw-r--r-- | dev-db/sqlite/Manifest | 3 | ||||
-rw-r--r-- | dev-db/sqlite/sqlite-3.49.1.ebuild | 432 |
5 files changed, 441 insertions, 6 deletions
diff --git a/dev-db/Manifest.gz b/dev-db/Manifest.gz Binary files differindex 780e99cec49b..01261b5e1955 100644 --- a/dev-db/Manifest.gz +++ b/dev-db/Manifest.gz diff --git a/dev-db/litecli/Manifest b/dev-db/litecli/Manifest index 6027c8b38c44..7c23793733ef 100644 --- a/dev-db/litecli/Manifest +++ b/dev-db/litecli/Manifest @@ -1,5 +1,5 @@ -DIST litecli-1.12.3.gh.tar.gz 884895 BLAKE2B eb4aeb8e268ae5d878aee960be68d86085ee87a1089d2f80e1f7be01c31b030ce12432656452867efc9a5b915b1c15ae69d1ab9b461a16586a1d76e001e4d51a SHA512 2b9dda031984d142a9341b19446d2cca366be98058ff57874e66fc60ee936b27f0b2900d7b00dffed058fd985028236148594372dac6a0010894d0502d7db04a DIST litecli-1.13.2.tar.gz 888874 BLAKE2B 88880027a9f6b30ce266c3e2989379121229a6332e9841822876c7ae76560f6b5b758cea2e7fac1b8355c1070e33f48fa6d18da329724474eb508fb9687535f1 SHA512 c1134e86d60390f70553984cc6c4bf166879c08f225da8162ea0c27e579b65051cb4bbc51be5894967f09bef807d1c721e6d3550ecfe2a25c7f73eb226373e73 -EBUILD litecli-1.12.3.ebuild 934 BLAKE2B e9714145a29e3e0f83b5362a46434f996a670affa564246a8d3bbc1dc979c42db1b7c872bef61063c1bb57c29bc92cd599989366356c7d48cc910164c8f55824 SHA512 d426940c7c7d598b77c1321fa39401cc79bcbf2bf5b4acc9ca7d5cc5b119026e401030d5ec72e4ffe9aa01d0937a84684c3ac8c6166859bc3cf1c4109276a2df +DIST litecli-1.14.4.tar.gz 894515 BLAKE2B 1cb218906a790802cc940f22cf8333d0b6645d0be4f8cc48f126459785768a7e53194500a104656a1458e72cd8b4f4996eb3f6978620950bcbc5c70f6cb4beb0 SHA512 8e380b5ffa3ebc9bed2a9a7ef1a250803fcac1531e9d7a324df2b62f82845083e588e8a5355128bdc48a294b0ac2937a91affbbd02bb26f50532fe1209bad593 EBUILD litecli-1.13.2.ebuild 937 BLAKE2B 509c095207acb63b2e99edd7b47f34fe9be8df1349450310267fbcfba557f224b35a4b7e03564d9b49ef4771011dbfeba9026a6f4b8dc67b00dd01a4d170f6be SHA512 22d103a2587909eb21cb59a5026e443915d6e161faba608ac6779bead147f15fd7b47d7360fd4678e050dc675253717f667076fa65f1f47b2b82cf9614f171de +EBUILD litecli-1.14.4.ebuild 939 BLAKE2B f688b01c7e676d2f853e4bd8baf7400a42667f9625bbb7470bee6d1e65139eaff6dca7e76bf86721a4c01d6f9bcdef5817e561bfa857cb2e3662f3c65901f00b SHA512 8066451e91795ecef521fbd44861ab55c266de0c930ad6246d262e60de888913f3a80039dcfd859717fd7c809cd23bf248a3b1c1ec695ed16291282be986253f MISC metadata.xml 558 BLAKE2B d0cc893d86444b930e255201d88d240ff83d534ffd502065bac82633b1575b175a430b795cc7cec00c31cbea33880f452b379361b5ea5abddd5ee386a12ee17b SHA512 44172f757590bb2c27a00b8d919c3f994f7f28b88c08ecc0b3d63d145fc5e773656b762a3997f512d61e1563826a62a87f9eaa2107063db422e3f100347e912b diff --git a/dev-db/litecli/litecli-1.12.3.ebuild b/dev-db/litecli/litecli-1.14.4.ebuild index d12d59e02200..0368b9e36c5a 100644 --- a/dev-db/litecli/litecli-1.12.3.ebuild +++ b/dev-db/litecli/litecli-1.14.4.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -6,15 +6,15 @@ EAPI=8 DISTUTILS_USE_PEP517=setuptools PYTHON_COMPAT=( python3_{10..13} ) PYTHON_REQ_USE="sqlite" -inherit distutils-r1 +inherit distutils-r1 pypi DESCRIPTION="CLI for SQLite with auto-completion and syntax highlighting" HOMEPAGE="https://litecli.com/ https://github.com/dbcli/litecli" -SRC_URI="https://github.com/dbcli/litecli/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz" +#SRC_URI="https://github.com/dbcli/litecli/archive/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="BSD" SLOT="0" -KEYWORDS="amd64 x86" +KEYWORDS="~amd64 ~x86" RDEPEND=" >=dev-python/click-4.1[${PYTHON_USEDEP}] diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest index 99f932e5529a..94ba05904fbb 100644 --- a/dev-db/sqlite/Manifest +++ b/dev-db/sqlite/Manifest @@ -6,11 +6,14 @@ AUX sqlite-3.49.0-icu-tests.patch 726 BLAKE2B e2b3d0ed8be80ba441e86a59372658d8da DIST sqlite-doc-3460100.zip 10851427 BLAKE2B 7462e83ca84e3e9aac7236f575fd2bdddac7744ae700a63fe8fdc9d2df3157c59fd374d99a0526bd4d9f742005ee7a90f3d78057861d3c3fcba9f897630e48db SHA512 1ad7dfc938d182f69ea9367b4f5ead1d48b991626521249e8b58c9fb4c2553e348ce402de9cc81b0ad699d4c45c467de56a98ee39f9c3555c6fafff15fba41ce DIST sqlite-doc-3470200.zip 10957830 BLAKE2B cbc40dd440d1c5af4ad4333090a7306bd54ec43250a478b6900b8f74bd721035018ea7647f3a208d42cc0639827325be26a9412d17af7d390f4e584d4c6acf44 SHA512 48349d512b7cd9bc6f6a5da3a2b2285de159d4653667311adb0f5e6a970060db940a590c2d01b529afc1614065b22434d5b3ac4d8d0122d003d74926745ba56e DIST sqlite-doc-3490000.zip 11327988 BLAKE2B ecabc9b9217953874cc575ef06d93f3ef5da25d82c0837b827daca3ca1da54968d7f3f2498ec7fee22d43fb2a2bcc2077be396dfc5f6e4ee62e1493d7be20e9e SHA512 89823a426aba9db78597f99df6fe2162601d0133d7490c83c939414372c293e9f313bd2e46c5e5d4b19dd3846337f53eb788208c91a1fa7ffc768a0a5966da03 +DIST sqlite-doc-3490100.zip 11333315 BLAKE2B 28fe302820898861e404f5c6dd1c05c3ff3ff10a8b713604f0ccec6b21ca7b82d61ba720903d7e9d8e9ec5de701900c5972037c23627ddd1a2734e95a92c5d6a SHA512 0eb6af0483bca7f6efd6baf00210adcca1d23ea5b474728aa96614a93a868ec6f9257d9b5f29c452fed5323c64fc180ee3845695ddbbcd7836dac69aecdfc833 DIST sqlite-src-3460100.zip 14276926 BLAKE2B df16ea944e317df8ed64fdfab289e3699ec71725ce55e2b30450adaeb41c061b4fba1eb8c41ba638b0edcd12b23264a1f9e413b69fd593c2b65fb1037d3fc8b2 SHA512 6d32a0db9f95d3cec34f02f3fd45b453bf7c422d4d4d9570790f641e7d190b8b31be8e8715afacc1b6e4417f15a4d15a0b28e608ae0b4b5f3054b075783b916e DIST sqlite-src-3470200.zip 14421983 BLAKE2B dcaea5be0099b2dad1b53403933f0037ace48b1f248040c1b5cc116ac2ad6c9b44c71b8efe3afd16bef01119b440d1a2ec9d553a22f855e0ba55793684f53d8d SHA512 a6280a02304bfae173d9e9ebf376b2d3624658f04af4d8e95d5a042e24cf0405a47c0a4023f4dbc2790716cd85e16b97fcc0a83c1534e6d554f4eb0bfb0a3ed3 DIST sqlite-src-3490000.zip 14371111 BLAKE2B 895d8869b3bc0abeb5faf8cdd0de29e0d86f44fa6eafb154e0df4373161fe79c5e35d360100064778f0a3f57a232e15dc8ec73ef5e75d23a4c8ffc880d2c571d SHA512 a414c544ca4288ab475c449327b3e2136e9d01145fc8b9c723ccfd30e356cc90411ca74ae969f3fe4c8212cad4d0969b2f3a72922ee073049c25e4984336eb7c +DIST sqlite-src-3490100.zip 14372402 BLAKE2B c7f6a574698512e2fde44e54ed2a101e7307821b0015287bbf5ab151f5f59432fe051fda1d1caec865928717f51c42f1161187fb768180088574ca225cd29250 SHA512 24c81cee52e5655f4e9d6496a366e4787352b5108ea27eb5ce3dc07ef3e1975205bb250584b0758fb2832add84ca922b09a4d925e0dc2f55dd3613a58b414ec3 EBUILD sqlite-3.46.1.ebuild 12792 BLAKE2B ca98f4e22e0ba7abdf3c1c8a785e82a6f64d19f186a68d9733fbe31db879c2d3d0b1b517b3ea3f0af5c678cd9c036a8702c4f3e87f3a20c5b4342e391fd720d9 SHA512 6633db1ba661ed8948e21ffb245f59f7507669224d3b827c16d4fc5332d9b2bd62f176066afc7f59ed5104b0a5d15dc4eb8ed91ba4ab55b2afb773d6026708a0 EBUILD sqlite-3.47.2-r1.ebuild 12880 BLAKE2B 6686cb865c8f3b68ea03077ef146753a3ae03bbc5dbce1e2224ca514c6b55b8bca6ec1702bd42984cbb96e4f6169e726e4748a931ddcc33e4af065e89d7f4b3e SHA512 c321faed21950909eb0abc4d32f22ab74e79f90577a25a6fad3f9f9c51f47b5337056a9a209f2781d0a45119a17c802165fbf0569748334011b43597c51aca47 EBUILD sqlite-3.49.0.ebuild 12978 BLAKE2B 3e90f580c22cd0a99a6c9e7f69e801fe60625e04fdc1a4afbc3332e054cb05bb477c636fe0de84095bf8c11324412e7fa678d49a9dad943579229b4083960bf1 SHA512 f7d2a28eee202c3dcaff7d233ef5632ea74232ccb94bf65463582f804b4c24f0743aea339ef5cdd1601e0c47dff8c97f4b21f4ff336bb463d7190fe9e57c7b97 +EBUILD sqlite-3.49.1.ebuild 12886 BLAKE2B 9ade68413d7290e22201df29e2fa39c164bdfaa04fae0bcbda9c7c9c248f3d3c7a64b186ab30e3e1ac4cc411488e5569f2a7ec9d7bfcffbcbf5b5f20818622c2 SHA512 2f33c688c8434e835338325ba82a3292ca2ede7e9704bdd4f646ca2433dc9ae4f25fad2ff36870ac94e59b4a5fbb54af9037626a19f8a5428e790c5cd0a436a9 EBUILD sqlite-9999.ebuild 12795 BLAKE2B 6f9a80eb912680ef1d0f3fb183d0bd5327c9d312c11ca392312568861b104556ba54e8350611c7acc758360c42e33e2a0cbe3bc44d57c4be225e2d84a7cb69c6 SHA512 375ce352d2ddd96bfde025a82e9abff16c1713d5d6a8fc0d5ef15534d281f60a586e8d963d8a57c98ee2c7369e6fd3fc5eef9513cb5fea7a038dc8aa04876105 MISC metadata.xml 824 BLAKE2B 8ab2e8f230bf3a2b26077d90944bca7bf35ae905310205b90bf243365148488303256606c0ee7c3fb736300686466a1c2583bf103693c20063ca668fe9e52647 SHA512 ed4a89e3c2d633cb6ebf8bcbf3ca055d0d1b2ffd801ba559395f812faeaafdfedd97dae11a5a53a4c068e43026fbd4eed4cb12c8b89a7fda6dabe6f78a2e0b38 diff --git a/dev-db/sqlite/sqlite-3.49.1.ebuild b/dev-db/sqlite/sqlite-3.49.1.ebuild new file mode 100644 index 000000000000..a0c2249a6802 --- /dev/null +++ b/dev-db/sqlite/sqlite-3.49.1.ebuild @@ -0,0 +1,432 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic multilib-minimal toolchain-funcs + +DESCRIPTION="SQL database engine" +HOMEPAGE="https://sqlite.org/" + +# On version updates, make sure to read the forum (https://sqlite.org/forum/forum) +# for hints regarding test failures, backports, etc. +if [[ ${PV} == 9999 ]]; then + S="${WORKDIR}"/${PN} + PROPERTIES="live" +else + printf -v SRC_PV "%u%02u%02u%02u" $(ver_rs 1- " ") + DOC_PV="${SRC_PV}" + #printf -v DOC_PV "%u%02u%02u00" $(ver_rs 1-3 " ") + + SRC_URI=" + https://sqlite.org/2025/${PN}-src-${SRC_PV}.zip + doc? ( https://sqlite.org/2025/${PN}-doc-${DOC_PV}.zip ) + " + S="${WORKDIR}/${PN}-src-${SRC_PV}" + + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi + +LICENSE="public-domain" +SLOT="3" +IUSE="debug doc icu +readline secure-delete static-libs tcl test tools" +RESTRICT="!test? ( test )" + +RDEPEND=" + sys-libs/zlib:=[${MULTILIB_USEDEP}] + icu? ( dev-libs/icu:=[${MULTILIB_USEDEP}] ) + readline? ( sys-libs/readline:=[${MULTILIB_USEDEP}] ) + tcl? ( dev-lang/tcl:=[${MULTILIB_USEDEP}] ) + tools? ( dev-lang/tcl:= ) +" +DEPEND=" + ${RDEPEND} + test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] ) +" +if [[ ${PV} == 9999 ]]; then + BDEPEND+=" dev-vcs/fossil" +else + BDEPEND+=" app-arch/unzip" +fi + +PATCHES=( + "${FILESDIR}"/${PN}-3.47.2-hwtime.h-Don-t-use-rdtsc-on-i486.patch + # https://sqlite.org/forum/forumpost/f93323a743 + "${FILESDIR}"/${PN}-3.49.0-icu-tests.patch +) + +_fossil_fetch() { + local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}" + local repo_id="${1}" + local repo_uri="${2}" + + local -x FOSSIL_HOME="${HOME}" + + mkdir -p "${T}/fossil/${repo_id}" || die + pushd "${T}/fossil/${repo_id}" > /dev/null || die + + if [[ -n "${EVCS_OFFLINE}" ]]; then + if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then + die "Network activity disabled using EVCS_OFFLINE and clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\"" + fi + else + if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then + einfo fossil clone --verbose "${repo_uri}" "${repo_id}.fossil" + fossil clone --verbose "${repo_uri}" "${repo_id}.fossil" || die + echo + else + cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" . || die + einfo fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}" + fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}" || die + echo + fi + + ( + addwrite "${distdir}" + mkdir -p "${distdir}/fossil-src/${repo_id}" || die + cp -p "${repo_id}.fossil" "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" || die + ) + fi + + popd > /dev/null || die +} + +_fossil_checkout() { + local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}" + local repo_id="${1}" + local branch_or_commit="${2}" + local target_directory="${3}" + + local -x FOSSIL_HOME="${HOME}" + + if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then + die "Clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\"" + fi + + if [[ ! -f "${T}/fossil/${repo_id}/${repo_id}.fossil" ]]; then + mkdir -p "${T}/fossil/${repo_id}" || die + cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" "${T}/fossil/${repo_id}" || die + fi + + mkdir "${target_directory}" || die + pushd "${target_directory}" > /dev/null || die + + einfo fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}" + fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}" || die + echo + + popd > /dev/null || die +} + +fossil_fetch() { + local repo_id="${1}" + local repo_uri="${2}" + local target_directory="${3}" + + local branch_or_commit="${EFOSSIL_COMMIT:-${EFOSSIL_BRANCH:-trunk}}" + + _fossil_fetch "${repo_id}" "${repo_uri}" + _fossil_checkout "${repo_id}" "${branch_or_commit}" "${target_directory}" +} + +src_unpack() { + if [[ ${PV} == 9999 ]]; then + fossil_fetch sqlite https://sqlite.org/src "${WORKDIR}/${PN}" + if use doc; then + fossil_fetch sqlite-doc https://sqlite.org/docsrc "${WORKDIR}/${PN}-doc" + fi + else + default + fi +} + +src_prepare() { + default + + multilib_copy_sources +} + +multilib_src_configure() { + local -x CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" + local options=() + + options+=( + --enable-load-extension + --enable-threadsafe + ) + + # Support detection of misuse of SQLite API. + # https://sqlite.org/compile.html#enable_api_armor + append-cppflags -DSQLITE_ENABLE_API_ARMOR + + # Support bytecode and tables_used virtual tables. + # https://sqlite.org/compile.html#enable_bytecode_vtab + # https://sqlite.org/bytecodevtab.html + append-cppflags -DSQLITE_ENABLE_BYTECODE_VTAB + + # Support column metadata functions. + # https://sqlite.org/compile.html#enable_column_metadata + # https://sqlite.org/c3ref/column_database_name.html + append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA + + # Support sqlite_dbpage virtual table. + # https://sqlite.org/compile.html#enable_dbpage_vtab + # https://sqlite.org/dbpage.html + append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB + + # Support dbstat virtual table. + # https://sqlite.org/compile.html#enable_dbstat_vtab + # https://sqlite.org/dbstat.html + append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB + + # Support sqlite3_serialize() and sqlite3_deserialize() functions. + # https://sqlite.org/compile.html#enable_deserialize + # https://sqlite.org/c3ref/serialize.html + # https://sqlite.org/c3ref/deserialize.html + append-cppflags -DSQLITE_ENABLE_DESERIALIZE + + # Support comments in output of EXPLAIN. + # https://sqlite.org/compile.html#enable_explain_comments + append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS + + # Support Full-Text Search versions 3, 4 and 5. + # https://sqlite.org/compile.html#enable_fts3 + # https://sqlite.org/compile.html#enable_fts3_parenthesis + # https://sqlite.org/compile.html#enable_fts4 + # https://sqlite.org/compile.html#enable_fts5 + # https://sqlite.org/fts3.html + # https://sqlite.org/fts5.html + append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS + options+=( --enable-fts4 ) + options+=( --enable-fts5 ) + + # Support hidden columns. + append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS + + # Support memsys5 memory allocator. + # https://sqlite.org/compile.html#enable_memsys5 + # https://sqlite.org/malloc.html#memsys5 + options+=( --enable-memsys5 ) + + # Support sqlite3_normalized_sql() function. + # https://sqlite.org/c3ref/expanded_sql.html + append-cppflags -DSQLITE_ENABLE_NORMALIZE + + # Support sqlite_offset() function. + # https://sqlite.org/compile.html#enable_offset_sql_func + # https://sqlite.org/lang_corefunc.html#sqlite_offset + append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC + + # Support pre-update hook functions. + # https://sqlite.org/compile.html#enable_preupdate_hook + # https://sqlite.org/c3ref/preupdate_count.html + append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK + + # Support Resumable Bulk Update extension. + # https://sqlite.org/compile.html#enable_rbu + # https://sqlite.org/rbu.html + append-cppflags -DSQLITE_ENABLE_RBU + + # Support R*Trees. + # https://sqlite.org/compile.html#enable_rtree + # https://sqlite.org/compile.html#enable_geopoly + # https://sqlite.org/rtree.html + # https://sqlite.org/geopoly.html + options+=( --enable-rtree --enable-geopoly ) + + # Support Session extension. + # https://sqlite.org/compile.html#enable_session + # https://sqlite.org/sessionintro.html + options+=( --enable-session ) + + # Support scan status functions. + # https://sqlite.org/compile.html#enable_stmt_scanstatus + # https://sqlite.org/c3ref/stmt_scanstatus.html + # https://sqlite.org/c3ref/stmt_scanstatus_reset.html + append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS + + # Support sqlite_stmt virtual table. + # https://sqlite.org/compile.html#enable_stmtvtab + # https://sqlite.org/stmt.html + append-cppflags -DSQLITE_ENABLE_STMTVTAB + + # Support unknown() function. + # https://sqlite.org/compile.html#enable_unknown_sql_function + append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION + + # Support unlock notification. + # https://sqlite.org/compile.html#enable_unlock_notify + # https://sqlite.org/c3ref/unlock_notify.html + # https://sqlite.org/unlock_notify.html + append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY + + # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements. + # https://sqlite.org/compile.html#enable_update_delete_limit + # https://sqlite.org/lang_delete.html#optional_limit_and_order_by_clauses + # https://sqlite.org/lang_update.html#optional_limit_and_order_by_clauses + append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT + + # Support soundex() function. + # https://sqlite.org/compile.html#soundex + # https://sqlite.org/lang_corefunc.html#soundex + append-cppflags -DSQLITE_SOUNDEX + + # Support URI filenames. + # https://sqlite.org/compile.html#use_uri + # https://sqlite.org/uri.html + append-cppflags -DSQLITE_USE_URI + + options+=( $(use_enable debug) ) + + if use icu; then + # Support ICU extension. + # https://sqlite.org/compile.html#enable_icu + options+=( --with-icu-config ) + fi + + options+=( + --disable-editline + $(use_enable readline) + ) + + if use readline; then + options+=( --with-readline-inc="-I${ESYSROOT}/usr/include/readline" ) + fi + + if use secure-delete; then + # Enable secure_delete pragma by default. + # https://sqlite.org/compile.html#secure_delete + # https://sqlite.org/pragma.html#pragma_secure_delete + append-cppflags -DSQLITE_SECURE_DELETE + fi + + options+=( $(use_enable static-libs static) ) + + # tcl, test, tools USE flags. + if use tcl || use test || { use tools && multilib_is_native_abi; }; then + options+=( + --enable-tcl + --with-tcl="${ESYSROOT}/usr/$(get_libdir)" + ) + else + options+=( --disable-tcl ) + fi + + if [[ "${ABI}" == "x86" ]]; then + if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then + append-cflags -mfpmath=sse + else + append-cflags -ffloat-store + fi + fi + + # set SONAME for the library + options+=( --soname=legacy ) + + # https://sqlite.org/forum/forumpost/4f4d06a9f6683bb9 + tc-export_build_env BUILD_CC + + CC_FOR_BUILD=${BUILD_CC} econf "${options[@]}" +} + +multilib_src_compile() { + emake HAVE_TCL="$(usev tcl 1)" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" + + if use tools && multilib_is_native_abi; then + emake changeset dbdump dbhash dbtotxt index_usage rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh + fi + + if [[ ${PV} == 9999 ]] && use doc && multilib_is_native_abi; then + emake tclsqlite3.c + + local build_directory="$(pwd)" + build_directory="${build_directory##*/}" + + mkdir "${WORKDIR}/${PN}-doc-build" || die + pushd "${WORKDIR}/${PN}-doc-build" > /dev/null || die + + 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 + rmdir doc/matrix{/*,} || die + + popd > /dev/null || die + fi +} + +multilib_src_test() { + if [[ "${EUID}" -eq 0 ]]; then + ewarn "Skipping tests due to root permissions" + return + fi + + local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}" + + # e_uri.test tries to open files in /. + # bug #839798 + local SANDBOX_PREDICT=${SANDBOX_PREDICT} + addpredict "/test.db" + addpredict "/ΓΏ.db" + + emake -Onone $(usex debug 'fulltest' 'test') +} + +multilib_src_install() { + emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install + + if use tools && multilib_is_native_abi; then + install_tool() { + if [[ -f ".libs/${1}" ]]; then + newbin ".libs/${1}" "${2}" + else + newbin "${1}" "${2}" + fi + } + + install_tool changeset sqlite3-changeset + install_tool dbdump sqlite3-db-dump + install_tool dbhash sqlite3-db-hash + install_tool dbtotxt sqlite3-db-to-txt + install_tool index_usage sqlite3-index-usage + install_tool rbu sqlite3-rbu + install_tool scrub sqlite3-scrub + install_tool showdb sqlite3-show-db + install_tool showjournal sqlite3-show-journal + install_tool showshm sqlite3-show-shm + install_tool showstat4 sqlite3-show-stat4 + install_tool showwal sqlite3-show-wal + install_tool sqldiff sqlite3-diff + install_tool sqlite3_analyzer sqlite3-analyzer + install_tool sqlite3_checker sqlite3-checker + install_tool sqlite3_expert sqlite3-expert + install_tool sqltclsh sqlite3-tclsh + + unset -f install_tool + fi +} + +multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + + doman sqlite3.1 + + if use doc; then + if [[ ${PV} == 9999 ]]; then + pushd "${WORKDIR}/${PN}-doc-build/doc" > /dev/null || die + else + pushd "${WORKDIR}/${PN}-doc-${DOC_PV}" > /dev/null || die + fi + + find "(" -name "*.db" -o -name "*.txt" ")" -delete || die + if [[ ${PV} != 9999 ]]; then + rm search search.d/admin || die + rmdir search.d || die + find -name "*~" -delete || die + fi + + ( + docinto html + dodoc -r * + ) + + popd > /dev/null || die + fi +} |