From 86af971b5b24f5a56cdd48713d16bfecbae1e4a6 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 24 Apr 2015 11:53:57 +0900 Subject: [PATCH] Fix wrong paper size due to the integer cast. --- paps-fix-paper-size-truncate.patch | 15 +++++++++++++++ paps.spec | 6 ++++++ 2 files changed, 21 insertions(+) create mode 100644 paps-fix-paper-size-truncate.patch diff --git a/paps-fix-paper-size-truncate.patch b/paps-fix-paper-size-truncate.patch new file mode 100644 index 0000000..90e9fcb --- /dev/null +++ b/paps-fix-paper-size-truncate.patch @@ -0,0 +1,15 @@ +diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c +--- paps-0.6.8.orig/src/paps.c 2015-04-24 11:49:53.220718394 +0900 ++++ paps-0.6.8/src/paps.c 2015-04-24 11:51:30.847718394 +0900 +@@ -532,9 +532,9 @@ int main(int argc, char *argv[]) + + /* Page layout */ + if (page_width < 0) +- page_width = paper_sizes[(int)paper_type].width; ++ page_width = (paper_sizes[(int)paper_type].width + 0.5); + if (page_height < 0) +- page_height = paper_sizes[(int)paper_type].height; ++ page_height = (paper_sizes[(int)paper_type].height + 0.5); + + if (num_columns == 1) + total_gutter_width = 0; diff --git a/paps.spec b/paps.spec index 5c26900..674ec11 100644 --- a/paps.spec +++ b/paps.spec @@ -38,6 +38,8 @@ Patch58: paps-correct-fsf-address.patch Patch59: %{name}-ft-header.patch ## rhbz#1196997 Patch60: %{name}-a3.patch +## rhbz#1214939 +Patch61: %{name}-fix-paper-size-truncate.patch Summary: Plain Text to PostScript converter Group: Applications/Publishing @@ -83,6 +85,7 @@ applications using paps API. %patch58 -p1 -b .fsf %patch59 -p1 -b .ft-header %patch60 -p1 -b .a3 +%patch61 -p1 -b .paper-size libtoolize -f -c autoreconf -f -i @@ -130,6 +133,9 @@ install -p -m0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d/ %{_libdir}/libpaps.so %changelog +* Fri Apr 24 2015 Akira TAGOH - 0.6.8-34 +- Fix wrong paper size due to the integer cast. + * Mon Mar 2 2015 Akira TAGOH - 0.6.8-33 - Support A3 paper size.