diff --git a/transfig.3.2.5d-mediaboxrealnb.dif b/transfig.3.2.5d-mediaboxrealnb.dif new file mode 100644 index 0000000..0fe1490 --- /dev/null +++ b/transfig.3.2.5d-mediaboxrealnb.dif @@ -0,0 +1,27 @@ +--- 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 + while (fgets(buf, 512, file) != NULL) { + /* look for /MediaBox for pdf file */ + if (pdf_flag) { ++ char *s; ++ for(s=buf; (s=strchr(s,'/')); s++) { + if (!strncmp(buf, "/MediaBox", 8)) { /* look for the MediaBox spec */ +- 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 = paperdef[0].width*72; + ury = paperdef[0].height*72; + put_msg("Bad MediaBox in imported PDF file %s, assuming %s size", + pic->file, metric? "A4" : "Letter" ); + } ++ pic->bit_size.x = (urx-(*llx)); ++ pic->bit_size.y = (ury-(*lly)); ++ break; + } ++ } + /* look for bounding box for EPS file */ + } else if (!nested && !strncmp(buf, "%%BoundingBox:", 14)) { + c=buf+14; diff --git a/transfig.3.2.5d-patches.tar.bz2 b/transfig.3.2.5d-patches.tar.bz2 new file mode 100644 index 0000000..23dfae7 --- /dev/null +++ b/transfig.3.2.5d-patches.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be9f42b720221593ca3ef8f75815797b07bd35161ae858c81215f370b866b158 +size 221348 diff --git a/transfig.3.2.5d.dif b/transfig.3.2.5d.dif index 1ebf681..ae29540 100644 --- a/transfig.3.2.5d.dif +++ b/transfig.3.2.5d.dif @@ -177,8 +177,16 @@ if (strstr(str, "CompositeRoman")) enable_composite_font = True; fputs(str, tfp); --- fig2dev/dev/genpstex.c -+++ fig2dev/dev/genpstex.c 2008-04-25 14:01:42.000000000 +0000 -@@ -64,10 +64,13 @@ extern void ++++ fig2dev/dev/genpstex.c 2013-02-08 12:45:41.649945157 +0000 +@@ -37,6 +37,7 @@ + * Jose Alberto. + */ + ++#include + #include "fig2dev.h" + #include "genps.h" + #include "genpdf.h" +@@ -64,10 +65,13 @@ extern void genps_spline (), genlatex_option (), genlatex_text (), @@ -193,7 +201,7 @@ + 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) @@ -295,7 +303,7 @@ */ @@ -95,4 +98,10 @@ fig_getopt(nargc,nargv,ostr) } - return(optopt); /* dump back option letter */ + return(fig_optopt); /* dump back option letter */ } - +#else diff --git a/transfig.changes b/transfig.changes index 937422f..2aaf121 100644 --- a/transfig.changes +++ b/transfig.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri Feb 8 11:14:39 UTC 2013 - werner@suse.de + +- User original patches from Debian + +------------------------------------------------------------------- +Thu Feb 7 16:34:21 UTC 2013 - werner@suse.de + +- Add xfig.3.2.5b-mediaboxrealnb.dif to fix regarding pdf import, + reported by Loic Le Guyader compare with Debian bug #530898 + ------------------------------------------------------------------- Fri Sep 28 14:15:17 UTC 2012 - werner@suse.de diff --git a/transfig.spec b/transfig.spec index 2fb749e..4094f15 100644 --- a/transfig.spec +++ b/transfig.spec @@ -1,7 +1,7 @@ # # spec file for package transfig # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -29,14 +29,14 @@ BuildRequires: texlive-pdftex BuildRequires: texlive-times BuildRequires: tex(times.sty) %endif -BuildRequires: xorg-x11 -BuildRequires: xorg-x11-devel %if 0%{?suse_version} > 1120 BuildRequires: libpng12-compat-devel BuildRequires: libpng12-devel %else BuildRequires: libpng-devel %endif +BuildRequires: xorg-x11 +BuildRequires: xorg-x11-devel Url: http://www.xfig.org/ Provides: transfig.3.2.3d Requires: ghostscript-fonts-std @@ -48,8 +48,10 @@ Summary: Graphic Converter License: MIT Group: Productivity/Graphics/Convertors Source: transfig.%{version}.tar.bz2 +Source1: transfig.%{version}-patches.tar.bz2 Patch0: transfig.3.2.5d.dif Patch2: transfig.3.2.5-binderman.dif +Patch3: transfig.3.2.5d-mediaboxrealnb.dif 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" @@ -85,8 +87,11 @@ Authors: %prep %setup -q -n transfig.%{version} -%patch0 -b .0 -%patch2 -b .bm +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 xmkmf -a -D_DATA='%{_data}' %build