.
OBS-URL: https://build.opensuse.org/package/show/Publishing/transfig?expand=0&rev=25
This commit is contained in:
parent
7b41917290
commit
8de30f6ab1
33
transfig.3.2.5d-mediaboxrealnb.dif
Normal file
33
transfig.3.2.5d-mediaboxrealnb.dif
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
--- fig2dev/dev/readeps.c
|
||||||
|
+++ fig2dev/dev/readeps.c 2013-02-07 16:18:36.233452627 +0000
|
||||||
|
@@ -79,12 +79,20 @@ read_eps_pdf(file, filetype, pic, llx, l
|
||||||
|
if (pdf_flag) {
|
||||||
|
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) {
|
||||||
|
+ if (c && sscanf(c,%lf %lf %lf %lf",
|
||||||
|
+ &fllx, &flly, &furx, &fury) < 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" );
|
||||||
|
+ } else {
|
||||||
|
+ *llx = (int) floor(fllx);
|
||||||
|
+ *lly = (int) floor(flly);
|
||||||
|
+ urx = (int) floor(furx);
|
||||||
|
+ ury = (int) floor(fury);
|
||||||
|
+ pic->bit_size.x = (int) (furx-fllx);
|
||||||
|
+ pic->bit_size.y = (int) (fury-flly);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* look for bounding box for EPS file */
|
||||||
|
@@ -101,6 +109,8 @@ read_eps_pdf(file, filetype, pic, llx, l
|
||||||
|
}
|
||||||
|
*llx = (int) floor(fllx);
|
||||||
|
*lly = (int) floor(flly);
|
||||||
|
+ urx = (int) floor(furx);
|
||||||
|
+ ury = (int) floor(fury);
|
||||||
|
pic->bit_size.x = (int) (furx-fllx);
|
||||||
|
pic->bit_size.y = (int) (fury-flly);
|
||||||
|
break;
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package transfig
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -50,6 +50,7 @@ Group: Productivity/Graphics/Convertors
|
|||||||
Source: transfig.%{version}.tar.bz2
|
Source: transfig.%{version}.tar.bz2
|
||||||
Patch0: transfig.3.2.5d.dif
|
Patch0: transfig.3.2.5d.dif
|
||||||
Patch2: transfig.3.2.5-binderman.dif
|
Patch2: transfig.3.2.5-binderman.dif
|
||||||
|
Patch3: transfig.3.2.5d-mediaboxrealnb.dif
|
||||||
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"
|
||||||
@ -85,8 +86,9 @@ Authors:
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n transfig.%{version}
|
%setup -q -n transfig.%{version}
|
||||||
%patch0 -b .0
|
%patch0 -p0 -b .0
|
||||||
%patch2 -b .bm
|
%patch2 -p0 -b .bm
|
||||||
|
%patch3 -p0 -b .mbox
|
||||||
xmkmf -a -D_DATA='%{_data}'
|
xmkmf -a -D_DATA='%{_data}'
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
Loading…
Reference in New Issue
Block a user