mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-04-01 20:02:52 +02:00
118 lines
2.9 KiB
Plaintext
118 lines
2.9 KiB
Plaintext
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
|
|
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
|
|
# Maintainer: Jingyun Hua <huajingyun@loongson.cn>
|
|
maintainer="Jingyun Hua <huajingyun@loongson.cn>"
|
|
pkgname=sqlite
|
|
# NOTE: pkgver needs to correspond with sqlite-tools
|
|
pkgver=3.51.2
|
|
pkgrel=1
|
|
pkgdesc="C library that implements an SQL database engine"
|
|
url="https://www.sqlite.org/"
|
|
arch="all"
|
|
license="blessing"
|
|
depends_dev="$pkgname=$pkgver-r$pkgrel"
|
|
makedepends_host="readline-dev"
|
|
subpackages="$pkgname-static $pkgname-doc $pkgname-dev $pkgname-libs"
|
|
|
|
# compute _ver
|
|
_a=${pkgver%%.*}
|
|
_b=${pkgver#"$_a".}
|
|
_b=${_b%%.*}
|
|
_c=${pkgver#"$_a"."$_b".}
|
|
_c=${_c%%.*}
|
|
case $pkgver in
|
|
*.*.*.*)_d=${pkgver##*.};;
|
|
*.*.*) _d=0;;
|
|
esac
|
|
[ $_b -lt 10 ] && _b=0$_b
|
|
[ $_c -lt 10 ] && _c=0$_c
|
|
[ $_d -lt 10 ] && _d=0$_d
|
|
_ver=${_a}${_b}${_c}$_d
|
|
|
|
# these variables depend on _ver being set
|
|
source="https://www.sqlite.org/2026/sqlite-autoconf-$_ver.tar.gz
|
|
https://www.sqlite.org/2026/sqlite-src-$_ver.zip
|
|
"
|
|
builddir="$srcdir/$pkgname-autoconf-$_ver"
|
|
options="!check" # no tests included
|
|
|
|
# secfixes:
|
|
# 3.34.1-r0:
|
|
# - CVE-2021-20227
|
|
# 3.32.1-r0:
|
|
# - CVE-2020-13434
|
|
# - CVE-2020-13435
|
|
# 3.30.1-r3:
|
|
# - CVE-2020-11655
|
|
# 3.30.1-r1:
|
|
# - CVE-2019-19242
|
|
# - CVE-2019-19244
|
|
# 3.28.0-r0:
|
|
# - CVE-2019-5018
|
|
# - CVE-2019-8457
|
|
# 0:
|
|
# - CVE-2022-35737
|
|
|
|
# additional CFLAGS to set, keep in sync with main/sqlite-tools
|
|
_amalgamation="-DSQLITE_ENABLE_FTS3_PARENTHESIS \
|
|
-DSQLITE_ENABLE_COLUMN_METADATA \
|
|
-DSQLITE_SECURE_DELETE \
|
|
-DSQLITE_ENABLE_UNLOCK_NOTIFY \
|
|
-DSQLITE_ENABLE_RTREE \
|
|
-DSQLITE_ENABLE_GEOPOLY \
|
|
-DSQLITE_USE_URI \
|
|
-DSQLITE_ENABLE_DBSTAT_VTAB \
|
|
-DSQLITE_SOUNDEX \
|
|
-DSQLITE_MAX_VARIABLE_NUMBER=250000"
|
|
|
|
prepare() {
|
|
if [ -f "$startdir"/../sqlite-tools/APKBUILD ]; then
|
|
(
|
|
_sqlitever=$pkgver
|
|
# shellcheck disable=SC1093
|
|
. "$startdir"/../sqlite-tools/APKBUILD
|
|
if [ "$_sqlitever" != "$pkgver" ]; then
|
|
warning "sqlite-tools version mismatch ($_sqlitever != $pkgver)"
|
|
fi
|
|
)
|
|
fi
|
|
|
|
default_prepare
|
|
}
|
|
|
|
build() {
|
|
export CFLAGS="${CFLAGS//-Os/-O2} $_amalgamation"
|
|
|
|
CC_FOR_BUILD="$BUILDCC" \
|
|
./configure \
|
|
--build="$CBUILD" \
|
|
--host="$CHOST" \
|
|
--prefix=/usr \
|
|
--enable-threadsafe \
|
|
--enable-readline \
|
|
--with-readline-header="$CBUILDROOT"/usr/include/readline/readline.h \
|
|
--enable-session \
|
|
--enable-static \
|
|
--enable-fts3 \
|
|
--enable-fts4 \
|
|
--enable-fts5 \
|
|
--soname=legacy
|
|
make
|
|
}
|
|
|
|
check() {
|
|
make check
|
|
}
|
|
|
|
package() {
|
|
make DESTDIR="$pkgdir" install
|
|
|
|
install -Dvm644 "$srcdir"/$pkgname-src-$_ver/LICENSE.md \
|
|
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE.md
|
|
}
|
|
|
|
sha512sums="
|
|
0f59037e537543154711fdfa5707592658121e8b0973eb07396a9fb980e6c0c822717d0a787c564ebd6bf7383a3388f128fce6adbbf98b417909855d42ac8710 sqlite-autoconf-3510200.tar.gz
|
|
89e1c76d6cae41f2ececb85af2e8bfd5cf60e8b9e3d8a48f98f3913513762bc8846f6b5c28e76cca12505ce670cdaf6ca95ecb2267b9527e47929fb928847605 sqlite-src-3510200.zip
|
|
"
|