public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Jakov Smolić" <jsmolic@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
Date: Sat, 16 Nov 2024 18:20:25 +0000 (UTC)	[thread overview]
Message-ID: <1731781197.4f5b65e1dc625a4101cb11b0c02d8ae1af3f2284.jsmolic@gentoo> (raw)

commit:     4f5b65e1dc625a4101cb11b0c02d8ae1af3f2284
Author:     Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 16 18:18:44 2024 +0000
Commit:     Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
CommitDate: Sat Nov 16 18:19:57 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f5b65e1

dev-db/sqlite: Fix build with USE=tcl

Closes: https://bugs.gentoo.org/942918
Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org>

 .../sqlite/files/sqlite-3.47.0-buildtclext.patch   | 122 +++++++++++++++++++++
 dev-db/sqlite/sqlite-3.47.0-r1.ebuild              |   1 +
 2 files changed, 123 insertions(+)

diff --git a/dev-db/sqlite/files/sqlite-3.47.0-buildtclext.patch b/dev-db/sqlite/files/sqlite-3.47.0-buildtclext.patch
new file mode 100644
index 000000000000..491674f5e993
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.47.0-buildtclext.patch
@@ -0,0 +1,122 @@
+# https://sqlite.org/forum/forumpost/0683a49cb02f31a1
+# https://bugs.gentoo.org/942918
+# Compiled from https://sqlite.org/forum/forumpost/6fd4ca69e86eafc6, https://www.sqlite.org/src/info/38136b33f9536b63 and https://www.sqlite.org/src/info/2f6e5946cf34e094
+
+--- a/tool/buildtclext.tcl
++++ b/tool/buildtclext.tcl
+@@ -140,12 +140,13 @@
+   if {[string length $OPTS]>1} {
+     append LDFLAGS $OPTS
+   }
+-  set CMD [subst $cmd]
+   if {$TCLMAJOR>8} {
+     set OUT libtcl9sqlite$VERSION.$SUFFIX
+   } else {
+     set OUT libsqlite$VERSION.$SUFFIX
+   }
++  set @ $OUT; # workaround for https://sqlite.org/forum/forumpost/6b1af7eb10884373
++  set CMD [subst $cmd]
+ }
+   
+ # Show information about prior installs
+
+From b03592c324a4d066e12c3af945dd510dc28b6d65 Mon Sep 17 00:00:00 2001
+From: stephan <stephan@noemail.net>
+Date: Sat, 16 Nov 2024 14:33:01 +0000
+Subject: [PATCH] Add DESTDIR support to the tclextension-install target, via
+ [67a3ca0c013b] and [d1663cf05f7d].
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -1600,7 +1600,7 @@ tclextension:	tclsqlite3.c
+ # to find it.
+ #
+ tclextension-install:	tclsqlite3.c
+-	$(TCLSH_CMD) $(TOP)/tool/buildtclext.tcl --cc "$(CC)" $(CFLAGS) $(OPT_FEATURE_FLAGS) $(OPTS)
++	$(TCLSH_CMD) $(TOP)/tool/buildtclext.tcl --destdir "$(DESTDIR)" --cc "$(CC)" $(CFLAGS) $(OPT_FEATURE_FLAGS) $(OPTS)
+ 
+ # Install the SQLite TCL extension that is used by $TCLSH_CMD
+ #
++38136b33f9536b63520d3810f397a3b4b5372028b31108806f84fe44bf338425
+--- a/tool/buildtclext.tcl
++++ b/tool/buildtclext.tcl
+@@ -15,6 +15,7 @@ Options:
+    --info               Show info on existing SQLite TCL extension installs
+    --install-only       Install an extension previously build
+    --uninstall          Uninstall the extension
++   --destdir DIR        Installation root (used by "make install DESTDIR=...")
+ 
+ Other options are retained and passed through into the compiler.}
+ 
+@@ -25,6 +26,7 @@ set uninstall 0
+ set infoonly 0
+ set CC {}
+ set OPTS {}
++set DESTDIR ""; # --destdir "$(DESTDIR)"
+ for {set ii 0} {$ii<[llength $argv]} {incr ii} {
+   set a0 [lindex $argv $ii]
+   if {$a0=="--install-only"} {
+@@ -42,6 +44,9 @@ for {set ii 0} {$ii<[llength $argv]} {incr ii} {
+   } elseif {$a0=="--cc" && $ii+1<[llength $argv]} {
+     incr ii
+     set CC [lindex $argv $ii]
++  } elseif {$a0=="--destdir" && $ii+1<[llength $argv]} {
++    incr ii
++    set DESTDIR [lindex $argv $ii]
+   } elseif {[string match -* $a0]} {
+     append OPTS " $a0"
+   } else {
+@@ -245,7 +250,7 @@ package ifneeded sqlite3 $VERSION \\
+ 
+ if {$install} {
+   # Install the extension
+-  set DEST2 $DEST/sqlite$VERSION
++  set DEST2 ${DESTDIR}$DEST/sqlite$VERSION
+   file mkdir $DEST2
+   puts "installing $DEST2/pkgIndex.tcl"
+   file copy -force pkgIndex.tcl $DEST2
+
+From 375552f224813c7e2fac0e67dd13ecd6ba3a3571 Mon Sep 17 00:00:00 2001
+From: stephan <stephan@noemail.net>
+Date: Sat, 16 Nov 2024 17:12:17 +0000
+Subject: [PATCH] Handle DESTDIR at an earlier phase in buildtclext.tcl to
+ account for the is-writable-dir check and to filter out //zipfs: dirs as
+ (im)possible installation targets.
+--- a/tool/buildtclext.tcl
++++ b/tool/buildtclext.tcl
+@@ -198,7 +198,15 @@ if {$install} {
+   #
+   set DEST {}
+   foreach dir $auto_path {
+-    if {[file writable $dir]} {
++    if {[string match //*:* $dir]} {
++      # We can't install to //zipfs: paths
++      continue
++    } elseif {"" ne $DESTDIR && ![file writable $DESTDIR]} {
++      continue
++    }
++    set dir ${DESTDIR}$dir
++    if {[file writable $dir] || "" ne $DESTDIR} {
++      # the dir will be created later ^^^^^^^^
+       set DEST $dir
+       break
+     } elseif {[glob -nocomplain $dir/sqlite3*/pkgIndex.tcl]!=""} {
+@@ -216,7 +224,7 @@ if {$install} {
+     puts "to work around this problem.\n"
+     puts "These are the (unwritable) \$auto_path directories:\n"
+     foreach dir $auto_path {
+-      puts "  *  $dir"
++      puts "  *  ${DESTDIR}$dir"
+     }
+     exit 1
+   }
+@@ -250,7 +258,7 @@ package ifneeded sqlite3 $VERSION \\
+
+ if {$install} {
+   # Install the extension
+-  set DEST2 ${DESTDIR}$DEST/sqlite$VERSION
++  set DEST2 $DEST/sqlite$VERSION
+   file mkdir $DEST2
+   puts "installing $DEST2/pkgIndex.tcl"
+   file copy -force pkgIndex.tcl $DEST2
+

diff --git a/dev-db/sqlite/sqlite-3.47.0-r1.ebuild b/dev-db/sqlite/sqlite-3.47.0-r1.ebuild
index c7033bdf2661..b3dd1b416b61 100644
--- a/dev-db/sqlite/sqlite-3.47.0-r1.ebuild
+++ b/dev-db/sqlite/sqlite-3.47.0-r1.ebuild
@@ -54,6 +54,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-3.45.1-ppc64-ptr.patch
 	"${FILESDIR}"/${PN}-3.47.0-nonbash.patch
 	"${FILESDIR}"/${PN}-3.47.0-allocator-mismatch.patch
+	"${FILESDIR}"/${PN}-3.47.0-buildtclext.patch
 )
 
 _fossil_fetch() {


             reply	other threads:[~2024-11-16 18:20 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-16 18:20 Jakov Smolić [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-03-01 19:10 [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/ Jakov Smolić
2024-02-06  3:26 Sam James
2023-04-17 17:30 Jakov Smolić
2023-03-23 22:39 Sam James
2022-11-25  3:40 Sam James
2021-04-02 15:00 Mike Gilbert
2021-03-26 14:38 Mike Gilbert
2021-03-26 14:38 Mike Gilbert
2020-12-28  0:01 Mike Gilbert
2020-12-27 18:39 Mike Gilbert
2020-09-15 18:34 Mike Gilbert
2020-07-29 18:46 Mike Gilbert
2020-07-04 13:53 Mike Gilbert
2020-07-04 13:53 Mike Gilbert
2020-03-09 19:29 Mike Gilbert
2019-12-06 20:25 Mike Gilbert
2019-05-05 19:05 Mike Gilbert
2019-02-25 21:25 Mike Gilbert
2018-12-19 17:59 Mike Gilbert
2018-10-02 20:08 Mike Gilbert
2018-06-13 14:36 Mike Gilbert
2018-04-16 18:29 Mike Gilbert
2018-04-16 18:29 Mike Gilbert
2018-02-12 19:16 Mike Gilbert
2017-11-01 20:54 Mike Gilbert
2017-11-01 20:54 Mike Gilbert
2017-09-28 17:18 Mike Gilbert
2017-08-04 18:39 Mike Gilbert
2017-04-04 19:50 Mike Gilbert
2016-11-10 18:19 Mike Gilbert
2016-08-16 18:37 Mike Gilbert
2016-04-02 21:31 Mike Gilbert
2016-03-03  1:54 Mike Gilbert
2016-02-20 17:23 Pacho Ramos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1731781197.4f5b65e1dc625a4101cb11b0c02d8ae1af3f2284.jsmolic@gentoo \
    --to=jsmolic@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox