SHA256
1
0
forked from pool/transfig
Dr. Werner Fink 2016-09-23 12:11:02 +00:00 committed by Git OBS Bridge
parent 8918a5c772
commit 18fff3098c
13 changed files with 8150 additions and 415 deletions

File diff suppressed because it is too large Load Diff

1412
fig2dev-3.2.6-fig2mpdf.patch Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

3
fig2dev-3.2.6.tar.xz Normal file
View File

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

155
transfig-3.2.6.dif Normal file
View File

@ -0,0 +1,155 @@
---
fig2dev/dev/genps.c | 26 +++++++++++++++++++++++---
fig2dev/dev/genpstex.c | 8 ++++++--
fig2dev/dev/gensvg.c | 8 +++++---
fig2dev/fig2ps2tex.csh | 2 +-
fig2dev/getopt.c | 10 ++++++++++
transfig/transfig.c | 2 ++
6 files changed, 47 insertions(+), 9 deletions(-)
--- fig2dev/dev/genps.c
+++ fig2dev/dev/genps.c 2016-09-22 12:48:10.157220393 +0000
@@ -48,6 +48,7 @@
#include <pwd.h>
#endif
#include <locale.h>
+#include <langinfo.h>
/* for the xpm package */
#ifdef HAVE_X11_XPM_H
@@ -787,8 +788,9 @@ genps_start(F_compound *objects)
fprintf(tfp, "%s\n", SPLINE_PS);
#ifdef I18N
if (support_i18n && iso_text_exist(objects)) {
- char *libdir, *locale;
+ char *libdir, *locale, *codeset;
char localefile[512], str[512];
+ size_t llen;
FILE *fp;
libdir = getenv("FIG2DEV_LIBDIR");
#ifdef I18N_DATADIR
@@ -796,16 +798,34 @@ genps_start(F_compound *objects)
libdir = I18N_DATADIR;
#endif
locale = setlocale(LC_CTYPE, NULL);
+ llen = strcspn(locale, ".@");
+ codeset = nl_langinfo(CODESET);
if (locale == NULL) {
fprintf(stderr, "fig2dev: LANG not defined; assuming C locale\n");
locale = "C";
}
- sprintf(localefile, "%s/%s.ps", libdir, locale);
+ snprintf(localefile, sizeof(localefile)-1, "%s/%s.ps", libdir, locale);
/* get filename like ``/usr/local/lib/fig2dev/japanese.ps'' */
fp = fopen(localefile, "rb");
if (fp == NULL) {
fprintf(stderr, "fig2dev: can't open file: %s\n", localefile);
- } else {
+ }
+ if (fp == NULL && strlen(locale) != llen) {
+ locale[llen] = '\0';
+ /* get filename like ``/usr/local/lib/fig2dev/de_DE.ps'' */
+ snprintf(localefile, sizeof(localefile)-1, "%s/%s.ps", libdir, locale);
+ fp = fopen(localefile, "rb");
+ if (fp == NULL)
+ fprintf(stderr, "fig2dev: B can't open file: %s\n", localefile);
+ }
+ if (fp == NULL && codeset) {
+ /* get filename like ``/usr/local/lib/fig2dev/ISO-8859-9.ps'' */
+ snprintf(localefile, sizeof(localefile)-1, "%s/%s.ps", libdir, codeset);
+ fp = fopen(localefile, "rb");
+ if (fp == NULL)
+ fprintf(stderr, "fig2dev: C can't open file: %s\n", localefile);
+ }
+ if (fp) {
while (fgets(str, sizeof(str), fp)) {
if (strstr(str, "CompositeRoman")) enable_composite_font = true;
fputs(str, tfp);
--- fig2dev/dev/genpstex.c
+++ fig2dev/dev/genpstex.c 2016-09-22 12:51:47.193159929 +0000
@@ -37,6 +37,7 @@
* Jose Alberto.
*/
+#include <sys/stat.h>
#include "fig2dev.h"
#include "object.h"
#include "texfonts.h"
@@ -53,10 +54,13 @@ extern void
genps_spline(F_spline *s),
genlatex_option(char opt, char *optarg),
genlatex_text(F_text *t),
- genps_text(F_text *t);
+ genps_text(F_text *t),
+ genpdf_option(char opt, char *optarg),
+ genpdf_start(F_compound *objects);
extern int
genlatex_end(void),
- genps_end(void);
+ genps_end(void),
+ genpdf_end(void);
extern void genpdf_option(char opt, char *optarg); /* genpdf.c */
extern void genpdf_start(F_compound *objects); /* genpdf.c */
--- fig2dev/dev/gensvg.c
+++ fig2dev/dev/gensvg.c 2016-09-22 12:54:57.341602013 +0000
@@ -800,9 +800,11 @@ gensvg_text(F_text *t)
x, y, degrees(t->angle));
x = y = 0;
}
- fprintf(tfp, "<text xml:space=\"preserve\" x=\"%d\" y=\"%d\" fill=\"#%6.6x\" font-family=\"%s\" "\
- "font-style=\"%s\" font-weight=\"%s\" font-size=\"%d\" text-anchor=\"%s\">",
- x, y, rgbColorVal(t->color), family[t->font / 4],
+ fprintf(tfp,
+ "<text xml:space=\"preserve\" x=\"%d\" y=\"%d\" fill=\"#%6.6x\" font-family=\"%s\" ",
+ x, y, rgbColorVal(t->color), family[t->font / 4]);
+ fprintf(tfp,
+ "font-style=\"%s\" font-weight=\"%s\" font-size=\"%d\" text-anchor=\"%s\">",
( (t->font % 2 == 0 || t->font >31) ? "normal" : "italic"),
( (t->font % 4 < 2 || t->font >31) ? "normal" : "bold"), (int) (ceil(t->size * 12 * mag)),
anchor[t->type]);
--- fig2dev/fig2ps2tex.csh
+++ fig2dev/fig2ps2tex.csh 2016-09-22 12:58:21.805775751 +0000
@@ -21,7 +21,7 @@
#
# 2016-07-07 Thomas Loimer
# * use here-document, instead of echo
-
+set echo_style=bsd
set bbox = `grep "^%%BoundingBox:" $1`
set xsp = `echo "3k $bbox[4] $bbox[2] - 72 / p" | dc`
--- fig2dev/getopt.c
+++ fig2dev/getopt.c 2016-09-22 13:00:51.710970183 +0000
@@ -45,6 +45,7 @@ static char sccsfid[] = "@(#) getopt.c 5
#define EMSG ""
#define ENDARGS "--"
+#ifndef __GLIBC__
/*
* get option letter from argument vector
*/
@@ -89,3 +90,12 @@ fig_getopt(int nargc, char **nargv, char
}
return(optc); /* dump back option letter */
}
+#else
+#include <unistd.h>
+int
+fig_getopt(int nargc, char * const nargv[], const char *ostr)
+{
+ return getopt(nargc, nargv, ostr);
+}
+#endif
+
--- transfig/transfig.c
+++ transfig/transfig.c 2016-09-22 13:02:04.917599987 +0000
@@ -26,6 +26,8 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
#include "transfig.h"
extern void sysmv(char *file); /* sys.c */

View File

@ -1,27 +1,12 @@
Index: transfig.3.2.5e/fig2dev/read1_3.c
===================================================================
--- transfig.3.2.5e.orig/fig2dev/read1_3.c
+++ transfig.3.2.5e/fig2dev/read1_3.c
@@ -336,6 +336,7 @@ FILE *fp;
l->back_arrow = NULL;
l->next = NULL;
l->points = Point_malloc(p);
+ l->points->next = NULL;
n = fscanf(fp, " %d %d %d %lf %d %d %d %d %d %d", &t,
&l->style, &l->thickness, &l->style_val,
&f, &b, &h, &w, &p->x, &p->y);
@@ -395,6 +396,7 @@ FILE *fp;
s->controls = NULL;
s->next = NULL;
s->points = Point_malloc(p);
+ s->points->next = NULL;
n = fscanf(fp, " %d %d %d %lf %d %d %d %d %d %d",
&t, &s->style, &s->thickness, &s->style_val,
&f, &b,
Index: transfig.3.2.5e/fig2dev/alloc.h
===================================================================
--- transfig.3.2.5e.orig/fig2dev/alloc.h
+++ transfig.3.2.5e/fig2dev/alloc.h
---
fig2dev-3.2.6/fig2dev/alloc.h | 20 ++++++++++----------
fig2dev-3.2.6/fig2dev/read1_3.c | 2 ++
2 files changed, 12 insertions(+), 10 deletions(-)
--- fig2dev-3.2.6/fig2dev/alloc.h
+++ fig2dev-3.2.6/fig2dev/alloc.h 2016-09-22 13:09:20.789406849 +0000
@@ -13,15 +13,15 @@
* notice remain intact.
*/
@ -48,3 +33,21 @@ Index: transfig.3.2.5e/fig2dev/alloc.h
+#define Arrow_malloc(z) z = (F_arrow*)calloc(ARROW_SIZE,1)
extern char Err_mem[];
--- fig2dev-3.2.6/fig2dev/read1_3.c
+++ fig2dev-3.2.6/fig2dev/read1_3.c 2016-09-22 13:10:28.012139567 +0000
@@ -334,6 +334,7 @@ read_lineobject(FILE *fp)
l->back_arrow = NULL;
l->next = NULL;
l->points = Point_malloc(p);
+ l->points->next = NULL;
n = fscanf(fp, " %d %d %d %lf %d %d %d %d %d %d", &t,
&l->style, &l->thickness, &l->style_val,
&f, &b, &h, &w, &p->x, &p->y);
@@ -392,6 +393,7 @@ read_splineobject(FILE *fp)
s->controls = NULL;
s->next = NULL;
s->points = Point_malloc(p);
+ s->points->next = NULL;
n = fscanf(fp, " %d %d %d %lf %d %d %d %d %d %d",
&t, &s->style, &s->thickness, &s->style_val,
&f, &b,

View File

@ -1,6 +1,10 @@
---
transfig/sys.c | 1 +
1 file changed, 1 insertion(+)
--- transfig/sys.c
+++ transfig/sys.c 2009-10-09 14:17:09.932073007 +0200
@@ -37,6 +37,7 @@ char *sysls()
+++ transfig/sys.c 2016-09-22 13:02:49.040774112 +0000
@@ -39,6 +39,7 @@ sysls(void)
i += 1;
c = fgetc(ls);
}

View File

@ -1,6 +1,10 @@
---
fig2dev/dev/readeps.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--- fig2dev/dev/readeps.c
+++ fig2dev/dev/readeps.c 2013-02-08 11:21:58.593945615 +0000
@@ -77,16 +77,22 @@ read_eps_pdf(file, filetype, pic, llx, l
+++ fig2dev/dev/readeps.c 2016-09-22 13:08:15.002647120 +0000
@@ -66,16 +66,22 @@ read_eps_pdf(FILE *file, int filetype, F
while (fgets(buf, 512, file) != NULL) {
/* look for /MediaBox for pdf file */
if (pdf_flag) {
@ -14,7 +18,7 @@
*llx = *lly = 0;
urx = paperdef[0].width*72;
ury = paperdef[0].height*72;
put_msg("Bad MediaBox in imported PDF file %s, assuming %s size",
put_msg("Bad MediaBox in imported PDF file %s, assuming %s size",
pic->file, metric? "A4" : "Letter" );
}
+ pic->bit_size.x = (urx-(*llx));

View File

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

View File

@ -1,347 +0,0 @@
--- Imakefile
+++ Imakefile 2006-07-31 17:14:30.000000000 +0000
@@ -1,7 +1,3 @@
-#ifndef XCOMM
-#define XCOMM #
-#endif
-
XCOMM Top level Makefile for TransFig
XCOMM TransFig: Facility for Translating Fig code
@@ -24,6 +20,7 @@ XCOMM type "xmkmf", "make Makefiles", "m
#define IHaveSubdirs
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
+MFLAGS = XFIGLIBDIR=_DATA/xfig
DEPLIBS =
SUBDIRS = fig2dev transfig
MakeSubdirs($(SUBDIRS))
--- doc/manual/Makefile
+++ doc/manual/Makefile 2007-07-24 15:30:27.000000000 +0000
@@ -2,7 +2,7 @@
# TransFig makefile
#
-all: trans.tex
+all: trans.tex manual.pdf
# translation into latex
@@ -12,3 +12,16 @@ clean::
rm -f trans.tex
cleandir::
+
+manual.ps: manual.dvi
+ dvips -o $@ $^
+
+manual.dvi: manual.tex trans.tex
+ latex manual.tex
+ latex manual.tex
+ latex manual.tex
+
+manual.pdf: manual.tex trans.tex
+ pdflatex manual.tex
+ pdflatex manual.tex
+ pdflatex manual.tex
--- fig2dev/Imakefile
+++ fig2dev/Imakefile 2007-07-24 15:04:29.000000000 +0000
@@ -34,7 +34,7 @@ XCOMM ******
XCOMM You should point XFIGLIBDIR to the same directory you did when you compiled
XCOMM and installed xfig.
-XFIGLIBDIR = /usr/local/lib/X11/xfig
+XFIGLIBDIR = $(LIBDIR)/xfig
XCOMM ******
XCOMM If your system doesn't have the strerror() function (has sys_errlist) then
@@ -53,7 +53,7 @@ XCOMM Uncomment the following line if yo
XCOMM inline functions. With the "INLINE" keyword, you should notice that
XCOMM the display will be a bit faster in complex figures
-XCOMM USEINLINE = -DUSE_INLINE
+USEINLINE = -DUSE_INLINE
XCOMM ****************
XCOMM Change RGB if necessary, to point to your rgb.txt color database
@@ -97,11 +97,11 @@ XPMINC = -I/usr/include/X11
XCOMM ****************
XCOMM Uncomment the following to set default paper size to A4
-XCOMM DDA4 = -DA4
+DDA4 = -DA4
XCOMM ****************
XCOMM Uncomment the following to set IBM Graphics Enhancement Cartridge
-XCOMM DDIBMGEC = -DIBMGEC
+DDIBMGEC = -DIBMGEC
XCOMM ****************
XCOMM Comment out the DDNFSS = ... line if you don't want NFSS2 font selection
@@ -117,6 +117,7 @@ XCOMM probably want to include neither.
DDNFSS = -DNFSS
DDLATEX2E_GRAPHICS = -DLATEX2E_GRAPHICS
+XCOMM Use modern garphics style, not older epsfig style
XCOMM DDEPSFIG = -DEPSFIG
XCOMM ****************
@@ -141,7 +142,7 @@ XCOMM Comment out the next line if you h
#ifdef I18N
I18N_DEFS = -DI18N
-FIG2DEV_LIBDIR = /usr/local/lib/fig2dev
+FIG2DEV_LIBDIR = $(XFIGLIBDIR)/fig2dev
I18N_DEV_DEFS = $(I18N_DEFS) -DFIG2DEV_LIBDIR=$(FIG2DEV_LIBDIR) -DFIG2DEV_LIBDIR_STR=\\\"$(FIG2DEV_LIBDIR)\\\"
#endif /* I18N */
@@ -150,7 +151,7 @@ XCOMM **********************************
XCOMM *** You shouldn't have to change anything below this point ***
XCOMM **************************************************************
-DIR_DEFS= -DBITMAPDIR=\\\"$(DESTDIR)$(XFIGLIBDIR)/bitmaps\\\"
+DIR_DEFS= -DBITMAPDIR=\\\"$(XFIGLIBDIR)/bitmaps\\\"
#ifdef USEPNG
DUSEPNG = -DUSE_PNG
@@ -229,7 +230,7 @@ install::
else (set -x; $(MKDIRHIER) $(DESTDIR)$(XFIGLIBDIR)/bitmaps ); fi ; \
echo Copying bitmap files for tk to $(DESTDIR)$(XFIGLIBDIR)/bitmaps ; \
for f in * ; do \
- $(INSTALL) -c $$f $(DESTDIR)$(XFIGLIBDIR)/bitmaps ; \
+ $(INSTALL) -m644 $$f $(DESTDIR)$(XFIGLIBDIR)/bitmaps ; \
done) ;
install.all::
--- fig2dev/dev/genps.c
+++ fig2dev/dev/genps.c 2007-07-24 15:15:36.000000000 +0000
@@ -37,6 +37,8 @@
*/
#include <sys/stat.h>
+#include <locale.h>
+#include <langinfo.h>
#include "fig2dev.h"
#include "object.h"
#include "bound.h"
@@ -786,25 +788,46 @@ F_compound *objects;
fprintf(tfp, "%s\n", SPLINE_PS);
#ifdef I18N
if (support_i18n && iso_text_exist(objects)) {
- char *libdir, *locale;
+ char *libdir, *locale, *codeset;
char localefile[512], str[512];
+ size_t llen;
FILE *fp;
libdir = getenv("FIG2DEV_LIBDIR");
#ifdef FIG2DEV_LIBDIR_STR
if (libdir == NULL)
libdir = FIG2DEV_LIBDIR_STR;
#endif
- locale = getenv("LANG");
+ locale = setlocale(LC_CTYPE, NULL);
+ llen = strcspn(locale, ".@");
+ codeset = nl_langinfo(CODESET);
if (locale == NULL) {
fprintf(stderr, "fig2dev: LANG not defined; assuming C locale\n");
locale = "C";
}
- sprintf(localefile, "%s/%s.ps", libdir, locale);
+ snprintf(localefile, sizeof(localefile)-1, "%s/%s.ps", libdir, locale);
/* get filename like ``/usr/local/lib/fig2dev/japanese.ps'' */
fp = fopen(localefile, "rb");
- if (fp == NULL) {
+ if (fp == NULL)
fprintf(stderr, "fig2dev: can't open file: %s\n", localefile);
- } else {
+
+ if (fp == NULL && strlen(locale) != llen) {
+ locale[llen] = '\0';
+ /* get filename like ``/usr/local/lib/fig2dev/de_DE.ps'' */
+ snprintf(localefile, sizeof(localefile)-1, "%s/%s.ps", libdir, locale);
+ fp = fopen(localefile, "rb");
+ if (fp == NULL)
+ fprintf(stderr, "fig2dev: B can't open file: %s\n", localefile);
+ }
+
+ if (fp == NULL && codeset) {
+ /* get filename like ``/usr/local/lib/fig2dev/ISO-8859-9.ps'' */
+ snprintf(localefile, sizeof(localefile)-1, "%s/%s.ps", libdir, codeset);
+ fp = fopen(localefile, "rb");
+ if (fp == NULL)
+ fprintf(stderr, "fig2dev: C can't open file: %s\n", localefile);
+ }
+
+ if (fp) {
while (fgets(str, sizeof(str), fp)) {
if (strstr(str, "CompositeRoman")) enable_composite_font = True;
fputs(str, tfp);
--- fig2dev/dev/genpstex.c
+++ fig2dev/dev/genpstex.c 2013-02-08 12:45:41.649945157 +0000
@@ -37,6 +37,7 @@
* Jose Alberto.
*/
+#include <sys/stat.h>
#include "fig2dev.h"
#include "genps.h"
#include "genpdf.h"
@@ -64,10 +65,13 @@ extern void
genps_spline (),
genlatex_option (),
genlatex_text (),
- genps_text ();
+ genps_text (),
+ genpdf_option(),
+ genpdf_start();
extern int
genlatex_end (),
- genps_end ();
+ genps_end (),
+ genpdf_end();
static char pstex_file[1000] = "";
static int iObjectsRead = 0;
--- fig2dev/dev/gensvg.c
+++ fig2dev/dev/gensvg.c 2009-12-14 13:29:42.000000000 +0000
@@ -816,9 +816,11 @@ gensvg_text (t)
x, y, degrees (t->angle));
x = y = 0;
}
- fprintf (tfp, "<text xml:space=\"preserve\" x=\"%d\" y=\"%d\" fill=\"#%6.6x\" font-family=\"%s\" "\
- "font-style=\"%s\" font-weight=\"%s\" font-size=\"%d\" text-anchor=\"%s\">",
- x, y, rgbColorVal (t->color), family[t->font / 4],
+ fprintf (tfp,
+ "<text xml:space=\"preserve\" x=\"%d\" y=\"%d\" fill=\"#%6.6x\" font-family=\"%s\" ",
+ x, y, rgbColorVal (t->color), family[t->font / 4]);
+ fprintf (tfp,
+ "font-style=\"%s\" font-weight=\"%s\" font-size=\"%d\" text-anchor=\"%s\">",
( (t->font % 2 == 0 || t->font >31) ? "normal" : "italic"),
( (t->font % 4 < 2 || t->font >31) ? "normal" : "bold"), (int) (ceil (t->size * 12 * mag)),
anchor[t->type]);
--- fig2dev/fig2dev.c
+++ fig2dev/fig2dev.c 2007-07-24 15:08:45.000000000 +0000
@@ -24,6 +24,7 @@
#include <sys/types.h>
#endif
#include <sys/file.h>
+#include <locale.h>
#include "fig2dev.h"
#include "alloc.h"
#include "object.h"
@@ -31,9 +32,14 @@
#include "bound.h"
#include "read.h"
+#ifndef __GLIBC__
extern int fig_getopt();
extern char *optarg;
extern int optind;
+#else
+# include <unistd.h>
+# define fig_getopt getopt
+#endif
char lang[40];
int parse_gridspec();
static void grid_usage();
@@ -380,6 +386,7 @@ char *argv[];
F_compound objects;
int status;
+ setlocale(LC_CTYPE, "");
#ifdef HAVE_SETMODE
setmode(1,O_BINARY); /* stdout is binary */
#endif
--- fig2dev/fig2dev.h
+++ fig2dev/fig2dev.h 2007-07-24 15:09:55.000000000 +0000
@@ -23,6 +23,7 @@
#include <sys/file.h>
#include <signal.h>
#include <string.h>
+#include <stdarg.h>
#include <pwd.h>
#include <errno.h>
#include <time.h>
@@ -57,7 +58,7 @@ typedef char Boolean;
#ifndef X_NOT_STDC_ENV
# include <string.h>
#else
-# ifdef SYSV
+# if defined(SYSV) || defined(__GLIBC__)
# include <string.h>
# else
# include <strings.h>
--- fig2dev/fig2ps2tex.script
+++ fig2dev/fig2ps2tex.script 2006-07-31 16:26:56.000000000 +0000
@@ -3,6 +3,7 @@
# Fig2ps2tex - generate a TeX file for including a PostScript file
# involves calculating the bounding box from fig2ps output
#
+set echo_style=bsd
set bbox = `grep "^%%BoundingBox:" $1`
set xsp = `echo "3k $bbox[4] $bbox[2] - 72 / p" | dc`
--- fig2dev/getopt.c
+++ fig2dev/getopt.c 2006-07-31 16:26:56.000000000 +0000
@@ -35,6 +35,7 @@ static char sccsfid[] = "@(#) getopt.c 5
#define EMSG ""
#define ENDARGS "--"
+#ifndef __GLIBC__
/* this is included because index is not on some UNIX systems */
static char *
index (s, c)
@@ -46,7 +47,9 @@ index (s, c)
else s++;
return (NULL);
}
+#endif
+#ifndef __GLIBC__
/*
* get option letter from argument vector
*/
@@ -95,4 +98,10 @@ fig_getopt(nargc,nargv,ostr)
}
return(fig_optopt); /* dump back option letter */
}
-
+#else
+#include <unistd.h>
+fig_getopt(int nargc, char * const nargv[], const char *ostr)
+{
+ return getopt(nargc, nargv, ostr);
+}
+#endif
--- transfig/Imakefile
+++ transfig/Imakefile 2006-07-31 16:26:56.000000000 +0000
@@ -32,7 +32,7 @@ XCOMM Uncomment the USELATEX2E flag to u
XCOMM \\usepackage{} command for LaTeX2e.
XCOMM The default is to use \\documentstyle{} for LaTeX209.
-XCOMM USELATEX2E = -DLATEX2E
+USELATEX2E = -DLATEX2E
XCOMM ******* DON'T CHANGE ANYTHING BELOW THIS POINT *******
--- transfig/sys.c
+++ transfig/sys.c 2012-09-28 14:24:03.339507328 +0000
@@ -17,6 +17,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include "transfig.h"
#define MAXSYS 10000
--- transfig/transfig.c
+++ transfig/transfig.c 2012-09-28 14:24:24.443392989 +0000
@@ -26,6 +26,8 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
#include "patchlevel.h"
#include "transfig.h"

View File

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

View File

@ -1,3 +1,69 @@
-------------------------------------------------------------------
Fri Sep 23 12:04:22 UTC 2016 - werner@suse.de
- Update to fig2dev version 3.2.6 (the successor of transfig)
o Add compile switch --enable-versioning and script update-version_m4,
to create version string from source control system
o tikz output: Support -G (grid) option. Make \XFigwidth and \XFigheight
only scale coordinates, not line widths; Do not set unnecessarily
\color{black} on text.
From Roland Rosenfeld <roland@spinnaker.de>
o Correct comment string in man page fig2ps2tex.1
o Distribute autotest file lookup_X_color.at - only useful for hacko
From Brian V. Smith:
o Changed object defs from O_ to OBJ_ because O_TEXT conflicts
with system typedef (debian 37_OBJ_typedef.patch)
o Remove unused charset variables cs and ca from genibmgl.c
(debian 38_unusedcharset.patch)
o Build with make CFLAGS="-Werror -Wpedantic -Wformat -Wformat-security'
o On lines with Round or Projecting cap style and arrowheads, the line
endpoint stuck out beyond the arrowhead (this was fixed in
xfig 3.2.5c, but not here until now; debian 41_arrowhead.patch)
o Changed .ce (center lines) to .RS (right-justify) in fig2ps2tex man
page file because of issues when generating HTML (From Eric Raymond)
(debian 36_manpage_ce2RS.patch)
o Quotes added to output file name for several formats in case there
are blanks in the name (debian 39_gs_quote.patch)
o For PDF output, changed -dColorImageFilter from /FlateEncode to
/DCTEncode for lossy compression (smaller pdf files)
(debian 40_ColorImageFilter.patch)
o Update help for PDF options (debian 42_PDF_help.patch)
From Roland Rosenfeld. Bug numers refer to https://bugs.debian.org/#.
o Remove bashisms in fig2ps2tex script. Reported from
Chris Lamb <chris@chris-lamb.co.uk>. Fixes debian bug 480615.
o Include sys/stat.h in genps.c. Reported from Steven Chamberlain
<steven@pyro.eu.org>. Debian bug 654767. (28_fix_chmod...patch)
o Distribute the man page transig.1. (34_transfig.1.patch)
o Do not report user information in ps files. Debian bug 316382
(04_displaywho.patch)
o Set locale to C. Debian bug 45378 (05_locale_patch).
o Support pdftex in transfig (20_transfig_pdftex.patch). Reported by
Jindrich Makovicka <makovick@gmail.com>.
o Fix some typos (22_typos.patch, 35_manpage_typos.patch).
o Honor environment variable SOURCE_DATE_EPOCH, for reproducible
builds. Debian bug 819911. From Alexis Bienvenüe <pado@passoire.fr>.
(33_honour_SOURCE_DATE_EPOCH.patch).
o Enable fonts >= 42 pt, needs \usepackage{type1cm}. Bug 343139,
(09_maxfontsize.patch).
o New pict2e and tikz output language, for use with TeX/LaTeX.
o Compile with ./configure; make; make install.
Optionally, use make check; make installcheck.
o By default, transfig is not built.
o Swap patterns in PostScript output, were upside down.
o Silence most compiler warnings.
o Update man-pages and help text.
o Accurately position arrowheads, flush with line, in PostScript output.
- Remove transfig.3.2.5d-patches.tar.bz2 but port and add the oldpatterns
and mpdf patches to 3.2.6:
fig2dev-3.2.6-fig2mpdf-doc.patch
fig2dev-3.2.6-fig2mpdf.patch
fig2dev-3.2.6-genps_oldpatterns.patch
- Patch transfig.3.2.5d.dif becomes transfig-3.2.6.dif
- Modify the patches
transfig-fix-afl.patch
transfig.3.2.5-binderman.dif
transfig.3.2.5d-mediaboxrealnb.dif
-------------------------------------------------------------------
Thu Apr 16 12:26:49 UTC 2015 - meissner@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package transfig
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -17,6 +17,7 @@
Name: transfig
BuildRequires: fdupes
BuildRequires: libjpeg-devel
BuildRequires: netpbm
BuildRequires: texlive-latex
@ -25,9 +26,14 @@ BuildRequires: texlive-amsfonts
BuildRequires: texlive-cm-super
BuildRequires: texlive-courier
BuildRequires: texlive-dvips
BuildRequires: texlive-epstopdf
BuildRequires: texlive-pdftex
BuildRequires: texlive-times
BuildRequires: tex(beamer.cls)
BuildRequires: tex(german.sty)
BuildRequires: tex(multimedia.sty)
BuildRequires: tex(times.sty)
BuildRequires: tex(xmpmulti.sty)
%endif
%if 0%{?suse_version} > 1120
BuildRequires: libpng12-compat-devel
@ -37,22 +43,27 @@ BuildRequires: libpng-devel
%endif
BuildRequires: xorg-x11
BuildRequires: xorg-x11-devel
Url: http://www.xfig.org/
# www.xfig.org is dead
Url: http://mcj.sourceforge.net/
Provides: fig2dev
Provides: transfig.3.2.3d
Requires: ghostscript-fonts-std
Requires: ghostscript-library
Requires: netpbm
Version: 3.2.5e
Requires: texlive-epstopdf
Version: 3.2.6
Release: 0
Summary: Graphic Converter
License: MIT
Group: Productivity/Graphics/Convertors
Source: http://sourceforge.net/projects/mcj/files/mcj-source/transfig.%{version}.tar.gz
Source1: transfig.3.2.5d-patches.tar.bz2
Patch0: transfig.3.2.5d.dif
Source: http://sourceforge.net/projects/mcj/files/mcj-source/fig2dev-%{version}.tar.xz
Patch0: transfig-%{version}.dif
Patch2: transfig.3.2.5-binderman.dif
Patch3: transfig.3.2.5d-mediaboxrealnb.dif
Patch4: transfig-fix-afl.patch
Patch42: fig2dev-3.2.6-genps_oldpatterns.patch
Patch43: fig2dev-3.2.6-fig2mpdf.patch
Patch44: fig2dev-3.2.6-fig2mpdf-doc.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{expand: %%global _exec_prefix %(type -p pkg-config &>/dev/null && pkg-config --variable prefix x11 || echo /usr/X11R6)}
%if "%_exec_prefix" == "/usr/X11R6"
@ -87,49 +98,63 @@ Authors:
Supoj Sutantavibul <beck@cs.utk.ecu>
%prep
%setup -q -n transfig.%{version}
%setup -q -n fig2dev-%{version}
find -type f | xargs -r chmod a-x,go-w
tar Oxfj %{S:1} | patch -p1 -s
%patch0 -p0 -b .0
%patch2 -p0 -b .bm
%patch3 -p0 -b .mbox
%patch4 -p1
xmkmf -a -D_DATA='%{_data}'
%patch4 -p1 -b .afl
%patch42 -p2 -b .oldp
%patch43 -p2 -b .mpdf
%patch44 -p1 -b .mpdfdoc
%build
make CCOPTIONS="$RPM_OPT_FLAGS -fno-strict-aliasing -w"
make -C doc/manual/
rm -f doc/manual/*.{log,toc,div}
CC=gcc
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -w -D_GNU_SOURCE -std=gnu99"
CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
export CC CFLAGS
chmod 755 configure
%configure \
--docdir=%{_defaultdocdir}/%{name} \
--enable-transfig \
--enable-scale-pic2t2e
make %{?_smp_mflags} CCOPTIONS="$CFLAGS"
%install
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_x11data}/xfig/fig2dev
mkdir -p %{buildroot}%{_x11data}/xfig/bitmaps
make DESTDIR=%{buildroot} install CCOPTIONS="$RPM_OPT_FLAGS -fno-strict-aliasing -w"
make DESTDIR=%{buildroot} install.man CCOPTIONS="$RPM_OPT_FLAGS -fno-strict-aliasing -w"
mkdir -p %{buildroot}%{_docdir}/transfig/manual
install -m 644 [CLNR]* %{buildroot}%{_docdir}/transfig/
install -m 644 doc/manual/* %{buildroot}%{_docdir}/transfig/manual/
rm -vf %{buildroot}%{_docdir}/transfig/manual/Makefile.orig
rm -vf %{buildroot}%{_docdir}/transfig/manual/*.aux
rm -vf %{buildroot}%{_docdir}/transfig/manual/*.toc
rm -vf %{buildroot}%{_docdir}/transfig/manual/*.log
rm -vf %{buildroot}%{_docdir}/transfig/manual/*.div
find -name '*.mpdfdoc' -o -name '*.mpdf' | xargs -r rm -vf
make DESTDIR=%{buildroot} install
install -m 0755 fig2mpdf/fig2mpdf %{buildroot}%{_bindir}
install -m 0644 fig2mpdf/fig2mpdf.1 %{buildroot}%{_mandir}/man1/
gzip -9 %{buildroot}%{_mandir}/man1/fig2mpdf.1
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}
install -m 0644 [CLNR]* %{buildroot}%{_defaultdocdir}/%{name}
pushd fig2mpdf/doc
make
mkdir %{buildroot}%{_defaultdocdir}/%{name}/fig2mpdf
rm -f overlay-sample-?.pdf
rm -f *.aux *.log *.nav *.out *.snm *.toc
install -m 0644 * %{buildroot}%{_defaultdocdir}/%{name}/fig2mpdf/
popd
pushd transfig/doc
../../fig2dev/fig2dev -L latex trans.fig > trans.tex
pdflatex manual.tex
pdflatex manual.tex
pdflatex manual.tex
install -m 0644 manual.pdf %{buildroot}%{_defaultdocdir}/%{name}/transfig.pdf
popd
%fdupes %{buildroot}
%files
%defattr(-,root,root)
%{_bindir}/fig2dev
%{_bindir}/fig2mpdf
%{_bindir}/fig2ps2tex
%{_bindir}/fig2ps2tex.sh
%{_bindir}/pic2tpic
%{_bindir}/transfig
%dir %{_x11data}/xfig
%{_x11data}/xfig/fig2dev/
%{_x11data}/xfig/bitmaps/
%doc %{_mandir}/man1/fig2dev.1x.gz
%doc %{_mandir}/man1/fig2ps2tex.1x.gz
%doc %{_mandir}/man1/pic2tpic.1x.gz
%doc %{_mandir}/man1/transfig.1x.gz
%doc %{_docdir}/transfig/
%{_datadir}/fig2dev/
%doc %{_defaultdocdir}/%{name}
%doc %{_mandir}/man1/*.1*.gz
%changelog