MSYS2-packages/sqlite/0007-sqlite3.32.3-Makefile.in-fix-libtclsqlite-package-installation-bug.patch
Jannick 325eedfc14 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
2020-08-24 10:06:49 +02:00

44 lines
1.7 KiB
Diff

From 64fe648e9cb54a0ee8ee9e9d7feefebcb2381adb Mon Sep 17 00:00:00 2001
From: Jannick <thirdedition@gmx.net>
Date: Sat, 8 Aug 2020 14:09:51 +0200
Subject: [PATCH] Makefile.in: fix libtclsqlite package installation bug
The shared object of libtclsqlite3 referenced by pkgIndex.tcl is NOT
placed next to pkgIndex.tcl after installation by libtool.
- using the flag -module instructs libtool to place the shared object
libtclsqlite3 in TCLLIBDIR upon installation.
- paste the shared library name from the libtool file 'libtclsqlite3.la'
into 'pkgIndex.tcl'.
---
Makefile.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index f92741f..589c9f6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -644,7 +644,7 @@ libsqlite3.la: $(LIBOBJ)
${ALLOWRELEASE} -rpath "$(libdir)" -version-info "8:6:8"
libtclsqlite3.la: tclsqlite.lo libsqlite3.la
- $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
+ $(LTLINK) -module -no-undefined -o $@ tclsqlite.lo \
libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
-rpath "$(TCLLIBDIR)" \
-version-info "8:6:8" \
@@ -1434,8 +1434,8 @@ install: sqlite3$(TEXE) lib_install sqlite3.h sqlite3.pc ${HAVE_TCL:1=tcl_instal
$(INSTALL) -d $(DESTDIR)$(pkgconfigdir)
$(INSTALL) -m 0644 sqlite3.pc $(DESTDIR)$(pkgconfigdir)
-pkgIndex.tcl:
- echo 'package ifneeded sqlite3 $(RELEASE) [list load [file join $$dir libtclsqlite3[info sharedlibextension]] sqlite3]' > $@
+pkgIndex.tcl: libtclsqlite3.la
+ echo 'package ifneeded sqlite3 $(RELEASE) [list load [file join $$dir '`source ./$< && echo $$dlname`'] sqlite3]' > $@
tcl_install: lib_install libtclsqlite3.la pkgIndex.tcl
$(INSTALL) -d $(DESTDIR)$(TCLLIBDIR)
$(LTINSTALL) libtclsqlite3.la $(DESTDIR)$(TCLLIBDIR)
--
2.28.0.windows.1