It was reported on IRC that installing wget on appveyor wont update icu which results in icu not being found due to an ABI bump/dll rename. Bumping the version requirements of icu users should fix this.
170 lines
5.2 KiB
Bash
170 lines
5.2 KiB
Bash
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
|
# Contributor: Renato Silva <br.renatosilva@gmail.com>
|
|
|
|
pkgbase="sqlite"
|
|
pkgname=('sqlite' 'libsqlite' 'libsqlite-devel' 'sqlite-doc')
|
|
_amalgamationver=3190300
|
|
_docver=${_amalgamationver}
|
|
pkgver=3.19.3.0
|
|
pkgrel=2
|
|
pkgdesc="A C library that implements an SQL database engine"
|
|
arch=('i686' 'x86_64')
|
|
license=(PublicDomain)
|
|
url="https://www.sqlite.org/"
|
|
depends=('libreadline' 'icu>=59.1' 'zlib')
|
|
makedepends=('libreadline-devel' 'icu-devel' 'zlib-devel')
|
|
source=( # tarball containing the amalgamation for SQLite >= 3.7.5 together with a configure script and makefile for building it; includes now also the Tcl Extension Architecture (TEA)
|
|
https://www.sqlite.org/2017/sqlite-autoconf-${_amalgamationver}.tar.gz
|
|
https://www.sqlite.org/2017/sqlite-doc-${_docver}.zip
|
|
LICENSE
|
|
'sqlite3-3.19.3-1.src.patch'
|
|
'sqlite-3.19.3-msys2.patch')
|
|
options=('!libtool' '!emptydirs' '!debug' 'strip')
|
|
sha256sums=('06129c03dced9f87733a8cba408871bd60673b8f93b920ba8d815efab0a06301'
|
|
'62cda70d5285e35144ddfd4629df8fadc2bae8dbcb43d0638aa874c1c03de101'
|
|
'1e188e0cf2088da923bff80c76a9f13b7028d4688d2d49cdb10562718068ee98'
|
|
'eff485c13f4bde21ea59e642593aef446bbdc5dbab8f7102aca59ac23fa7f25e'
|
|
'843cf2e8197ac7b634dc751e122ca4020085cdd64a68e993bfbb75a35907208f')
|
|
|
|
# Helper macros to help make tasks easier #
|
|
apply_patch_with_msg() {
|
|
for _patch in "$@"
|
|
do
|
|
msg2 "Applying $_patch"
|
|
patch -Nbp1 -i "${srcdir}/${_patch}"
|
|
done
|
|
}
|
|
|
|
apply_patch_with_msg_p2() {
|
|
for _patch in "$@"
|
|
do
|
|
msg2 "Applying $_patch"
|
|
patch -Nbp2 -i "${srcdir}/${_patch}"
|
|
done
|
|
}
|
|
|
|
|
|
del_file_exists() {
|
|
for _fname in "$@"
|
|
do
|
|
if [ -f $_fname ]; then
|
|
rm -rf $_fname
|
|
fi
|
|
done
|
|
}
|
|
# =========================================== #
|
|
|
|
|
|
prepare() {
|
|
cd "${srcdir}"/sqlite-autoconf-${_amalgamationver}
|
|
del_file_exists README amatch.c anycollseq.c carray.c closure.c compress.c csv.c \
|
|
eval.c fileio.c fuzzer.c icu.c ieee754.c json1.c \
|
|
memvfs.c nextchar.c percentile.c \
|
|
rbu.c regexp.c remember.c rot13.c \
|
|
scrub.c series.c sha1.c shathree.c showauth.c spaceanal.tcl spellfix.c sqldiff.c sqlite3rbu.c sqlite3rbu.h \
|
|
totype.c vfslog.c vfsstat.c vtshim.c wholenumber.c
|
|
|
|
apply_patch_with_msg_p2 sqlite3-3.19.3-1.src.patch
|
|
apply_patch_with_msg sqlite-3.19.3-msys2.patch
|
|
|
|
autoreconf -fi
|
|
}
|
|
|
|
build() {
|
|
export CPPFLAGS="$CPPFLAGS \
|
|
-DHAVE_MALLOC_H \
|
|
-DHAVE_MALLOC_USABLE_SIZE \
|
|
-DSQLITE_ENABLE_DBSTAT_VTAB=1 \
|
|
-DSQLITE_ENABLE_STAT4=1 \
|
|
-DSQLITE_ENABLE_UNLOCK_NOTIFY=1 \
|
|
-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 \
|
|
-DSQLITE_OMIT_LOOKASIDE \
|
|
-DSQLITE_OS_UNIX=1 \
|
|
-DSQLITE_OS_WIN=1 \
|
|
-DSQLITE_SECURE_DELETE=1 \
|
|
-DSQLITE_ENABLE_SESSION=1 \
|
|
-DSQLITE_ENABLE_PREUPDATE_HOOK=1 \
|
|
-DSQLITE_SOUNDEX=1 \
|
|
-DSQLITE_TEMP_STORE=1 \
|
|
-DSQLITE_USE_FCNTL_TRACE=1 \
|
|
-DUSE_SYSTEM_SQLITE=1 \
|
|
-DSQLITE_ENABLE_FTS3_PARENTHESIS=1"
|
|
|
|
cd "${srcdir}"/sqlite-autoconf-$_amalgamationver
|
|
./configure \
|
|
--prefix=/usr \
|
|
--sysconfdir=/etc \
|
|
--localstatedir=/var \
|
|
--build=${CHOST} \
|
|
--enable-shared \
|
|
--enable-static \
|
|
--enable-readline --disable-editline \
|
|
--enable-fts5 --enable-json1
|
|
|
|
make
|
|
make DESTDIR=${srcdir}/dest install
|
|
}
|
|
|
|
_install_license() {
|
|
install -D -m644 ${srcdir}/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
|
|
}
|
|
|
|
package_sqlite() {
|
|
pkgdesc="A C library that implements an SQL database engine"
|
|
depends=('libreadline' 'libsqlite')
|
|
provides=("sqlite3=${pkgver}")
|
|
replaces=("sqlite3")
|
|
|
|
mkdir -p ${pkgdir}/usr/bin
|
|
cp -f ${srcdir}/dest/usr/bin/*.exe ${pkgdir}/usr/bin/
|
|
cp -rf ${srcdir}/dest/usr/share ${pkgdir}/usr/
|
|
_install_license
|
|
}
|
|
|
|
package_libsqlite() {
|
|
pkgdesc="Sqlite3 library"
|
|
groups=('libraries')
|
|
|
|
mkdir -p ${pkgdir}/usr/bin
|
|
cp -f ${srcdir}/dest/usr/bin/*.dll ${pkgdir}/usr/bin/
|
|
_install_license
|
|
}
|
|
|
|
package_libsqlite-devel() {
|
|
pkgdesc="Sqlite3 headers and libraries"
|
|
groups=('development')
|
|
depends=("libsqlite=${pkgver}")
|
|
options+=('staticlibs')
|
|
|
|
mkdir -p ${pkgdir}/usr
|
|
cp -rf ${srcdir}/dest/usr/include ${pkgdir}/usr/
|
|
cp -rf ${srcdir}/dest/usr/lib ${pkgdir}/usr/
|
|
_install_license
|
|
}
|
|
|
|
package_sqlite-doc() {
|
|
pkgdesc="Most of the static HTML files that comprise this website, including all of the SQL Syntax and the C/C++ interface specs and other miscellaneous documentation"
|
|
#arch=('any') - not yet supported
|
|
provides=("sqlite3-doc=$pkgver")
|
|
replaces=("sqlite3-doc")
|
|
|
|
#cd ${srcdir}/sqlite-doc-${_amalgamationver}
|
|
cd ${srcdir}/sqlite-doc-${_docver}
|
|
mkdir -p ${pkgdir}/usr/share/doc/${pkgbase}
|
|
cp -R * ${pkgdir}/usr/share/doc/${pkgbase}/
|
|
|
|
# fix permissions and remove obsolete files; https://bugs.archlinux.org/task/24605
|
|
find ${pkgdir} -type f -perm 755 -exec ls -lha {} \;
|
|
find ${pkgdir} -type f -perm 755 -exec chmod 644 {} \;
|
|
|
|
find ${pkgdir} -type f -name '*~' -exec ls -lha {} \;
|
|
find ${pkgdir} -type d -name '*~' -exec ls -lha {} \;
|
|
find ${pkgdir} -name '*~' -exec rm -f {} \;
|
|
|
|
find ${pkgdir} -type f -name '.~*' -exec ls -lha {} \; # /build/pkg/sqlite-doc/usr/share/doc/sqlite/images/fileformat/.~lock.indexpage.odg#
|
|
find ${pkgdir} -type d -name '.~*' -exec ls -lha {} \;
|
|
find ${pkgdir} -name '.~*' -exec rm -f {} \;
|
|
|
|
_install_license
|
|
}
|