summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sqlite-Add-DESTDIR-support-to-the-tclextension-install-target.patch35
1 files changed, 13 insertions, 22 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 129d980..4e88d16 100644
--- a/sqlite-Add-DESTDIR-support-to-the-tclextension-install-target.patch
+++ b/sqlite-Add-DESTDIR-support-to-the-tclextension-install-target.patch
@@ -20,9 +20,7 @@ Index: tool/buildtclext.tcl
==================================================================
--- tool/buildtclext.tcl
+++ tool/buildtclext.tcl
-@@ -13,10 +13,11 @@
- --build-only Only build the extension, don't install it
- --cc COMPILER Build using this compiler
+@@ -15,6 +15,7 @@
--info Show info on existing SQLite TCL extension installs
--install-only Install an extension previously build
--uninstall Uninstall the extension
@@ -30,11 +28,7 @@ Index: tool/buildtclext.tcl
Other options are retained and passed through into the compiler.}
-
- set build 1
-@@ -23,10 +24,11 @@
- set install 1
- set uninstall 0
+@@ -25,6 +26,7 @@
set infoonly 0
set CC {}
set OPTS {}
@@ -42,11 +36,7 @@ Index: tool/buildtclext.tcl
for {set ii 0} {$ii<[llength $argv]} {incr ii} {
set a0 [lindex $argv $ii]
if {$a0=="--install-only"} {
- set build 0
- } elseif {$a0=="--build-only"} {
-@@ -40,10 +42,13 @@
- set install 0
- set infoonly 1
+@@ -42,6 +44,9 @@
} elseif {$a0=="--cc" && $ii+1<[llength $argv]} {
incr ii
set CC [lindex $argv $ii]
@@ -56,11 +46,16 @@ Index: tool/buildtclext.tcl
} elseif {[string match -* $a0]} {
append OPTS " $a0"
} else {
- puts stderr "Unknown option: \"$a0\"\n"
- puts stderr $help
-@@ -243,12 +248,12 @@
- }
-
+@@ -193,7 +198,7 @@
+ #
+ set DEST {}
+ foreach dir $auto_path {
+- if {[file writable $dir]} {
++ if {[file writable ${DESTDIR}$dir]} {
+ set DEST $dir
+ break
+ } elseif {[glob -nocomplain $dir/sqlite3*/pkgIndex.tcl]!=""} {
+@@ -245,7 +250,7 @@
if {$install} {
# Install the extension
@@ -69,7 +64,3 @@ Index: tool/buildtclext.tcl
file mkdir $DEST2
puts "installing $DEST2/pkgIndex.tcl"
file copy -force pkgIndex.tcl $DEST2
- puts "installing $DEST2/$OUT"
- file copy -force $OUT $DEST2
- }
-