summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-11-17 03:38:20 +0000
committerCoprDistGit <infra@openeuler.org>2024-11-17 03:38:20 +0000
commit5d3ce69d6c9f5718c4b7d7c7eb63e94478bf65d8 (patch)
tree35a92ded62e92fb5b4aa8a40dbebba95aca753e2
parente41dc95891813db288881d56d3a49b7f288f58f9 (diff)
automatic import of sqlite
-rw-r--r--sqlite-Add-DESTDIR-support-to-the-tclextension-install-target.patch54
1 files changed, 49 insertions, 5 deletions
diff --git a/sqlite-Add-DESTDIR-support-to-the-tclextension-install-target.patch b/sqlite-Add-DESTDIR-support-to-the-tclextension-install-target.patch
index 4e88d16..1b04d25 100644
--- a/sqlite-Add-DESTDIR-support-to-the-tclextension-install-target.patch
+++ b/sqlite-Add-DESTDIR-support-to-the-tclextension-install-target.patch
@@ -46,21 +46,65 @@ Index: tool/buildtclext.tcl
} elseif {[string match -* $a0]} {
append OPTS " $a0"
} else {
-@@ -193,7 +198,7 @@
+@@ -245,7 +250,7 @@
+
+ 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
+Index: tool/buildtclext.tcl
+==================================================================
+--- tool/buildtclext.tcl
++++ tool/buildtclext.tcl
+@@ -196,11 +196,19 @@
+ # Figure out where the extension will be installed. Put the extension
+ # in the first writable directory on $auto_path.
#
set DEST {}
foreach dir $auto_path {
- if {[file writable $dir]} {
-+ if {[file writable ${DESTDIR}$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]!=""} {
-@@ -245,7 +250,7 @@
+ set conflict [lindex [glob $dir/sqlite3*/pkgIndex.tcl] 0]
+ puts "Unable to install. There is already a conflicting version"
+@@ -214,11 +222,11 @@
+ puts "None of the directories on \$auto_path are writable by this process,"
+ puts "so the installation cannot take place. Consider running using sudo"
+ 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
+ }
+ }
+
+@@ -248,12 +256,12 @@
+ }
+
if {$install} {
# Install the extension
-- set DEST2 $DEST/sqlite$VERSION
-+ set DEST2 ${DESTDIR}$DEST/sqlite$VERSION
+- 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
+ puts "installing $DEST2/$OUT"
+ file copy -force $OUT $DEST2
+ }
+