Skip to content

Commit 325eedf

Browse files
committed
sqlite(3.32.3): remove dependency on version-dependent 3rd-party patch
This commit as a heavy overhaul removes the dependency on a version-dependent third-party patch which obfuscates what is going on and prevents transparent maintenance. As an intermediate step the split package 'sqlite-extensions' is temporarily removed, but is added back in the subsequent commit to make more understandable the commit series this commit is part of. The overall goal is to compile the splite package together with packaging all of its MSYS2 split-packages straight out of the box for each sqlite package release. * PKGBUILD: - switch from source package 'sqlite-autoconf-XXXXXXX.tar.gz' to 'sqlite-src-XXXXXXX.zip' which contains the extension source code - remove 'sqlite-3.28.0-msys2.patch' which is obsolete since its changes are overridden by 'autoreconf' - remove 'sqlite-3.28.0-msys2.patch' provided by third party and comprising not well maintained sqlite extension code - add three patches for flawless package compilation - build package rather in separate build directory instead in source code directory (VPATH compilation) - note that targets of the split package 'tcl-sqlite' are now built by the main 'make' run (instead of a separate configure step when using sqlite-autoconf-XXXXXXX.tar.gz as source package) - sqlite split-packages are restructured as follows, in line with the overall structure of the sqlite package (as of 3.32.3): - sqlite-compress : moved to 'sqlite-extensions' - sqlite-extensions : added back in subsequent commit (!) - sqlite-icu : extension obsolete since icu compiled into sqlite3.exe by default - sqlite-rbu : extension moved to 'sqlite-extensions', executable to 'sqlite' - sqlite-vfslog : moved to 'sqlite-extensions' * sqlite-3.28.0-msys2.patch: removed since obsolete after running 'autoreconf'. * sqlite3-3.32.3-1.src.patch: removed as third-party patch * other patches: fix compilation and installation bugs
1 parent a0f03ed commit 325eedf

6 files changed

+156
-109755
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From a2193226b26851e45a863f2f2a749d291dd4c478 Mon Sep 17 00:00:00 2001
2+
From: Jannick <[email protected]>
3+
Date: Sat, 8 Aug 2020 14:03:25 +0200
4+
Subject: [PATCH 1/3] configure.ac: fix OS recognition on MSYS2
5+
6+
---
7+
configure.ac | 44 ++++++++++++++++++++++----------------------
8+
1 file changed, 22 insertions(+), 22 deletions(-)
9+
10+
diff --git a/configure.ac b/configure.ac
11+
index ef70a4f..f293c8a 100644
12+
--- a/configure.ac
13+
+++ b/configure.ac
14+
@@ -269,7 +269,7 @@ if test x"$cross_compiling" = xno; then
15+
else
16+
TARGET_EXEEXT=$config_TARGET_EXEEXT
17+
fi
18+
-if test "$TARGET_EXEEXT" = ".exe"; then
19+
+if test "$TARGET_EXEEXT" = ".exe" && test x$CYGWIN != xyes; then
20+
SQLITE_OS_UNIX=0
21+
SQLITE_OS_WIN=1
22+
CFLAGS="$CFLAGS -DSQLITE_OS_WIN=1"
23+
--
24+
2.28.0.windows.1
25+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
From 40ca95b26d0dfc122fdc4d25d204236ae6aac06f Mon Sep 17 00:00:00 2001
2+
From: Jannick <[email protected]>
3+
Date: Sat, 8 Aug 2020 14:07:41 +0200
4+
Subject: [PATCH 2/3] Makefile.in: fix rule compiling rbu.exe
5+
6+
---
7+
Makefile.in | 4 ++--
8+
1 file changed, 2 insertions(+), 2 deletions(-)
9+
10+
diff --git a/Makefile.in b/Makefile.in
11+
index 1341dee..2820e37 100644
12+
--- a/Makefile.in
13+
+++ b/Makefile.in
14+
@@ -1368,8 +1368,8 @@ KV_OPT += -DSQLITE_DIRECT_OVERFLOW_READ
15+
kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
16+
$(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
17+
18+
-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
19+
- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
20+
+rbu$(TEXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
21+
+ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo $(TLIBS)
22+
23+
loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
24+
$(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
25+
--
26+
2.28.0.windows.1
27+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
From 64fe648e9cb54a0ee8ee9e9d7feefebcb2381adb Mon Sep 17 00:00:00 2001
2+
From: Jannick <[email protected]>
3+
Date: Sat, 8 Aug 2020 14:09:51 +0200
4+
Subject: [PATCH] Makefile.in: fix libtclsqlite package installation bug
5+
6+
The shared object of libtclsqlite3 referenced by pkgIndex.tcl is NOT
7+
placed next to pkgIndex.tcl after installation by libtool.
8+
9+
- using the flag -module instructs libtool to place the shared object
10+
libtclsqlite3 in TCLLIBDIR upon installation.
11+
- paste the shared library name from the libtool file 'libtclsqlite3.la'
12+
into 'pkgIndex.tcl'.
13+
---
14+
Makefile.in | 6 +++---
15+
1 file changed, 3 insertions(+), 3 deletions(-)
16+
17+
diff --git a/Makefile.in b/Makefile.in
18+
index f92741f..589c9f6 100644
19+
--- a/Makefile.in
20+
+++ b/Makefile.in
21+
@@ -644,7 +644,7 @@ libsqlite3.la: $(LIBOBJ)
22+
${ALLOWRELEASE} -rpath "$(libdir)" -version-info "8:6:8"
23+
24+
libtclsqlite3.la: tclsqlite.lo libsqlite3.la
25+
- $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
26+
+ $(LTLINK) -module -no-undefined -o $@ tclsqlite.lo \
27+
libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
28+
-rpath "$(TCLLIBDIR)" \
29+
-version-info "8:6:8" \
30+
@@ -1434,8 +1434,8 @@ install: sqlite3$(TEXE) lib_install sqlite3.h sqlite3.pc ${HAVE_TCL:1=tcl_instal
31+
$(INSTALL) -d $(DESTDIR)$(pkgconfigdir)
32+
$(INSTALL) -m 0644 sqlite3.pc $(DESTDIR)$(pkgconfigdir)
33+
34+
-pkgIndex.tcl:
35+
- echo 'package ifneeded sqlite3 $(RELEASE) [list load [file join $$dir libtclsqlite3[info sharedlibextension]] sqlite3]' > $@
36+
+pkgIndex.tcl: libtclsqlite3.la
37+
+ echo 'package ifneeded sqlite3 $(RELEASE) [list load [file join $$dir '`source ./$< && echo $$dlname`'] sqlite3]' > $@
38+
tcl_install: lib_install libtclsqlite3.la pkgIndex.tcl
39+
$(INSTALL) -d $(DESTDIR)$(TCLLIBDIR)
40+
$(LTINSTALL) libtclsqlite3.la $(DESTDIR)$(TCLLIBDIR)
41+
--
42+
2.28.0.windows.1
43+

0 commit comments

Comments
 (0)