# $Id$ PNAME="sqlite" PVER="3.20.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=">= virtual/glibc" # 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})" ALX_PKG_KEEP="usr/bin usr/$(mlibdir)/*.so.*" sminclude multilib alx-split SRC_URI=( http://www.sqlite.org/2017/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) UP2DATE="updatecmd http://www.sqlite.org | grep 'Latest Release' | sed -n 's/.*Version \(.*\)\ (.*/\1/;$ p'" src_compile() { # required flags by firefox export CFLAGS+=" -DSQLITE_ENABLE_DBSTAT_VTAB=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_SECURE_DELETE" mconfigure \ --enable-load-extension \ --disable-readline \ --enable-cross-thread-connections \ --enable-threadsafe \ --disable-tcl \ --disable-debug \ || die mmake || die }