From a61d0bea3d046c59c91a437ebe6921cd248ad6ef Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 29 Jun 2006 13:31:33 +0000 Subject: [PATCH] - Adjusted CUPS patch: CUPS invokes the filter with the destination printer name in argv[0], not the binary name. --- paps-cups.patch | 23 ++++++++++++----------- paps.spec | 6 ++++-- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/paps-cups.patch b/paps-cups.patch index 687b330..9c14f71 100644 --- a/paps-cups.patch +++ b/paps-cups.patch @@ -1,4 +1,4 @@ -diff -ruN paps-0.6.6.orig/configure.in paps-0.6.6/configure.in +unchanged: --- paps-0.6.6.orig/configure.in 2006-04-28 04:41:36.000000000 +0900 +++ paps-0.6.6/configure.in 2006-06-29 17:45:59.000000000 +0900 @@ -7,4 +7,17 @@ @@ -19,7 +19,7 @@ diff -ruN paps-0.6.6.orig/configure.in paps-0.6.6/configure.in +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 +unchanged: --- paps-0.6.6.orig/src/Makefile.am 2006-06-20 20:40:11.000000000 +0900 +++ paps-0.6.6/src/Makefile.am 2006-06-29 19:09:12.000000000 +0900 @@ -5,10 +5,10 @@ @@ -35,9 +35,9 @@ diff -ruN paps-0.6.6.orig/src/Makefile.am paps-0.6.6/src/Makefile.am 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-06-20 20:40:11.000000000 +0900 -+++ paps-0.6.6/src/paps.c 2006-06-29 19:06:46.000000000 +0900 +diff -u paps-0.6.6/src/paps.c paps-0.6.6/src/paps.c +--- paps-0.6.6/src/paps.c 2006-06-29 19:06:46.000000000 +0900 ++++ paps-0.6.6/src/paps.c 2006-06-29 14:29:13.000000000 +0100 @@ -29,6 +29,7 @@ #include #include @@ -65,7 +65,7 @@ diff -ruN paps-0.6.6.orig/src/paps.c paps-0.6.6/src/paps.c int do_tumble = -1; /* -1 means not initialized */ int do_duplex = -1; gchar *paps_header = NULL; -@@ -253,12 +255,112 @@ +@@ -253,12 +255,113 @@ gchar *filename_in, *title, *text; int header_sep = 20; GIConv cvh = NULL; @@ -85,7 +85,8 @@ diff -ruN paps-0.6.6.orig/src/paps.c paps-0.6.6/src/paps.c + int num_options; + const char *val; + -+ if (strncmp(prgname, "texttopaps", 10) == 0) { ++ if (strncmp(prgname, "texttopaps", 10) == 0 || ++ getenv ("CUPS_SERVER") != NULL) { + /* argument format should be job-id user title copies options [file] */ + cups_mode = TRUE; + if (argc < 6 || argc > 7) { @@ -178,7 +179,7 @@ diff -ruN paps-0.6.6.orig/src/paps.c paps-0.6.6/src/paps.c /* Parse command line */ if (!g_option_context_parse(ctxt, &argc, &argv, &error)) { -@@ -285,6 +387,8 @@ +@@ -285,6 +388,8 @@ IN = stdin; } title = filename_in; @@ -187,7 +188,7 @@ diff -ruN paps-0.6.6.orig/src/paps.c paps-0.6.6/src/paps.c paps = paps_new(); pango_context = paps_get_pango_context (paps); -@@ -303,8 +407,10 @@ +@@ -303,8 +408,10 @@ pango_context_set_font_description (pango_context, font_description); /* Page layout */ @@ -200,7 +201,7 @@ diff -ruN paps-0.6.6.orig/src/paps.c paps-0.6.6/src/paps.c if (num_columns == 1) total_gutter_width = 0; -@@ -340,6 +446,7 @@ +@@ -340,6 +447,7 @@ page_layout.header_ypos = page_layout.top_margin; page_layout.header_height = 0; page_layout.footer_height = 0; @@ -208,7 +209,7 @@ diff -ruN paps-0.6.6.orig/src/paps.c paps-0.6.6/src/paps.c if (do_draw_header) page_layout.header_sep = header_sep; else -@@ -495,7 +602,8 @@ +@@ -495,7 +603,8 @@ page_layout->pango_dir == PANGO_DIRECTION_LTR ? PANGO_ALIGN_LEFT : PANGO_ALIGN_RIGHT); pango_layout_set_width (para->layout, paint_width * PANGO_SCALE); diff --git a/paps.spec b/paps.spec index d5be99b..17e9282 100644 --- a/paps.spec +++ b/paps.spec @@ -1,6 +1,6 @@ Name: paps Version: 0.6.6 -Release: 8%{?dist} +Release: 9%{?dist} License: LGPL URL: http://paps.sourceforge.net/ @@ -73,7 +73,9 @@ rm -rf $RPM_BUILD_ROOT %changelog -* Thu Jun 29 2006 Tim Waugh +* Thu Jun 29 2006 Tim Waugh - 0.6.6-9 +- Adjusted CUPS patch: CUPS invokes the filter with the destination + printer name in argv[0], not the binary name. - CUPS filter lives in CUPS_SERVERBIN, which is /usr/lib/cups on all architectures -- not %%{_libdir}/cups.