rpms/paps/FC-6 paps-0.6.6-langinfo.patch, NONE, 1.1 paps-cups.patch, 1.9, 1.10 paps.spec, 1.19, 1.20
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Wed Mar 7 12:10:35 UTC 2007
Author: tagoh
Update of /cvs/dist/rpms/paps/FC-6
In directory cvs.devel.redhat.com:/tmp/cvs-serv7113
Modified Files:
paps-cups.patch paps.spec
Added Files:
paps-0.6.6-langinfo.patch
Log Message:
* Thu Mar 7 2007 Akira TAGOH <tagoh at redhat.com> - 0.6.6-18
- default to lpi=6 and cpi=10 if paps is bringing up as cups filter. (#223862)
paps-0.6.6-langinfo.patch:
paps.c | 13 +++++++++++++
1 files changed, 13 insertions(+)
--- NEW FILE paps-0.6.6-langinfo.patch ---
diff -pruN paps-0.6.6.orig/src/paps.c paps-0.6.6/src/paps.c
--- paps-0.6.6.orig/src/paps.c 2007-01-23 18:56:04.000000000 +0900
+++ paps-0.6.6/src/paps.c 2007-01-23 18:59:15.000000000 +0900
@@ -25,6 +25,7 @@
#include <pango/pangoft2.h>
#include "libpaps.h"
#include <errno.h>
+#include <langinfo.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -324,6 +325,9 @@ int main(int argc, char *argv[])
int max_width = 0, w;
GIConv cvh = NULL;
+ /* Set locale from environment. */
+ setlocale(LC_ALL, "");
+
/* Prerequisite when using glib. */
g_type_init();
@@ -451,6 +455,15 @@ int main(int argc, char *argv[])
g_object_unref (G_OBJECT (fontmap));
}
+ if (encoding == NULL)
+ {
+ encoding = g_strdup(nl_langinfo(CODESET));
+ if (!strcmp(encoding, "UTF-8"))
+ {
+ g_free(encoding);
+ encoding = NULL;
+ }
+ }
if (encoding != NULL)
{
cvh = g_iconv_open ("UTF-8", encoding);
paps-cups.patch:
configure.in | 13 ++++
src/Makefile.am | 4 -
src/paps.c | 160 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
3 files changed, 170 insertions(+), 7 deletions(-)
Index: paps-cups.patch
===================================================================
RCS file: /cvs/dist/rpms/paps/FC-6/paps-cups.patch,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- paps-cups.patch 29 Sep 2006 18:18:36 -0000 1.9
+++ paps-cups.patch 7 Mar 2007 12:10:32 -0000 1.10
@@ -1,7 +1,7 @@
-diff -ruN paps-0.6.6.orig/configure.in paps-0.6.6/configure.in
+diff -pruN -x Makefile -x Makefile.in -x '*.m4' -x autom4te.cache -x 'config.*' -x configure -x doc -x libtool -x .deps -x .libs -x '*.ps' -x foo -x paps -x 'lib*' -x texttopaps -x '*o' -x '*.cups' -x 'test*' -x 'stamp*' paps-0.6.6.orig/configure.in paps-0.6.6/configure.in
--- paps-0.6.6.orig/configure.in 2006-04-28 04:41:36.000000000 +0900
-+++ paps-0.6.6/configure.in 2006-09-30 03:13:29.000000000 +0900
-@@ -7,4 +7,17 @@
++++ paps-0.6.6/configure.in 2007-02-15 23:34:24.000000000 +0900
+@@ -7,4 +7,17 @@ AC_LANG_C
AC_PROG_CC
AM_PROG_LIBTOOL
@@ -19,10 +19,10 @@
+AC_SUBST(CUPS_LIBS)
+
AC_OUTPUT(Makefile src/Makefile doc/Makefile)
-diff -ruN paps-0.6.6.orig/src/Makefile.am paps-0.6.6/src/Makefile.am
---- paps-0.6.6.orig/src/Makefile.am 2006-09-30 03:13:05.000000000 +0900
-+++ paps-0.6.6/src/Makefile.am 2006-09-30 03:13:29.000000000 +0900
-@@ -5,10 +5,10 @@
+diff -pruN -x Makefile -x Makefile.in -x '*.m4' -x autom4te.cache -x 'config.*' -x configure -x doc -x libtool -x .deps -x .libs -x '*.ps' -x foo -x paps -x 'lib*' -x texttopaps -x '*o' -x '*.cups' -x 'test*' -x 'stamp*' paps-0.6.6.orig/src/Makefile.am paps-0.6.6/src/Makefile.am
+--- paps-0.6.6.orig/src/Makefile.am 2007-02-15 22:59:47.000000000 +0900
++++ paps-0.6.6/src/Makefile.am 2007-02-15 23:34:24.000000000 +0900
+@@ -5,10 +5,10 @@ libpaps_a_inc_HEADERS = libpaps.h
libpaps_a_incdir = $(includedir)
bin_PROGRAMS = paps
@@ -35,10 +35,10 @@
paps_DEPENDENCIES = $(noinst_LIBRARIES)
EXTRA_DIST = test_libpaps.c paps.1
-diff -ruN paps-0.6.6.orig/src/paps.c paps-0.6.6/src/paps.c
---- paps-0.6.6.orig/src/paps.c 2006-09-30 03:13:05.000000000 +0900
-+++ paps-0.6.6/src/paps.c 2006-09-30 03:16:10.000000000 +0900
-@@ -31,6 +31,7 @@
+diff -pruN -x Makefile -x Makefile.in -x '*.m4' -x autom4te.cache -x 'config.*' -x configure -x doc -x libtool -x .deps -x .libs -x '*.ps' -x foo -x paps -x 'lib*' -x texttopaps -x '*o' -x '*.cups' -x 'test*' -x 'stamp*' paps-0.6.6.orig/src/paps.c paps-0.6.6/src/paps.c
+--- paps-0.6.6.orig/src/paps.c 2007-02-15 22:59:48.000000000 +0900
++++ paps-0.6.6/src/paps.c 2007-03-07 20:58:31.000000000 +0900
+@@ -32,6 +32,7 @@
#include <time.h>
#include <locale.h>
#include <wchar.h>
@@ -46,7 +46,7 @@
#define BUFSIZE 1024
#define DEFAULT_FONT_FAMILY "Monospace"
-@@ -84,9 +85,11 @@
+@@ -85,9 +86,11 @@ typedef struct {
gboolean do_separation_line;
gboolean do_draw_contour;
gboolean do_wordwrap;
@@ -58,7 +58,7 @@
} page_layout_t;
typedef struct {
-@@ -313,8 +316,8 @@
+@@ -314,8 +317,8 @@ int main(int argc, char *argv[])
int num_pages = 1;
int gutter_width = 40;
int total_gutter_width;
@@ -69,15 +69,16 @@
int do_tumble = -1; /* -1 means not initialized */
int do_duplex = -1;
gchar *paps_header = NULL;
-@@ -323,12 +326,124 @@
+@@ -324,6 +327,8 @@ int main(int argc, char *argv[])
int header_sep = 20;
int max_width = 0, w;
GIConv cvh = NULL;
+ gboolean cups_mode = FALSE;
+ gchar *page_owner = NULL;
- /* Prerequisite when using glib. */
- g_type_init();
+ /* Set locale from environment. */
+ setlocale(LC_ALL, "");
+@@ -333,6 +338,128 @@ int main(int argc, char *argv[])
g_option_context_add_main_entries(ctxt, entries, NULL);
@@ -95,6 +96,16 @@
+ g_set_prgname(prgname);
+ /* argument format should be job-id user title copies options [file] */
+ cups_mode = TRUE;
++ /* set default values */
++ lpi = 6.0L;
++ cpi = 10.0L;
++ left_margin = 18;
++ right_margin = 18;
++ top_margin = 36;
++ bottom_margin = 36;
++ page_width = 612;
++ page_height = 792;
++
+ if (argc < 6 || argc > 7) {
+ fprintf(stderr, "ERROR: %s job-id user title copies options [file]\n", prgname);
+ exit(1);
@@ -133,11 +144,12 @@
+ }
+
+ if ((val = cupsGetOption("landscape", num_options, options)) != NULL) {
-+ if (g_ascii_strcasecmp(val, "no") != 0 &&
-+ g_ascii_strcasecmp(val, "off") != 0 &&
-+ g_ascii_strcasecmp(val, "false") != 0) {
-+ /* XXX: need to support other orientations? */
-+ do_landscape = TRUE;
++ if (g_ascii_strcasecmp(val, "no") &&
++ g_ascii_strcasecmp(val, "off") &&
++ g_ascii_strcasecmp(val, "false")) {
++ /* We don't need to process the documentation for orientation support.
++ * pstops certainly does. (#222137)
++ */
+ }
+ }
+ /* XXX: need to support orientation-requested? */
@@ -178,8 +190,9 @@
+ }
+ if (getenv("CHARSET") != NULL) {
+ char *charset = getenv("CHARSET");
-+ // Map CUPS charset names to real ones.
-+ // http://cups.org/newsgroups.php?s9797+gcups.general+v9797+T1
++ /* Map CUPS charset names to real ones.
++ * http://cups.org/newsgroups.php?s9797+gcups.general+v9797+T1
++ */
+ if (!g_ascii_strcasecmp(charset, "windows-932"))
+ charset = "WINDOWS-31J";
+ if (g_ascii_strcasecmp(charset, "utf-8") &&
@@ -194,7 +207,7 @@
/* Parse command line */
if (!g_option_context_parse(ctxt, &argc, &argv, &error))
{
-@@ -355,6 +470,8 @@
+@@ -359,6 +486,8 @@ int main(int argc, char *argv[])
IN = stdin;
}
title = filename_in;
@@ -203,7 +216,7 @@
paps = paps_new();
pango_context = paps_get_pango_context (paps);
-@@ -373,8 +490,10 @@
+@@ -377,8 +506,10 @@ int main(int argc, char *argv[])
pango_context_set_font_description (pango_context, font_description);
/* Page layout */
@@ -216,7 +229,7 @@
if (num_columns == 1)
total_gutter_width = 0;
-@@ -435,6 +554,8 @@
+@@ -439,6 +570,8 @@ int main(int argc, char *argv[])
page_layout.pango_dir = pango_dir;
page_layout.filename = filename_in;
page_layout.header_font_desc = header_font_desc;
@@ -225,7 +238,7 @@
/* calculate x-coordinate scale */
if (cpi > 0.0L)
-@@ -571,6 +692,12 @@
+@@ -584,6 +717,12 @@ split_text_into_paragraphs (PangoContext
if (wc == (gunichar)-1)
{
fprintf (stderr, "%s: Invalid character in input\n", g_get_prgname ());
@@ -238,7 +251,7 @@
wc = 0;
}
if (!*p || !wc || wc == '\n' || wc == '\f')
-@@ -784,6 +911,7 @@
+@@ -810,6 +949,7 @@ void print_postscript_header(FILE *OUT,
int orientation = page_layout->page_width > page_layout->page_height;
int bb_page_width = page_layout->page_width;
int bb_page_height = page_layout->page_height;
@@ -246,7 +259,7 @@
/* Keep bounding box non-rotated to make ggv happy */
if (orientation)
-@@ -793,12 +921,20 @@
+@@ -819,12 +959,20 @@ void print_postscript_header(FILE *OUT,
bb_page_height = tmp;
}
@@ -268,7 +281,7 @@
"%%%%BeginProlog\n"
"%%%%Orientation: %s\n"
"/papsdict 1 dict def\n"
-@@ -848,8 +984,10 @@
+@@ -874,8 +1022,10 @@ void print_postscript_header(FILE *OUT,
title,
bb_page_width,
bb_page_height,
Index: paps.spec
===================================================================
RCS file: /cvs/dist/rpms/paps/FC-6/paps.spec,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- paps.spec 4 Dec 2006 11:48:54 -0000 1.19
+++ paps.spec 7 Mar 2007 12:10:32 -0000 1.20
@@ -1,6 +1,6 @@
Name: paps
Version: 0.6.6
-Release: 17%{?dist}
+Release: 18%{?dist}
License: LGPL
URL: http://paps.sourceforge.net/
@@ -26,6 +26,7 @@
Patch9: paps-0.6.6-cpilpi.patch
Patch10: paps-0.6.6-exitcode.patch
Patch11: paps-0.6.6-fix-wcswidth.patch
+Patch12: paps-0.6.6-langinfo.patch
Patch50: paps-cups.patch
Summary: Plain Text to PostScript converter
@@ -47,6 +48,7 @@
%patch9 -p1 -b .cpilpi
%patch10 -p1 -b .exitcode
%patch11 -p1 -b .wcswidth
+%patch12 -p1 -b .langinfo
%patch50 -p1 -b .cups
aclocal
automake
@@ -80,6 +82,12 @@
%changelog
+* Thu Mar 7 2007 Akira TAGOH <tagoh at redhat.com> - 0.6.6-18
+- default to lpi=6 and cpi=10 if paps is bringing up as cups filter. (#223862)
+
+* Tue Jan 23 2007 Akira TAGOH <tagoh at redhat.com>
+- Better the encoding guess by looking at current locale. (#212154)
+
* Mon Dec 4 2006 Akira TAGOH <tagoh at redhat.com> - 0.6.6-17
- Fix a segfault on non-printable character. (#216296)
More information about the fedora-cvs-commits
mailing list