1 |
bicatali 10/01/29 18:09:11 |
2 |
|
3 |
Added: ds9-6.0-main.patch |
4 |
Log: |
5 |
Version bump |
6 |
(Portage version: 2.2_rc61/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 sci-astronomy/ds9/files/ds9-6.0-main.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-astronomy/ds9/files/ds9-6.0-main.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-astronomy/ds9/files/ds9-6.0-main.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: ds9-6.0-main.patch |
15 |
=================================================================== |
16 |
diff -Nur saods9.orig/ds9/ds9.C saods9/ds9/ds9.C |
17 |
--- saods9.orig/ds9/ds9.C 2009-10-01 17:53:59.000000000 +0100 |
18 |
+++ saods9/ds9/ds9.C 2010-01-29 17:46:20.000000000 +0000 |
19 |
@@ -13,8 +13,6 @@ |
20 |
|
21 |
void TclSetStartupScriptFileName(const char*); |
22 |
|
23 |
- int Zvfs_Init(Tcl_Interp*); |
24 |
- int Zvfs_Mount(Tcl_Interp*, char*, char *); |
25 |
|
26 |
int Blt_Init(Tcl_Interp*); |
27 |
int Tktable_Init(Tcl_Interp*); |
28 |
@@ -73,15 +71,13 @@ |
29 |
appname = dupstr(argv[0]); |
30 |
|
31 |
// set default encoding dir |
32 |
- Tcl_SetDefaultEncodingDir("./zvfsmntpt/tcl8.4"); |
33 |
|
34 |
// so that tcl and tk know where to find their libs |
35 |
// we do it here before InitLibraryPath is called |
36 |
- putenv((char*)"TCL_LIBRARY=./zvfsmntpt/tcl8.4"); |
37 |
- putenv((char*)"TK_LIBRARY=./zvfsmntpt/tk8.4"); |
38 |
+ |
39 |
|
40 |
// invoke startup script |
41 |
- TclSetStartupScriptFileName("./zvfsmntpt/src/ds9.tcl"); |
42 |
+ TclSetStartupScriptFileName("/usr/share/ds9/src/ds9.tcl"); |
43 |
} |
44 |
|
45 |
Tcl_Interp *global_interp; |
46 |
@@ -100,31 +96,8 @@ |
47 |
// We have to initialize the virtual filesystem before calling |
48 |
// Tcl_Init(). Otherwise, Tcl_Init() will not be able to find |
49 |
// its startup script files. |
50 |
- if (Zvfs_Init(interp) == TCL_ERROR) |
51 |
- return TCL_ERROR; |
52 |
- Tcl_StaticPackage (interp, "zvfs", Zvfs_Init, |
53 |
- (Tcl_PackageInitProc*)NULL); |
54 |
|
55 |
// find current working directory, and set as mount point |
56 |
- { |
57 |
- Tcl_DString pwd; |
58 |
- Tcl_DStringInit(&pwd); |
59 |
- Tcl_GetCwd(interp, &pwd); |
60 |
-#ifdef ZIPFILE |
61 |
- ostringstream str; |
62 |
- str << (char *)Tcl_GetNameOfExecutable() |
63 |
- << "/../ds9.zip" |
64 |
- << ends; |
65 |
- if( Zvfs_Mount(interp, (char*)str.str().c_str(), Tcl_DStringValue(&pwd)) != TCL_OK ){ |
66 |
- cerr << "ERROR: The auxiliary ds9 file 'ds9.zip' is missing. If you moved the ds9 program from its original location, please also move the zip file to the same place." << endl; |
67 |
- exit(1); |
68 |
- } |
69 |
-#else |
70 |
- Zvfs_Mount(interp, (char *)Tcl_GetNameOfExecutable(), |
71 |
- Tcl_DStringValue(&pwd)); |
72 |
-#endif |
73 |
- Tcl_DStringFree(&pwd); |
74 |
- } |
75 |
|
76 |
// Initialize Tcl and Tk |
77 |
if (Tcl_Init(interp)) |
78 |
@@ -133,7 +106,6 @@ |
79 |
// Tk |
80 |
if (Tk_Init(interp)) |
81 |
return TCL_ERROR; |
82 |
- Tcl_StaticPackage(interp,"Tk", Tk_Init, Tk_SafeInit); |
83 |
|
84 |
{ |
85 |
Tcl_DString pwd; |
86 |
@@ -142,18 +114,6 @@ |
87 |
Tcl_DStringFree(&pwd); |
88 |
} |
89 |
|
90 |
- // Blt |
91 |
- if (Blt_Init(interp) == TCL_ERROR) |
92 |
- return TCL_ERROR; |
93 |
- Tcl_StaticPackage (interp, "BLT", Blt_Init, |
94 |
- (Tcl_PackageInitProc*)NULL); |
95 |
- |
96 |
- // Tktable |
97 |
- if (Tktable_Init(interp) == TCL_ERROR) |
98 |
- return TCL_ERROR; |
99 |
- Tcl_StaticPackage (interp, "Tktable", Tktable_Init, |
100 |
- (Tcl_PackageInitProc*)NULL); |
101 |
- |
102 |
// Checkdns |
103 |
if (Checkdns_Init(interp) == TCL_ERROR) |
104 |
return TCL_ERROR; |
105 |
@@ -171,13 +131,6 @@ |
106 |
return TCL_ERROR; |
107 |
Tcl_StaticPackage (interp, "tkhtml", Tkhtml_Init, |
108 |
(Tcl_PackageInitProc*)NULL); |
109 |
- |
110 |
- // Tclxpa |
111 |
- if (Tclxpa_Init(interp) == TCL_ERROR) |
112 |
- return TCL_ERROR; |
113 |
- Tcl_StaticPackage (interp, "Tclxpa", Tclxpa_Init, |
114 |
- (Tcl_PackageInitProc*)NULL); |
115 |
- |
116 |
// IIS |
117 |
if (Iis_Init(interp) == TCL_ERROR) |
118 |
return TCL_ERROR; |
119 |
@@ -190,88 +143,6 @@ |
120 |
Tcl_StaticPackage (interp, "tkmpeg", Tkmpeg_Init, |
121 |
(Tcl_PackageInitProc*)NULL); |
122 |
|
123 |
- // Tclxml |
124 |
- if (Tclxml_Init(interp) == TCL_ERROR) |
125 |
- return TCL_ERROR; |
126 |
- |
127 |
- // Tkimg |
128 |
- if (Tkimg_Init(interp) == TCL_ERROR) |
129 |
- return TCL_ERROR; |
130 |
- Tcl_StaticPackage (interp, "img", |
131 |
- Tkimg_Init,(Tcl_PackageInitProc*)NULL); |
132 |
- |
133 |
- // zlibtcl |
134 |
- if (Zlibtcl_Init(interp) == TCL_ERROR) |
135 |
- return TCL_ERROR; |
136 |
- Tcl_StaticPackage (interp, "zlibtcl", Zlibtcl_Init, |
137 |
- (Tcl_PackageInitProc*)NULL); |
138 |
- |
139 |
- // jpegtcl |
140 |
- if (Jpegtcl_Init(interp) == TCL_ERROR) |
141 |
- return TCL_ERROR; |
142 |
- Tcl_StaticPackage (interp, "jpegtcl", Jpegtcl_Init, |
143 |
- (Tcl_PackageInitProc*)NULL); |
144 |
- |
145 |
- // Tkimgjpeg |
146 |
- if (Tkimgjpeg_Init(interp) == TCL_ERROR) |
147 |
- return TCL_ERROR; |
148 |
- Tcl_StaticPackage (interp, "jpeg", Tkimgjpeg_Init, |
149 |
- (Tcl_PackageInitProc*)NULL); |
150 |
- |
151 |
- // Tifftcl |
152 |
- if (Tifftcl_Init(interp) == TCL_ERROR) |
153 |
- return TCL_ERROR; |
154 |
- Tcl_StaticPackage (interp, "tifftcl", Tifftcl_Init, |
155 |
- (Tcl_PackageInitProc*)NULL); |
156 |
- |
157 |
- // Tkimgtiff |
158 |
- if (Tkimgtiff_Init(interp) == TCL_ERROR) |
159 |
- return TCL_ERROR; |
160 |
- Tcl_StaticPackage (interp, "tiff", Tkimgtiff_Init, |
161 |
- (Tcl_PackageInitProc*)NULL); |
162 |
- |
163 |
- // Pngtcl |
164 |
- if (Pngtcl_Init(interp) == TCL_ERROR) |
165 |
- return TCL_ERROR; |
166 |
- Tcl_StaticPackage (interp, "pngtcl", Pngtcl_Init, |
167 |
- (Tcl_PackageInitProc*)NULL); |
168 |
- |
169 |
- // Tkimgpng |
170 |
- if (Tkimgpng_Init(interp) == TCL_ERROR) |
171 |
- return TCL_ERROR; |
172 |
- Tcl_StaticPackage (interp, "png", Tkimgpng_Init, |
173 |
- (Tcl_PackageInitProc*)NULL); |
174 |
- |
175 |
- // Tkimggif |
176 |
- if (Tkimggif_Init(interp) == TCL_ERROR) |
177 |
- return TCL_ERROR; |
178 |
- Tcl_StaticPackage (interp, "gif", Tkimggif_Init, |
179 |
- (Tcl_PackageInitProc*)NULL); |
180 |
- |
181 |
- // Tkimgppm |
182 |
- if (Tkimgppm_Init(interp) == TCL_ERROR) |
183 |
- return TCL_ERROR; |
184 |
- Tcl_StaticPackage (interp, "ppm", Tkimgppm_Init, |
185 |
- (Tcl_PackageInitProc*)NULL); |
186 |
- |
187 |
- // Tkimgbmp |
188 |
- if (Tkimgbmp_Init(interp) == TCL_ERROR) |
189 |
- return TCL_ERROR; |
190 |
- Tcl_StaticPackage (interp, "bmp", Tkimgbmp_Init, |
191 |
- (Tcl_PackageInitProc*)NULL); |
192 |
- |
193 |
- // Tkimgxbm |
194 |
- if (Tkimgxbm_Init(interp) == TCL_ERROR) |
195 |
- return TCL_ERROR; |
196 |
- Tcl_StaticPackage (interp, "xbm", Tkimgxbm_Init, |
197 |
- (Tcl_PackageInitProc*)NULL); |
198 |
- |
199 |
- // Tkimgwindow |
200 |
- if (Tkimgwindow_Init(interp) == TCL_ERROR) |
201 |
- return TCL_ERROR; |
202 |
- Tcl_StaticPackage (interp, "window", Tkimgwindow_Init, |
203 |
- (Tcl_PackageInitProc*)NULL); |
204 |
- |
205 |
// Signal_Ext |
206 |
#ifndef _WIN32 |
207 |
if (Signal_ext_Init(interp) == TCL_ERROR) |
208 |
@@ -294,15 +165,6 @@ |
209 |
(Tcl_PackageInitProc*)NULL); |
210 |
#endif |
211 |
|
212 |
- // Variables |
213 |
- Tcl_SetVar(interp, "auto_path", "./zvfsmntpt/tcl8.4 ./zvfsmntpt/tk8.4 ./zvfsmntpt/blt2.4 ./zvfsmntpt/tcllib1.6 ./zvfsmntpt/src", TCL_GLOBAL_ONLY); |
214 |
- Tcl_SetVar(interp, "tcl_libPath", "./zvfsmntpt/tcl8.4", TCL_GLOBAL_ONLY); |
215 |
- Tcl_SetVar(interp, "blt_library", "./zvfsmntpt/blt2.4", TCL_GLOBAL_ONLY); |
216 |
- Tcl_SetVar(interp, "blt_libPath", "./zvfsmntpt/blt2.4", TCL_GLOBAL_ONLY); |
217 |
- Tcl_SetVar2(interp, "env", "TK_TABLE_LIBRARY", "", TCL_GLOBAL_ONLY); |
218 |
- |
219 |
- //Tcl_SetVar(interp, "tcl_rcFileName", "~/.wishrc", TCL_GLOBAL_ONLY); |
220 |
- |
221 |
return TCL_OK; |
222 |
} |
223 |
|
224 |
diff -Nur saods9.orig/ds9/Makefile saods9/ds9/Makefile |
225 |
--- saods9.orig/ds9/Makefile 2010-01-12 21:24:30.000000000 +0000 |
226 |
+++ saods9/ds9/Makefile 2010-01-29 17:53:29.000000000 +0000 |
227 |
@@ -4,12 +4,7 @@ |
228 |
#--------------------------defines |
229 |
|
230 |
ZDIR = zipdir/zvfsmntpt |
231 |
-FFILES = $(ZDIR)/$(TCLVER) \ |
232 |
- $(ZDIR)/$(TKVER) \ |
233 |
- $(ZDIR)/$(BLTVER) \ |
234 |
- $(ZDIR)/$(TCLLIBVER) \ |
235 |
- $(ZDIR)/$(TKCONVER) \ |
236 |
- $(ZDIR)/$(XMLRPCVER) \ |
237 |
+FFILES = \ |
238 |
$(ZDIR)/src \ |
239 |
$(ZDIR)/msgs \ |
240 |
$(ZDIR)/doc \ |
241 |
@@ -30,43 +25,14 @@ |
242 |
../lib/libsaotk.a \ |
243 |
../lib/libtkhtml.a \ |
244 |
../lib/libtkmpeg.a \ |
245 |
- ../lib/$(TCLXMLVER)/libTclxml3.2.a \ |
246 |
- ../lib/$(TKIMGVER)/libtkimgwindow1.3.a \ |
247 |
- ../lib/$(TKIMGVER)/libtkimgjpeg1.3.a \ |
248 |
- ../lib/$(TKIMGVER)/libjpegtcl1.0.a \ |
249 |
- ../lib/$(TKIMGVER)/libtkimgtiff1.3.a \ |
250 |
- ../lib/$(TKIMGVER)/libtifftcl3.6.1.a \ |
251 |
- ../lib/$(TKIMGVER)/libtkimgpng1.3.a \ |
252 |
- ../lib/$(TKIMGVER)/libpngtcl1.2.6.a \ |
253 |
- ../lib/$(TKIMGVER)/libtkimgppm1.3.a \ |
254 |
- ../lib/$(TKIMGVER)/libtkimggif1.3.a \ |
255 |
- ../lib/$(TKIMGVER)/libtkimgbmp1.3.a \ |
256 |
- ../lib/$(TKIMGVER)/libtkimgxbm1.3.a \ |
257 |
- ../lib/$(TKIMGVER)/libzlibtcl1.2.1.a \ |
258 |
- ../lib/$(TKIMGVER)/libtkimg1.3.a \ |
259 |
- ../lib/$(TKTABLEVER)/libTktable2.9.a \ |
260 |
- ../lib/libfuntools.a \ |
261 |
../lib/librice.a \ |
262 |
../lib/libhcomp.a \ |
263 |
../lib/libplio.a \ |
264 |
- ../lib/libast.a \ |
265 |
- ../lib/libast_err.a \ |
266 |
- ../lib/libast_grf3d.a \ |
267 |
- ../lib/libast_pal.a \ |
268 |
- ../lib/libast_wcslib.a \ |
269 |
../lib/libsaotk.a \ |
270 |
- ../lib/libwcs.a \ |
271 |
../lib/libsla.a \ |
272 |
- ../lib/libzvfs.a \ |
273 |
- ../lib/libzip.a \ |
274 |
- ../lib/libz.a \ |
275 |
- ../lib/libxpa.a \ |
276 |
../lib/libiis.a \ |
277 |
../lib/libcheckdns.a \ |
278 |
- ../lib/libsignal_ext.a \ |
279 |
- ../lib/libBLT24.a \ |
280 |
- ../lib/libtk8.4.a \ |
281 |
- ../lib/libtcl8.4.a |
282 |
+ ../lib/libsignal_ext.a |
283 |
endif |
284 |
|
285 |
ifeq ($(OS),windows) |
286 |
@@ -178,12 +144,9 @@ |
287 |
|
288 |
all: ds9 |
289 |
|
290 |
-ds9 : ds9Base ds9.zip |
291 |
+ds9 : ds9Base |
292 |
$(RM) $@ |
293 |
- cp ds9Base ds9 |
294 |
- strip ds9 |
295 |
- cp ds9 ../bin/. |
296 |
- cp ds9.zip ../bin/. |
297 |
+ cp ds9Base ../bin/ds9 |
298 |
cd ../bin; $(CODESIGN) -s "SAOImage DS9" ds9 |
299 |
|
300 |
debug : ds9Base ds9.zip |
301 |
@@ -199,14 +162,9 @@ |
302 |
|
303 |
all: ds9 |
304 |
|
305 |
-ds9 : null.zip ds9Base $(FILES) |
306 |
+ds9 : ds9Base $(FILES) |
307 |
$(RM) $@ |
308 |
- cp ds9Base ds9.zip |
309 |
- strip ds9.zip |
310 |
- cat null.zip >> ds9.zip |
311 |
- cd zipdir; zip -rA9 ../ds9.zip * |
312 |
- mv ds9.zip ds9 |
313 |
- cp ds9 ../bin/. |
314 |
+ cp ds9Base ../bin/ds9 |
315 |
|
316 |
debug : null.zip ds9Base $(FILES) |
317 |
$(RM) $@ |
318 |
@@ -377,6 +335,23 @@ |
319 |
|
320 |
#--------------------------linux |
321 |
|
322 |
+# for gentoo: get rid of bundled libs |
323 |
+ifneq (,$(findstring gentoo,$(ARCH))) |
324 |
+ds9Base : $(OBJS) $(LIBS) |
325 |
+ $(RM) $@ |
326 |
+ rm -f libstdc++.a |
327 |
+ ln -s `$(CXX) -print-file-name=libstdc++.a` . |
328 |
+ $(CXX) $(LDFLAGS) \ |
329 |
+ $(OBJS) $(LIBS) -o $@ \ |
330 |
+ -Wl,-Bstatic -L. -lstdc++ \ |
331 |
+ -Wl,-Bdynamic -L$(X11LIB) -lX11 \ |
332 |
+ -ldl -lpthread -lxml2 \ |
333 |
+ -ltk -ltcl -lBLT24 \ |
334 |
+ -lfuntools `pkg-config --libs wcstools` -lz \ |
335 |
+ `ast_link` |
336 |
+ rm -f libstdc++.a |
337 |
+endif |
338 |
+ |
339 |
ifneq (,$(findstring linux,$(ARCH))) |
340 |
ds9Base : $(OBJS) $(LIBS) |
341 |
$(RM) $@ |