SHA256
1
0
forked from pool/xfig
Dr. Werner Fink 2013-12-10 14:25:41 +00:00 committed by Git OBS Bridge
parent 951a758c3f
commit 7e0aa87dca
12 changed files with 100 additions and 242 deletions

View File

@ -1,7 +1,6 @@
diff -ru xfig.3.2.3d.orig/main.c xfig.3.2.3d/main.c --- main.c
--- xfig.3.2.3d.orig/main.c 2001-01-25 22:49:19.000000000 +0100 +++ main.c 2013-12-10 13:40:27.062735528 +0000
+++ xfig.3.2.3d/main.c 2003-05-09 11:58:41.000000000 +0200 @@ -328,8 +328,36 @@ static XtResource application_resources[
@@ -259,18 +259,36 @@
XtOffset(appresPtr, always_use_fontset), XtRBoolean, (caddr_t) & false}, XtOffset(appresPtr, always_use_fontset), XtRBoolean, (caddr_t) & false},
{"fixedFontSet", "FontSet", XtRFontSet, sizeof(XFontSet), {"fixedFontSet", "FontSet", XtRFontSet, sizeof(XFontSet),
XtOffset(appresPtr, fixed_fontset), XtRString, XtOffset(appresPtr, fixed_fontset), XtRString,
@ -14,12 +13,9 @@ diff -ru xfig.3.2.3d.orig/main.c xfig.3.2.3d/main.c
+ "-*-*-medium-r-normal--34-*-*-*-*-*-*-*,*--34-*" + "-*-*-medium-r-normal--34-*-*-*-*-*-*-*,*--34-*"
+ "-*-times-medium-r-normal--16-*-*-*-*-*-*-*," + "-*-times-medium-r-normal--16-*-*-*-*-*-*-*,"
+ "-*-*-medium-r-normal--16-*-*-*-*-*-*-*,*--16-*" + "-*-*-medium-r-normal--16-*-*-*-*-*-*-*,*--16-*"
+ }, + }, /*
{"normalFontSet", "NormalFontSet", XtRFontSet, sizeof(XFontSet), + {"normalFontSet", "NormalFontSet", XtRFontSet, sizeof(XFontSet),
XtOffset(appresPtr, normal_fontset), XtRString, + XtOffset(appresPtr, normal_fontset), XtRString,
- (caddr_t) "-*-times-medium-r-normal--16-*-*-*-*-*-*-*,"
- "-*-*-medium-r-normal--16-*-*-*-*-*-*-*,"
- "-*-*-*-r-*--16-*-*-*-*-*-*-*" },
+ (caddr_t) "-URW-Nimbus Roman No9 L-medium-r-normal--34-*-*-*-*-*-*-*," + (caddr_t) "-URW-Nimbus Roman No9 L-medium-r-normal--34-*-*-*-*-*-*-*,"
+ "-kochi-mincho-medium-r-normal--34-*-*-*-*-*-jisx0208.1983-0," + "-kochi-mincho-medium-r-normal--34-*-*-*-*-*-jisx0208.1983-0,"
+ "-baekmukttf-batang-medium-r-normal--34-*-*-*-*-*-ksc5601.1987-0," + "-baekmukttf-batang-medium-r-normal--34-*-*-*-*-*-ksc5601.1987-0,"
@ -29,11 +25,8 @@ diff -ru xfig.3.2.3d.orig/main.c xfig.3.2.3d/main.c
+ "-*-times-medium-r-normal--16-*-*-*-*-*-*-*," + "-*-times-medium-r-normal--16-*-*-*-*-*-*-*,"
+ "-*-*-medium-r-normal--16-*-*-*-*-*-*-*,*--16-*" + "-*-*-medium-r-normal--16-*-*-*-*-*-*-*,*--16-*"
+ }, + },
{"boldFontSet", "BoldFontSet", XtRFontSet, sizeof(XFontSet), + {"boldFontSet", "BoldFontSet", XtRFontSet, sizeof(XFontSet),
XtOffset(appresPtr, bold_fontset), XtRString, + XtOffset(appresPtr, bold_fontset), XtRString,
- (caddr_t) "-*-times-bold-r-normal--16-*-*-*-*-*-*-*,"
- "-*-*-bold-r-normal--16-*-*-*-*-*-*-*,"
- "-*-*-*-r-*--16-*-*-*-*-*-*-*" },
+ (caddr_t) "-URW-Nimbus Roman No9 L-bold-r-normal--34-*-*-*-*-*-*-*," + (caddr_t) "-URW-Nimbus Roman No9 L-bold-r-normal--34-*-*-*-*-*-*-*,"
+ "-kochi-gothic-medium-r-normal--34-*-*-*-*-*-jisx0208.1983-0," + "-kochi-gothic-medium-r-normal--34-*-*-*-*-*-jisx0208.1983-0,"
+ "-baekmukttf-dotum-medium-r-normal--34-*-*-*-*-*-ksc5601.1987-0," + "-baekmukttf-dotum-medium-r-normal--34-*-*-*-*-*-ksc5601.1987-0,"
@ -42,8 +35,7 @@ diff -ru xfig.3.2.3d.orig/main.c xfig.3.2.3d/main.c
+ "-*-*-*-r-*--34-*-*-*-*-*-*-*" + "-*-*-*-r-*--34-*-*-*-*-*-*-*"
+ "-*-times-medium-r-normal--16-*-*-*-*-*-*-*," + "-*-times-medium-r-normal--16-*-*-*-*-*-*-*,"
+ "-*-*-medium-r-normal--16-*-*-*-*-*-*-*,*--16-*" + "-*-*-medium-r-normal--16-*-*-*-*-*-*-*,*--16-*"
+ }, + }, */
{"fontSetSize", "FontSetSize", XtRInt, sizeof(int), {"fontSetSize", "FontSetSize", XtRInt, sizeof(int),
XtOffset(appresPtr, fontset_size), XtRImmediate, (caddr_t)0 }, XtOffset(appresPtr, fontset_size), XtRImmediate, (caddr_t)0 },
{"inputStyle", "InputStyle", XtRString, sizeof(char *), {"inputStyle", "InputStyle", XtRString, sizeof(char *),

View File

@ -57,23 +57,16 @@
* These come with the Open Group X distribution so they should be a common set. * These come with the Open Group X distribution so they should be a common set.
* *
--- u_fonts.h --- u_fonts.h
+++ u_fonts.h 2007-05-07 15:12:49.772318545 +0200 +++ u_fonts.h 2013-12-10 13:33:06.818235791 +0000
@@ -58,9 +58,12 @@ struct _xfstruct { @@ -60,6 +60,8 @@ extern int psfontnum(char *font);
extern int psfontnum(char *font);
extern int latexfontnum(char *font); extern int latexfontnum(char *font);
-extern struct _xfstruct x_fontinfo[], x_backup_fontinfo[]; extern struct _xfstruct x_fontinfo[], x_backup_fontinfo[];
-extern struct _fstruct ps_fontinfo[]; +extern struct _xfstruct x_urw_fontinfo[];
-extern struct _fstruct latex_fontinfo[]; +extern struct _xfstruct x_adobe_fontinfo[];
+extern struct _xfstruct x_fontinfo[]; extern struct _fstruct ps_fontinfo[];
+extern struct _xfstruct x_urw_fontinfo[]; extern struct _fstruct latex_fontinfo[];
+extern struct _xfstruct x_adobe_fontinfo[];
+extern struct _xfstruct x_backup_fontinfo[];
+extern struct _fstruct ps_fontinfo[];
+extern struct _fstruct latex_fontinfo[];
int x_fontnum(int psflag, int fnum);
#endif /* U_FONTS_H */
--- w_drawprim.c --- w_drawprim.c
+++ w_drawprim.c 2005-10-06 19:12:02.000000000 +0200 +++ w_drawprim.c 2005-10-06 19:12:02.000000000 +0200
@@ -117,6 +117,22 @@ void init_font(void) @@ -117,6 +117,22 @@ void init_font(void)

View File

@ -1,22 +0,0 @@
--- 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");

View File

@ -1,51 +0,0 @@
--- xfig.3.2.5b/f_readold.c
+++ xfig.3.2.5b/f_readold.c 2009-12-04 10:20:36.000000000 +0000
@@ -471,7 +471,7 @@ read_1_3_textobject(FILE *fp)
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 @@ read_1_3_textobject(FILE *fp)
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;

View File

@ -1,5 +1,5 @@
--- main.c --- main.c
+++ main.c 2007-05-07 15:39:50.847599259 +0200 +++ main.c 2013-12-10 13:47:11.675533754 +0000
@@ -61,11 +61,13 @@ @@ -61,11 +61,13 @@
/* input extensions for an input tablet */ /* input extensions for an input tablet */
@ -15,7 +15,7 @@
#endif /* I18N */ #endif /* I18N */
#include <X11/IntrinsicP.h> #include <X11/IntrinsicP.h>
@@ -771,11 +773,6 @@ void main(int argc, char **argv) @@ -784,11 +786,6 @@ void main(int argc, char **argv)
} }
} }
@ -27,18 +27,18 @@
/* /*
* save the command line arguments * save the command line arguments
*/ */
@@ -866,6 +863,10 @@ void main(int argc, char **argv) @@ -890,6 +887,10 @@ void main(int argc, char **argv)
} setup_icons_big();
#ifdef I18N #ifdef I18N
+ if (NULL == strcasestr(nl_langinfo(CODESET),"ANSI") && + if (NULL == strcasestr(nl_langinfo(CODESET),"ANSI") &&
+ NULL == strcasestr(nl_langinfo(CODESET),"ISO-8859-1")) + NULL == strcasestr(nl_langinfo(CODESET),"ISO-8859-1"))
+ appres.international = True; + appres.international = True;
+ +
/************************************************************/ /************************************************************/
/* if the international option has been set, set the locale */ /* if the international option has been set, set the locale */
/************************************************************/ /************************************************************/
@@ -1587,6 +1588,11 @@ setup_visual(int *argc_p, char **argv, A @@ -1612,6 +1613,11 @@ setup_visual(int *argc_p, char **argv, A
*/ */
tool = XtAppInitialize (&tool_app, "Fig", options, XtNumber (options), argc_p, argv, tool = XtAppInitialize (&tool_app, "Fig", options, XtNumber (options), argc_p, argv,
(String *) NULL, args, 0); (String *) NULL, args, 0);
@ -51,7 +51,7 @@
tool_d = XtDisplay(tool); tool_d = XtDisplay(tool);
tool_s = XtScreen(tool); tool_s = XtScreen(tool);
--- u_print.c --- u_print.c
+++ u_print.c 2006-11-16 13:45:46.000000000 +0100 +++ u_print.c 2006-11-16 12:45:46.000000000 +0000
@@ -15,6 +15,7 @@ @@ -15,6 +15,7 @@
* *
*/ */

View File

@ -1,56 +1,26 @@
--- f_readeps.c --- f_readeps.c
+++ f_readeps.c 2011-06-17 12:46:08.519926308 +0000 +++ f_readeps.c 2013-12-10 13:57:36.222235930 +0000
@@ -252,11 +252,12 @@ bitmap_from_gs(file, filetype, pic, urx, @@ -257,7 +257,7 @@ bitmap_from_gs(file, filetype, pic, urx,
{
char buf[300]; char buf[300];
FILE *tmpfp, *pixfile, *gsfile; FILE *tmpfp, *pixfile, *gsfile;
- char *psnam, *driver; char *driver;
- int status, wid, ht, nbitmap, fd; - int status, wid, ht, nbitmap, fd;
+ char *driver;
+ int status, wid, ht, nbitmap, fd, len; + int status, wid, ht, nbitmap, fd, len;
char tmpfile[PATH_MAX], char tmpfile[PATH_MAX],
pixnam[PATH_MAX], pixnam[PATH_MAX],
errnam[PATH_MAX], errnam[PATH_MAX],
+ psnam[PATH_MAX], @@ -317,9 +317,13 @@ bitmap_from_gs(file, filetype, pic, urx,
gscom[2 * PATH_MAX]; file_msg("Cannot canonicalize %s: %s\n", tmpfile, strerror(errno));
return False;
wid = urx - llx;
@@ -307,19 +308,26 @@ bitmap_from_gs(file, filetype, pic, urx,
/* for color, use pcx */
driver = "pcx256";
} }
- /* avoid absolute paths (for Cygwin with gswin32) by changing directory */ - sprintf(gscom,
- 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" gs after .locksafe */
+ if (!realpath(tmpfile, psnam)) {
+ file_msg("Cannot canonicalize %s: %s\n", tmpfile, strerror(errno));
+ return False;
+ }
+ /* From Language.htm of ghostscript 9.00 and higher:
+ * If Ghostscript is started with -dNOSAFER or -dDELAYSAFER, this operator can
+ * be used to enter SAFER mode with the current set of PermitFile... user
+ * parameters in effect. Since .setsafe sets the PermitFile... user parameters
+ * to empty arrays, a script or job server that needs to enable certain paths
+ * for file Reading, Writing and/or Control can use this operator to perform
+ * the locking needed to enter SAFER mode.
+ */
+ len = snprintf(gscom, sizeof(gscom) - 1, + len = snprintf(gscom, sizeof(gscom) - 1,
+ "%s -r72x72 -sDEVICE=%s -g%dx%d -dDELAYSAFER -sOutputFile=%s -c '<</PermitFileReading[(%s)]>> setuserparams .locksafe' -q - > %s 2>&1", "%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); appres.ghostscript, driver, wid, ht, pixnam, psnam, errnam);
+ if (len >= sizeof(gscom) - 1 || len < 0) { + if (len >= sizeof(gscom) - 1 || len < 0) {
+ file_msg("Cannot write to buffer, file name to large: %s\n", psnam); + file_msg("Cannot write to buffer, file name to large: %s\n", psnam);
+ return False; + 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);
if (appres.DEBUG) if (appres.DEBUG)
fprintf(stderr,"calling: %s\n",gscom); fprintf(stderr,"calling: %s\n",gscom);
if ((gsfile = popen(gscom, "w")) == 0) { if ((gsfile = popen(gscom, "w")) == 0) {

View File

@ -1,5 +1,5 @@
--- u_print.c --- u_print.c
+++ u_print.c 2009-12-14 12:01:21.031429470 +0000 +++ u_print.c 2013-12-10 13:52:12.414235932 +0000
@@ -354,8 +354,10 @@ int print_to_file(char *file, char *lang @@ -354,8 +354,10 @@ int print_to_file(char *file, char *lang
strcat(prcmd, tmpcmd); strcat(prcmd, tmpcmd);
} else if (!strcmp(lang,"pspdftex")) { } else if (!strcmp(lang,"pspdftex")) {
@ -30,25 +30,22 @@
strcat(prcmd,".pdf"); strcat(prcmd,".pdf");
(void) exec_prcmd(prcmd, "EXPORT of PDF part"); (void) exec_prcmd(prcmd, "EXPORT of PDF part");
@@ -383,12 +385,13 @@ int print_to_file(char *file, char *lang @@ -383,10 +385,11 @@ int print_to_file(char *file, char *lang
#ifdef I18N #ifdef I18N
/* set the numeric locale to C so we get decimal points for numbers */ /* set the numeric locale to C so we get decimal points for numbers */
setlocale(LC_NUMERIC, "C"); setlocale(LC_NUMERIC, "C");
- sprintf(prcmd, "fig2dev %s -L %s -p %s -m %f %s %s", - sprintf(prcmd, "fig2dev %s -L %s -p %s -m %f %s %s %s",
- appres.international ? appres.fig2dev_localize_option : "", - appres.international ? appres.fig2dev_localize_option : "",
+ sprintf(prcmd, "%s %s -L %s -E %d -p %s -m %f -b %d %s %s", + sprintf(prcmd, "%s %s -L %s -p %s -m %f %s %s %s",
+ fig2dev_cmd, appres.international ? appres.fig2dev_localize_option : "", + fig2dev_cmd, appres.international ? appres.fig2dev_localize_option : "",
#else #else
- sprintf(prcmd, "fig2dev -L %s -p %s -m %f %s %s", - sprintf(prcmd, "fig2dev -L %s -p %s -m %f %s %s %s",
+ sprintf(prcmd, "%s -L %s -E %d -p %s -m %f -b %d %s %s", + sprintf(prcmd, "%s -L %s -p %s -m %f %s %s %s",
+ fig2dev_cmd, + fig2dev_cmd,
#endif /* I18N */ #endif /* I18N */
- "pstex_t", tmp_name, mag/100.0, tmp_fig_file, outfile); "pstex_t", tmp_name, mag/100.0, layers, tmp_fig_file, outfile);
+ "pstex_t", appres.encoding, tmp_name, mag/100.0, border, tmp_fig_file, outfile);
#ifdef I18N #ifdef I18N
/* reset to original locale */ @@ -743,7 +746,7 @@ void build_layer_list(char *layers)
setlocale(LC_NUMERIC, "");
@@ -742,7 +745,7 @@ void build_layer_list(char *layers)
{ {
char list[PATH_MAX], notlist[PATH_MAX], num[10]; char list[PATH_MAX], notlist[PATH_MAX], num[10];
int layer, len, notlen; int layer, len, notlen;

View File

@ -1,6 +1,6 @@
--- Doc/xfig.man --- ./Doc/xfig.man
+++ Doc/xfig.man +++ ./Doc/xfig.man 2013-12-09 15:40:37.278735670 +0000
@@ -1475,8 +1475,11 @@ @@ -1489,8 +1489,11 @@ or X toolkit resource keyFile.
See the See the
.IR Imakefile . .IR Imakefile .
.TP .TP
@ -14,22 +14,6 @@
CompKeyDB file, and a directory of libraries containing Fig objects CompKeyDB file, and a directory of libraries containing Fig objects
such as electrical symbols, logic symbols, etc. such as electrical symbols, logic symbols, etc.
.TP .TP
--- Doc/xfig_man.html
+++ Doc/xfig_man.html
@@ -2539,8 +2539,11 @@
See the
<I>Imakefile</I>.
-<DT>/usr/lib/X11/xfig<DD>
-This directory contains the html documentation, the above mentioned
+<DT>/usr/share/doc/packages/xfig<DD>
+This directory contains the documentation.
+
+<DT>/usr/share/X11/xfig<DD>
+This directory contains the above mentioned
CompKeyDB file, and a directory of libraries containing Fig objects
such as electrical symbols, logic symbols, etc.
<DT><B>Fig.ad and Fig-color.ad</B>
--- Fig.ad --- Fig.ad
+++ Fig.ad 2009-12-14 11:42:24.307429001 +0000 +++ Fig.ad 2009-12-14 11:42:24.307429001 +0000
@@ -15,6 +15,8 @@ Fig.version: 3.2.5b @@ -15,6 +15,8 @@ Fig.version: 3.2.5b
@ -104,34 +88,25 @@
Fig*Label.background: gray80 Fig*Label.background: gray80
Fig*ind_box.background: gray80 Fig*ind_box.background: gray80
--- Imakefile --- Imakefile
+++ Imakefile 2009-12-14 11:46:44.459929609 +0000 +++ Imakefile 2013-12-09 15:55:48.894736219 +0000
@@ -60,7 +60,7 @@ XCOMM Uncomment the following if you hav @@ -53,7 +53,7 @@ XCOMM the 3d Athena Widget Set
XCOMM some new features, including "Tips", which replace xfig's "help balloons" #define XAW3D
XCOMM NOTE: This is the default for many X systems now.
-XCOMM #define XAW3D1_5E #ifdef XAW3D
+#define XAW3D1_5E -XAWLIB = -lXaw3d
+XAWLIB = $(shell pkg-config xaw3d --libs)
#endif
#ifdef XAW3D1_5E XCOMM Uncomment the following if you have David Hawkey's Xaw3D version 1.5E which has
DUSEXAW3D = -DXAW3D -DXAW3D1_5E
@@ -76,7 +76,7 @@ XCOMM Redefine the following if your PNG
XCOMM are in different places
PNGLIBDIR = $(USRLIBDIR)
-PNGINC = -I/usr/local/include
+PNGINC = -I/usr/include
ZLIBDIR = $(USRLIBDIR)
XCOMM If don't want JPEG support, comment out the #define USEJPEG line
@@ -96,8 +96,8 @@ XCOMM You must have version 5b or newer @@ -96,8 +96,8 @@ XCOMM You must have version 5b or newer
#ifdef USEJPEG #ifdef USEJPEG
#ifdef USEINSTALLEDJPEG # ifdef USEINSTALLEDJPEG
- JPEGLIBDIR = /usr/local/lib - JPEGLIBDIR = /usr/local/lib
- JPEGINC = -I/usr/include/X11 - JPEGINC = -I/usr/include/X11
+ JPEGLIBDIR = /usr/lib + JPEGLIBDIR = /usr/lib
+ JPEGINC = -I/usr/include + JPEGINC = -I/usr/include
#else # else
JPEGLIBDIR = ../jpeg JPEGLIBDIR = ../jpeg
JPEGINC = -I$(JPEGLIBDIR) JPEGINC = -I$(JPEGLIBDIR)
@@ -119,8 +119,8 @@ XCOMM Change XPMINC if necessary to poin @@ -119,8 +119,8 @@ XCOMM Change XPMINC if necessary to poin
@ -139,22 +114,24 @@
#ifdef USEXPM #ifdef USEXPM
-XPMLIBDIR = /usr/local/lib -XPMLIBDIR = /usr/local/lib
-XPMINC = -I/usr/local/include/X11 -XPMINC = -I/usr/include/X11
+XPMLIBDIR = $(USRLIBDIR) +XPMLIBDIR = $(USRLIBDIR)
+XPMINC = -I$(USRLIBDIR) +XPMINC = -I/usr/include
#endif #endif
XCOMM Uncomment the following definiton if you want to use the small icons XCOMM Uncomment the following definiton if you want to use the small icons
@@ -150,7 +150,7 @@ XCOMM Comment out the next line if you h @@ -150,8 +150,8 @@ XCOMM Comment out the next two lines if
XCOMM If your setlocale() doesn't support the locale, you should XCOMM If your setlocale() doesn't support the locale, you should
XCOMM add -DSETLOCALE to I18N_DEFS. XCOMM add -DSETLOCALE to I18N_DEFS.
-XCOMM #define I18N -XCOMM #define I18N
-XCOMM XAW_INTERN = -DXAW_INTERNATIONALIZATION
+#define I18N +#define I18N
+XAW_INTERN = $(shell pkg-config xaw3d --cflags)
XCOMM If using an input tablet uncomment the following XCOMM If using an input tablet uncomment the following
@@ -161,7 +161,7 @@ XCOMM uncomment the following line if yo @@ -162,7 +162,7 @@ XCOMM uncomment the following line if yo
XCOMM inline functions. With the "INLINE" keyword, you should notice that XCOMM inline functions. With the "INLINE" keyword, you should notice that
XCOMM the display will be a bit faster in complex figures XCOMM the display will be a bit faster in complex figures
@ -163,7 +140,7 @@
XCOMM use (and change) the following if you want the multi-key data base file XCOMM use (and change) the following if you want the multi-key data base file
XCOMM somewhere other than the standard X11 library directory XCOMM somewhere other than the standard X11 library directory
@@ -169,16 +169,19 @@ XCOMM be sure to comment out the second @@ -170,16 +170,19 @@ XCOMM be sure to comment out the second
XCOMM XFIGLIBDIR = $(LIBDIR) XCOMM XFIGLIBDIR = $(LIBDIR)
XCOMM use this if you want the multi-key data base file in the standard X11 tree XCOMM use this if you want the multi-key data base file in the standard X11 tree
@ -186,7 +163,7 @@
XCOMM If your system doesn't have strstr undefine the following definition XCOMM If your system doesn't have strstr undefine the following definition
XCOMM HAVE_NO_NOSTRSTR = -DNOSTRSTR XCOMM HAVE_NO_NOSTRSTR = -DNOSTRSTR
@@ -208,7 +211,7 @@ XCOMM instead. @@ -209,7 +212,7 @@ XCOMM instead.
XCOMM Add `-DCACHE_SIZE_LIMIT=xxxx' where xxxx is the cache size in kilobytes. XCOMM Add `-DCACHE_SIZE_LIMIT=xxxx' where xxxx is the cache size in kilobytes.
XCOMM A cache size of zero turns caching off. XCOMM A cache size of zero turns caching off.
@ -195,7 +172,7 @@
XCOMM For SYSV systems with BSD-style printer command which use lpr instead of XCOMM For SYSV systems with BSD-style printer command which use lpr instead of
XCOMM lp (SGI is one such machine), add -DBSDLPR to the DEFINES variable XCOMM lp (SGI is one such machine), add -DBSDLPR to the DEFINES variable
@@ -222,6 +225,7 @@ XCOMM number of vertices. @@ -223,6 +226,7 @@ XCOMM number of vertices.
XCOMM If you want a compiler other than "cc", define it here XCOMM If you want a compiler other than "cc", define it here
XCOMM CC = /opt/SUNWspro/bin/cc XCOMM CC = /opt/SUNWspro/bin/cc
@ -203,25 +180,6 @@
XCOMM Shorten unnecessary dependencies: XCOMM Shorten unnecessary dependencies:
XCOMM #define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWCLIENTLIBS) $(XLIB) XCOMM #define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWCLIENTLIBS) $(XLIB)
@@ -251,7 +255,7 @@ DEPLIBJPEG = $(JPEGLIBDIR)/libjpeg.a
#endif /* USEJPEG */
#ifdef I18N
-I18N_DEFS = -DI18N -DSETLOCALE
+I18N_DEFS = -DI18N
I18N_SRC = w_i18n.c
I18N_OBJ = w_i18n.o
#endif
--- fig.h
+++ fig.h 2006-07-31 15:56:25.000000000 +0000
@@ -29,6 +29,7 @@ extern char *my_strdup(char *str);
#endif
#include <sys/types.h> /* for stat structure */
#endif
+#include <sys/param.h>
#include <sys/stat.h>
#if defined(__convex__) && defined(__STDC__)
--- w_menuentry.c --- w_menuentry.c
+++ w_menuentry.c 2006-07-31 15:56:25.000000000 +0000 +++ w_menuentry.c 2006-07-31 15:56:25.000000000 +0000
@@ -169,7 +169,8 @@ Redisplay(Widget w, XEvent *event, Regio @@ -169,7 +169,8 @@ Redisplay(Widget w, XEvent *event, Regio

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d1be85ed976747db2ca50f53de5fa7577cca95c826a63698427b35470c97bfc3
size 1206

3
xfig.3.2.5c.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5addb08184f2596b36cdef11d61343c1be6ba308d34f413f15317cf1a6913550
size 6018897

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Tue Dec 10 14:06:39 UTC 2013 - werner@suse.de
- Update underlying source tar ball to xfig.3.2.5c
- Delete patches
xfig.3.2.5b-bnc777469.diff and xfig.3.2.5b-bnc657393.dif
as those are part of xfig.3.2.5c
- Change patches
xfig.3.2.5-urw-fonts.dif, xfig.3.2.3d-international-std-fonts.dif,
xfig.3.2.5b-locale.dif, xfig.3.2.5b-pspdftex.dif, and
xfig.3.2.5b-preview.dif to fit xfig.3.2.5c
- Modify Imakefile to support new libXaw3d-1.6.2
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Feb 8 11:14:39 UTC 2013 - werner@suse.de Fri Feb 8 11:14:39 UTC 2013 - werner@suse.de

View File

@ -17,12 +17,13 @@
Name: xfig Name: xfig
BuildRequires: dos2unix
BuildRequires: flex BuildRequires: flex
BuildRequires: freetype2-devel BuildRequires: freetype2-devel
BuildRequires: libXaw3d-devel
BuildRequires: libjpeg-devel BuildRequires: libjpeg-devel
BuildRequires: netpbm BuildRequires: netpbm
BuildRequires: update-desktop-files BuildRequires: update-desktop-files
BuildRequires: xaw3d-devel
BuildRequires: xorg-x11 BuildRequires: xorg-x11
BuildRequires: xorg-x11-devel BuildRequires: xorg-x11-devel
%if 0%{?suse_version} > 1120 %if 0%{?suse_version} > 1120
@ -39,7 +40,7 @@ Requires: netpbm
Requires: transfig Requires: transfig
Requires: xorg-x11-fonts Requires: xorg-x11-fonts
Requires: xorg-x11-fonts-core Requires: xorg-x11-fonts-core
Version: 3.2.5b Version: 3.2.5c
Release: 0 Release: 0
Summary: Facility for Interactive Generation of Figures under the X Window System Summary: Facility for Interactive Generation of Figures under the X Window System
License: MIT License: MIT
@ -47,17 +48,17 @@ Group: Productivity/Graphics/Vector Editors
Url: http://www.xfig.org/ Url: http://www.xfig.org/
# #
# Remove forbidden files: aircraft.fig # Remove forbidden files: aircraft.fig
# bunzip2 xfig.3.2.5b.tar # gunzip xfig.3.2.5c.tar
# tar -f xfig.3.2.5b.tar --delete xfig.3.2.5b/Libraries/Examples/aircraft.fig # tar -f xfig.3.2.5c.tar --delete xfig.3.2.5c/Libraries/Examples/aircraft.fig
# bzip2 xfig.3.2.5b.tar # gzip xfig.3.2.5c.tar
# #
Source: xfig.%{version}.tar.bz2 Source: xfig.%{version}.tar.gz
Source1: font-test.fig Source1: font-test.fig
Source2: browser Source2: browser
Source3: xfig.sh Source3: xfig.sh
Source4: xfig.desktop Source4: xfig.desktop
Source5: xfig.%{version}-patches.tar.bz2 Source5: xfig.3.2.5c-patches.tar.bz2
Patch0: xfig.%{version}.dif Patch0: xfig.3.2.5b.dif
Patch1: xfig.3.2.5-urw-fonts.dif Patch1: xfig.3.2.5-urw-fonts.dif
Patch2: xfig.3.2.5-xim.dif Patch2: xfig.3.2.5-xim.dif
Patch3: xfig.3.2.3d-international-std-fonts.dif Patch3: xfig.3.2.3d-international-std-fonts.dif
@ -68,8 +69,6 @@ Patch6: xfig.3.2.5b-locale.dif
Patch7: xfig.3.2.5b-fixes.dif Patch7: xfig.3.2.5b-fixes.dif
Patch8: xfig.3.2.5b-pspdftex.dif Patch8: xfig.3.2.5b-pspdftex.dif
Patch10: xfig.3.2.5b-preview.dif Patch10: xfig.3.2.5b-preview.dif
Patch11: xfig.3.2.5b-bnc657393.dif
Patch12: xfig.3.2.5b-bnc777469.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{expand: %%global _exec_prefix %(type -p pkg-config &>/dev/null && pkg-config --variable prefix x11 || echo /usr/X11R6)} %{expand: %%global _exec_prefix %(type -p pkg-config &>/dev/null && pkg-config --variable prefix x11 || echo /usr/X11R6)}
%if "%_exec_prefix" == "/usr/X11R6" %if "%_exec_prefix" == "/usr/X11R6"
@ -106,20 +105,25 @@ Authors:
%prep %prep
%setup -q -n xfig.%{version} %setup -q -n xfig.%{version}
set +x
find -type f | xargs -r chmod a-x,go-w find -type f | xargs -r chmod a-x,go-w
find -type f | while read file; do
if grep -qr $'\r' $file ; then
dos2unix --keepdate --quiet $file
fi
done
set -x
tar Oxfj %{S:5} | patch -p1 -s tar Oxfj %{S:5} | patch -p1 -s
%patch0 -p0 %patch0 -p0
%patch1 -p0 -b .urw-fonts %patch1 -p0 -b .urw-fonts
%patch2 -p0 -b .xim %patch2 -p0 -b .xim
%patch3 -p1 -b .international-std-fonts %patch3 -p0 -b .international-std-fonts
%patch4 -p0 -b .mbox %patch4 -p0 -b .mbox
%patch5 -p0 -b .null %patch5 -p0 -b .null
%patch6 -p0 -b .locale %patch6 -p0 -b .locale
%patch7 -p0 -b .fixes %patch7 -p0 -b .fixes
%patch8 -p0 -b .pspdftex %patch8 -p0 -b .pspdftex
%patch10 -p0 -b .preview %patch10 -p0 -b .preview
%patch11 -p0 -b .vsprintf
%patch12 -p1 -b .ovflow
cp %{S:1} . cp %{S:1} .
test ! -e Libraries/Examples/aircraft.fig || { echo forbidden file found 1>&2; exit 1; } test ! -e Libraries/Examples/aircraft.fig || { echo forbidden file found 1>&2; exit 1; }
@ -141,8 +145,6 @@ ln -sf %{_defaultdocdir}/%{name}/Libraries \
%{buildroot}%{_x11data}/xfig/Libraries %{buildroot}%{_x11data}/xfig/Libraries
ln -sf %{_defaultdocdir}/%{name}/html \ ln -sf %{_defaultdocdir}/%{name}/html \
%{buildroot}%{_x11data}/xfig/ %{buildroot}%{_x11data}/xfig/
ln -sf %{_defaultdocdir}/%{name}/xfig_man.html \
%{buildroot}%{_x11data}/xfig/
ln -sf %{_defaultdocdir}/%{name}/xfig-howto.pdf \ ln -sf %{_defaultdocdir}/%{name}/xfig-howto.pdf \
%{buildroot}%{_x11data}/xfig/ %{buildroot}%{_x11data}/xfig/
install -m 0755 %{SOURCE2} %{buildroot}%{_x11data}/xfig/ install -m 0755 %{SOURCE2} %{buildroot}%{_x11data}/xfig/
@ -150,7 +152,7 @@ make DESTDIR=%{buildroot} install
make DESTDIR=%{buildroot} install.man make DESTDIR=%{buildroot} install.man
mkdir -p %{buildroot}/%{_docdir}/%{name} mkdir -p %{buildroot}/%{_docdir}/%{name}
cp -pr README FIGAPPS Libraries font-test.fig %{buildroot}/%{_docdir}/%{name} cp -pr README FIGAPPS Libraries font-test.fig %{buildroot}/%{_docdir}/%{name}
cp -pr Doc/FORMAT* Doc/TODO Doc/html Doc/*.pdf Doc/*.html %{buildroot}/%{_docdir}/%{name} cp -pr Doc/FORMAT* Doc/TODO Doc/html Doc/*.pdf %{buildroot}/%{_docdir}/%{name}
find %{buildroot}%{_defaultdocdir}/%{name}/ -name '*.bak' | xargs -r rm find %{buildroot}%{_defaultdocdir}/%{name}/ -name '*.bak' | xargs -r rm
find %{buildroot}%{_defaultdocdir}/%{name}/ -type f -print0 | xargs -0 chmod 644 find %{buildroot}%{_defaultdocdir}/%{name}/ -type f -print0 | xargs -0 chmod 644
mkdir -p %{buildroot}%{_datadir}/pixmaps mkdir -p %{buildroot}%{_datadir}/pixmaps