diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-gfx/xfig/files | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-gfx/xfig/files')
19 files changed, 1332 insertions, 0 deletions
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 new file mode 100644 index 000000000000..eb85513ef69d --- /dev/null +++ b/media-gfx/xfig/files/xfig-3.2.5b-CVE-2010-4262.patch @@ -0,0 +1,22 @@ +--- w_msgpanel.c ++++ w_msgpanel.c 2010-12-03 14:21:07.931926127 +0000 +@@ -60,7 +60,7 @@ DeclareStaticArgs(12); + /* for the popup message (file_msg) window */ + + static int file_msg_length=0; +-static char tmpstr[300]; ++static char tmpstr[512]; + static Widget file_msg_panel, + file_msg_win, file_msg_dismiss; + +@@ -582,8 +582,8 @@ file_msg(char *format,...) + } + + va_start(ap, format); +- /* format the string */ +- vsprintf(tmpstr, format, ap); ++ /* format the string (but leave room for \n and \0) */ ++ vsnprintf(tmpstr, sizeof(tmpstr)-2, format, ap); + va_end(ap); + + strcat(tmpstr,"\n"); diff --git a/media-gfx/xfig/files/xfig-3.2.5b-app-defaults.patch b/media-gfx/xfig/files/xfig-3.2.5b-app-defaults.patch new file mode 100644 index 000000000000..d773da51b180 --- /dev/null +++ b/media-gfx/xfig/files/xfig-3.2.5b-app-defaults.patch @@ -0,0 +1,24 @@ +Defaults for xfig. Idea from Roland Rosenfeld <roland@debian.org> + +diff -urNad xfig~/Fig.ad xfig/Fig.ad +--- Fig.ad ++++ Fig.ad +@@ -10,13 +10,17 @@ + + ! some sample settings you may want to change + ++! If the following resource is set to false, xfig will use metric units ++! by default. ++Fig.inches: false ++ + ! The following fixes a problem that some window managers have + ! with xfig continually resizing itself + + Fig*AllowShellResize: false + + ! Image editor - can edit imported image +-Fig.image_editor: xv ++Fig.image_editor: gimp + + ! name of ghostscript (not ghostview) + Fig.ghostscript: gs diff --git a/media-gfx/xfig/files/xfig-3.2.5b-darwin.patch b/media-gfx/xfig/files/xfig-3.2.5b-darwin.patch new file mode 100644 index 000000000000..0c4fa29fb271 --- /dev/null +++ b/media-gfx/xfig/files/xfig-3.2.5b-darwin.patch @@ -0,0 +1,22 @@ +--- fig.h ++++ fig.h +@@ -374,7 +374,7 @@ + extern long random(); + extern void srandom(unsigned int); + +-#elif !defined(__osf__) && !defined(__CYGWIN__) && !defined(linux) && !defined(__FreeBSD__) && !defined(__GLIBC__) ++#elif !defined(__osf__) && !defined(__CYGWIN__) && !defined(linux) && !defined(__FreeBSD__) && !defined(__DARWIN__) && !defined(__GLIBC__) + extern void srandom(int); + + #endif +--- w_keyboard.c ++++ w_keyboard.c +@@ -41,7 +41,7 @@ + #define REG_NOERROR REG_OKAY + #endif + +-#if defined(__FreeBSD__) && !defined(REG_NOERROR) ++#if (defined(__FreeBSD__) || defined(__DARWIN__)) && !defined(REG_NOERROR) + #define REG_NOERROR 0 + #endif + 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 new file mode 100644 index 000000000000..ea396f1b005c --- /dev/null +++ b/media-gfx/xfig/files/xfig-3.2.5b-edit-menu.patch @@ -0,0 +1,332 @@ +diff -Naur /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/Imakefile /root/xfig.3.2.5b/Imakefile +--- /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/Imakefile 2012-04-20 09:46:26.217957716 +0200 ++++ /root/xfig.3.2.5b/Imakefile 2012-04-20 09:16:28.744362135 +0200 +@@ -251,7 +251,7 @@ + #endif /* USEJPEG */ + + #ifdef I18N +-I18N_DEFS = -DI18N -DSETLOCALE ++I18N_DEFS = -DI18N -DSETLOCALE -DXAW_INTERNATIONALIZATION + I18N_SRC = w_i18n.c + I18N_OBJ = w_i18n.o + #endif +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 +--- /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 ++++ /root/xfig.3.2.5b/e_edit.c 2012-04-20 10:02:04.209542848 +0200 +@@ -3211,7 +3211,7 @@ + XtAddCallback(but1, XtNcallback, + (XtCallbackProc) grab_button, (XtPointer) NULL); + +- if ( cur_image_editor != NULL && *cur_image_editor != (char) NULL) { ++ if ( cur_image_editor != NULL && *cur_image_editor != '\0' ) { + FirstArg(XtNlabel,"Edit Image"); + NextArg(XtNfromHoriz, but1); + NextArg(XtNfromVert, label); +@@ -3501,7 +3501,7 @@ + { + Widget but_spline[3]; + Dimension label_height, label_width; +- int i, dist; ++ int i, dist; + + static char use_item[]="Edit the behavior\nof the control point"; + +@@ -3598,7 +3598,7 @@ + below = but_spline[i] = XtCreateManagedWidget(sfactor_type[i].label, + commandWidgetClass, form, Args, ArgCount); + XtAddCallback(but_spline[i], XtNcallback, +- (XtCallbackProc) toggle_sfactor_type, (XtPointer) i); ++ (XtCallbackProc) toggle_sfactor_type, (XtPointer) (intptr_t) i); + XtSetArg(Args[0], XtNfromVert, below); /* here are the direct */ + XtSetArg(Args[1], XtNvertDistance, 3 * dist); /* accesses to Args */ + } +@@ -3608,7 +3608,7 @@ + static void + toggle_sfactor_type(Widget panel_local, XtPointer _sfactor_index, XtPointer call_data) + { +- int sfactor_index = (int) _sfactor_index; ++ int sfactor_index = (int) (intptr_t) _sfactor_index; + + update_sfactor_value(sfactor_type[sfactor_index].value); + XawScrollbarSetThumb(sfactor_bar, +@@ -3629,10 +3629,10 @@ + static void + scroll_sfactor_value(Widget panel_local, XtPointer closure, XtPointer _num_pixels) + { +- int *num_pixels = (int *) _num_pixels; ++ int num_pixels = (int) (intptr_t) _num_pixels; + + update_sfactor_value(sub_sfactor->s + +- (STEP_VALUE * SFACTOR_SIGN((int) num_pixels))); ++ (STEP_VALUE * SFACTOR_SIGN(num_pixels))); + XawScrollbarSetThumb(panel_local, SFACTOR_TO_PERCENTAGE(sub_sfactor->s), + THUMB_H); + } +@@ -4031,7 +4031,6 @@ + Widget + color_selection_panel(char *label, char *wname, char *name, Widget parent, Widget below, Widget beside, Widget *button, Widget *popup, int color, XtCallbackProc callback) + { +- + FirstArg(XtNfromVert, below); + NextArg(XtNborderWidth, 0); + NextArg(XtNtop, XtChainBottom); +@@ -4057,7 +4056,7 @@ + * callback + */ + /* also set the label */ +- (callback)(below, (XtPointer) color, NULL); ++ (callback)(below, (XtPointer) (intptr_t) color, NULL); + *popup = make_color_popup_menu(below, name, callback, NO_TRANSP, NO_BACKG); + + return *button; +@@ -4658,7 +4657,7 @@ + int ival; + double val; + +- new_points_units = (int) new_unit; ++ new_points_units = (int) (intptr_t) new_unit; + if (points_units == new_points_units) + return; + +@@ -4739,7 +4738,7 @@ + FirstArg(XtNlabel, XtName(w)); + SetValues(arc_type_panel); + +- generic_vals.arc_type = (int) new_style; ++ generic_vals.arc_type = (int) (intptr_t) new_style; + /* if now a pie-wedge type, make the arrow panels insensitive */ + if (generic_vals.arc_type == T_PIE_WEDGE_ARC) { + /* unmanage arrow forms */ +@@ -4865,7 +4864,7 @@ + static void + pen_color_select(Widget w, XtPointer new_color, XtPointer call_data) + { +- pen_color = (Color) new_color; ++ pen_color = (Color) (intptr_t) new_color; + color_select(pen_col_button, pen_color); + if (pen_color_popup) { + XtPopdown(pen_color_popup); +@@ -4875,7 +4874,7 @@ + static void + fill_color_select(Widget w, XtPointer new_color, XtPointer call_data) + { +- fill_color = (Color) new_color; ++ fill_color = (Color) (intptr_t) new_color; + color_select(fill_col_button, fill_color); + if (fill_color_popup) { + XtPopdown(fill_color_popup); +@@ -4927,7 +4926,7 @@ + { + FirstArg(XtNlabel, XtName(w)); + SetValues(hidden_text_panel); +- hidden_text_flag = (int) new_hidden_text; ++ hidden_text_flag = (int) (intptr_t) new_hidden_text; + } + + static void +@@ -4935,7 +4934,7 @@ + { + FirstArg(XtNlabel, XtName(w)); + SetValues(rigid_text_panel); +- rigid_text_flag = (int) new_rigid_text; ++ rigid_text_flag = (int) (intptr_t) new_rigid_text; + } + + static void +@@ -4943,7 +4942,7 @@ + { + FirstArg(XtNlabel, XtName(w)); + SetValues(special_text_panel); +- special_text_flag = (int) new_special_text; ++ special_text_flag = (int) (intptr_t) new_special_text; + } + + static void +@@ -4951,7 +4950,7 @@ + { + FirstArg(XtNlabel, XtName(w)); + SetValues(textjust_panel); +- textjust = (int) new_textjust; ++ textjust = (int) (intptr_t) new_textjust; + } + + static void +@@ -4963,7 +4962,7 @@ + + FirstArg(XtNlabel, XtName(w)); + SetValues(flip_pic_panel); +- flip_pic_flag = (int) new_flipflag; ++ flip_pic_flag = (int) (intptr_t) new_flipflag; + p1.x = panel_get_dim_value(x1_panel); + p1.y = panel_get_dim_value(y1_panel); + p2.x = panel_get_dim_value(x2_panel); +@@ -4996,7 +4995,7 @@ + FirstArg(XtNlabel, XtName(w)); + SetValues(rotation_panel); + /* get new rotation (0 = 0 degrees, 1 = 90, 2 = 180, 3 = 270) */ +- rotation = (int) new_rotation; ++ rotation = (int) (intptr_t) new_rotation; + + /* get the two opposite corners */ + p1.x = panel_get_dim_value(x1_panel); +@@ -5104,7 +5103,7 @@ + + FirstArg(XtNlabel, XtName(w)); + SetValues(fill_style_button); +- fill_flag = (int) new_fillflag; ++ fill_flag = (int) (intptr_t) new_fillflag; + + if (fill_flag == 0) { + /* no fill; blank out fill density value and pattern */ +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 +--- /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 ++++ /root/xfig.3.2.5b/u_draw.c 2012-04-20 09:20:31.379714332 +0200 +@@ -603,7 +603,7 @@ + /* is it a picture object or a Fig figure? */ + if (line->type == T_PICTURE) { + if (line->pic->pic_cache) { +- if ((line->pic->pic_cache->bitmap != (Pixmap) NULL) && active_layer(line->depth)) { ++ if ((line->pic->pic_cache->bitmap != NULL) && active_layer(line->depth)) { + /* only draw the picture if there is a pixmap AND this layer is active */ + draw_pic_pixmap(line, op); + return; +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 +--- /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 ++++ /root/xfig.3.2.5b/w_cmdpanel.c 2012-04-20 09:54:55.595198185 +0200 +@@ -1581,7 +1581,7 @@ + beside = XtCreateManagedWidget("char_button", commandWidgetClass, + character_map_panel, Args, ArgCount); + /* add callback to paste character into current text */ +- XtAddCallback(beside, XtNcallback, paste_char, (XtPointer) i); ++ XtAddCallback(beside, XtNcallback, paste_char, (XtPointer) (intptr_t) i); + /* skip empty entries and 127 (delete) */ + if (i==126) { + below = beside; +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 +--- /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 ++++ /root/xfig.3.2.5b/w_color.c 2012-04-20 09:23:24.738775166 +0200 +@@ -334,7 +334,7 @@ + } else { + NextArg(XtNstate, True); /* start with edit pen */ + } +- NextArg(XtNradioData, (XtPointer) (i+1)); /* can't use 0 */ ++ NextArg(XtNradioData, (XtPointer) (intptr_t) (i+1)); /* can't use 0 */ + mixedEdit[i] = XtCreateManagedWidget("mixedEdit", toggleWidgetClass, + mixedForm[i], Args, ArgCount); + XtAddCallback(mixedEdit[i], XtNcallback, switch_edit, (XtPointer) 0); +@@ -807,7 +807,7 @@ + set_slider_sensitivity(); + + /* activate the one the user pressed (pen or fill) */ +- XawToggleSetCurrent(mixedEdit[0],(XtPointer) (func==I_PEN_COLOR? 1:2)); ++ XawToggleSetCurrent(mixedEdit[0],(XtPointer) (intptr_t) (func==I_PEN_COLOR? 1:2)); + } + + void restore_mixed_colors(void) +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 +--- /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 ++++ /root/xfig.3.2.5b/w_export.c 2012-04-20 09:24:09.181867729 +0200 +@@ -384,7 +384,7 @@ + change_orient(); + appres.landscape = (int) client_data; + /* make sure that paper size is appropriate */ +- papersize_select(export_papersize_panel, (XtPointer) appres.papersize, (XtPointer) 0); ++ papersize_select(export_papersize_panel, (XtPointer) (intptr_t) appres.papersize, (XtPointer) 0); + } + } + +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 +--- /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 ++++ /root/xfig.3.2.5b/w_fontpanel.c 2012-04-20 09:26:50.774325641 +0200 +@@ -142,14 +142,14 @@ + ps_fontmenu_items[i].type = MENU_IMAGESTRING; /* put the fontnames in + * menu */ + ps_fontmenu_items[i].label = ps_fontinfo[i].name; +- ps_fontmenu_items[i].info = (caddr_t) (i - 1); /* index for font # */ ++ ps_fontmenu_items[i].info = (caddr_t) (intptr_t) (i - 1); /* index for font # */ + } + + for (i = 0; i < NUM_LATEX_FONTS; i++) { + latex_fontmenu_items[i].type = MENU_IMAGESTRING; /* put the fontnames in + * menu */ + latex_fontmenu_items[i].label = latex_fontinfo[i].name; +- latex_fontmenu_items[i].info = (caddr_t) i; /* index for font # */ ++ latex_fontmenu_items[i].info = (caddr_t) (intptr_t) i; /* index for font # */ + } + + pane_actions = XtParseTranslationTable("<EnterWindow>:set()\n\ +@@ -352,9 +352,9 @@ + char *font_name = mi->label; + + if (*flag_sel) +- *font_ps_sel = (int) mi->info; /* set ps font to one selected */ ++ *font_ps_sel = (int) (intptr_t) mi->info; /* set ps font to one selected */ + else +- *font_latex_sel = (int) mi->info; /* set latex font to one ++ *font_latex_sel = (int) (intptr_t) mi->info; /* set latex font to one + * selected */ + put_msg("Font: %s", font_name); + /* put image of font in indicator window */ +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 +--- /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 ++++ /root/xfig.3.2.5b/w_indpanel.c 2012-04-20 09:34:38.181793478 +0200 +@@ -2692,7 +2692,7 @@ + /* "Ticks" checkbutton */ + below = CreateCheckbutton("Show ticks", "ticks", tickform, below, (Widget) NULL, + MANAGE, LARGE_CHK, &dimline_ticks, +- dimline_panel_preview, (Widget) NULL); ++ dimline_panel_preview, (Widget*) NULL); + + /* Tick Thickness label */ + FirstArg(XtNlabel, "Thickness"); +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 +--- /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 ++++ /root/xfig.3.2.5b/w_print.c 2012-04-20 09:36:11.004623947 +0200 +@@ -407,7 +407,7 @@ + change_orient(); + appres.landscape = (int) new_orient; + /* make sure that paper size is appropriate */ +- papersize_select(print_papersize_panel, (XtPointer) appres.papersize, (XtPointer) 0); ++ papersize_select(print_papersize_panel, (XtPointer) (intptr_t) appres.papersize, (XtPointer) 0); + } + } + +@@ -771,7 +771,7 @@ + for (i = 0; i < XtNumber(paper_sizes); i++) { + entry = XtCreateManagedWidget(paper_sizes[i].fname, smeBSBObjectClass, + papersize_menu, NULL, ZERO); +- XtAddCallback(entry, XtNcallback, papersize_select, (XtPointer) i); ++ XtAddCallback(entry, XtNcallback, papersize_select, (XtPointer) (intptr_t) i); + } + + /* Orientation */ +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 +--- /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 ++++ /root/xfig.3.2.5b/w_util.c 2012-04-20 09:37:37.764153931 +0200 +@@ -378,7 +378,7 @@ + } + entry = XtCreateManagedWidget(entries[i], smeBSBObjectClass, pulldown_menu, + NULL, ZERO); +- XtAddCallback(entry, XtNcallback, callback, (XtPointer) i); ++ XtAddCallback(entry, XtNcallback, callback, (XtPointer) (intptr_t) i); + } + return pulldown_menu; + } +@@ -488,7 +488,7 @@ + NextArg(XtNbackground, black_color.pixel); + } + entry = XtCreateManagedWidget(buf, commandWidgetClass, pop_form, Args, ArgCount); +- XtAddCallback(entry, XtNcallback, callback, (XtPointer) i); ++ XtAddCallback(entry, XtNcallback, callback, (XtPointer) (intptr_t) i); + } + + /* make a scrollable viewport in case all the buttons don't fit */ +@@ -545,7 +545,7 @@ + } + entry = XtCreateManagedWidget(buf, commandWidgetClass, color_box, + Args, ArgCount); +- XtAddCallback(entry, XtNcallback, callback, (XtPointer) i); ++ XtAddCallback(entry, XtNcallback, callback, (XtPointer) (intptr_t) i); + } + + /* make the cancel button */ diff --git a/media-gfx/xfig/files/xfig-3.2.5b-figparserstack.patch b/media-gfx/xfig/files/xfig-3.2.5b-figparserstack.patch new file mode 100644 index 000000000000..7f4668214acc --- /dev/null +++ b/media-gfx/xfig/files/xfig-3.2.5b-figparserstack.patch @@ -0,0 +1,61 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 30_figparserstack.dpatch by Hans de Goede <j.w.r.degoede@hhs.nl> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix Stack-based buffer overflow by loading malformed .FIG files +## DP: https://bugzilla.redhat.com/show_bug.cgi?id=543905 +## DP: Closes: #559274 + +@DPATCH@ +diff -urNad xfig~/f_readold.c xfig/f_readold.c +--- xfig~/f_readold.c ++++ xfig/f_readold.c +@@ -471,7 +471,7 @@ + F_text *t; + int n; + int dum; +- char buf[128]; ++ char buf[512]; + PR_SIZE tx_dim; + + if ((t = create_text()) == NULL) +@@ -485,22 +485,34 @@ + t->pen_style = -1; + t->angle = 0.0; + t->next = NULL; ++ if (!fgets(buf, sizeof(buf), fp)) { ++ file_msg("Incomplete text data"); ++ free((char *) t); ++ return (NULL); ++ } ++ ++ /* Note using strlen(buf) here will waste a few bytes, as the ++ various text attributes are counted into this length too. */ ++ if ((t->cstring = new_string(strlen(buf))) == NULL) ++ return (NULL); ++ + /* ascent and length will be recalculated later */ +- n = fscanf(fp, " %d %d %d %d %d %d %d %[^\n]", ++ n = sscanf(buf, " %d %d %d %d %d %d %d %[^\n]", + &t->font, &dum, &dum, &t->ascent, &t->length, +- &t->base_x, &t->base_y, buf); ++ &t->base_x, &t->base_y, t->cstring); + if (n != 8) { + file_msg("Incomplete text data"); ++ free(t->cstring); + free((char *) t); + return (NULL); + } +- if ((t->cstring = new_string(strlen(buf))) == NULL) { ++ ++ if (!strlen(t->cstring)) { ++ free(t->cstring); + free((char *) t); + file_msg("Empty text string at line %d.", line_no); + return (NULL); + } +- /* put string in structure */ +- strcpy(t->cstring, buf); + + /* get the font struct */ + t->zoom = zoomscale; 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 new file mode 100644 index 000000000000..7601d20eae31 --- /dev/null +++ b/media-gfx/xfig/files/xfig-3.2.5b-fix-eps-reading.patch @@ -0,0 +1,46 @@ +diff -ur xfig.3.2.5b/f_readeps.c xfig.3.2.5b.new/f_readeps.c +--- xfig.3.2.5b/f_readeps.c 2009-03-30 17:52:18.000000000 +0200 ++++ xfig.3.2.5b.new/f_readeps.c 2010-11-25 16:53:54.328247928 +0100 +@@ -252,12 +252,13 @@ + { + char buf[300]; + FILE *tmpfp, *pixfile, *gsfile; +- char *psnam, *driver; ++ char *driver; + int status, wid, ht, nbitmap, fd; + char tmpfile[PATH_MAX], + pixnam[PATH_MAX], + errnam[PATH_MAX], +- gscom[2 * PATH_MAX]; ++ gscom[2 * PATH_MAX], ++ psnam[PATH_MAX]; + + wid = urx - llx; + ht = ury - lly; +@@ -307,19 +308,14 @@ + /* for color, use pcx */ + driver = "pcx256"; + } +- /* avoid absolute paths (for Cygwin with gswin32) by changing directory */ +- if (tmpfile[0] == '/') { +- psnam = strrchr(tmpfile, '/'); +- *psnam = 0; +- sprintf(gscom, "cd \"%s/\";", tmpfile); +- *psnam++ = '/'; /* Restore name for unlink() below */ +- } else { +- psnam = tmpfile; +- gscom[0] = '\0'; ++ /* Canonicalize the eps file filename, needed to "defeat" -dSAFER */ ++ if (!realpath(tmpfile, psnam)) { ++ file_msg("Cannot canonicalize %s: %s\n", tmpfile, strerror(errno)); ++ return False; + } +- sprintf(&gscom[strlen(gscom)], +- "%s -r72x72 -dSAFER -sDEVICE=%s -g%dx%d -sOutputFile=%s -q - > %s 2>&1", +- appres.ghostscript, driver, wid, ht, pixnam, errnam); ++ sprintf(gscom, ++ "%s -r72x72 -sDEVICE=%s -g%dx%d -sOutputFile=%s -dDELAYSAFER -c '<< /PermitFileReading [ (%s)] >> setuserparams .locksafe' -dSAFER -q - > %s 2>&1", ++ appres.ghostscript, driver, wid, ht, pixnam, psnam, errnam); + if (appres.DEBUG) + fprintf(stderr,"calling: %s\n",gscom); + if ((gsfile = popen(gscom, "w")) == 0) { 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 new file mode 100644 index 000000000000..7d9c3f15efb9 --- /dev/null +++ b/media-gfx/xfig/files/xfig-3.2.5b-libpng-1.5.patch @@ -0,0 +1,70 @@ +Index: xfig.3.2.5b/f_readpng.c +=================================================================== +--- xfig.3.2.5b.orig/f_readpng.c ++++ xfig.3.2.5b/f_readpng.c +@@ -73,7 +73,7 @@ read_png(FILE *file, int filetype, F_pic + } + + /* set long jump recovery here */ +- if (setjmp(png_ptr->jmpbuf)) { ++ if (setjmp(png_jmpbuf(png_ptr))) { + /* if we get here there was a problem reading the file */ + png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); + close_picfile(file,filetype); +@@ -90,15 +90,17 @@ read_png(FILE *file, int filetype, F_pic + png_get_IHDR(png_ptr, info_ptr, &w, &h, &bit_depth, &color_type, + &interlace_type, &compression_type, &filter_type); + +- if (info_ptr->valid & PNG_INFO_gAMA) +- png_set_gamma(png_ptr, 2.2, info_ptr->gamma); +- else +- png_set_gamma(png_ptr, 2.2, 0.45); ++ png_fixed_point gamma = 0.45; ++ png_get_gAMA_fixed(png_ptr,info_ptr,&gamma); ++ png_set_gamma(png_ptr, 2.2, gamma); + +- if (info_ptr->valid & PNG_INFO_bKGD) ++ if (png_get_valid(png_ptr,info_ptr,PNG_INFO_bKGD)) { + /* set the background to the one supplied */ +- png_set_background(png_ptr, &info_ptr->background, ++ png_color_16p background; ++ png_get_bKGD(png_ptr,info_ptr,&background); ++ png_set_background(png_ptr, background, + PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); ++ } + else { + /* blend the canvas background using the alpha channel */ + background.red = x_bg_color.red >> 8; +@@ -136,7 +138,11 @@ read_png(FILE *file, int filetype, F_pic + + if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette)) { + png_get_hIST(png_ptr, info_ptr, &histogram); ++#if PNG_LIBPNG_VER_MAJOR <= 1 && PNG_LIBPNG_VER_MINOR < 5 + png_set_dither(png_ptr, palette, num_palette, 256, histogram, 0); ++#else ++ png_set_quantize(png_ptr, palette, num_palette, 256, histogram, 0); ++#endif + } + } + if (color_type == PNG_COLOR_TYPE_GRAY || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { +Index: xfig.3.2.5b/f_wrpng.c +=================================================================== +--- xfig.3.2.5b.orig/f_wrpng.c ++++ xfig.3.2.5b/f_wrpng.c +@@ -20,6 +20,7 @@ + #include "w_msgpanel.h" + #include "w_setup.h" + #include <png.h> ++#include <zlib.h> + + /* + * Write PNG file from rgb data +@@ -59,7 +60,7 @@ write_png(FILE *file, unsigned char *dat + } + + /* set long jump recovery here */ +- if (setjmp(png_ptr->jmpbuf)) { ++ if (setjmp(png_jmpbuf(png_ptr))) { + /* if we get here there was a problem reading the file */ + png_destroy_write_struct(&png_ptr, &info_ptr); + return False; diff --git a/media-gfx/xfig/files/xfig-3.2.5b-mkstemp.patch b/media-gfx/xfig/files/xfig-3.2.5b-mkstemp.patch new file mode 100644 index 000000000000..c672a27554da --- /dev/null +++ b/media-gfx/xfig/files/xfig-3.2.5b-mkstemp.patch @@ -0,0 +1,32 @@ +Missed hunk noticed https://bugzilla.redhat.com/show_bug.cgi?id=505257#c1 is recreated. + +http://bugs.gentoo.org/show_bug.cgi?id=264575 + +=== modified file 'u_print.c' +--- u_print.c 2010-01-14 19:50:08 +0000 ++++ u_print.c 2010-01-14 19:54:14 +0000 +@@ -202,14 +202,22 @@ + char tmp_fig_file[PATH_MAX]; + char *outfile, *name, *real_lang; + char *suf; ++ int fd; + + /* if file exists, ask if ok */ + if (!ok_to_write(file, "EXPORT")) + return (1); + +- sprintf(tmp_fig_file, "%s/%s%06d", TMPDIR, "xfig-fig", getpid()); ++ snprintf(tmp_fig_file, sizeof(tmp_fig_file), "%s/xfig-fig.XXXXXX", TMPDIR); + /* write the fig objects to a temporary file */ + warnexist = False; ++ ++ if ((fd = mkstemp(tmp_fig_file)) == -1) { ++ file_msg("Can't open temp file %s: %s\n", tmp_fig_file, strerror(errno)); ++ return; ++ } ++ close(fd); ++ + init_write_tmpfile(); + if (write_file(tmp_fig_file, False)) { + end_write_tmpfile(); + diff --git a/media-gfx/xfig/files/xfig-3.2.5b-network_images.patch b/media-gfx/xfig/files/xfig-3.2.5b-network_images.patch new file mode 100644 index 000000000000..1f7be5ff99a9 --- /dev/null +++ b/media-gfx/xfig/files/xfig-3.2.5b-network_images.patch @@ -0,0 +1,371 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 12_network_images.dpatch by Roland Rosenfeld <roland@debian.org> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Some network icons colored and/or combined by Roland Rosenfeld. + +@DPATCH@ +diff -urNad xfig~/Libraries/Networks/Devices/firewall-pair.fig xfig/Libraries/Networks/Devices/firewall-pair.fig +--- Libraries/Networks/Devices/firewall-pair.fig ++++ Libraries/Networks/Devices/firewall-pair.fig +@@ -0,0 +1,75 @@ ++#FIG 3.2 Produced by xfig version 3.2.5-alpha5 ++Portrait ++Center ++Inches ++A4 ++100.00 ++Single ++-2 ++# A pair of firewalls ++# Combined by Roland Rosenfeld ++1200 2 ++0 32 #aeaaae ++# A pair of firewalls ++6 3375 2175 4050 3075 ++6 3600 2250 4050 3075 ++# Firewall ++# (from TomiOllila <Tomi.Ollila@tfi.net> ) ++6 3600 2250 4050 3075 ++2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2 ++ 3825 3075 3825 2475 ++2 1 0 1 0 20 2 0 20 0.000 0 0 -1 0 0 5 ++ 3675 2475 3675 3075 3825 3075 3975 2925 3975 2400 ++2 1 0 1 0 32 1 0 20 0.000 0 0 -1 0 0 7 ++ 3600 2400 3600 2475 3900 2475 4050 2325 4050 2250 3750 2250 ++ 3600 2400 ++2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 3 ++ 3900 2475 3900 2400 3600 2400 ++2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2 ++ 3900 2400 4050 2250 ++2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 3 ++ 3675 2625 3825 2625 3975 2475 ++2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 3 ++ 3675 2775 3825 2775 3975 2625 ++2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 3 ++ 3675 2925 3825 2925 3975 2775 ++2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2 ++ 3900 3000 3900 2850 ++2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2 ++ 3900 2700 3900 2550 ++2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2 ++ 3750 2475 3750 2625 ++2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2 ++ 3750 2775 3750 2925 ++-6 ++-6 ++6 3375 2175 3825 3000 ++6 3450 2175 3825 3000 ++2 1 0 1 0 7 20 0 -1 0.000 0 0 7 0 0 2 ++ 3600 3000 3600 2400 ++2 1 0 1 0 7 20 0 -1 0.000 0 0 7 0 0 2 ++ 3675 2325 3825 2175 ++2 1 0 1 0 7 20 0 -1 0.000 0 0 7 0 0 3 ++ 3450 2550 3600 2550 3750 2400 ++2 1 0 1 0 7 20 0 -1 0.000 0 0 7 0 0 3 ++ 3450 2700 3600 2700 3750 2550 ++2 1 0 1 0 7 20 0 -1 0.000 0 0 7 0 0 3 ++ 3450 2850 3600 2850 3750 2700 ++2 1 0 1 0 7 20 0 -1 0.000 0 0 7 0 0 2 ++ 3675 2925 3675 2775 ++2 1 0 1 0 7 20 0 -1 0.000 0 0 7 0 0 2 ++ 3675 2625 3675 2475 ++2 1 0 1 0 7 20 0 -1 0.000 0 0 7 0 0 2 ++ 3525 2400 3525 2550 ++2 1 0 1 0 7 20 0 -1 0.000 0 0 7 0 0 2 ++ 3525 2700 3525 2850 ++-6 ++2 1 0 1 0 20 22 0 20 0.000 0 0 -1 0 0 5 ++ 3450 2400 3450 3000 3600 3000 3750 2850 3750 2325 ++2 1 0 1 0 32 21 0 20 0.000 0 0 -1 0 0 7 ++ 3375 2325 3375 2400 3675 2400 3825 2250 3825 2175 3525 2175 ++ 3375 2325 ++2 1 0 1 0 7 20 0 -1 0.000 0 0 -1 0 0 3 ++ 3675 2400 3675 2325 3375 2325 ++-6 ++-6 +diff -urNad xfig~/Libraries/Networks/Devices/internet.fig xfig/Libraries/Networks/Devices/internet.fig +--- Libraries/Networks/Devices/internet.fig ++++ Libraries/Networks/Devices/internet.fig +@@ -0,0 +1,39 @@ ++#FIG 3.2 Produced by xfig version 3.2.5-alpha5 ++Portrait ++Center ++Inches ++A4 ++100.00 ++Single ++-2 ++# Internet cloud ++# By Roland Rosenfeld ++1200 2 ++# An Internet cloud ++6 4275 5700 7200 7650 ++2 1 0 0 7 7 970 0 20 4.000 0 0 0 0 0 65 ++ 4719 7111 4633 7121 4548 7105 4469 7057 4394 6983 4346 6888 ++ 4309 6776 4298 6654 4309 6526 4346 6415 4394 6325 4469 6244 ++ 4548 6197 4633 6181 4719 6197 4798 6048 4893 5915 4994 5825 ++ 5122 5746 5244 5719 5377 5719 5505 5746 5627 5825 5733 5915 ++ 5850 5825 5961 5746 6094 5719 6222 5719 6355 5746 6472 5825 ++ 6583 5915 6668 6048 6748 6197 6833 6181 6918 6197 7003 6244 ++ 7072 6325 7130 6415 7157 6526 7168 6654 7157 6776 7130 6888 ++ 7072 6983 7003 7057 6918 7105 6833 7121 6748 7111 6668 7265 ++ 6583 7387 6472 7488 6355 7557 6222 7594 6094 7594 5961 7557 ++ 5850 7488 5733 7387 5627 7488 5505 7557 5377 7594 5244 7594 ++ 5122 7557 4994 7488 4893 7387 4798 7265 4719 7111 ++2 1 0 2 1 0 969 0 -1 0.000 0 0 0 0 0 65 ++ 4719 7111 4633 7121 4548 7105 4469 7057 4394 6983 4346 6888 ++ 4309 6776 4298 6654 4309 6526 4346 6415 4394 6325 4469 6244 ++ 4548 6197 4633 6181 4719 6197 4798 6048 4893 5915 4994 5825 ++ 5122 5746 5244 5719 5377 5719 5505 5746 5627 5825 5733 5915 ++ 5850 5825 5961 5746 6094 5719 6222 5719 6355 5746 6472 5825 ++ 6583 5915 6668 6048 6748 6197 6833 6181 6918 6197 7003 6244 ++ 7072 6325 7130 6415 7157 6526 7168 6654 7157 6776 7130 6888 ++ 7072 6983 7003 7057 6918 7105 6833 7121 6748 7111 6668 7265 ++ 6583 7387 6472 7488 6355 7557 6222 7594 6094 7594 5961 7557 ++ 5850 7488 5733 7387 5627 7488 5505 7557 5377 7594 5244 7594 ++ 5122 7557 4994 7488 4893 7387 4798 7265 4719 7111 ++4 0 0 100 0 18 33 0.0000 4 405 2040 4744 6853 Internet\001 ++-6 +diff -urNad xfig~/Libraries/Networks/Routers/router-pair.fig xfig/Libraries/Networks/Routers/router-pair.fig +--- Libraries/Networks/Routers/router-pair.fig ++++ Libraries/Networks/Routers/router-pair.fig +@@ -0,0 +1,78 @@ ++#FIG 3.2 Produced by xfig version 3.2.5-alpha5 ++Portrait ++Center ++Inches ++A4 ++100.00 ++Single ++-2 ++# A pair of routers ++# Colored and combined by Roland Rosenfeld ++1200 2 ++# A pair of routers ++6 3150 3300 4275 3975 ++6 3346 3450 4269 3975 ++6 3844 3615 4173 3718 ++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8 ++ 3879 3701 3854 3647 3976 3624 3955 3642 4159 3676 4111 3713 ++ 3908 3676 3879 3701 ++-6 ++6 3617 3636 3803 3759 ++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8 ++ 3764 3731 3638 3754 3634 3694 3671 3703 3738 3646 3800 3657 ++ 3727 3719 3764 3731 ++-6 ++6 3803 3470 3988 3594 ++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 7 0 0 8 ++ 3837 3518 3982 3481 3983 3541 3947 3535 3876 3591 3809 3581 ++ 3882 3526 3837 3518 ++-6 ++1 2 0 1 0 15 51 0 20 0.000 1 0.0000 3807 3619 457 169 3349 3619 4264 3619 ++1 2 0 1 0 15 53 0 20 0.000 1 0.0000 3803 3806 457 169 3346 3806 4261 3806 ++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8 ++ 3705 3557 3738 3608 3609 3637 3638 3615 3439 3581 3488 3545 ++ 3681 3576 3705 3557 ++2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 ++ 3350 3613 3347 3812 ++2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 ++ 4263 3626 4263 3815 ++2 2 0 0 0 15 52 -1 20 0.000 0 0 -1 0 0 5 ++ 3349 3626 4269 3626 4269 3800 3349 3800 3349 3626 ++-6 ++6 3150 3300 4125 3825 ++6 3600 3450 3975 3600 ++# polyline
++2 1 0 1 0 7 60 0 20 0.000 0 0 0 0 0 8 ++ 3683 3551 3658 3497 3780 3474 3759 3492 3963 3526 3915 3563 ++ 3712 3526 3683 3551 ++-6 ++6 3600 3300 3825 3450 ++# polyline
++2 1 0 1 0 7 60 0 20 0.000 0 0 7 0 0 8 ++ 3641 3368 3786 3331 3787 3391 3751 3385 3680 3441 3613 3431 ++ 3686 3376 3641 3368 ++-6 ++6 3375 3450 3675 3675 ++# polyline
++2 1 0 1 0 7 60 0 20 0.000 0 0 0 0 0 8 ++ 3568 3581 3442 3604 3438 3544 3475 3553 3542 3496 3604 3507 ++ 3531 3569 3568 3581 ++-6 ++1 2 0 1 0 15 61 0 20 0.000 1 0.0000 3611 3469 457 169 3153 3469 4068 3469 ++1 2 0 1 0 15 63 0 20 0.000 1 0.0000 3607 3656 457 169 3150 3656 4065 3656 ++2 1 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 2 ++ 4067 3476 4067 3665 ++# polyline
++2 1 0 1 0 7 60 0 20 0.000 0 0 0 0 0 8 ++ 3509 3407 3542 3458 3413 3487 3442 3465 3243 3431 3292 3395 ++ 3485 3426 3509 3407 ++2 1 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 2 ++ 3154 3463 3151 3662 ++2 2 0 0 0 15 62 -1 20 0.000 0 0 -1 0 0 5 ++ 3153 3476 4073 3476 4073 3650 3153 3650 3153 3476 ++-6 ++-6 +diff -urNad xfig~/Libraries/Networks/Routers/router4.fig xfig/Libraries/Networks/Routers/router4.fig +--- Libraries/Networks/Routers/router4.fig ++++ Libraries/Networks/Routers/router4.fig +@@ -0,0 +1,44 @@ ++#FIG 3.2 Produced by xfig version 3.2.5-alpha5 ++Portrait ++Center ++Metric ++A4 ++100.00 ++Single ++-2 ++# Router ++# Colored by Roland Rosenfeld ++1200 2 ++# Router ++6 3870 4455 5940 5625 ++6 4995 4815 5715 5040 ++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8 ++ 5072 5002 5018 4886 5284 4834 5238 4873 5683 4948 5578 5030 ++ 5136 4948 5072 5002 ++-6 ++6 4500 4860 4905 5130 ++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8 ++ 4822 5067 4545 5117 4537 4989 4618 5007 4766 4883 4900 4905 ++ 4741 5041 4822 5067 ++-6 ++6 4905 4500 5310 4770 ++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 7 0 0 8 ++ 4981 4603 5296 4523 5300 4653 5222 4640 5066 4762 4919 4741 ++ 5079 4622 4981 4603 ++-6 ++1 2 0 1 0 15 51 0 20 0.000 1 0.0000 4914 4824 999 369 3915 4824 5913 4824 ++1 2 0 1 0 15 53 0 20 0.000 1 0.0000 4908 5231 999 369 3909 5231 5907 5231 ++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8 ++ 4693 4690 4766 4800 4483 4863 4545 4814 4111 4740 4219 4661 ++ 4640 4731 4693 4690 ++2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 ++ 3917 4811 3910 5244 ++2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 ++ 5910 4838 5910 5251 ++2 2 0 0 0 15 52 -1 20 0.000 0 0 -1 0 0 5 ++ 3915 4838 5924 4838 5924 5218 3915 5218 3915 4838 ++-6 +diff -urNad xfig~/Libraries/Networks/Switches/switch-pair.fig xfig/Libraries/Networks/Switches/switch-pair.fig +--- Libraries/Networks/Switches/switch-pair.fig ++++ Libraries/Networks/Switches/switch-pair.fig +@@ -0,0 +1,66 @@ ++#FIG 3.2 Produced by xfig version 3.2.5-alpha5 ++Portrait ++Center ++Inches ++A4 ++100.00 ++Single ++-2 ++# A pair of switches ++# Colored and combined by Roland Rosenfeld ++1200 2 ++# A pair of switches ++6 2550 2625 4725 3750 ++6 2625 2850 4725 3750 ++6 3000 2850 4425 3300 ++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8 ++ 3603 3180 3581 3210 3194 3210 3161 3240 3028 3195 3268 3126 ++ 3214 3184 3608 3184 ++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8 ++ 3651 3128 3673 3098 4060 3098 4093 3068 4226 3113 3986 3182 ++ 4040 3124 3646 3124 ++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8 ++ 3760 3008 3738 3038 3351 3038 3318 3068 3185 3023 3425 2954 ++ 3371 3012 3765 3012 ++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8 ++ 3827 2963 3849 2933 4236 2933 4269 2903 4402 2948 4162 3017 ++ 4216 2959 3822 2959 ++-6 ++2 1 0 1 0 15 51 0 20 0.000 0 0 -1 0 0 4 ++ 4125 3300 4725 2850 4725 3300 4125 3750 ++2 2 0 1 0 15 51 0 20 0.000 0 0 -1 0 0 5 ++ 2625 3300 4125 3300 4125 3750 2625 3750 2625 3300 ++2 3 0 1 0 15 51 -1 20 0.000 0 0 -1 0 0 5 ++ 2625 3300 3225 2850 4725 2850 4125 3300 2625 3300 ++-6 ++6 2550 2625 4650 3525 ++6 2925 2625 4350 3075 ++# polyline
++2 1 0 1 0 7 61 0 20 0.000 0 0 0 0 0 8 ++ 3528 2955 3506 2985 3119 2985 3086 3015 2953 2970 3193 2901 ++ 3139 2959 3533 2959 ++# polyline
++2 1 0 1 0 7 61 0 20 0.000 0 0 0 0 0 8 ++ 3576 2903 3598 2873 3985 2873 4018 2843 4151 2888 3911 2957 ++ 3965 2899 3571 2899 ++# polyline
++2 1 0 1 0 7 61 0 20 0.000 0 0 0 0 0 8 ++ 3685 2783 3663 2813 3276 2813 3243 2843 3110 2798 3350 2729 ++ 3296 2787 3690 2787 ++# polyline
++2 1 0 1 0 7 61 0 20 0.000 0 0 0 0 0 8 ++ 3752 2738 3774 2708 4161 2708 4194 2678 4327 2723 4087 2792 ++ 4141 2734 3747 2734 ++-6 ++2 1 0 1 0 15 62 0 20 0.000 0 0 -1 0 0 4 ++ 4050 3075 4650 2625 4650 3075 4050 3525 ++2 2 0 1 0 15 62 0 20 0.000 0 0 -1 0 0 5 ++ 2550 3075 4050 3075 4050 3525 2550 3525 2550 3075 ++2 3 0 1 0 15 62 -1 20 0.000 0 0 -1 0 0 5 ++ 2550 3075 3150 2625 4650 2625 4050 3075 2550 3075 ++-6 ++-6 +diff -urNad xfig~/Libraries/Networks/Switches/switch2.fig xfig/Libraries/Networks/Switches/switch2.fig +--- Libraries/Networks/Switches/switch2.fig ++++ Libraries/Networks/Switches/switch2.fig +@@ -0,0 +1,38 @@ ++#FIG 3.2 Produced by xfig version 3.2.5-alpha5 ++Portrait ++Center ++Inches ++A4 ++100.00 ++Single ++-2 ++# Switch ++# colored by Roland Rosenfeld ++1200 2 ++# Switch ++6 2625 2850 4725 3750 ++6 3000 2850 4425 3300 ++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8 ++ 3603 3180 3581 3210 3194 3210 3161 3240 3028 3195 3268 3126 ++ 3214 3184 3608 3184 ++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8 ++ 3651 3128 3673 3098 4060 3098 4093 3068 4226 3113 3986 3182 ++ 4040 3124 3646 3124 ++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8 ++ 3760 3008 3738 3038 3351 3038 3318 3068 3185 3023 3425 2954 ++ 3371 3012 3765 3012 ++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8 ++ 3827 2963 3849 2933 4236 2933 4269 2903 4402 2948 4162 3017 ++ 4216 2959 3822 2959 ++-6 ++2 1 0 1 0 15 51 0 20 0.000 0 0 -1 0 0 4 ++ 4125 3300 4725 2850 4725 3300 4125 3750 ++2 2 0 1 0 15 51 0 20 0.000 0 0 -1 0 0 5 ++ 2625 3300 4125 3300 4125 3750 2625 3750 2625 3300 ++2 3 0 1 0 15 51 -1 20 0.000 0 0 -1 0 0 5 ++ 2625 3300 3225 2850 4725 2850 4125 3300 2625 3300 ++-6 diff --git a/media-gfx/xfig/files/xfig-3.2.5b-papersize_b1.patch b/media-gfx/xfig/files/xfig-3.2.5b-papersize_b1.patch new file mode 100644 index 000000000000..fa0bdf0a3c0e --- /dev/null +++ b/media-gfx/xfig/files/xfig-3.2.5b-papersize_b1.patch @@ -0,0 +1,27 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 32_papersize_b1.dpatch by Roland Rosenfeld <roland@debian.org> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: xfig -papersize b1 now really uses B1 instead of B10 +## DP: Closes: #535181 + +@DPATCH@ +diff -urNad xfig~/resources.c xfig/resources.c +--- xfig~/resources.c ++++ xfig/resources.c +@@ -228,7 +228,6 @@ + {"A2 ", "ISO A2 ( 420mm x 594mm)", 19843, 28063}, + {"A1 ", "ISO A1 ( 594mm x 841mm)", 28063, 39732}, + {"A0 ", "ISO A0 ( 841mm x 1189mm)", 39732, 56173}, +- {"B10 ", "JIS B10 ( 32mm x 45mm)", 1516, 2117}, + {"B9 ", "JIS B9 ( 45mm x 64mm)", 2117, 3017}, + {"B8 ", "JIS B8 ( 64mm x 91mm)", 3017, 4300}, + {"B7 ", "JIS B7 ( 91mm x 128mm)", 4300, 6050}, +@@ -239,6 +238,7 @@ + {"B2 ", "JIS B2 ( 515mm x 728mm)", 24333, 34400}, + {"B1 ", "JIS B1 ( 728mm x 1030mm)", 34400, 48666}, + {"B0 ", "JIS B0 (1030mm x 1456mm)", 48666, 68783}, ++ {"B10 ", "JIS B10 ( 32mm x 45mm)", 1516, 2117}, + }; + + char *multiple_pages[] = { diff --git a/media-gfx/xfig/files/xfig-3.2.5b-pdfimport_mediabox.patch b/media-gfx/xfig/files/xfig-3.2.5b-pdfimport_mediabox.patch new file mode 100644 index 000000000000..23de740f157d --- /dev/null +++ b/media-gfx/xfig/files/xfig-3.2.5b-pdfimport_mediabox.patch @@ -0,0 +1,37 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 33_pdfimport_mediabox.dpatch by jsoula@univ-lille2.fr +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix reading "/MediaBox" when importing PDF (Closes: #530898). + +@DPATCH@ +diff -urNad xfig~/f_readeps.c xfig/f_readeps.c +--- xfig~/f_readeps.c ++++ xfig/f_readeps.c +@@ -77,11 +77,13 @@ + + /* look for /MediaBox for pdf file */ + if (pdf_flag) { +- if (!strncmp(buf, "/MediaBox", 8)) { /* look for the MediaBox spec */ ++ char *s; ++ for(s=buf; (s=strchr(s,'/')); s++) { ++ if (!strncmp(s, "/MediaBox", 8)) { /* look for the MediaBox spec */ + char *c; + +- c = strchr(buf, '[') + 1; +- if (c && sscanf(c, "%d %d %d %d", &llx, &lly, &urx, &ury) < 4) { ++ c = strchr(s, '['); ++ if (c && sscanf(c+1, "%d %d %d %d", &llx, &lly, &urx, &ury) < 4) { + llx = lly = 0; + urx = paper_sizes[0].width * 72 / PIX_PER_INCH; + ury = paper_sizes[0].height * 72 / PIX_PER_INCH; +@@ -89,7 +91,9 @@ + appres.INCHES ? "Letter" : "A4"); + app_flush(); + } ++ break; + } ++ } + /* look for bounding box */ + } else if (!nested && !strncmp(buf, "%%BoundingBox:", 14)) { + if (!strstr(buf, "(atend)")) { /* make sure doesn't say (atend) */ diff --git a/media-gfx/xfig/files/xfig-3.2.5b-solaris.patch b/media-gfx/xfig/files/xfig-3.2.5b-solaris.patch new file mode 100644 index 000000000000..a295b5227f00 --- /dev/null +++ b/media-gfx/xfig/files/xfig-3.2.5b-solaris.patch @@ -0,0 +1,26 @@ +* workaround some missing things on Solaris + +--- u_quartic.c ++++ u_quartic.c +@@ -21,4 +21,7 @@ + #include <math.h> + ++ #ifndef M_PI ++ # define M_PI 3.14159265358979323846 ++ #endif + + static int +--- w_intersect.c ++++ w_intersect.c +@@ -31,6 +31,11 @@ + #define ISET_P1 (1 << 0) + #define ISET_P2 (1 << 1) + ++#if defined (__SVR4) && defined (__sun) ++#undef _Complex_I ++#define _Complex_I (__extension__ 1.0fi) ++#endif ++ + intersect_state_e intersect_state = INTERSECT_INITIAL; + + static INLINE Boolean diff --git a/media-gfx/xfig/files/xfig-3.2.5b-spelling.patch b/media-gfx/xfig/files/xfig-3.2.5b-spelling.patch new file mode 100644 index 000000000000..942276ca75e9 --- /dev/null +++ b/media-gfx/xfig/files/xfig-3.2.5b-spelling.patch @@ -0,0 +1,29 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 31_spelling.dpatch by Roland Rosenfeld <roland@debian.org> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix spelling errors in binary. + +@DPATCH@ +diff -urNad xfig~/f_load.c xfig/f_load.c +--- xfig~/f_load.c ++++ xfig/f_load.c +@@ -373,5 +373,5 @@ + /* Format error; relevant error message is already delivered */ + ; + else +- file_msg("File \"%s\" is not accessable; %s.", file, strerror(err)); ++ file_msg("File \"%s\" is not accessible; %s.", file, strerror(err)); + } +diff -urNad xfig~/f_readgif.c xfig/f_readgif.c +--- xfig~/f_readgif.c ++++ xfig/f_readgif.c +@@ -137,7 +137,7 @@ + + if (c == '!') { /* Extension */ + if (! ReadOK(file,&c,1)) +- file_msg("GIF read error on extention function code"); ++ file_msg("GIF read error on extension function code"); + (void) DoGIFextension(file, c); + continue; + } diff --git a/media-gfx/xfig/files/xfig-3.2.5b-urwfonts.patch b/media-gfx/xfig/files/xfig-3.2.5b-urwfonts.patch new file mode 100644 index 000000000000..6a5c3dff949e --- /dev/null +++ b/media-gfx/xfig/files/xfig-3.2.5b-urwfonts.patch @@ -0,0 +1,79 @@ +--- u_fonts.c 2002-09-09 13:36:58.000000000 -0400 ++++ u_fonts.c 2006-10-11 00:29:07.000000000 -0400 +@@ -22,41 +22,41 @@ + /* X11 font names */ + + struct _xfstruct x_fontinfo[NUM_FONTS] = { +- {"-*-times-medium-r-normal--", (struct xfont*) NULL}, +- {"-*-times-medium-i-normal--", (struct xfont*) NULL}, +- {"-*-times-bold-r-normal--", (struct xfont*) NULL}, +- {"-*-times-bold-i-normal--", (struct xfont*) NULL}, +- {"-*-avantgarde-book-r-normal--", (struct xfont*) NULL}, +- {"-*-avantgarde-book-o-normal--", (struct xfont*) NULL}, +- {"-*-avantgarde-demi-r-normal--", (struct xfont*) NULL}, +- {"-*-avantgarde-demi-o-normal--", (struct xfont*) NULL}, +- {"-*-bookman-light-r-normal--", (struct xfont*) NULL}, +- {"-*-bookman-light-i-normal--", (struct xfont*) NULL}, +- {"-*-bookman-demi-r-normal--", (struct xfont*) NULL}, +- {"-*-bookman-demi-i-normal--", (struct xfont*) NULL}, +- {"-*-courier-medium-r-normal--", (struct xfont*) NULL}, +- {"-*-courier-medium-o-normal--", (struct xfont*) NULL}, +- {"-*-courier-bold-r-normal--", (struct xfont*) NULL}, +- {"-*-courier-bold-o-normal--", (struct xfont*) NULL}, +- {"-*-helvetica-medium-r-normal--", (struct xfont*) NULL}, +- {"-*-helvetica-medium-o-normal--", (struct xfont*) NULL}, +- {"-*-helvetica-bold-r-normal--", (struct xfont*) NULL}, +- {"-*-helvetica-bold-o-normal--", (struct xfont*) NULL}, +- {"-*-helvetica-medium-r-narrow--", (struct xfont*) NULL}, +- {"-*-helvetica-medium-o-narrow--", (struct xfont*) NULL}, +- {"-*-helvetica-bold-r-narrow--", (struct xfont*) NULL}, +- {"-*-helvetica-bold-o-narrow--", (struct xfont*) NULL}, +- {"-*-new century schoolbook-medium-r-normal--", (struct xfont*) NULL}, +- {"-*-new century schoolbook-medium-i-normal--", (struct xfont*) NULL}, +- {"-*-new century schoolbook-bold-r-normal--", (struct xfont*) NULL}, +- {"-*-new century schoolbook-bold-i-normal--", (struct xfont*) NULL}, +- {"-*-palatino-medium-r-normal--", (struct xfont*) NULL}, +- {"-*-palatino-medium-i-normal--", (struct xfont*) NULL}, +- {"-*-palatino-bold-r-normal--", (struct xfont*) NULL}, +- {"-*-palatino-bold-i-normal--", (struct xfont*) NULL}, +- {"-*-symbol-medium-r-normal--", (struct xfont*) NULL}, +- {"-*-itc zapf chancery-medium-i-normal--", (struct xfont*) NULL}, +- {"-*-itc zapf dingbats-*-*-*--", (struct xfont*) NULL}, ++ {"-urw-nimbus roman no9 l-medium-r-normal--", (struct xfont*) NULL}, ++ {"-urw-nimbus roman no9 l-medium-i-normal--", (struct xfont*) NULL}, ++ {"-urw-nimbus roman no9 l-bold-r-normal--", (struct xfont*) NULL}, ++ {"-urw-nimbus roman no9 l-bold-i-normal--", (struct xfont*) NULL}, ++ {"-urw-urw gothic l-medium-r-normal--", (struct xfont*) NULL}, ++ {"-urw-urw gothic l-medium-o-normal--", (struct xfont*) NULL}, ++ {"-urw-urw gothic l-semibold-r-normal--", (struct xfont*) NULL}, ++ {"-urw-urw gothic l-semibold-o-normal--", (struct xfont*) NULL}, ++ {"-urw-urw bookman l-medium-r-normal--", (struct xfont*) NULL}, ++ {"-urw-urw bookman l-medium-i-normal--", (struct xfont*) NULL}, ++ {"-urw-urw bookman l-bold-r-normal--", (struct xfont*) NULL}, ++ {"-urw-urw bookman l-bold-i-normal--", (struct xfont*) NULL}, ++ {"-urw-nimbus mono l-medium-r-normal--", (struct xfont*) NULL}, ++ {"-urw-nimbus mono l-medium-o-normal--", (struct xfont*) NULL}, ++ {"-urw-nimbus mono l-bold-r-normal--", (struct xfont*) NULL}, ++ {"-urw-nimbus mono l-bold-o-normal--", (struct xfont*) NULL}, ++ {"-urw-nimbus sans l-medium-r-normal--", (struct xfont*) NULL}, ++ {"-urw-nimbus sans l-medium-i-normal--", (struct xfont*) NULL}, ++ {"-urw-nimbus sans l-bold-r-normal--", (struct xfont*) NULL}, ++ {"-urw-nimbus sans l-bold-i-normal--", (struct xfont*) NULL}, ++ {"-urw-nimbus sans l-medium-r-condensed--", (struct xfont*) NULL}, ++ {"-urw-nimbus sans l-medium-i-condensed--", (struct xfont*) NULL}, ++ {"-urw-nimbus sans l-bold-r-condensed--", (struct xfont*) NULL}, ++ {"-urw-nimbus sans l-bold-i-condensed--", (struct xfont*) NULL}, ++ {"-urw-century schoolbook l-medium-r-normal--", (struct xfont*) NULL}, ++ {"-urw-century schoolbook l-medium-i-normal--", (struct xfont*) NULL}, ++ {"-urw-century schoolbook l-bold-r-normal--", (struct xfont*) NULL}, ++ {"-urw-century schoolbook l-bold-i-normal--", (struct xfont*) NULL}, ++ {"-urw-urw palladio l-medium-r-normal--", (struct xfont*) NULL}, ++ {"-urw-urw palladio l-medium-i-normal--", (struct xfont*) NULL}, ++ {"-urw-urw palladio l-bold-r-normal--", (struct xfont*) NULL}, ++ {"-urw-urw palladio l-bold-i-normal--", (struct xfont*) NULL}, ++ {"-urw-standard symbols l-medium-r-normal--", (struct xfont*) NULL}, ++ {"-urw-urw chancery l-medium-i-normal--", (struct xfont*) NULL}, ++ {"-urw-dingbats-medium-r-normal--", (struct xfont*) NULL}, + }; + + /* Use the following font names for any font that doesn't exist in the table above. 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 new file mode 100644 index 000000000000..11e5ceb932a8 --- /dev/null +++ b/media-gfx/xfig/files/xfig-3.2.5b-zoom-during-edit.patch @@ -0,0 +1,22 @@ +commit fc4381d7c3e8d7440a3e33430d24ebf217a99142 +Author: Vladislav Zavjalov <slazav@altlinux.org> +Date: Thu Oct 2 12:24:04 2008 +0400 + + fix calling null function (todo: problem with initialize_char_handler after resize?) + +Fixes crash. To reproduce create some object, zoom in so that it does not fit +the screen, start another edit and press Ctrl+Z. + +diff --git a/xfig/u_redraw.c b/xfig/u_redraw.c +index 146abfa..fd53a8e 100644 +--- a/xfig/u_redraw.c ++++ b/xfig/u_redraw.c +@@ -434,7 +434,7 @@ redisplay_curobj() + } + } else { + /* editing an object, just refresh it as is */ +- (*canvas_ref_proc)(cur_x, cur_y); ++ if (canvas_ref_proc) (*canvas_ref_proc)(cur_x, cur_y); + } + } + diff --git a/media-gfx/xfig/files/xfig-3.2.5c-XAW3D1_5E_notlocal.patch b/media-gfx/xfig/files/xfig-3.2.5c-XAW3D1_5E_notlocal.patch new file mode 100644 index 000000000000..8998b406467a --- /dev/null +++ b/media-gfx/xfig/files/xfig-3.2.5c-XAW3D1_5E_notlocal.patch @@ -0,0 +1,70 @@ +From be8cf541743060921f629d5bfe990d985ecf1813 Mon Sep 17 00:00:00 2001 +From: Vladislav Zavjalov <slazav@altlinux.org> +Origin: http://git.altlinux.org/people/slazav/packages/?p=xfig.git;a=patch;h=be8cf541743060921f629d5bfe990d985ecf1813 +Date: Wed, 29 May 2013 02:18:13 +0400 +Subject: [PATCH] Don't use local SimpleMenu.c with XAW3D1_5E +Bug-Debian: http://bugs.debian.org/296703 + +--- + xfig/SmeCascade.h | 5 +++++ + xfig/SmeCascadeP.h | 5 +++++ + xfig/w_menuentry.h | 4 ++++ + xfig/w_util.c | 2 ++ + 4 files changed, 16 insertions(+), 0 deletions(-) + +--- a/SmeCascade.h ++++ b/SmeCascade.h +@@ -27,7 +27,12 @@ + #else
+ #include <X11/Xaw/Sme.h>
+ #endif
++
++#ifdef XAW3D1_5E
++#include <X11/Xaw3d/SmeBSB.h>
++#else
+ #include "SmeBSB.h"
++#endif
+
+ /****************************************************************
+ *
+--- a/SmeCascadeP.h ++++ b/SmeCascadeP.h +@@ -32,8 +32,12 @@ + #include <X11/Xaw/SmeP.h>
+ #endif
+
++#ifdef XAW3D1_5E
++#include <X11/Xaw3d/SmeBSBP.h>
++#else
+ #include "SmeBSBP.h"
+ #include "SmeCascade.h"
++#endif
+
+ /************************************************************
+ *
+--- a/w_menuentry.h ++++ b/w_menuentry.h +@@ -30,7 +30,11 @@ + #include <X11/Xaw/Sme.h>
+ #endif
+
++#ifdef XAW3D1_5E
++#include <X11/Xaw3d/SmeBSB.h>
++#else
+ #include "SmeBSB.h"
++#endif
+
+ /****************************************************************
+ *
+--- a/w_util.c ++++ b/w_util.c +@@ -351,7 +351,9 @@ + * (use -1 if no line desired) + */ + ++#ifndef XAW3D1_5E + #include "SmeCascade.h" ++#endif /* XAW3D1_5E */ + + #include "d_text.h" + #include "e_placelib.h" diff --git a/media-gfx/xfig/files/xfig-3.2.5c-crash-on-exit.patch b/media-gfx/xfig/files/xfig-3.2.5c-crash-on-exit.patch new file mode 100644 index 000000000000..80d20281ae93 --- /dev/null +++ b/media-gfx/xfig/files/xfig-3.2.5c-crash-on-exit.patch @@ -0,0 +1,19 @@ +commit 56f0caaae3cc3fdbf6eaa21fc419c951c53a156d +Author: Peter Volkov <peter.volkov@gmail.com> +Date: Mon Jun 9 12:36:12 2014 +0400 + + Fix crash on exit (regression of xfig.3.2.5c) + +diff --git a/u_free.c b/u_free.c +index 18d517a..4a5080f 100755 +--- a/u_free.c ++++ b/u_free.c +@@ -270,8 +270,6 @@ void free_Fonts(void) + XUnloadFont(tool_d, nf->fid); + if (nf->fstruct != NULL) + XFreeFont(tool_d, nf->fstruct); +- if (nf->fset != NULL) +- XFreeFontSet(tool_d, nf->fset); + nf = nf->next; + } + } diff --git a/media-gfx/xfig/files/xfig-3.2.5c-darwin.patch b/media-gfx/xfig/files/xfig-3.2.5c-darwin.patch new file mode 100644 index 000000000000..5d64c2a4deb5 --- /dev/null +++ b/media-gfx/xfig/files/xfig-3.2.5c-darwin.patch @@ -0,0 +1,26 @@ +diff --git a/fig.h b/fig.h +index ca00aef..a3605b0 100644 +--- a/fig.h ++++ b/fig.h +@@ -375,7 +375,7 @@ extern double drand48(); + extern long random();
+ extern void srandom(unsigned int);
+
+-#elif !defined(__osf__) && !defined(__CYGWIN__) && !defined(linux) && !defined(__FreeBSD__) && !defined(__GLIBC__)
++#elif !defined(__osf__) && !defined(__CYGWIN__) && !defined(linux) && !defined(__FreeBSD__) && !defined(__DARWIN__) && !defined(__GLIBC__)
+ extern void srandom(int);
+
+ #endif
+diff --git a/w_keyboard.c b/w_keyboard.c +index 427d60c..03a3f76 100644 +--- a/w_keyboard.c ++++ b/w_keyboard.c +@@ -41,7 +41,7 @@ + #define REG_NOERROR 0 + #endif + +-#if defined(__FreeBSD__) && !defined(REG_NOERROR) ++#if (defined(__FreeBSD__) || defined(__DARWIN__)) && !defined(REG_NOERROR) + #define REG_NOERROR 0 + #endif + diff --git a/media-gfx/xfig/files/xfig-3.2.5c-spelling.patch b/media-gfx/xfig/files/xfig-3.2.5c-spelling.patch new file mode 100644 index 000000000000..4af77e0e9b06 --- /dev/null +++ b/media-gfx/xfig/files/xfig-3.2.5c-spelling.patch @@ -0,0 +1,17 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 31_spelling.dpatch by Roland Rosenfeld <roland@debian.org> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix spelling errors in binary. + +@DPATCH@ +diff -urNad xfig~/f_load.c xfig/f_load.c +--- xfig~/f_load.c ++++ xfig/f_load.c +@@ -373,5 +373,5 @@ + /* Format error; relevant error message is already delivered */ + ; + else +- file_msg("File \"%s\" is not accessable; %s.", file, strerror(err)); ++ file_msg("File \"%s\" is not accessible; %s.", file, strerror(err)); + } |