Gentoo Archives: gentoo-commits

From: "Göktürk Yüksek" <gokturk@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/xfig/files/
Date: Wed, 28 Dec 2016 16:49:13
Message-Id: 1482943652.259f780a0cb56182531c874df7dac505b209cbd9.gokturk@gentoo
1 commit: 259f780a0cb56182531c874df7dac505b209cbd9
2 Author: Michael Mair-Keimberger (asterix) <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Wed Dec 28 16:02:15 2016 +0000
4 Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
5 CommitDate: Wed Dec 28 16:47:32 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=259f780a
7
8 media-gfx/xfig: remove unused patches
9
10 .../xfig/files/xfig-3.2.5b-CVE-2010-4262.patch | 22 --
11 media-gfx/xfig/files/xfig-3.2.5b-darwin.patch | 22 --
12 media-gfx/xfig/files/xfig-3.2.5b-edit-menu.patch | 332 ---------------------
13 .../xfig/files/xfig-3.2.5b-figparserstack.patch | 61 ----
14 .../xfig/files/xfig-3.2.5b-fix-eps-reading.patch | 46 ---
15 media-gfx/xfig/files/xfig-3.2.5b-libpng-1.5.patch | 70 -----
16 media-gfx/xfig/files/xfig-3.2.5b-spelling.patch | 29 --
17 .../xfig/files/xfig-3.2.5b-zoom-during-edit.patch | 22 --
18 8 files changed, 604 deletions(-)
19
20 diff --git a/media-gfx/xfig/files/xfig-3.2.5b-CVE-2010-4262.patch b/media-gfx/xfig/files/xfig-3.2.5b-CVE-2010-4262.patch
21 deleted file mode 100644
22 index eb85513..00000000
23 --- a/media-gfx/xfig/files/xfig-3.2.5b-CVE-2010-4262.patch
24 +++ /dev/null
25 @@ -1,22 +0,0 @@
26 ---- w_msgpanel.c
27 -+++ w_msgpanel.c 2010-12-03 14:21:07.931926127 +0000
28 -@@ -60,7 +60,7 @@ DeclareStaticArgs(12);
29 - /* for the popup message (file_msg) window */
30 -
31 - static int file_msg_length=0;
32 --static char tmpstr[300];
33 -+static char tmpstr[512];
34 - static Widget file_msg_panel,
35 - file_msg_win, file_msg_dismiss;
36 -
37 -@@ -582,8 +582,8 @@ file_msg(char *format,...)
38 - }
39 -
40 - va_start(ap, format);
41 -- /* format the string */
42 -- vsprintf(tmpstr, format, ap);
43 -+ /* format the string (but leave room for \n and \0) */
44 -+ vsnprintf(tmpstr, sizeof(tmpstr)-2, format, ap);
45 - va_end(ap);
46 -
47 - strcat(tmpstr,"\n");
48
49 diff --git a/media-gfx/xfig/files/xfig-3.2.5b-darwin.patch b/media-gfx/xfig/files/xfig-3.2.5b-darwin.patch
50 deleted file mode 100644
51 index 0c4fa29..00000000
52 --- a/media-gfx/xfig/files/xfig-3.2.5b-darwin.patch
53 +++ /dev/null
54 @@ -1,22 +0,0 @@
55 ---- fig.h
56 -+++ fig.h
57 -@@ -374,7 +374,7 @@
58 - extern long random();
59 - extern void srandom(unsigned int);
60 -
61 --#elif !defined(__osf__) && !defined(__CYGWIN__) && !defined(linux) && !defined(__FreeBSD__) && !defined(__GLIBC__)
62 -+#elif !defined(__osf__) && !defined(__CYGWIN__) && !defined(linux) && !defined(__FreeBSD__) && !defined(__DARWIN__) && !defined(__GLIBC__)
63 - extern void srandom(int);
64 -
65 - #endif
66 ---- w_keyboard.c
67 -+++ w_keyboard.c
68 -@@ -41,7 +41,7 @@
69 - #define REG_NOERROR REG_OKAY
70 - #endif
71 -
72 --#if defined(__FreeBSD__) && !defined(REG_NOERROR)
73 -+#if (defined(__FreeBSD__) || defined(__DARWIN__)) && !defined(REG_NOERROR)
74 - #define REG_NOERROR 0
75 - #endif
76 -
77
78 diff --git a/media-gfx/xfig/files/xfig-3.2.5b-edit-menu.patch b/media-gfx/xfig/files/xfig-3.2.5b-edit-menu.patch
79 deleted file mode 100644
80 index ea396f1..00000000
81 --- a/media-gfx/xfig/files/xfig-3.2.5b-edit-menu.patch
82 +++ /dev/null
83 @@ -1,332 +0,0 @@
84 -diff -Naur /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/Imakefile /root/xfig.3.2.5b/Imakefile
85 ---- /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/Imakefile 2012-04-20 09:46:26.217957716 +0200
86 -+++ /root/xfig.3.2.5b/Imakefile 2012-04-20 09:16:28.744362135 +0200
87 -@@ -251,7 +251,7 @@
88 - #endif /* USEJPEG */
89 -
90 - #ifdef I18N
91 --I18N_DEFS = -DI18N -DSETLOCALE
92 -+I18N_DEFS = -DI18N -DSETLOCALE -DXAW_INTERNATIONALIZATION
93 - I18N_SRC = w_i18n.c
94 - I18N_OBJ = w_i18n.o
95 - #endif
96 -diff -Naur /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/e_edit.c /root/xfig.3.2.5b/e_edit.c
97 ---- /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/e_edit.c 2007-04-04 18:18:32.000000000 +0200
98 -+++ /root/xfig.3.2.5b/e_edit.c 2012-04-20 10:02:04.209542848 +0200
99 -@@ -3211,7 +3211,7 @@
100 - XtAddCallback(but1, XtNcallback,
101 - (XtCallbackProc) grab_button, (XtPointer) NULL);
102 -
103 -- if ( cur_image_editor != NULL && *cur_image_editor != (char) NULL) {
104 -+ if ( cur_image_editor != NULL && *cur_image_editor != '\0' ) {
105 - FirstArg(XtNlabel,"Edit Image");
106 - NextArg(XtNfromHoriz, but1);
107 - NextArg(XtNfromVert, label);
108 -@@ -3501,7 +3501,7 @@
109 - {
110 - Widget but_spline[3];
111 - Dimension label_height, label_width;
112 -- int i, dist;
113 -+ int i, dist;
114 -
115 - static char use_item[]="Edit the behavior\nof the control point";
116 -
117 -@@ -3598,7 +3598,7 @@
118 - below = but_spline[i] = XtCreateManagedWidget(sfactor_type[i].label,
119 - commandWidgetClass, form, Args, ArgCount);
120 - XtAddCallback(but_spline[i], XtNcallback,
121 -- (XtCallbackProc) toggle_sfactor_type, (XtPointer) i);
122 -+ (XtCallbackProc) toggle_sfactor_type, (XtPointer) (intptr_t) i);
123 - XtSetArg(Args[0], XtNfromVert, below); /* here are the direct */
124 - XtSetArg(Args[1], XtNvertDistance, 3 * dist); /* accesses to Args */
125 - }
126 -@@ -3608,7 +3608,7 @@
127 - static void
128 - toggle_sfactor_type(Widget panel_local, XtPointer _sfactor_index, XtPointer call_data)
129 - {
130 -- int sfactor_index = (int) _sfactor_index;
131 -+ int sfactor_index = (int) (intptr_t) _sfactor_index;
132 -
133 - update_sfactor_value(sfactor_type[sfactor_index].value);
134 - XawScrollbarSetThumb(sfactor_bar,
135 -@@ -3629,10 +3629,10 @@
136 - static void
137 - scroll_sfactor_value(Widget panel_local, XtPointer closure, XtPointer _num_pixels)
138 - {
139 -- int *num_pixels = (int *) _num_pixels;
140 -+ int num_pixels = (int) (intptr_t) _num_pixels;
141 -
142 - update_sfactor_value(sub_sfactor->s +
143 -- (STEP_VALUE * SFACTOR_SIGN((int) num_pixels)));
144 -+ (STEP_VALUE * SFACTOR_SIGN(num_pixels)));
145 - XawScrollbarSetThumb(panel_local, SFACTOR_TO_PERCENTAGE(sub_sfactor->s),
146 - THUMB_H);
147 - }
148 -@@ -4031,7 +4031,6 @@
149 - Widget
150 - color_selection_panel(char *label, char *wname, char *name, Widget parent, Widget below, Widget beside, Widget *button, Widget *popup, int color, XtCallbackProc callback)
151 - {
152 --
153 - FirstArg(XtNfromVert, below);
154 - NextArg(XtNborderWidth, 0);
155 - NextArg(XtNtop, XtChainBottom);
156 -@@ -4057,7 +4056,7 @@
157 - * callback
158 - */
159 - /* also set the label */
160 -- (callback)(below, (XtPointer) color, NULL);
161 -+ (callback)(below, (XtPointer) (intptr_t) color, NULL);
162 - *popup = make_color_popup_menu(below, name, callback, NO_TRANSP, NO_BACKG);
163 -
164 - return *button;
165 -@@ -4658,7 +4657,7 @@
166 - int ival;
167 - double val;
168 -
169 -- new_points_units = (int) new_unit;
170 -+ new_points_units = (int) (intptr_t) new_unit;
171 - if (points_units == new_points_units)
172 - return;
173 -
174 -@@ -4739,7 +4738,7 @@
175 - FirstArg(XtNlabel, XtName(w));
176 - SetValues(arc_type_panel);
177 -
178 -- generic_vals.arc_type = (int) new_style;
179 -+ generic_vals.arc_type = (int) (intptr_t) new_style;
180 - /* if now a pie-wedge type, make the arrow panels insensitive */
181 - if (generic_vals.arc_type == T_PIE_WEDGE_ARC) {
182 - /* unmanage arrow forms */
183 -@@ -4865,7 +4864,7 @@
184 - static void
185 - pen_color_select(Widget w, XtPointer new_color, XtPointer call_data)
186 - {
187 -- pen_color = (Color) new_color;
188 -+ pen_color = (Color) (intptr_t) new_color;
189 - color_select(pen_col_button, pen_color);
190 - if (pen_color_popup) {
191 - XtPopdown(pen_color_popup);
192 -@@ -4875,7 +4874,7 @@
193 - static void
194 - fill_color_select(Widget w, XtPointer new_color, XtPointer call_data)
195 - {
196 -- fill_color = (Color) new_color;
197 -+ fill_color = (Color) (intptr_t) new_color;
198 - color_select(fill_col_button, fill_color);
199 - if (fill_color_popup) {
200 - XtPopdown(fill_color_popup);
201 -@@ -4927,7 +4926,7 @@
202 - {
203 - FirstArg(XtNlabel, XtName(w));
204 - SetValues(hidden_text_panel);
205 -- hidden_text_flag = (int) new_hidden_text;
206 -+ hidden_text_flag = (int) (intptr_t) new_hidden_text;
207 - }
208 -
209 - static void
210 -@@ -4935,7 +4934,7 @@
211 - {
212 - FirstArg(XtNlabel, XtName(w));
213 - SetValues(rigid_text_panel);
214 -- rigid_text_flag = (int) new_rigid_text;
215 -+ rigid_text_flag = (int) (intptr_t) new_rigid_text;
216 - }
217 -
218 - static void
219 -@@ -4943,7 +4942,7 @@
220 - {
221 - FirstArg(XtNlabel, XtName(w));
222 - SetValues(special_text_panel);
223 -- special_text_flag = (int) new_special_text;
224 -+ special_text_flag = (int) (intptr_t) new_special_text;
225 - }
226 -
227 - static void
228 -@@ -4951,7 +4950,7 @@
229 - {
230 - FirstArg(XtNlabel, XtName(w));
231 - SetValues(textjust_panel);
232 -- textjust = (int) new_textjust;
233 -+ textjust = (int) (intptr_t) new_textjust;
234 - }
235 -
236 - static void
237 -@@ -4963,7 +4962,7 @@
238 -
239 - FirstArg(XtNlabel, XtName(w));
240 - SetValues(flip_pic_panel);
241 -- flip_pic_flag = (int) new_flipflag;
242 -+ flip_pic_flag = (int) (intptr_t) new_flipflag;
243 - p1.x = panel_get_dim_value(x1_panel);
244 - p1.y = panel_get_dim_value(y1_panel);
245 - p2.x = panel_get_dim_value(x2_panel);
246 -@@ -4996,7 +4995,7 @@
247 - FirstArg(XtNlabel, XtName(w));
248 - SetValues(rotation_panel);
249 - /* get new rotation (0 = 0 degrees, 1 = 90, 2 = 180, 3 = 270) */
250 -- rotation = (int) new_rotation;
251 -+ rotation = (int) (intptr_t) new_rotation;
252 -
253 - /* get the two opposite corners */
254 - p1.x = panel_get_dim_value(x1_panel);
255 -@@ -5104,7 +5103,7 @@
256 -
257 - FirstArg(XtNlabel, XtName(w));
258 - SetValues(fill_style_button);
259 -- fill_flag = (int) new_fillflag;
260 -+ fill_flag = (int) (intptr_t) new_fillflag;
261 -
262 - if (fill_flag == 0) {
263 - /* no fill; blank out fill density value and pattern */
264 -diff -Naur /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/u_draw.c /root/xfig.3.2.5b/u_draw.c
265 ---- /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/u_draw.c 2007-04-04 18:18:32.000000000 +0200
266 -+++ /root/xfig.3.2.5b/u_draw.c 2012-04-20 09:20:31.379714332 +0200
267 -@@ -603,7 +603,7 @@
268 - /* is it a picture object or a Fig figure? */
269 - if (line->type == T_PICTURE) {
270 - if (line->pic->pic_cache) {
271 -- if ((line->pic->pic_cache->bitmap != (Pixmap) NULL) && active_layer(line->depth)) {
272 -+ if ((line->pic->pic_cache->bitmap != NULL) && active_layer(line->depth)) {
273 - /* only draw the picture if there is a pixmap AND this layer is active */
274 - draw_pic_pixmap(line, op);
275 - return;
276 -diff -Naur /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_cmdpanel.c /root/xfig.3.2.5b/w_cmdpanel.c
277 ---- /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_cmdpanel.c 2008-07-17 17:50:06.000000000 +0200
278 -+++ /root/xfig.3.2.5b/w_cmdpanel.c 2012-04-20 09:54:55.595198185 +0200
279 -@@ -1581,7 +1581,7 @@
280 - beside = XtCreateManagedWidget("char_button", commandWidgetClass,
281 - character_map_panel, Args, ArgCount);
282 - /* add callback to paste character into current text */
283 -- XtAddCallback(beside, XtNcallback, paste_char, (XtPointer) i);
284 -+ XtAddCallback(beside, XtNcallback, paste_char, (XtPointer) (intptr_t) i);
285 - /* skip empty entries and 127 (delete) */
286 - if (i==126) {
287 - below = beside;
288 -diff -Naur /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_color.c /root/xfig.3.2.5b/w_color.c
289 ---- /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_color.c 2007-04-04 18:18:32.000000000 +0200
290 -+++ /root/xfig.3.2.5b/w_color.c 2012-04-20 09:23:24.738775166 +0200
291 -@@ -334,7 +334,7 @@
292 - } else {
293 - NextArg(XtNstate, True); /* start with edit pen */
294 - }
295 -- NextArg(XtNradioData, (XtPointer) (i+1)); /* can't use 0 */
296 -+ NextArg(XtNradioData, (XtPointer) (intptr_t) (i+1)); /* can't use 0 */
297 - mixedEdit[i] = XtCreateManagedWidget("mixedEdit", toggleWidgetClass,
298 - mixedForm[i], Args, ArgCount);
299 - XtAddCallback(mixedEdit[i], XtNcallback, switch_edit, (XtPointer) 0);
300 -@@ -807,7 +807,7 @@
301 - set_slider_sensitivity();
302 -
303 - /* activate the one the user pressed (pen or fill) */
304 -- XawToggleSetCurrent(mixedEdit[0],(XtPointer) (func==I_PEN_COLOR? 1:2));
305 -+ XawToggleSetCurrent(mixedEdit[0],(XtPointer) (intptr_t) (func==I_PEN_COLOR? 1:2));
306 - }
307 -
308 - void restore_mixed_colors(void)
309 -diff -Naur /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_export.c /root/xfig.3.2.5b/w_export.c
310 ---- /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_export.c 2007-09-19 21:32:30.000000000 +0200
311 -+++ /root/xfig.3.2.5b/w_export.c 2012-04-20 09:24:09.181867729 +0200
312 -@@ -384,7 +384,7 @@
313 - change_orient();
314 - appres.landscape = (int) client_data;
315 - /* make sure that paper size is appropriate */
316 -- papersize_select(export_papersize_panel, (XtPointer) appres.papersize, (XtPointer) 0);
317 -+ papersize_select(export_papersize_panel, (XtPointer) (intptr_t) appres.papersize, (XtPointer) 0);
318 - }
319 - }
320 -
321 -diff -Naur /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_fontpanel.c /root/xfig.3.2.5b/w_fontpanel.c
322 ---- /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_fontpanel.c 2007-04-04 18:18:32.000000000 +0200
323 -+++ /root/xfig.3.2.5b/w_fontpanel.c 2012-04-20 09:26:50.774325641 +0200
324 -@@ -142,14 +142,14 @@
325 - ps_fontmenu_items[i].type = MENU_IMAGESTRING; /* put the fontnames in
326 - * menu */
327 - ps_fontmenu_items[i].label = ps_fontinfo[i].name;
328 -- ps_fontmenu_items[i].info = (caddr_t) (i - 1); /* index for font # */
329 -+ ps_fontmenu_items[i].info = (caddr_t) (intptr_t) (i - 1); /* index for font # */
330 - }
331 -
332 - for (i = 0; i < NUM_LATEX_FONTS; i++) {
333 - latex_fontmenu_items[i].type = MENU_IMAGESTRING; /* put the fontnames in
334 - * menu */
335 - latex_fontmenu_items[i].label = latex_fontinfo[i].name;
336 -- latex_fontmenu_items[i].info = (caddr_t) i; /* index for font # */
337 -+ latex_fontmenu_items[i].info = (caddr_t) (intptr_t) i; /* index for font # */
338 - }
339 -
340 - pane_actions = XtParseTranslationTable("<EnterWindow>:set()\n\
341 -@@ -352,9 +352,9 @@
342 - char *font_name = mi->label;
343 -
344 - if (*flag_sel)
345 -- *font_ps_sel = (int) mi->info; /* set ps font to one selected */
346 -+ *font_ps_sel = (int) (intptr_t) mi->info; /* set ps font to one selected */
347 - else
348 -- *font_latex_sel = (int) mi->info; /* set latex font to one
349 -+ *font_latex_sel = (int) (intptr_t) mi->info; /* set latex font to one
350 - * selected */
351 - put_msg("Font: %s", font_name);
352 - /* put image of font in indicator window */
353 -diff -Naur /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_indpanel.c /root/xfig.3.2.5b/w_indpanel.c
354 ---- /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_indpanel.c 2009-03-30 17:54:00.000000000 +0200
355 -+++ /root/xfig.3.2.5b/w_indpanel.c 2012-04-20 09:34:38.181793478 +0200
356 -@@ -2692,7 +2692,7 @@
357 - /* "Ticks" checkbutton */
358 - below = CreateCheckbutton("Show ticks", "ticks", tickform, below, (Widget) NULL,
359 - MANAGE, LARGE_CHK, &dimline_ticks,
360 -- dimline_panel_preview, (Widget) NULL);
361 -+ dimline_panel_preview, (Widget*) NULL);
362 -
363 - /* Tick Thickness label */
364 - FirstArg(XtNlabel, "Thickness");
365 -diff -Naur /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_print.c /root/xfig.3.2.5b/w_print.c
366 ---- /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_print.c 2009-04-20 18:26:14.000000000 +0200
367 -+++ /root/xfig.3.2.5b/w_print.c 2012-04-20 09:36:11.004623947 +0200
368 -@@ -407,7 +407,7 @@
369 - change_orient();
370 - appres.landscape = (int) new_orient;
371 - /* make sure that paper size is appropriate */
372 -- papersize_select(print_papersize_panel, (XtPointer) appres.papersize, (XtPointer) 0);
373 -+ papersize_select(print_papersize_panel, (XtPointer) (intptr_t) appres.papersize, (XtPointer) 0);
374 - }
375 - }
376 -
377 -@@ -771,7 +771,7 @@
378 - for (i = 0; i < XtNumber(paper_sizes); i++) {
379 - entry = XtCreateManagedWidget(paper_sizes[i].fname, smeBSBObjectClass,
380 - papersize_menu, NULL, ZERO);
381 -- XtAddCallback(entry, XtNcallback, papersize_select, (XtPointer) i);
382 -+ XtAddCallback(entry, XtNcallback, papersize_select, (XtPointer) (intptr_t) i);
383 - }
384 -
385 - /* Orientation */
386 -diff -Naur /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_util.c /root/xfig.3.2.5b/w_util.c
387 ---- /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_util.c 2009-03-30 17:52:38.000000000 +0200
388 -+++ /root/xfig.3.2.5b/w_util.c 2012-04-20 09:37:37.764153931 +0200
389 -@@ -378,7 +378,7 @@
390 - }
391 - entry = XtCreateManagedWidget(entries[i], smeBSBObjectClass, pulldown_menu,
392 - NULL, ZERO);
393 -- XtAddCallback(entry, XtNcallback, callback, (XtPointer) i);
394 -+ XtAddCallback(entry, XtNcallback, callback, (XtPointer) (intptr_t) i);
395 - }
396 - return pulldown_menu;
397 - }
398 -@@ -488,7 +488,7 @@
399 - NextArg(XtNbackground, black_color.pixel);
400 - }
401 - entry = XtCreateManagedWidget(buf, commandWidgetClass, pop_form, Args, ArgCount);
402 -- XtAddCallback(entry, XtNcallback, callback, (XtPointer) i);
403 -+ XtAddCallback(entry, XtNcallback, callback, (XtPointer) (intptr_t) i);
404 - }
405 -
406 - /* make a scrollable viewport in case all the buttons don't fit */
407 -@@ -545,7 +545,7 @@
408 - }
409 - entry = XtCreateManagedWidget(buf, commandWidgetClass, color_box,
410 - Args, ArgCount);
411 -- XtAddCallback(entry, XtNcallback, callback, (XtPointer) i);
412 -+ XtAddCallback(entry, XtNcallback, callback, (XtPointer) (intptr_t) i);
413 - }
414 -
415 - /* make the cancel button */
416
417 diff --git a/media-gfx/xfig/files/xfig-3.2.5b-figparserstack.patch b/media-gfx/xfig/files/xfig-3.2.5b-figparserstack.patch
418 deleted file mode 100644
419 index 7f46682..00000000
420 --- a/media-gfx/xfig/files/xfig-3.2.5b-figparserstack.patch
421 +++ /dev/null
422 @@ -1,61 +0,0 @@
423 -#! /bin/sh /usr/share/dpatch/dpatch-run
424 -## 30_figparserstack.dpatch by Hans de Goede <j.w.r.degoede@×××.nl>
425 -##
426 -## All lines beginning with `## DP:' are a description of the patch.
427 -## DP: Fix Stack-based buffer overflow by loading malformed .FIG files
428 -## DP: https://bugzilla.redhat.com/show_bug.cgi?id=543905
429 -## DP: Closes: #559274
430 -
431 -@DPATCH@
432 -diff -urNad xfig~/f_readold.c xfig/f_readold.c
433 ---- xfig~/f_readold.c
434 -+++ xfig/f_readold.c
435 -@@ -471,7 +471,7 @@
436 - F_text *t;
437 - int n;
438 - int dum;
439 -- char buf[128];
440 -+ char buf[512];
441 - PR_SIZE tx_dim;
442 -
443 - if ((t = create_text()) == NULL)
444 -@@ -485,22 +485,34 @@
445 - t->pen_style = -1;
446 - t->angle = 0.0;
447 - t->next = NULL;
448 -+ if (!fgets(buf, sizeof(buf), fp)) {
449 -+ file_msg("Incomplete text data");
450 -+ free((char *) t);
451 -+ return (NULL);
452 -+ }
453 -+
454 -+ /* Note using strlen(buf) here will waste a few bytes, as the
455 -+ various text attributes are counted into this length too. */
456 -+ if ((t->cstring = new_string(strlen(buf))) == NULL)
457 -+ return (NULL);
458 -+
459 - /* ascent and length will be recalculated later */
460 -- n = fscanf(fp, " %d %d %d %d %d %d %d %[^\n]",
461 -+ n = sscanf(buf, " %d %d %d %d %d %d %d %[^\n]",
462 - &t->font, &dum, &dum, &t->ascent, &t->length,
463 -- &t->base_x, &t->base_y, buf);
464 -+ &t->base_x, &t->base_y, t->cstring);
465 - if (n != 8) {
466 - file_msg("Incomplete text data");
467 -+ free(t->cstring);
468 - free((char *) t);
469 - return (NULL);
470 - }
471 -- if ((t->cstring = new_string(strlen(buf))) == NULL) {
472 -+
473 -+ if (!strlen(t->cstring)) {
474 -+ free(t->cstring);
475 - free((char *) t);
476 - file_msg("Empty text string at line %d.", line_no);
477 - return (NULL);
478 - }
479 -- /* put string in structure */
480 -- strcpy(t->cstring, buf);
481 -
482 - /* get the font struct */
483 - t->zoom = zoomscale;
484
485 diff --git a/media-gfx/xfig/files/xfig-3.2.5b-fix-eps-reading.patch b/media-gfx/xfig/files/xfig-3.2.5b-fix-eps-reading.patch
486 deleted file mode 100644
487 index 7601d20..00000000
488 --- a/media-gfx/xfig/files/xfig-3.2.5b-fix-eps-reading.patch
489 +++ /dev/null
490 @@ -1,46 +0,0 @@
491 -diff -ur xfig.3.2.5b/f_readeps.c xfig.3.2.5b.new/f_readeps.c
492 ---- xfig.3.2.5b/f_readeps.c 2009-03-30 17:52:18.000000000 +0200
493 -+++ xfig.3.2.5b.new/f_readeps.c 2010-11-25 16:53:54.328247928 +0100
494 -@@ -252,12 +252,13 @@
495 - {
496 - char buf[300];
497 - FILE *tmpfp, *pixfile, *gsfile;
498 -- char *psnam, *driver;
499 -+ char *driver;
500 - int status, wid, ht, nbitmap, fd;
501 - char tmpfile[PATH_MAX],
502 - pixnam[PATH_MAX],
503 - errnam[PATH_MAX],
504 -- gscom[2 * PATH_MAX];
505 -+ gscom[2 * PATH_MAX],
506 -+ psnam[PATH_MAX];
507 -
508 - wid = urx - llx;
509 - ht = ury - lly;
510 -@@ -307,19 +308,14 @@
511 - /* for color, use pcx */
512 - driver = "pcx256";
513 - }
514 -- /* avoid absolute paths (for Cygwin with gswin32) by changing directory */
515 -- if (tmpfile[0] == '/') {
516 -- psnam = strrchr(tmpfile, '/');
517 -- *psnam = 0;
518 -- sprintf(gscom, "cd \"%s/\";", tmpfile);
519 -- *psnam++ = '/'; /* Restore name for unlink() below */
520 -- } else {
521 -- psnam = tmpfile;
522 -- gscom[0] = '\0';
523 -+ /* Canonicalize the eps file filename, needed to "defeat" -dSAFER */
524 -+ if (!realpath(tmpfile, psnam)) {
525 -+ file_msg("Cannot canonicalize %s: %s\n", tmpfile, strerror(errno));
526 -+ return False;
527 - }
528 -- sprintf(&gscom[strlen(gscom)],
529 -- "%s -r72x72 -dSAFER -sDEVICE=%s -g%dx%d -sOutputFile=%s -q - > %s 2>&1",
530 -- appres.ghostscript, driver, wid, ht, pixnam, errnam);
531 -+ sprintf(gscom,
532 -+ "%s -r72x72 -sDEVICE=%s -g%dx%d -sOutputFile=%s -dDELAYSAFER -c '<< /PermitFileReading [ (%s)] >> setuserparams .locksafe' -dSAFER -q - > %s 2>&1",
533 -+ appres.ghostscript, driver, wid, ht, pixnam, psnam, errnam);
534 - if (appres.DEBUG)
535 - fprintf(stderr,"calling: %s\n",gscom);
536 - if ((gsfile = popen(gscom, "w")) == 0) {
537
538 diff --git a/media-gfx/xfig/files/xfig-3.2.5b-libpng-1.5.patch b/media-gfx/xfig/files/xfig-3.2.5b-libpng-1.5.patch
539 deleted file mode 100644
540 index 7d9c3f1..00000000
541 --- a/media-gfx/xfig/files/xfig-3.2.5b-libpng-1.5.patch
542 +++ /dev/null
543 @@ -1,70 +0,0 @@
544 -Index: xfig.3.2.5b/f_readpng.c
545 -===================================================================
546 ---- xfig.3.2.5b.orig/f_readpng.c
547 -+++ xfig.3.2.5b/f_readpng.c
548 -@@ -73,7 +73,7 @@ read_png(FILE *file, int filetype, F_pic
549 - }
550 -
551 - /* set long jump recovery here */
552 -- if (setjmp(png_ptr->jmpbuf)) {
553 -+ if (setjmp(png_jmpbuf(png_ptr))) {
554 - /* if we get here there was a problem reading the file */
555 - png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
556 - close_picfile(file,filetype);
557 -@@ -90,15 +90,17 @@ read_png(FILE *file, int filetype, F_pic
558 - png_get_IHDR(png_ptr, info_ptr, &w, &h, &bit_depth, &color_type,
559 - &interlace_type, &compression_type, &filter_type);
560 -
561 -- if (info_ptr->valid & PNG_INFO_gAMA)
562 -- png_set_gamma(png_ptr, 2.2, info_ptr->gamma);
563 -- else
564 -- png_set_gamma(png_ptr, 2.2, 0.45);
565 -+ png_fixed_point gamma = 0.45;
566 -+ png_get_gAMA_fixed(png_ptr,info_ptr,&gamma);
567 -+ png_set_gamma(png_ptr, 2.2, gamma);
568 -
569 -- if (info_ptr->valid & PNG_INFO_bKGD)
570 -+ if (png_get_valid(png_ptr,info_ptr,PNG_INFO_bKGD)) {
571 - /* set the background to the one supplied */
572 -- png_set_background(png_ptr, &info_ptr->background,
573 -+ png_color_16p background;
574 -+ png_get_bKGD(png_ptr,info_ptr,&background);
575 -+ png_set_background(png_ptr, background,
576 - PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
577 -+ }
578 - else {
579 - /* blend the canvas background using the alpha channel */
580 - background.red = x_bg_color.red >> 8;
581 -@@ -136,7 +138,11 @@ read_png(FILE *file, int filetype, F_pic
582 -
583 - if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette)) {
584 - png_get_hIST(png_ptr, info_ptr, &histogram);
585 -+#if PNG_LIBPNG_VER_MAJOR <= 1 && PNG_LIBPNG_VER_MINOR < 5
586 - png_set_dither(png_ptr, palette, num_palette, 256, histogram, 0);
587 -+#else
588 -+ png_set_quantize(png_ptr, palette, num_palette, 256, histogram, 0);
589 -+#endif
590 - }
591 - }
592 - if (color_type == PNG_COLOR_TYPE_GRAY || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
593 -Index: xfig.3.2.5b/f_wrpng.c
594 -===================================================================
595 ---- xfig.3.2.5b.orig/f_wrpng.c
596 -+++ xfig.3.2.5b/f_wrpng.c
597 -@@ -20,6 +20,7 @@
598 - #include "w_msgpanel.h"
599 - #include "w_setup.h"
600 - #include <png.h>
601 -+#include <zlib.h>
602 -
603 - /*
604 - * Write PNG file from rgb data
605 -@@ -59,7 +60,7 @@ write_png(FILE *file, unsigned char *dat
606 - }
607 -
608 - /* set long jump recovery here */
609 -- if (setjmp(png_ptr->jmpbuf)) {
610 -+ if (setjmp(png_jmpbuf(png_ptr))) {
611 - /* if we get here there was a problem reading the file */
612 - png_destroy_write_struct(&png_ptr, &info_ptr);
613 - return False;
614
615 diff --git a/media-gfx/xfig/files/xfig-3.2.5b-spelling.patch b/media-gfx/xfig/files/xfig-3.2.5b-spelling.patch
616 deleted file mode 100644
617 index 942276c..00000000
618 --- a/media-gfx/xfig/files/xfig-3.2.5b-spelling.patch
619 +++ /dev/null
620 @@ -1,29 +0,0 @@
621 -#! /bin/sh /usr/share/dpatch/dpatch-run
622 -## 31_spelling.dpatch by Roland Rosenfeld <roland@××××××.org>
623 -##
624 -## All lines beginning with `## DP:' are a description of the patch.
625 -## DP: Fix spelling errors in binary.
626 -
627 -@DPATCH@
628 -diff -urNad xfig~/f_load.c xfig/f_load.c
629 ---- xfig~/f_load.c
630 -+++ xfig/f_load.c
631 -@@ -373,5 +373,5 @@
632 - /* Format error; relevant error message is already delivered */
633 - ;
634 - else
635 -- file_msg("File \"%s\" is not accessable; %s.", file, strerror(err));
636 -+ file_msg("File \"%s\" is not accessible; %s.", file, strerror(err));
637 - }
638 -diff -urNad xfig~/f_readgif.c xfig/f_readgif.c
639 ---- xfig~/f_readgif.c
640 -+++ xfig/f_readgif.c
641 -@@ -137,7 +137,7 @@
642 -
643 - if (c == '!') { /* Extension */
644 - if (! ReadOK(file,&c,1))
645 -- file_msg("GIF read error on extention function code");
646 -+ file_msg("GIF read error on extension function code");
647 - (void) DoGIFextension(file, c);
648 - continue;
649 - }
650
651 diff --git a/media-gfx/xfig/files/xfig-3.2.5b-zoom-during-edit.patch b/media-gfx/xfig/files/xfig-3.2.5b-zoom-during-edit.patch
652 deleted file mode 100644
653 index 11e5ceb..00000000
654 --- a/media-gfx/xfig/files/xfig-3.2.5b-zoom-during-edit.patch
655 +++ /dev/null
656 @@ -1,22 +0,0 @@
657 -commit fc4381d7c3e8d7440a3e33430d24ebf217a99142
658 -Author: Vladislav Zavjalov <slazav@××××××××.org>
659 -Date: Thu Oct 2 12:24:04 2008 +0400
660 -
661 - fix calling null function (todo: problem with initialize_char_handler after resize?)
662 -
663 -Fixes crash. To reproduce create some object, zoom in so that it does not fit
664 -the screen, start another edit and press Ctrl+Z.
665 -
666 -diff --git a/xfig/u_redraw.c b/xfig/u_redraw.c
667 -index 146abfa..fd53a8e 100644
668 ---- a/xfig/u_redraw.c
669 -+++ b/xfig/u_redraw.c
670 -@@ -434,7 +434,7 @@ redisplay_curobj()
671 - }
672 - } else {
673 - /* editing an object, just refresh it as is */
674 -- (*canvas_ref_proc)(cur_x, cur_y);
675 -+ if (canvas_ref_proc) (*canvas_ref_proc)(cur_x, cur_y);
676 - }
677 - }
678 -