File: tksao-Initialize-tkblt-stubs-and-include-path-to-libxml2.patch

package info (click to toggle)
saods9 8.6%2Brepack-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,272 kB
  • sloc: tcl: 78,253; cpp: 71,015; ansic: 3,955; xml: 1,555; sh: 968; makefile: 183; perl: 68
file content (61 lines) | stat: -rw-r--r-- 1,914 bytes parent folder | download | duplicates (2)
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
From: Ole Streicher <olebole@debian.org>
Date: Fri, 14 Apr 2017 13:30:17 +0200
Subject: [tksao] Initialize tkblt stubs and include path to libxml2

This resolves a crash when using vertical/horizontal graphs.
Closes: #859777
It also helps building on FreeBSD and GNU HURD.
---
 tksao/configure.ac | 9 ++++++---
 tksao/saotk.C      | 4 ++++
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/tksao/configure.ac b/tksao/configure.ac
index c14da09..5798588 100644
--- a/tksao/configure.ac
+++ b/tksao/configure.ac
@@ -248,8 +248,11 @@ widget/widget.C
 ])
 
 TEA_ADD_HEADERS([])
-TEA_ADD_INCLUDES([-I. -I./colorbar -I./frame -I./list -I./magnifier -I./panner -I./tkutil -I./widget -I${prefix}/include])
-TEA_ADD_LIBS([])
+TEA_ADD_INCLUDES([-I. -I../util -I../vector -I../fitsy -I./colorbar -I./frame -I./list -I./magnifier -I./panner -I./tkutil -I./widget -I${prefix}/include -I/usr/include/libxml2])
+TEA_ADD_LIBS([-lstarlink_ast -lstarlink_ast_err -lfuntools -ltkbltstub -lxml2])
+TEA_ADD_STUB_SOURCES([])
+TEA_ADD_TCL_SOURCES([])
+
 case $system in
     Darwin* )
 	case `arch` in
@@ -262,7 +265,7 @@ case $system in
 	esac
 	;;
     *)
-	TEA_ADD_CFLAGS([])
+	TEA_ADD_CFLAGS([-DUSE_TKBLT_STUBS])
 	;;
 esac
 TEA_ADD_STUB_SOURCES([])
diff --git a/tksao/saotk.C b/tksao/saotk.C
index 1e1fb0a..4a53d65 100644
--- a/tksao/saotk.C
+++ b/tksao/saotk.C
@@ -4,6 +4,8 @@
 
 #include <tk.h>
 
+extern const char* Tkblt_InitStubs(Tcl_Interp*, const char*, int);
+
 extern int FrameTrueColor8_Init(Tcl_Interp*);
 extern int FrameTrueColor16_Init(Tcl_Interp*);
 extern int FrameTrueColor24_Init(Tcl_Interp*);
@@ -64,6 +66,8 @@ int Tksao_Init(Tcl_Interp* interp) {
     return TCL_ERROR;
   if (Tk_InitStubs(interp, TK_PATCH_LEVEL, 0) == NULL)
     return TCL_ERROR;
+  if (Tkblt_InitStubs(interp, "3.2", 0) == NULL)
+    return TCL_ERROR;
 
   if (FrameTrueColor8_Init(interp) == TCL_ERROR)
     return TCL_ERROR;