Skip to content

Commit

Permalink
sqlite3: update to 3.47.2
Browse files Browse the repository at this point in the history
  • Loading branch information
MehdiChinoune committed Dec 9, 2024
1 parent ef3033c commit 08a5617
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 38 deletions.
11 changes: 11 additions & 0 deletions mingw-w64-sqlite3/0002-fix-building-sqldiff.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/Makefile.in
+++ b/Makefile.in
@@ -695,7 +695,7 @@
$(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"

sqldiff$(TEXE): $(TOP)/tool/sqldiff.c $(TOP)/ext/misc/sqlite3_stdio.h sqlite3.lo sqlite3.h
- $(LTLINK) -I$(TOP)/ext/misc -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
+ $(LTLINK) -I$(TOP)/ext/misc -o $@ $(TOP)/tool/sqldiff.c $(TOP)\ext\misc\sqlite3_stdio.c sqlite3.lo $(TLIBS)

dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
$(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)

This file was deleted.

11 changes: 11 additions & 0 deletions mingw-w64-sqlite3/0003-do-not-install-tclsqlite3-with-make.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/Makefile.in
+++ b/Makefile.in
@@ -1580,7 +1580,7 @@
tcl_install_0 =
tcl_install_1 = tclextension-install

-install: sqlite3$(TEXE) lib_install sqlite3.h sqlite3.pc $(tcl_install_$(HAVE_TCL))
+install: sqlite3$(TEXE) lib_install sqlite3.h sqlite3.pc
$(INSTALL) -d $(DESTDIR)$(bindir)
$(LTINSTALL) sqlite3$(TEXE) $(DESTDIR)$(bindir)
$(INSTALL) -d $(DESTDIR)$(includedir)
67 changes: 40 additions & 27 deletions mingw-w64-sqlite3/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,58 +5,70 @@
_realname=sqlite3
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
"${MINGW_PACKAGE_PREFIX}-sqlite-docs")
$([[ ${CARCH} == i686 ]] || echo "${MINGW_PACKAGE_PREFIX}-sqlite-docs"))
_sqlite_year=2024
_amalgamationver=3460100
_amalgamationver=3470200
_docver=${_amalgamationver}
pkgver=3.46.1
pkgver=3.47.2
pkgrel=1
pkgdesc="A C library that implements an SQL database engine (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url="https://www.sqlite.org/"
msys2_repository_url="https://www.sqlite.org/cgi/src/dir?ci=trunk"
msys2_references=(
'archlinux: sqlite'
"cpe: cpe:/a:sqlite:sqlite"
)
msys2_repository_url="https://www.sqlite.org/cgi/src/dir?ci=trunk"
license=(PublicDomain)
url="https://www.sqlite.org/"
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
"${MINGW_PACKAGE_PREFIX}-readline"
"${MINGW_PACKAGE_PREFIX}-tcl"
depends=($([[ ${CARCH} == i686 ]] || echo "${MINGW_PACKAGE_PREFIX}-readline")
"${MINGW_PACKAGE_PREFIX}-zlib")
makedepends=("${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-autotools")
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-autotools"
"${MINGW_PACKAGE_PREFIX}-tcl")
source=(https://www.sqlite.org/${_sqlite_year}/sqlite-src-${_amalgamationver}.zip
https://www.sqlite.org/${_sqlite_year}/sqlite-doc-${_docver}.zip
0001-sqlite-pcachetrace-include-sqlite3.patch
0002-sqlite-sqldiff-makefile-add-console-io.patch
0002-fix-building-sqldiff.patch
0003-do-not-install-tclsqlite3-with-make.patch
Makefile.ext.in
README.md.in
LICENSE)
sha256sums=('def3fc292eb9ecc444f6c1950e5c79d8462ed5e7b3d605fd6152d145e1d5abb4'
'e969131f93ca79fbc64d57724a1035735881555a52600dbe69c69eab72c9fcd1'
sha256sums=('e6a471f1238225f34c2c48c5601b54024cc538044368230f59ff0672be1fc623'
'6dcca89a6749029fba81bc0f4188cbd4f78acb48d6a3eadc6d548af9117c3f41'
'6518119034ceb2820d058afcb099d11f636271f55a41ffae22855af66a369166'
'4f85775d239b82b5031494a87814838b145d347876dfe0ace4b1d45d03192408'
'9eed63acd9c1423faabca6a53cddaf649227d698999d67b1fe06971437b0e1a1'
'a500428a3434075932de84247b1405f3d73e7ed0a8b664eb20a736bd02d6ed29'
'4a8a87289253529cf04c916e5743c8727a5506b5185bc9bd4070b42037e8ae20'
'5ca42f1f92abfb61bacc9ff60f5836cc56e2ce2af52264f918cb06c3d566d562'
'0b76663a90e034f3d7f2af5bfada4cedec5ebc275361899eccc5c18e6f01ff1f')
options=('staticlibs' '!buildflags')

# From Debian sqlite3-tools
_sqlite_tools="showdb.exe showjournal.exe showstat4.exe showwal.exe sqlite3_analyzer.exe dbhash.exe sqldiff.exe"
_sqlite_tools="showdb.exe showjournal.exe showstat4.exe showwal.exe dbhash.exe sqldiff.exe"
if [[ ${CARCH} != i686 ]]; then
_sqlite_tools+=" sqlite3_analyzer.exe"
fi

prepare() {
cd "sqlite-src-${_amalgamationver}"
patch -p1 -i "${srcdir}/0001-sqlite-pcachetrace-include-sqlite3.patch"
patch -p1 -i "${srcdir}/0002-sqlite-sqldiff-makefile-add-console-io.patch"
patch -p1 -i "${srcdir}/0002-fix-building-sqldiff.patch"
# Installing tclsqlite3 fails on Windows.
patch -p1 -i "${srcdir}/0003-do-not-install-tclsqlite3-with-make.patch"
}

build() {
test -d ${srcdir}/build-${MSYSTEM} && rm -rf ${srcdir}/build-${MSYSTEM}
mkdir -p ${srcdir}/build-${MSYSTEM} && cd ${srcdir}/build-${MSYSTEM}

export lt_cv_deplibs_check_method='pass_all'

declare -a _extra_config
if [[ ${CARCH} != i686 ]]; then
_extra_config+=("--enable-readline" "--enable-tcl")
else
_extra_config+=("--disable-readline" "--disable-tcl")
fi

declare -a SQLITE_OPTIONS=(
"-DSQLITE_ENABLE_COLUMN_METADATA=1"
"-DSQLITE_USE_MALLOC_H=1"
Expand All @@ -71,16 +83,13 @@ build() {

../sqlite-src-${_amalgamationver}/configure -C \
--prefix=${MINGW_PREFIX} \
--host=${MINGW_CHOST} \
--target=${MINGW_CHOST} \
--build=${MINGW_CHOST} \
--enable-threadsafe \
--disable-editline \
--enable-readline \
--enable-all \
--enable-session \
--with-readline-inc=-I${MINGW_PREFIX}/include \
--with-tcl=${MINGW_PREFIX}/lib \
"${_extra_config[@]}" \
TCLLIBDIR=${MINGW_PREFIX}/lib/sqlite${pkgver}

make
Expand All @@ -100,19 +109,23 @@ check() {
}

package_sqlite3() {
provides=(${MINGW_PACKAGE_PREFIX}-sqlite=${pkgver}
${MINGW_PACKAGE_PREFIX}-sqlite-analyzer=${pkgver})
conflicts=(${MINGW_PACKAGE_PREFIX}-sqlite-analyzer)
replaces=(${MINGW_PACKAGE_PREFIX}-sqlite-analyzer)
if [[ ${CARCH} != i686 ]]; then
optdepends=("${MINGW_PACKAGE_PREFIX}-tcl: for sqlite3_analyzer")
provides=(${MINGW_PACKAGE_PREFIX}-sqlite=${pkgver}
${MINGW_PACKAGE_PREFIX}-sqlite-analyzer=${pkgver})
conflicts=(${MINGW_PACKAGE_PREFIX}-sqlite-analyzer)
replaces=(${MINGW_PACKAGE_PREFIX}-sqlite-analyzer)
fi

cd ${srcdir}/build-${MSYSTEM}
make DESTDIR="${pkgdir}" install

for tools in ${_sqlite_tools}; do
install -Dm755 .libs/$tools "${pkgdir}${MINGW_PREFIX}/bin/$tools"
done
mv ${pkgdir}${MINGW_PREFIX}/lib/bin/*.* ${pkgdir}${MINGW_PREFIX}/lib/sqlite${pkgver}/
rm -rf ${pkgdir}${MINGW_PREFIX}/lib/bin
# Move tcl dlls
# mv ${pkgdir}${MINGW_PREFIX}/lib/bin/*.* ${pkgdir}${MINGW_PREFIX}/lib/sqlite${pkgver}/
# rm -rf ${pkgdir}${MINGW_PREFIX}/lib/bin

# Install extensions
make -C ext/misc DESTDIR="${pkgdir}" install
Expand Down

0 comments on commit 08a5617

Please sign in to comment.