1 |
bicatali 13/11/05 23:56:14 |
2 |
|
3 |
Added: plplot-5.9.10-itcltk.patch plplot-5.9.10-haru.patch |
4 |
plplot-5.9.10-tcltk.patch plplot-5.9.10-tcl86.patch |
5 |
Log: |
6 |
Fixed tcl/tk binding upgrade (bug #489728), add shared lib soversion slot, use BUILD_DIR instead of CMAKE_BUILD_DIR, fixed calling libharu headers |
7 |
|
8 |
(Portage version: 2.2.7-prefix/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 sci-libs/plplot/files/plplot-5.9.10-itcltk.patch |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/plplot/files/plplot-5.9.10-itcltk.patch?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/plplot/files/plplot-5.9.10-itcltk.patch?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: plplot-5.9.10-itcltk.patch |
17 |
=================================================================== |
18 |
--- bindings/tk/tkMain.c.orig |
19 |
+++ bindings/tk/tkMain.c |
20 |
@@ -85,11 +85,6 @@ |
21 |
|
22 |
// From tclIntDecls.h |
23 |
|
24 |
-#ifndef Tcl_Import_TCL_DECLARED |
25 |
-EXTERN int Tcl_Import _ANSI_ARGS_( ( Tcl_Interp * interp, |
26 |
- Tcl_Namespace * nsPtr, char * pattern, |
27 |
- int allowOverwrite ) ); |
28 |
-#endif |
29 |
|
30 |
#ifndef Tcl_GetGlobalNamespace_TCL_DECLARE |
31 |
EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace _ANSI_ARGS_( ( |
32 |
--- cmake/modules/tcl-related.cmake.orig 2013-10-31 08:57:07.044160099 -0700 |
33 |
+++ cmake/modules/tcl-related.cmake 2013-10-31 08:57:37.854350228 -0700 |
34 |
@@ -94,7 +94,7 @@ |
35 |
message(STATUS "Looking for itcl.h - found") |
36 |
message(STATUS "Looking for itcl library") |
37 |
get_filename_component(TCL_LIBRARY_PATH ${TCL_LIBRARY} PATH) |
38 |
- set(itcl_library_versions 3.4 3.3 3.2 3.1 3.0 2.1 2.0) |
39 |
+ set(itcl_library_versions 4.0.0 3.4 3.3 3.2 3.1 3.0 2.1 2.0) |
40 |
foreach(version ${itcl_library_versions}) |
41 |
find_library(ITCL_LIBRARY itcl${version} PATHS ${TCL_LIBRARY_PATH} |
42 |
PATH_SUFFIXES itcl${version}) |
43 |
@@ -153,7 +153,7 @@ |
44 |
if(ITK_INCLUDE_PATH) |
45 |
message(STATUS "Looking for itk.h - found") |
46 |
message(STATUS "Looking for itk library") |
47 |
- set(itk_library_versions 3.4 3.3 3.2 3.1 3.0 2.1 2.0) |
48 |
+ set(itk_library_versions 4.0.0 3.4 3.3 3.2 3.1 3.0 2.1 2.0) |
49 |
foreach(version ${itk_library_versions}) |
50 |
find_library(ITK_LIBRARY itk${version} |
51 |
PATH_SUFFIXES itk${version}) |
52 |
|
53 |
|
54 |
|
55 |
1.1 sci-libs/plplot/files/plplot-5.9.10-haru.patch |
56 |
|
57 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/plplot/files/plplot-5.9.10-haru.patch?rev=1.1&view=markup |
58 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/plplot/files/plplot-5.9.10-haru.patch?rev=1.1&content-type=text/plain |
59 |
|
60 |
Index: plplot-5.9.10-haru.patch |
61 |
=================================================================== |
62 |
get hpdf header in /usr/include - applied upstream in trunk |
63 |
bicatali nov 2013 |
64 |
|
65 |
--- cmake/modules/Findhpdf.cmake.orig 2013-11-05 14:44:16.088810181 -0800 |
66 |
+++ cmake/modules/Findhpdf.cmake 2013-11-05 14:44:23.264854503 -0800 |
67 |
@@ -8,7 +8,12 @@ |
68 |
# hpdf_LIBRARY_DIRS, the directory where libhpdf (either shared or static) |
69 |
# is found. |
70 |
|
71 |
-find_path(hpdf_INCLUDE_DIR hpdf/hpdf.h /usr/local/include /usr/include) |
72 |
+# Give preference to header found in hpdf subdirectory (which is the |
73 |
+# result of a build and install of upstream libharu), then if not |
74 |
+# found look for the case of no such subdirectory (which is how the |
75 |
+# Debian system version of libharu headers is installed). |
76 |
+find_path(hpdf_INCLUDE_DIR hpdf.h PATHS /usr/local/include /usr/include PATH_SUFFIXES hpdf) |
77 |
+find_path(hpdf_INCLUDE_DIR hpdf.h PATHS /usr/local/include /usr/include) |
78 |
|
79 |
if(hpdf_INCLUDE_DIR) |
80 |
find_library(hpdf_LIBRARY |
81 |
--- drivers/pdf.c.orig 2013-11-05 14:55:58.928226651 -0800 |
82 |
+++ drivers/pdf.c 2013-11-05 14:56:10.534299828 -0800 |
83 |
@@ -38,7 +38,7 @@ |
84 |
#include <math.h> |
85 |
#include <setjmp.h> |
86 |
|
87 |
-#include "hpdf/hpdf.h" |
88 |
+#include "hpdf.h" |
89 |
|
90 |
// PLplot header files |
91 |
#define DEBUG |
92 |
|
93 |
|
94 |
|
95 |
1.1 sci-libs/plplot/files/plplot-5.9.10-tcltk.patch |
96 |
|
97 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/plplot/files/plplot-5.9.10-tcltk.patch?rev=1.1&view=markup |
98 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/plplot/files/plplot-5.9.10-tcltk.patch?rev=1.1&content-type=text/plain |
99 |
|
100 |
Index: plplot-5.9.10-tcltk.patch |
101 |
=================================================================== |
102 |
Allow itcl and itk 4.0.0, applied upstream in trunk |
103 |
bicatali nov 2013 |
104 |
|
105 |
--- cmake/modules/tcl-related.cmake.orig 2013-11-05 11:31:42.436587456 -0800 |
106 |
+++ cmake/modules/tcl-related.cmake 2013-11-05 11:31:54.411661141 -0800 |
107 |
@@ -85,16 +85,16 @@ |
108 |
OUTPUT_VARIABLE AVAILABLE_ITCL) |
109 |
if(AVAILABLE_ITCL) |
110 |
execute_process( |
111 |
- COMMAND ${TCL_TCLSH} GetITCL_Version.tcl |
112 |
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/cmake/modules |
113 |
- OUTPUT_VARIABLE itcl_library_versions) |
114 |
+ COMMAND ${TCL_TCLSH} GetITCL_Version.tcl |
115 |
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/cmake/modules |
116 |
+ OUTPUT_VARIABLE itcl_library_versions) |
117 |
message(STATUS "Looking for itcl.h") |
118 |
find_path(ITCL_INCLUDE_PATH itcl.h ${TCL_INCLUDE_PATH}) |
119 |
if(ITCL_INCLUDE_PATH) |
120 |
message(STATUS "Looking for itcl.h - found") |
121 |
message(STATUS "Looking for itcl library") |
122 |
- get_filename_component(TCL_LIBRARY_PATH ${TCL_LIBRARY} PATH) |
123 |
- set(itcl_library_versions 3.4 3.3 3.2 3.1 3.0 2.1 2.0) |
124 |
+ get_filename_component(TCL_LIBRARY_PATH ${TCL_LIBRARY} PATH) |
125 |
+ set(itcl_library_versions 4.0.0 3.4 3.3 3.2 3.1 3.0 2.1 2.0) |
126 |
foreach(version ${itcl_library_versions}) |
127 |
find_library(ITCL_LIBRARY itcl${version} PATHS ${TCL_LIBRARY_PATH} |
128 |
PATH_SUFFIXES itcl${version}) |
129 |
@@ -132,13 +132,21 @@ |
130 |
else(ENABLE_itcl) |
131 |
set(MKTCLINDEX_ARGS "-tcl") |
132 |
endif(ENABLE_itcl) |
133 |
+ |
134 |
if(ENABLE_tk AND NOT X11_FOUND) |
135 |
message(STATUS "WARNING: X11 not found, disabling Tk interface code") |
136 |
set(ENABLE_tk OFF CACHE BOOL "Enable Tk interface code" FORCE) |
137 |
endif(ENABLE_tk AND NOT X11_FOUND) |
138 |
if(ENABLE_tk) |
139 |
+ get_filename_component(TK_LIBRARY_PATH ${TK_LIBRARY} PATH) |
140 |
+ if(NOT ${TK_LIBRARY_PATH} STREQUAL ${TCL_LIBRARY_PATH}) |
141 |
+ message(STATUS "TCL_LIBRARY_PATH = ${TCL_LIBRARY_PATH}") |
142 |
+ message(STATUS "TK_LIBRARY_PATH = ${TK_LIBRARY_PATH}") |
143 |
+ message(STATUS "WARNING: the Tcl and Tk library locations are inconsistent so those libraries are likely not compatible") |
144 |
+ endif(NOT ${TK_LIBRARY_PATH} STREQUAL ${TCL_LIBRARY_PATH}) |
145 |
+ endif(ENABLE_tk) |
146 |
+ if(ENABLE_tk) |
147 |
set(TK_INCLUDE_PATH ${TK_INCLUDE_PATH} ${X11_INCLUDE_DIR}) |
148 |
- set(TK_LIBRARY ${TK_LIBRARY}) |
149 |
message(STATUS "TK_INCLUDE_PATH = ${TK_INCLUDE_PATH}") |
150 |
message(STATUS "TK_LIBRARY = ${TK_LIBRARY}") |
151 |
else(ENABLE_tk) |
152 |
@@ -153,9 +161,9 @@ |
153 |
if(ITK_INCLUDE_PATH) |
154 |
message(STATUS "Looking for itk.h - found") |
155 |
message(STATUS "Looking for itk library") |
156 |
- set(itk_library_versions 3.4 3.3 3.2 3.1 3.0 2.1 2.0) |
157 |
+ set(itk_library_versions 4.0.0 3.4 3.3 3.2 3.1 3.0 2.1 2.0) |
158 |
foreach(version ${itk_library_versions}) |
159 |
- find_library(ITK_LIBRARY itk${version} |
160 |
+ find_library(ITK_LIBRARY itk${version} PATHS ${TCL_LIBRARY_PATH} |
161 |
PATH_SUFFIXES itk${version}) |
162 |
endforeach(version ${itk_library_versions}) |
163 |
if(ITK_LIBRARY) |
164 |
--- bindings/tk/tkMain.c.orig 2013-11-05 11:34:29.219602234 -0800 |
165 |
+++ bindings/tk/tkMain.c 2013-11-05 11:34:48.394718925 -0800 |
166 |
@@ -1,4 +1,4 @@ |
167 |
-// $Id: plplot-5.9.10-tcltk.patch,v 1.1 2013/11/05 23:56:14 bicatali Exp $ |
168 |
+// $Id: plplot-5.9.10-tcltk.patch,v 1.1 2013/11/05 23:56:14 bicatali Exp $ |
169 |
// |
170 |
// Modified version of tkMain.c, from Tk 3.6. |
171 |
// Maurice LeBrun |
172 |
@@ -85,7 +85,8 @@ |
173 |
|
174 |
// From tclIntDecls.h |
175 |
|
176 |
-#ifndef Tcl_Import_TCL_DECLARED |
177 |
+//#ifndef Tcl_Import_TCL_DECLARED |
178 |
+#if 0 |
179 |
EXTERN int Tcl_Import _ANSI_ARGS_( ( Tcl_Interp * interp, |
180 |
Tcl_Namespace * nsPtr, char * pattern, |
181 |
int allowOverwrite ) ); |
182 |
|
183 |
|
184 |
|
185 |
1.1 sci-libs/plplot/files/plplot-5.9.10-tcl86.patch |
186 |
|
187 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/plplot/files/plplot-5.9.10-tcl86.patch?rev=1.1&view=markup |
188 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/plplot/files/plplot-5.9.10-tcl86.patch?rev=1.1&content-type=text/plain |
189 |
|
190 |
Index: plplot-5.9.10-tcl86.patch |
191 |
=================================================================== |
192 |
Upgrade to tcl-8.6 - not applied upstream |
193 |
bicatali nov 2013 |
194 |
|
195 |
--- drivers/ntk.c.orig 2013-11-05 14:30:01.105432771 -0800 |
196 |
+++ drivers/ntk.c 2013-11-05 14:29:42.632317282 -0800 |
197 |
@@ -115,7 +115,7 @@ |
198 |
// |
199 |
sprintf( scmd, "send %s {%s}", rem_interp, cmd ); // mess! make it more efficient |
200 |
if ( Tcl_Eval( interp, scmd ) != TCL_OK ) |
201 |
- fprintf( stderr, "%s\n", interp->result ); |
202 |
+ fprintf( stderr, "%s\n", Tcl_GetStringResult(interp) ); |
203 |
} |
204 |
} |
205 |
|
206 |
@@ -264,7 +264,7 @@ |
207 |
sprintf( cmd, "send %s \"set client [tk appname]; wm deiconify .\"", rem_interp ); |
208 |
if ( Tcl_Eval( interp, cmd ) != TCL_OK ) |
209 |
{ |
210 |
- fprintf( stderr, "%s\n", interp->result ); |
211 |
+ fprintf( stderr, "%s\n", Tcl_GetStringResult(interp) ); |
212 |
plexit( "No such tk server." ); |
213 |
} |
214 |
} |
215 |
@@ -301,7 +301,7 @@ |
216 |
// Set up device parameters |
217 |
|
218 |
Tcl_Eval( interp, "tk scaling" ); // pixels per mm |
219 |
- ppm = (PLFLT) atof( interp->result ) / ( 25.4 / 72. ); |
220 |
+ ppm = (PLFLT) atof( Tcl_GetStringResult(interp) ) / ( 25.4 / 72. ); |
221 |
plP_setpxl( ppm, ppm ); |
222 |
plP_setphy( xmin, xmax * scale, ymin, ymax * scale ); |
223 |
} |
224 |
@@ -371,11 +371,11 @@ |
225 |
{ |
226 |
tk_cmd( "update" ); |
227 |
tk_cmd( "info exists keypress" ); |
228 |
- sscanf( interp->result, "%d", &st ); |
229 |
+ sscanf( Tcl_GetStringResult(interp), "%d", &st ); |
230 |
} |
231 |
|
232 |
tk_cmd( "set keypress" ); |
233 |
- sscanf( interp->result, "%d", &key ); |
234 |
+ sscanf( Tcl_GetStringResult(interp), "%d", &key ); |
235 |
//fprintf(stderr,"\n%d\n", key);fflush(stderr); |
236 |
tk_cmd( "unset keypress" ); |
237 |
st = 0; |
238 |
@@ -433,7 +433,7 @@ |
239 |
{ |
240 |
tk_cmd( "update" ); |
241 |
tk_cmd( "winfo exists $plf.f2.c$ccanv" ); |
242 |
- sscanf( interp->result, "%d", &st ); |
243 |
+ sscanf( Tcl_GetStringResult(interp), "%d", &st ); |
244 |
} |
245 |
st = 0; |
246 |
// this give a "Segmentation fault", even after checking for the canvas! |
247 |
@@ -450,16 +450,16 @@ |
248 |
{ |
249 |
tk_cmd( "update" ); |
250 |
tk_cmd( "info exists xloc" ); |
251 |
- sscanf( interp->result, "%d", &st ); |
252 |
+ sscanf( Tcl_GetStringResult(interp), "%d", &st ); |
253 |
} |
254 |
tk_cmd( "set xloc" ); |
255 |
- sscanf( interp->result, "%d", &gin.pX ); |
256 |
+ sscanf( Tcl_GetStringResult(interp), "%d", &gin.pX ); |
257 |
tk_cmd( "set yloc" ); |
258 |
- sscanf( interp->result, "%d", &gin.pY ); |
259 |
+ sscanf( Tcl_GetStringResult(interp), "%d", &gin.pY ); |
260 |
tk_cmd( "set bloc" ); |
261 |
- sscanf( interp->result, "%d", &gin.button ); |
262 |
+ sscanf( Tcl_GetStringResult(interp), "%d", &gin.button ); |
263 |
tk_cmd( "set sloc" ); |
264 |
- sscanf( interp->result, "%d", &gin.state ); |
265 |
+ sscanf( Tcl_GetStringResult(interp), "%d", &gin.state ); |
266 |
|
267 |
gin.dX = (PLFLT) gin.pX / xmax; |
268 |
gin.dY = 1. - (PLFLT) gin.pY / ymax; |