Fix FTBFS issue. (#716211)
This commit is contained in:
parent
21e1a3334d
commit
2107e9ac17
@ -40,15 +40,16 @@ diff -pruN paps-0.6.8.orig/src/Makefile.am paps-0.6.8/src/Makefile.am
|
|||||||
diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c
|
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 2008-11-07 08:21:05.000000000 +0900
|
--- paps-0.6.8.orig/src/paps.c 2008-11-07 08:21:05.000000000 +0900
|
||||||
+++ paps-0.6.8/src/paps.c 2008-11-07 08:26:28.000000000 +0900
|
+++ paps-0.6.8/src/paps.c 2008-11-07 08:26:28.000000000 +0900
|
||||||
@@ -31,6 +31,7 @@
|
@@ -31,6 +31,8 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
+#include <cups/cups.h>
|
+#include <cups/cups.h>
|
||||||
|
+#include <cups/ppd.h>
|
||||||
|
|
||||||
#define BUFSIZE 1024
|
#define BUFSIZE 1024
|
||||||
#define DEFAULT_FONT_FAMILY "Monospace"
|
#define DEFAULT_FONT_FAMILY "Monospace"
|
||||||
@@ -86,9 +87,11 @@ typedef struct {
|
@@ -86,9 +88,11 @@ typedef struct {
|
||||||
gboolean do_wordwrap;
|
gboolean do_wordwrap;
|
||||||
gboolean do_use_markup;
|
gboolean do_use_markup;
|
||||||
gboolean do_stretch_chars;
|
gboolean do_stretch_chars;
|
||||||
@ -60,7 +61,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c
|
|||||||
gint lpi;
|
gint lpi;
|
||||||
gint cpi;
|
gint cpi;
|
||||||
} page_layout_t;
|
} page_layout_t;
|
||||||
@@ -320,8 +323,8 @@ int main(int argc, char *argv[])
|
@@ -320,8 +324,8 @@ int main(int argc, char *argv[])
|
||||||
int num_pages = 1;
|
int num_pages = 1;
|
||||||
int gutter_width = 40;
|
int gutter_width = 40;
|
||||||
int total_gutter_width;
|
int total_gutter_width;
|
||||||
@ -71,7 +72,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c
|
|||||||
int do_tumble = -1; /* -1 means not initialized */
|
int do_tumble = -1; /* -1 means not initialized */
|
||||||
int do_duplex = -1;
|
int do_duplex = -1;
|
||||||
gchar *paps_header = NULL;
|
gchar *paps_header = NULL;
|
||||||
@@ -331,6 +334,8 @@ int main(int argc, char *argv[])
|
@@ -331,6 +335,8 @@ int main(int argc, char *argv[])
|
||||||
int max_width = 0, w;
|
int max_width = 0, w;
|
||||||
GIConv cvh = NULL;
|
GIConv cvh = NULL;
|
||||||
GOptionGroup *options;
|
GOptionGroup *options;
|
||||||
@ -80,7 +81,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c
|
|||||||
|
|
||||||
/* Set locale from environment. */
|
/* Set locale from environment. */
|
||||||
setlocale(LC_ALL, "");
|
setlocale(LC_ALL, "");
|
||||||
@@ -348,6 +353,130 @@ int main(int argc, char *argv[])
|
@@ -348,6 +354,130 @@ int main(int argc, char *argv[])
|
||||||
g_option_context_add_main_entries(ctxt, entries, NULL);
|
g_option_context_add_main_entries(ctxt, entries, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -211,7 +212,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c
|
|||||||
/* Parse command line */
|
/* Parse command line */
|
||||||
if (!g_option_context_parse(ctxt, &argc, &argv, &error))
|
if (!g_option_context_parse(ctxt, &argc, &argv, &error))
|
||||||
{
|
{
|
||||||
@@ -374,6 +503,8 @@ int main(int argc, char *argv[])
|
@@ -374,6 +504,8 @@ int main(int argc, char *argv[])
|
||||||
IN = stdin;
|
IN = stdin;
|
||||||
}
|
}
|
||||||
title = filename_in;
|
title = filename_in;
|
||||||
@ -220,7 +221,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c
|
|||||||
|
|
||||||
paps = paps_new();
|
paps = paps_new();
|
||||||
pango_context = paps_get_pango_context (paps);
|
pango_context = paps_get_pango_context (paps);
|
||||||
@@ -392,8 +523,10 @@ int main(int argc, char *argv[])
|
@@ -392,8 +524,10 @@ int main(int argc, char *argv[])
|
||||||
pango_context_set_font_description (pango_context, font_description);
|
pango_context_set_font_description (pango_context, font_description);
|
||||||
|
|
||||||
/* Page layout */
|
/* Page layout */
|
||||||
@ -233,7 +234,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c
|
|||||||
|
|
||||||
if (num_columns == 1)
|
if (num_columns == 1)
|
||||||
total_gutter_width = 0;
|
total_gutter_width = 0;
|
||||||
@@ -456,6 +589,8 @@ int main(int argc, char *argv[])
|
@@ -456,6 +590,8 @@ int main(int argc, char *argv[])
|
||||||
page_layout.pango_dir = pango_dir;
|
page_layout.pango_dir = pango_dir;
|
||||||
page_layout.filename = filename_in;
|
page_layout.filename = filename_in;
|
||||||
page_layout.header_font_desc = header_font_desc;
|
page_layout.header_font_desc = header_font_desc;
|
||||||
@ -242,7 +243,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c
|
|||||||
|
|
||||||
/* calculate x-coordinate scale */
|
/* calculate x-coordinate scale */
|
||||||
if (page_layout.cpi > 0.0L)
|
if (page_layout.cpi > 0.0L)
|
||||||
@@ -756,6 +891,12 @@ split_text_into_paragraphs (PangoContext
|
@@ -756,6 +892,12 @@ split_text_into_paragraphs (PangoContext
|
||||||
if (wc == (gunichar)-1)
|
if (wc == (gunichar)-1)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "%s: Invalid character in input\n", g_get_prgname ());
|
fprintf (stderr, "%s: Invalid character in input\n", g_get_prgname ());
|
||||||
@ -255,7 +256,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c
|
|||||||
wc = 0;
|
wc = 0;
|
||||||
}
|
}
|
||||||
if (!*p || !wc || wc == '\n' || wc == '\f')
|
if (!*p || !wc || wc == '\n' || wc == '\f')
|
||||||
@@ -925,21 +1066,32 @@ void print_postscript_header(FILE *OUT,
|
@@ -925,21 +1067,32 @@ void print_postscript_header(FILE *OUT,
|
||||||
int orientation = page_layout->page_width > page_layout->page_height;
|
int orientation = page_layout->page_width > page_layout->page_height;
|
||||||
int bb_page_width = page_layout->page_width;
|
int bb_page_width = page_layout->page_width;
|
||||||
int bb_page_height = page_layout->page_height;
|
int bb_page_height = page_layout->page_height;
|
||||||
@ -290,7 +291,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c
|
|||||||
"%%%%BeginProlog\n"
|
"%%%%BeginProlog\n"
|
||||||
"%%%%Orientation: %s\n"
|
"%%%%Orientation: %s\n"
|
||||||
"/papsdict 1 dict def\n"
|
"/papsdict 1 dict def\n"
|
||||||
@@ -961,7 +1113,7 @@ void print_postscript_header(FILE *OUT,
|
@@ -961,7 +1114,7 @@ void print_postscript_header(FILE *OUT,
|
||||||
" pagewidth\n"
|
" pagewidth\n"
|
||||||
" /pagewidth pageheight def\n"
|
" /pagewidth pageheight def\n"
|
||||||
" /pageheight exch def\n"
|
" /pageheight exch def\n"
|
||||||
@ -299,7 +300,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c
|
|||||||
" } if\n"
|
" } if\n"
|
||||||
" 2 dict\n"
|
" 2 dict\n"
|
||||||
" dup /PageSize [pagewidth pageheight] put\n"
|
" dup /PageSize [pagewidth pageheight] put\n"
|
||||||
@@ -986,11 +1138,21 @@ void print_postscript_header(FILE *OUT,
|
@@ -986,11 +1139,21 @@ void print_postscript_header(FILE *OUT,
|
||||||
" 90 rotate\n"
|
" 90 rotate\n"
|
||||||
" 0 pageheight neg translate\n"
|
" 0 pageheight neg translate\n"
|
||||||
"} def\n",
|
"} def\n",
|
||||||
|
@ -90,16 +90,16 @@ diff --git a/src/paps.c b/src/paps.c
|
|||||||
index 334d547..72dbaad 100644
|
index 334d547..72dbaad 100644
|
||||||
--- a/src/paps.c
|
--- a/src/paps.c
|
||||||
+++ b/src/paps.c
|
+++ b/src/paps.c
|
||||||
@@ -32,6 +32,8 @@
|
@@ -33,6 +33,8 @@
|
||||||
#include <time.h>
|
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <cups/cups.h>
|
#include <cups/cups.h>
|
||||||
|
#include <cups/ppd.h>
|
||||||
+#include <math.h>
|
+#include <math.h>
|
||||||
+#include <wchar.h>
|
+#include <wchar.h>
|
||||||
|
|
||||||
#define BUFSIZE 1024
|
#define BUFSIZE 1024
|
||||||
#define DEFAULT_FONT_FAMILY "Monospace"
|
#define DEFAULT_FONT_FAMILY "Monospace"
|
||||||
@@ -593,6 +595,8 @@ int main(int argc, char *argv[])
|
@@ -594,6 +596,8 @@ int main(int argc, char *argv[])
|
||||||
page_layout.owner = page_owner;
|
page_layout.owner = page_owner;
|
||||||
page_layout.cups_mode = cups_mode;
|
page_layout.cups_mode = cups_mode;
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ index 334d547..72dbaad 100644
|
|||||||
/* calculate x-coordinate scale */
|
/* calculate x-coordinate scale */
|
||||||
if (page_layout.cpi > 0.0L)
|
if (page_layout.cpi > 0.0L)
|
||||||
{
|
{
|
||||||
@@ -605,7 +609,7 @@ int main(int argc, char *argv[])
|
@@ -606,7 +610,7 @@ int main(int argc, char *argv[])
|
||||||
w = pango_font_metrics_get_approximate_digit_width (metrics);
|
w = pango_font_metrics_get_approximate_digit_width (metrics);
|
||||||
if (w > max_width)
|
if (w > max_width)
|
||||||
max_width = w;
|
max_width = w;
|
||||||
@ -117,7 +117,7 @@ index 334d547..72dbaad 100644
|
|||||||
pango_font_metrics_unref (metrics);
|
pango_font_metrics_unref (metrics);
|
||||||
g_object_unref (G_OBJECT (fontmap));
|
g_object_unref (G_OBJECT (fontmap));
|
||||||
|
|
||||||
@@ -613,6 +617,8 @@ int main(int argc, char *argv[])
|
@@ -614,6 +618,8 @@ int main(int argc, char *argv[])
|
||||||
// update the font size to that width
|
// update the font size to that width
|
||||||
pango_font_description_set_size (font_description, font_size * page_layout.scale_x);
|
pango_font_description_set_size (font_description, font_size * page_layout.scale_x);
|
||||||
pango_context_set_font_description (pango_context, font_description);
|
pango_context_set_font_description (pango_context, font_description);
|
||||||
@ -126,7 +126,7 @@ index 334d547..72dbaad 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
page_layout.scale_x = page_layout.scale_y = 1.0;
|
page_layout.scale_x = page_layout.scale_y = 1.0;
|
||||||
@@ -726,119 +732,6 @@ read_file (FILE *file,
|
@@ -727,119 +733,6 @@ read_file (FILE *file,
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ index 334d547..72dbaad 100644
|
|||||||
/* Take a UTF8 string and break it into paragraphs on \n characters
|
/* Take a UTF8 string and break it into paragraphs on \n characters
|
||||||
*/
|
*/
|
||||||
static GList *
|
static GList *
|
||||||
@@ -904,18 +797,85 @@ split_text_into_paragraphs (PangoContext *pango_context,
|
@@ -905,18 +798,85 @@ split_text_into_paragraphs (PangoContext *pango_context,
|
||||||
para->text = last_para;
|
para->text = last_para;
|
||||||
para->length = p - last_para;
|
para->length = p - last_para;
|
||||||
para->layout = pango_layout_new (pango_context);
|
para->layout = pango_layout_new (pango_context);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Name: paps
|
Name: paps
|
||||||
Version: 0.6.8
|
Version: 0.6.8
|
||||||
Release: 15%{?dist}
|
Release: 16%{?dist}
|
||||||
|
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: http://paps.sourceforge.net/
|
URL: http://paps.sourceforge.net/
|
||||||
@ -108,6 +108,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_libdir}/libpaps.so
|
%{_libdir}/libpaps.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jun 24 2011 Akira TAGOH <tagoh@redhat.com> - 0.6.8-16
|
||||||
|
- Fix FTBFS issue. (#716211)
|
||||||
|
|
||||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.8-15
|
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.8-15
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user