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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
diff -rupN gnoclCanvas-0.9.95.orig/demo/clockGadget.tcl gnoclCanvas-0.9.95/demo/clockGadget.tcl
--- gnoclCanvas-0.9.95.orig/demo/clockGadget.tcl 2010-04-21 00:37:20.000000000 +0200
+++ gnoclCanvas-0.9.95/demo/clockGadget.tcl 2013-09-09 23:52:06.948384806 +0200
@@ -1,4 +1,3 @@
-# text_dump.tcl
#!/bin/sh
# the next line restarts using tclsh \
exec tclsh "$0" "$@"
diff -rupN gnoclCanvas-0.9.95.orig/demo/test-canvas.tcl gnoclCanvas-0.9.95/demo/test-canvas.tcl
--- gnoclCanvas-0.9.95.orig/demo/test-canvas.tcl 2010-04-21 00:37:20.000000000 +0200
+++ gnoclCanvas-0.9.95/demo/test-canvas.tcl 2013-09-09 23:52:06.948384806 +0200
@@ -1,3 +1,7 @@
+#!/bin/sh
+# the next line restarts using tclsh \
+exec tclsh "$0" "$@"
+
#---------------
# canvastest.tcl
#---------------
@@ -5,10 +9,6 @@
# 02-Nov-2009
#---------------
-#!/bin/sh
-# the next line restarts using tclsh \
-exec tclsh "$0" "$@"
-
package require Gnocl
package require GnoclCanvas
diff -rupN gnoclCanvas-0.9.95.orig/src/Makefile gnoclCanvas-0.9.95/src/Makefile
--- gnoclCanvas-0.9.95.orig/src/Makefile 2010-04-21 00:37:20.000000000 +0200
+++ gnoclCanvas-0.9.95/src/Makefile 2013-09-09 23:52:59.955054391 +0200
@@ -22,7 +22,7 @@ DEFINE:= "DEBUG_CANVAS"
CFLAGS += -pedantic -fPIC -w
TCL_VERSION := $(shell echo 'puts $$tcl_version' | tclsh)
-GNOCL_VERSION := 0.9.95
+GNOCL_VERSION := 0.9.96
ADDCFLAGS := -DVERSION=\"$(VERSION)\" \
-DUSE_TCL_STUBS $(shell pkg-config --cflags gtk+-2.0 libgnomecanvas-2.0 ) \
@@ -30,9 +30,18 @@ ADDCFLAGS := -DVERSION=\"$(VERSION)\" \
-I/usr/include/libglade-2.0 \
-I/usr/local/include
-LIBS := $(shell pkg-config \
- --libs gtk+-2.0 libglade-2.0 libgnomecanvas-2.0) \
- -ltclstub$(TCL_VERSION) -lgnocl-$(GNOCL_VERSION)
+# Note that linking against libgnocl.a doesn't work, as there are some global
+# data structures in gnocl (e.g., the global widget hash table) which need to
+# be shared between gnocl and the different addon modules. To work around this
+# problem, we simply link against the installed gnocl.so Tcl module instead.
+
+#LIBS := -Wl,--no-as-needed $(shell pkg-config \
+# --libs gtk+-2.0 libglade-2.0 libgnomecanvas-2.0) \
+# -ltclstub$(TCL_VERSION) -lgnocl-$(GNOCL_VERSION)
+
+LIBS := /usr/lib/tcl8.6/gnocl$(GNOCL_VERSION)/gnocl.so \
+ $(shell pkg-config --libs gtk+-2.0 libglade-2.0 libgnomecanvas-2.0) \
+ -ltclstub$(TCL_VERSION)
TGZDIR:= $(PACKAGE_NAME)-$(VERSION)$(SUFFIX)
TGZFILE:= $(PACKAGE_NAME)-$(VERSION)$(SUFFIX).tar.bz2
@@ -70,15 +79,15 @@ clean:
rm -f $(GTK_OBJ) $(PACKAGE_NAME).so
install:
- ./install.tcl $(PACKAGE_REQUIRE_NAME) $(VERSION) $(PACKAGE_NAME) install
+ ./install.tcl $(PACKAGE_REQUIRE_NAME) $(VERSION) $(PACKAGE_NAME) install $(DESTDIR)
uninstall:
- ./install.tcl $(PACKAGE_REQUIRE_NAME) $(VERSION) $(PACKAGE_NAME) uninstall
+ ./install.tcl $(PACKAGE_REQUIRE_NAME) $(VERSION) $(PACKAGE_NAME) uninstall $(DESTDIR)
test:
( \
cd ../demo; \
- ./test-canvas.tcl; \
+ ./test-canvas.tcl; \
cd ../src; \
)
diff -rupN gnoclCanvas-0.9.95.orig/src/install.tcl gnoclCanvas-0.9.95/src/install.tcl
--- gnoclCanvas-0.9.95.orig/src/install.tcl 2010-04-21 00:37:20.000000000 +0200
+++ gnoclCanvas-0.9.95/src/install.tcl 2013-09-09 23:55:06.638394701 +0200
@@ -36,13 +36,13 @@ proc date { {i date} } {
}
# error checking
-if { $argc != 4 } {
+if { $argc < 4 || $argc > 5 } {
set name [file tail $argv0]
error "Wrong number of args.\nUsage: $name package version install/uninstall"
}
# get parameters
-foreach {package version name what} $argv { break }
+foreach {package version name what dest} $argv { break }
# get installation directory
set dir [info library]
@@ -51,7 +51,7 @@ set dir [info library]
set destDir [file join $dir $name$version]
switch -- $what {
"install" {
- if { [file exists $destDir] } {
+ if { [file exists $dest$destDir] } {
puts "$destDir exists already. Aborting installation."
exit -1
}
@@ -70,20 +70,20 @@ switch -- $what {
puts $fp "package ifneeded $package $version \[list load \[file join \$dir $name.so\]\]"
close $fp
puts "Creating $destDir"
- file mkdir $destDir
+ file mkdir $dest$destDir
set files [glob *.so]
lappend files pkgIndex.tcl
foreach file $files {
puts "Copying $file"
- file copy $file $destDir
+ file copy $file $dest$destDir
}
}
"uninstall" {
- puts "Deleting $destDir"
- file delete -force $destDir
- }
- default {
- error "unknown type \"$what\" must be install, test or uninstall"
- }
+ puts "Deleting $destDir"
+ file delete -force $dest$destDir
+ }
+ default {
+ error "unknown type \"$what\" must be install, test or uninstall"
+ }
}
|