Skip to content

Commit d192748

Browse files
committed
Update to SQLite 3.49.0
1 parent 770844a commit d192748

File tree

3 files changed

+38
-37
lines changed

3 files changed

+38
-37
lines changed

sqlite/build.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ recipe_dir=$(dirname $(realpath $0))
55

66
# Unfortunately the URL represents the version as an integer, and also includes a year
77
# subdirectory. For example, version 3.39.2 is at /2022/sqlite-autoconf-3390200.tar.gz.
8-
year=2024
98
version=${1:?}
109
read major minor micro < <(echo $version | tr '.' ' ')
1110
version_int=$(printf "%d%02d%02d00" $major $minor $micro)
@@ -39,10 +38,9 @@ tar -xf $version_dir/$src_filename
3938
cd $(basename $src_filename .tar.gz)
4039

4140
patch -p1 -i "$recipe_dir/soname.patch"
42-
patch -p1 -i "$recipe_dir/strerror_r.patch"
4341

4442
CFLAGS+=" -Os" # This is off by default, but it's recommended in the README.
45-
./configure --host=$HOST --disable-static --disable-static-shell --with-pic
43+
./configure --host=$HOST --disable-static
4644
make -j $CPU_COUNT
4745

4846
prefix=$build_dir/prefix

sqlite/soname.patch

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,39 @@
1-
--- a/configure 2024-04-15 13:46:16.000000000 +0000
2-
+++ b/configure 2024-10-12 18:41:30.139425614 +0000
3-
@@ -12522,8 +12522,18 @@
4-
version_type=none # Android doesn't support versioned libraries.
5-
need_lib_prefix=no
6-
need_version=no
7-
- library_names_spec='$libname$release$shared_ext'
8-
- soname_spec='$libname$release$shared_ext'
1+
--- a/Makefile.in 2025-02-06 13:59:25
2+
+++ b/Makefile.in 2025-02-10 19:15:31
3+
@@ -120,7 +120,17 @@
4+
$(LDFLAGS.math) $(LDFLAGS.dlopen) \
5+
$(LDFLAGS.zlib) $(LDFLAGS.icu) \
6+
$(LDFLAGS.configure)
7+
-LDFLAGS.libsqlite3.soname = @LDFLAGS_LIBSQLITE3_SONAME@
98
+
10-
+ # CPython: We add a _python suffix to avoid conflict with libraries of the
11-
+ # same name that are provided by Android itself, or other components of an
12-
+ # app.
13-
+ #
14-
+ # We used to do this with patchelf, but patching a library before stripping
15-
+ # it may corrupt it (https://github.com/NixOS/patchelf/issues/507). And the
16-
+ # Android Gradle plugin will strip all libraries in an app, if its preferred
17-
+ # NDK version is installed.
18-
+ library_names_spec='${libname}_python$release$shared_ext $libname$release$shared_ext'
19-
+ soname_spec='${libname}_python$release$shared_ext'
9+
+# CPython: We add a _python suffix to avoid conflict with libraries of the
10+
+# same name that are provided by Android itself, or other components of an
11+
+# app.
12+
+#
13+
+# We used to do this with patchelf, but patching a library before stripping
14+
+# it may corrupt it (https://github.com/NixOS/patchelf/issues/507). And the
15+
+# Android Gradle plugin will strip all libraries in an app, if its preferred
16+
+# NDK version is installed.
17+
+LDFLAGS.libsqlite3.soname = -Wl,-soname,libsqlite3_python.so
2018
+
21-
finish_cmds=
22-
shlibpath_var=LD_LIBRARY_PATH
23-
shlibpath_overrides_runpath=yes
19+
CFLAGS.libsqlite3 = -I. $(CFLAGS.core) $(CFLAGS.icu) $(OPT_FEATURE_FLAGS)
20+
21+
sqlite3.o: sqlite3.h sqlite3.c
22+
@@ -140,12 +150,13 @@
23+
24+
install-so-1: $(install-dir.lib) $(libsqlite3.SO)
25+
$(INSTALL) $(libsqlite3.SO) "$(install-dir.lib)"
26+
+ # CPython: see comment above about the _python suffix.
27+
@echo "Setting up $(libsqlite3.SO) symlinks..."; \
28+
cd "$(install-dir.lib)" || exit $$?; \
29+
- rm -f $(libsqlite3.SO).0 $(libsqlite3.SO).$(PACKAGE_VERSION) || exit $$?; \
30+
- mv $(libsqlite3.SO) $(libsqlite3.SO).$(PACKAGE_VERSION) || exit $$?; \
31+
- ln -s $(libsqlite3.SO).$(PACKAGE_VERSION) $(libsqlite3.SO) || exit $$?; \
32+
- ln -s $(libsqlite3.SO).$(PACKAGE_VERSION) $(libsqlite3.SO).0 || exit $$?; \
33+
+ rm -f $(libsqlite3.SO).0 libsqlite3_python.so || exit $$?; \
34+
+ mv $(libsqlite3.SO) libsqlite3_python.so || exit $$?; \
35+
+ ln -s libsqlite3_python.so $(libsqlite3.SO) || exit $$?; \
36+
+ ln -s libsqlite3_python.so $(libsqlite3.SO).0 || exit $$?; \
37+
ls -la $(libsqlite3.SO) $(libsqlite3.SO).[03]*; \
38+
if [ -e $(libsqlite3.SO).0.8.6 ]; then \
39+
echo "ACHTUNG: legacy libtool-compatible install found. Re-linking it..."; \

sqlite/strerror_r.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)