summaryrefslogtreecommitdiff
path: root/sqlite-drop-tcl-at-sign.patch
blob: a19d9d05eba9b35406cf83967f999061f2a9fa18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Index: tool/buildtclext.tcl
==================================================================
--- tool/buildtclext.tcl
+++ tool/buildtclext.tcl
@@ -105,11 +105,11 @@
   #
   #puts "using $LIBDIR/tclConfig.sh"
   set fd [open $LIBDIR/tclConfig.sh rb]
   set tclConfig [read $fd]
   close $fd
-  
+
   # Extract parameter we will need from the tclConfig.sh file
   #
   set TCLMAJOR 8
   regexp {TCL_MAJOR_VERSION='(\d)'} $tclConfig all TCLMAJOR
   set SUFFIX so
@@ -138,18 +138,21 @@
   regexp {TCL_SHLIB_LD='([^']+)'} $tclConfig all cmd
   set LDFLAGS "$INC -DUSE_TCL_STUBS"
   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/0683a49cb02f31a1
+              # in which Gentoo edits their tclConfig.sh to include an soname
+              # linker flag which includes ${@} (the target file's name).
+  set CMD [subst $cmd]
 }
-  
+
 # Show information about prior installs
 #
 if {$infoonly} {
   set cnt 0
   foreach dir $auto_path {