Hi László,

find attached a revised version of the ICU patch, now only addressing ICU (and not another extension with it).

This extra bin:pkg sqlite3-mod-icu is an absolutely must-have for qtcontacts-sqlite, the addressbook storage backend of lomiri-addressbook-app.

Please upload the changes proposed to Debian unstable asap, so that our Lomiri testers can check if non-ASCII character support works in lomiri-addressbook-app. Thanks!!!

Thanks!
Mike


--

mike gabriel aka sunweaver (Debian Developer)
mobile: +49 (1520) 1976 148
landline: +49 (4351) 486 14 27

GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22  0782 9AF4 6B30 2577 1B31
mail: sunwea...@debian.org, http://sunweavers.net

diff -Nru sqlite3-3.46.1/debian/changelog sqlite3-3.46.1/debian/changelog
--- sqlite3-3.46.1/debian/changelog     2024-08-14 21:40:03.000000000 +0200
+++ sqlite3-3.46.1/debian/changelog     2024-05-24 09:18:30.000000000 +0200
@@ -1,3 +1,12 @@
+sqlite3 (3.46.1-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * debian/:
+    + Build ICU extension as dynamically loadable library and ship it in 
bin:pkg
+      libsqlite3-mod-icu.
+
+ -- Mike Gabriel <sunwea...@debian.org>  Fri, 24 May 2024 09:18:30 +0200
+
 sqlite3 (3.46.1-1) unstable; urgency=medium
 
   * New upstream release.
diff -Nru sqlite3-3.46.1/debian/control sqlite3-3.46.1/debian/control
--- sqlite3-3.46.1/debian/control       2024-05-30 19:37:02.000000000 +0200
+++ sqlite3-3.46.1/debian/control       2024-05-24 09:18:30.000000000 +0200
@@ -2,7 +2,7 @@
 Section: devel
 Priority: optional
 Maintainer: Laszlo Boszormenyi (GCS) <g...@debian.org>
-Build-Depends: debhelper-compat (= 13), autoconf (>= 2.59), libtool (>= 
1.5.2), automake, chrpath, lynx, libreadline-dev, tcl8.6-dev
+Build-Depends: debhelper-compat (= 13), autoconf (>= 2.59), libtool (>= 
1.5.2), automake, chrpath, lynx, libreadline-dev, tcl8.6-dev, libicu-dev
 Build-Conflicts: tcl8.4, tcl8.4-dev, tcl8.5, tcl8.5-dev
 Standards-Version: 4.7.0
 Rules-Requires-Root: no
@@ -85,6 +85,19 @@
  .
  This package contains the Tcl bindings.
 
+Package: libsqlite3-mod-icu
+Suggests: sqlite3-doc
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: SQLite 3 ICU extension
+ SQLite is a C library that implements an SQL database engine.
+ Programs that link with the SQLite library can have SQL database
+ access without running a separate RDBMS process.
+ .
+ This package contains the ICU extension as dynamically loadable
+ library.
+
 Package: sqlite3-tools
 Suggests: sqlite3-doc
 Section: database
diff -Nru sqlite3-3.46.1/debian/libsqlite3-mod-icu.install 
sqlite3-3.46.1/debian/libsqlite3-mod-icu.install
--- sqlite3-3.46.1/debian/libsqlite3-mod-icu.install    1970-01-01 
01:00:00.000000000 +0100
+++ sqlite3-3.46.1/debian/libsqlite3-mod-icu.install    2024-05-24 
09:18:30.000000000 +0200
@@ -0,0 +1 @@
+usr/lib/*/libSqliteIcu.so
diff -Nru sqlite3-3.46.1/debian/rules sqlite3-3.46.1/debian/rules
--- sqlite3-3.46.1/debian/rules 2024-03-13 21:16:30.000000000 +0100
+++ sqlite3-3.46.1/debian/rules 2024-05-24 09:18:30.000000000 +0200
@@ -99,6 +99,7 @@
        $(MAKE) lemon
 endif
        cd ext/misc && $(HOST_CC) $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) -g -fPIC 
-I../.. -shared csv.c -o csv.so
+       cd ext/icu  && $(HOST_CC) $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) -g -fPIC 
-I../.. -I../../src -shared icu.c $(shell pkg-config --libs --cflags icu-uc 
icu-io) -o libSqliteIcu.so
 
        touch $@
 
@@ -110,6 +111,7 @@
        [ ! -f Makefile ] || $(MAKE) distclean
        rm -f config.h sqlite3session.h mksourceid
        rm -f ext/misc/csv.so
+       rm -f ext/icu/libSqliteIcu.so
        dh_autoreconf_clean
        dh_clean
 
@@ -132,6 +134,18 @@
        install -d $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/sqlite/
        install -m 0775 ext/misc/csv.so \
                $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/sqlite/
+       # This extension should actually go into 
/usr/lib/$(DEB_HOST_MULTIARCH)/sqlite3,
+       # but the extension loader does not support loading the extension 
module from
+       # there without specifying the full path. Consumers of libSqliteIcu.so
+       # expect the extension to be loadable without full path given, so drop 
the
+       # ICU extension in LIBDIR directly instead. (See: 
https://bugs.debian.org/958530).
+       #
+       # Cave: Debian policy violation.
+       #
+       # However, other Sqlite3 extensions such as those from src:pkg 
sqliteodbc also
+       # install their Sqlite3 extensions to LIBDIR for the same reason.
+       install -m 0775 ext/icu/libSqliteIcu.so \
+               $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/
 
        # Remove *.la files per policy 3.9.1.0
        rm $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/libsqlite3.la

Attachment: pgpif3MHYm4A7.pgp
Description: Digitale PGP-Signatur

Reply via email to