wok-next annotate sqlite3/receipt @ rev 20871

fossil: up (2.6) / fix build; sqlite3: up (3.24.0), drop providing "sqlite[^3]*"; add staticperl
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Jul 02 22:39:08 2018 +0300 (2018-07-02)
parents 10df65db91ad
children d5aab818505e
rev   line source
al@19741 1 # SliTaz package receipt v2.
al@19741 2
al@19741 3 PACKAGE="sqlite3"
al@20871 4 VERSION="3.24.0"
al@19741 5 CATEGORY="database"
al@19741 6 SHORT_DESC="Small SQL database engine"
al@19741 7 MAINTAINER="pankso@slitaz.org"
al@19741 8 LICENSE="PublicDomain"
al@19741 9 WEB_SITE="https://www.sqlite.org/"
al@19741 10
al@20871 11 TARBALL="sqlite-src-$(echo $VERSION | awk 'BEGIN{FS="."}{printf("%d%02d%02d00",$1,$2,$3)}').zip"
al@20871 12 WGET_URL="https://www.sqlite.org/2018/$TARBALL"
al@20871 13 # integrity check: https://www.sqlite.org/download.html
al@20871 14 TARBALL_SHA1="fb558c49ee21a837713c4f1e7e413309aabdd9c7"
al@19741 15
al@19741 16 EXTRA_SOURCE_FILES="mysql2sqlite.sh"
al@19741 17
al@20871 18 BUILD_DEPENDS="tcl-dev readline-dev zlib-dev"
al@20871 19 SPLIT="lemon sqlite3-analyzer sqlite3 libsqlite3 libsqlite3-tcl sqlite3-dev"
al@19741 20
al@20604 21 compile_rules() {
al@19741 22 case "$ARCH" in
al@19741 23 arm*) ARCH_ARGS="--with-tcl=/cross/arm/sysroot/usr/lib" ;;
al@19741 24 esac
al@19741 25
al@20871 26 [ -s "$SRC/mysql2sqlite.sh" ] || wget -P $SRC \
al@20871 27 https://gist.github.com/esperlu/943776/raw/dd87f4088f6d5ec7563478f7a28a37ba02cf26e2/mysql2sqlite.sh
al@19741 28
al@20871 29 export CFLAGS="$CFLAGS \
al@20871 30 -DSQLITE_ENABLE_COLUMN_METADATA=1 \
al@20871 31 -DSQLITE_ENABLE_UNLOCK_NOTIFY \
al@20871 32 -DSQLITE_ENABLE_DBSTAT_VTAB=1 \
al@20871 33 -DSQLITE_ENABLE_FTS3_TOKENIZER=1 \
al@20871 34 -DSQLITE_SECURE_DELETE \
al@20871 35 -DSQLITE_MAX_VARIABLE_NUMBER=250000 \
al@20871 36 -DSQLITE_MAX_EXPR_DEPTH=10000"
al@20871 37 export CPPFLAGS="$CFLAGS"
al@19741 38
al@19741 39 ./configure \
al@19741 40 --disable-static \
al@20871 41 --disable-amalgamation \
al@20871 42 --enable-fts3 \
al@20871 43 --enable-fts4 \
al@20871 44 --enable-fts5 \
al@20871 45 --enable-rtree \
al@20871 46 --enable-json1 \
al@20871 47 TCLLIBDIR=/usr/lib/sqlite$VERSION \
al@19741 48 $ARCH_ARGS \
al@19741 49 $CONFIGURE_ARGS &&
al@20604 50 fix libtool &&
al@20871 51 make -j1 &&
al@20871 52 make showdb showjournal showstat4 showwal sqldiff sqlite3_analyzer &&
al@20871 53 make DESTDIR=$DESTDIR install || return 1
al@19741 54
al@20871 55 # recompiling lemon
al@20871 56 [ -f $src/lemon ] && rm $src/lemon
al@19741 57 cp $src/tool/lemon.c .
al@20871 58 sed -i 's|lempar.c|/usr/share/lemon/lempar.c|' lemon.c
al@19741 59 echo -n "Compiling lemon..."
al@20871 60 gcc -o lemon lemon.c
al@20871 61 status
al@20871 62 install -Dm644 $src/lempar.c $install/usr/share/lemon/lempar.c
al@19741 63
al@20871 64 install -m755 showdb showjournal showstat4 showwal sqldiff lemon \
al@20871 65 sqlite3_analyzer $SRC/mysql2sqlite.sh $install/usr/bin/
al@20871 66
al@20871 67 cook_pick_manpages sqlite3.1 autoconf/tea/doc/sqlite3.n
al@20871 68 cook_pick_docs doc/*
al@19741 69 }
al@19741 70
al@20604 71 genpkg_rules() {
al@19741 72 case $PACKAGE in
al@20871 73 lemon)
al@20871 74 copy lemon lempar.c
al@20871 75 CAT="system-tools|the LEMON Parser Generator"
al@20871 76 DEPENDS=" "
al@20871 77 ;;
al@20871 78 sqlite3-analyzer)
al@20871 79 copy sqlite3_analyzer
al@20871 80 CAT="database|analysing database files"
al@20871 81 DEPENDS="tcl"
al@20871 82 ;;
al@19741 83 sqlite3)
al@20871 84 copy bin/ @rm
al@20871 85 DEPENDS="readline zlib libsqlite3"
al@19741 86 ;;
al@19741 87 libsqlite3)
al@19741 88 copy libsqlite3.so*
al@19741 89 CAT="database|library"
al@19741 90 DEPENDS=" "
al@19741 91 ;;
al@19741 92 libsqlite3-tcl)
al@20871 93 copy libtclsqlite3.so pkgIndex.tcl
al@19741 94 CAT="database|TCL library"
al@20871 95 DEPENDS="libsqlite3 tcl"
al@19741 96 ;;
al@19741 97 sqlite3-dev)
al@19741 98 copy @dev
al@20871 99 DEPENDS="sqlite3 libsqlite3 libsqlite3-tcl lemon sqlite3-analyzer"
al@19741 100 ;;
al@19741 101 esac
al@19741 102 }