# $Id$ PNAME="sqlite" PVER="3.42.0" PBUILD="r1" PCAT="dev-db" DESCRIPTION="SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine." HOMEPAGE="http://www.sqlite.org/" DEPEND=">= sys-libs/ncurses-6.4 >= sys-libs/readline-8.2" SDEPEND=">= sys-libs/zlib-1.2.13" # helper function sqlite_upstream_pver() { local pver="$1" local count=0 local i for i in $(echo ${pver//./\ }) do if [[ ${i} -lt 10 ]] && [[ ${count} -gt 0 ]] then echo -n "0${i}" else echo -n "${i}" fi (( count++)) done # fill up missing zeros if needed if [[ ${count} -lt 4 ]] then for (( i=4-count; i>0; i--)) do echo -n "00" done fi # crlf echo } SRCFILE="${PNAME}-autoconf-$(sqlite_upstream_pver ${PVER}).tar.gz" # a special srcfile is needed to build without tcl SRCDIR="${BUILDDIR}/${PNAME}-autoconf-$(sqlite_upstream_pver ${PVER})" sminclude multilib mbuild SRC_URI=( http://www.sqlite.org/2023/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) #UP2DATE="updatecmd http://www.sqlite.org | grep 'Latest Release' | sed -n 's/.*Version \(.*\)\ (.*/\1/;$ p'" UP2DATE="updatecmd http://www.sqlite.org | grep 'Version' | sed -n 's/.*Version \(.*\)\ (.*/\1/;$ p'" src_compile() { # required flags by firefox export CPPFLAGS+=" -DSQLITE_ENABLE_DBSTAT_VTAB=1 \ -DSQLITE_ENABLE_COLUMN_METADATA=1 \ -DSQLITE_ENABLE_UNLOCK_NOTIFY \ -DSQLITE_SECURE_DELETE \ -DSQLITE_ENABLE_FTS3_TOKENIZER=1 \ -DSQLITE_ENABLE_FTS3_PARENTHESIS \ -DSQLITE_ENABLE_STMTVTAB \ -DSQLITE_MAX_VARIABLE_NUMBER=250000 \ -DSQLITE_MAX_EXPR_DEPTH=10000 \ -DSQLITE_ENABLE_MATH_FUNCTIONS" mconfigure \ --enable-load-extension \ --enable-readline \ --enable-cross-thread-connections \ --enable-threadsafe \ --disable-tcl \ --disable-debug \ --enable-fts3 \ --enable-fts4 \ --enable-fts5 \ --enable-rtree \ --disable-tcl \ || die # apply as-needed sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool || die mmake || die }