* Use an older glibc so resulting binaries can run on older systems (without having to link statically against glibc) * Call packages static-compat-* to make it clear that these packages are intended for compatibility with older distributions * Add further libraries to get static-compat-qt6-base and some other static-compat-qt6-* packages building
75 lines
2.3 KiB
Bash
75 lines
2.3 KiB
Bash
# Contributor: Andreas Radke <andyrtr@archlinux.org>
|
|
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
|
|
|
|
_pkgname=sqlite
|
|
pkgname=static-compat-$_pkgname
|
|
_srcver=3380200
|
|
_docver=${_srcver}
|
|
#_docver=3330000
|
|
pkgver=3.38.2
|
|
pkgrel=1
|
|
pkgdesc="A C library that implements an SQL database engine"
|
|
arch=('x86_64')
|
|
license=('custom:Public Domain')
|
|
url="https://www.sqlite.org/"
|
|
depends=(static-compat-zlib static-compat-readline)
|
|
makedepends=(static-compat-configure static-compat-tcl patchelf)
|
|
source=(https://www.sqlite.org/2022/sqlite-src-${_srcver}.zip
|
|
sqlite-lemon-system-template.patch
|
|
license.txt)
|
|
options=('!emptydirs' '!makeflags' 'staticlibs') # json extensions breaks parallel build
|
|
# upstream now switched to sha3sums - currently not suppoerted by makepkg
|
|
sha256sums=('c7c0f070a338c92eb08805905c05f254fa46d1c4dda3548a02474f6fb567329a'
|
|
'55746d93b0df4b349c4aa4f09535746dac3530f9fd6de241c9f38e2c92e8ee97'
|
|
'4e57d9ac979f1c9872e69799c2597eeef4c6ce7224f3ede0bf9dc8d217b1e65d')
|
|
|
|
prepare() {
|
|
cd sqlite-src-$_srcver
|
|
|
|
# patch taken from Fedora
|
|
# https://src.fedoraproject.org/rpms/sqlite/blob/master/f/sqlite.spec
|
|
patch -Np1 -i ../sqlite-lemon-system-template.patch
|
|
|
|
#autoreconf -vfi
|
|
}
|
|
|
|
build() {
|
|
source static-compat-environment
|
|
export PATH=$PWD:$PATH
|
|
printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config
|
|
chmod +x pkg-config
|
|
export CPPFLAGS="$CPPFLAGS \
|
|
-DSQLITE_ENABLE_COLUMN_METADATA=1 \
|
|
-DSQLITE_ENABLE_UNLOCK_NOTIFY \
|
|
-DSQLITE_ENABLE_DBSTAT_VTAB=1 \
|
|
-DSQLITE_ENABLE_FTS3_TOKENIZER=1 \
|
|
-DSQLITE_SECURE_DELETE \
|
|
-DSQLITE_ENABLE_STMTVTAB \
|
|
-DSQLITE_MAX_VARIABLE_NUMBER=250000 \
|
|
-DSQLITE_MAX_EXPR_DEPTH=10000 \
|
|
-DSQLITE_ENABLE_MATH_FUNCTIONS"
|
|
|
|
# build sqlite
|
|
cd sqlite-src-$_srcver
|
|
static-compat-configure \
|
|
--disable-amalgamation \
|
|
--disable-shared \
|
|
--enable-fts3 \
|
|
--enable-fts4 \
|
|
--enable-fts5 \
|
|
--enable-rtree \
|
|
--enable-json1 \
|
|
TCLLIBDIR="$static_compat_prefix"/lib/sqlite$pkgver
|
|
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
|
|
make
|
|
}
|
|
|
|
package() {
|
|
source static-compat-environment
|
|
cd sqlite-src-$_srcver
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
patchelf --remove-rpath "${pkgdir}/$static_compat_prefix"/bin/sqlite3
|
|
install -D -m644 "${srcdir}"/license.txt "${pkgdir}"/usr/share/licenses/${pkgname}/license.txt
|
|
}
|