From fbf777aee32a885cbe4b053deee6ab858cc374ea Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Mon, 21 Apr 2008 07:09:28 +0000 Subject: [PATCH 1/5] Initialize branch F-9 for paps --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..1c26f78 --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-9 From 7bf71e48b1264524f7d99b12f9339025c9958d7a Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 16 May 2008 12:04:09 +0000 Subject: [PATCH 2/5] - paps-cups.patch: Fix printing with -o landscape in CUPS. (#222137) - paps-autoconf262.patch: Fix an error on autoreconf. --- paps-0.6.6-fix-wcswidth.patch | 47 ----------- paps-autoconf262.patch | 24 ++++++ paps-cups.patch | 79 ++++++++++--------- ...ompliant.patch => paps-dsc-compliant.patch | 24 +++--- paps.spec | 12 ++- 5 files changed, 85 insertions(+), 101 deletions(-) delete mode 100644 paps-0.6.6-fix-wcswidth.patch create mode 100644 paps-autoconf262.patch rename paps-0.6.8-dsc-compliant.patch => paps-dsc-compliant.patch (81%) diff --git a/paps-0.6.6-fix-wcswidth.patch b/paps-0.6.6-fix-wcswidth.patch deleted file mode 100644 index c6604c2..0000000 --- a/paps-0.6.6-fix-wcswidth.patch +++ /dev/null @@ -1,47 +0,0 @@ -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-12-04 20:08:36.000000000 +0900 -+++ paps-0.6.6/src/paps.c 2006-12-04 20:16:59.000000000 +0900 -@@ -712,7 +712,7 @@ - PangoRectangle ink_rect, logical_rect; - wchar_t *wtext, *wnewtext; - gchar *newtext; -- size_t i, len, wwidth = 0, n; -+ int i, len, wwidth = 0, n; - - wtext = (wchar_t *)g_utf8_to_ucs4 (para->text, para->length, NULL, NULL, NULL); - if (wtext == NULL) -@@ -722,11 +722,17 @@ - } - - len = wcswidth (wtext); -+ if (len < 0) -+ { -+ /* assuming that width of all characters in wtext may be 1 */ -+ len = wcslen (wtext); -+ } - /* the amount of characters to be able to put on the line against CPI */ - n = page_layout->column_width / 72.0 * cpi; - if (len > n) - { -- wnewtext = g_new (wchar_t, wcslen (wtext) + 1); -+ len = wcslen (wtext); -+ wnewtext = g_new (wchar_t, len + 1); - if (wnewtext == NULL) - { - fprintf (stderr, "Failed to allocate a memory.\n"); -@@ -735,7 +741,14 @@ - } - for (i = 0; i < len; i++) - { -- wwidth += wcwidth (wtext[i]); -+ int w = wcwidth (wtext[i]); -+ -+ if (w < 0) -+ { -+ /* assuming that a width of this character may be 1 */ -+ w = 1; -+ } -+ wwidth += w; - if (wwidth > n) - break; - wnewtext[i] = wtext[i]; diff --git a/paps-autoconf262.patch b/paps-autoconf262.patch new file mode 100644 index 0000000..1a1c16b --- /dev/null +++ b/paps-autoconf262.patch @@ -0,0 +1,24 @@ +diff -pruN paps-0.6.8.orig/acinclude.m4 paps-0.6.8/acinclude.m4 +--- paps-0.6.8.orig/acinclude.m4 2006-11-29 05:11:50.000000000 +0900 ++++ paps-0.6.8/acinclude.m4 2008-05-16 20:36:03.000000000 +0900 +@@ -76,9 +76,9 @@ AC_DEFUN([DX_IF_FEATURE], [ifelse(DX_FEA + # Require the specified program to be found for the DX_CURRENT_FEATURE to work. + AC_DEFUN([DX_REQUIRE_PROG], [ + AC_PATH_TOOL([$1], [$2]) +-if test "$DX_FLAG_[]DX_CURRENT_FEATURE$$1" = 1; then ++if test "$DX_FLAG_DX_CURRENT_FEATURE$$1" = 1; then + AC_MSG_WARN([$2 not found - will not DX_CURRENT_DESCRIPTION]) +- AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) ++ AC_SUBST([DX_FLAG_DX_CURRENT_FEATURE], 0) + fi + ]) + +@@ -101,7 +101,7 @@ test "$DX_FLAG_$1" = "$2" \ + # ---------------------------------------------------------- + # Turn off the DX_CURRENT_FEATURE if the required feature is off. + AC_DEFUN([DX_CLEAR_DEPEND], [ +-test "$DX_FLAG_$1" = "$2" || AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) ++test "$DX_FLAG_$1" = "$2" || AC_SUBST([DX_FLAG_DX_CURRENT_FEATURE], 0) + ]) + + # DX_FEATURE_ARG(FEATURE, DESCRIPTION, diff --git a/paps-cups.patch b/paps-cups.patch index 88fa9a4..9d00ec6 100644 --- a/paps-cups.patch +++ b/paps-cups.patch @@ -1,6 +1,6 @@ diff -pruN paps-0.6.8.orig/configure.in paps-0.6.8/configure.in --- paps-0.6.8.orig/configure.in 2007-01-19 20:06:10.000000000 +0900 -+++ paps-0.6.8/configure.in 2007-11-30 18:40:32.000000000 +0900 ++++ paps-0.6.8/configure.in 2008-05-15 22:46:49.000000000 +0900 @@ -7,6 +7,19 @@ AC_LANG_C AC_PROG_CC AM_PROG_LIBTOOL @@ -22,8 +22,8 @@ diff -pruN paps-0.6.8.orig/configure.in paps-0.6.8/configure.in DX_CHM_FEATURE(OFF) DX_CHI_FEATURE(OFF) diff -pruN paps-0.6.8.orig/src/Makefile.am paps-0.6.8/src/Makefile.am ---- paps-0.6.8.orig/src/Makefile.am 2007-11-30 18:40:15.000000000 +0900 -+++ paps-0.6.8/src/Makefile.am 2007-11-30 18:40:32.000000000 +0900 +--- paps-0.6.8.orig/src/Makefile.am 2008-05-15 22:46:34.000000000 +0900 ++++ paps-0.6.8/src/Makefile.am 2008-05-15 22:46:49.000000000 +0900 @@ -5,10 +5,10 @@ libpapsinc_HEADERS = libpaps.h libpapsincdir = $(includedir) @@ -38,8 +38,8 @@ diff -pruN paps-0.6.8.orig/src/Makefile.am paps-0.6.8/src/Makefile.am EXTRA_DIST = test_libpaps.c paps.1 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 2007-11-30 18:40:15.000000000 +0900 -+++ paps-0.6.8/src/paps.c 2007-11-30 18:47:28.000000000 +0900 +--- paps-0.6.8.orig/src/paps.c 2008-05-15 22:46:34.000000000 +0900 ++++ paps-0.6.8/src/paps.c 2008-05-15 22:48:42.000000000 +0900 @@ -31,6 +31,7 @@ #include #include @@ -80,7 +80,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c /* Set locale from environment. */ setlocale(LC_ALL, ""); -@@ -348,6 +353,134 @@ int main(int argc, char *argv[]) +@@ -348,6 +353,128 @@ int main(int argc, char *argv[]) g_option_context_add_main_entries(ctxt, entries, NULL); #endif @@ -148,14 +148,8 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c + if ((val = cupsGetOption("landscape", num_options, options)) != NULL) { + if (g_ascii_strcasecmp(val, "no") && + g_ascii_strcasecmp(val, "off") && -+ g_ascii_strcasecmp(val, "false")) { -+ /* We really need to deal with the landscape orientation because -+ * pstops doesn't deal with the position where it should appears. -+ * However this causes the unnecessary rotation by pstops. so paps -+ * will puts the fake Orientation tag and stop rotating in PS. -+ */ ++ g_ascii_strcasecmp(val, "false")) + do_landscape = TRUE; -+ } + } + /* XXX: need to support orientation-requested? */ + if ((val = cupsGetOption("page-left", num_options, options)) != NULL) { @@ -215,7 +209,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c /* Parse command line */ if (!g_option_context_parse(ctxt, &argc, &argv, &error)) { -@@ -374,6 +507,8 @@ int main(int argc, char *argv[]) +@@ -374,6 +501,8 @@ int main(int argc, char *argv[]) IN = stdin; } title = filename_in; @@ -224,7 +218,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c paps = paps_new(); pango_context = paps_get_pango_context (paps); -@@ -392,8 +527,10 @@ int main(int argc, char *argv[]) +@@ -392,8 +521,10 @@ int main(int argc, char *argv[]) pango_context_set_font_description (pango_context, font_description); /* Page layout */ @@ -237,7 +231,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c if (num_columns == 1) total_gutter_width = 0; -@@ -456,6 +593,8 @@ int main(int argc, char *argv[]) +@@ -456,6 +587,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; @@ -246,7 +240,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c /* calculate x-coordinate scale */ if (page_layout.cpi > 0.0L) -@@ -756,6 +895,12 @@ split_text_into_paragraphs (PangoContext +@@ -756,6 +889,12 @@ split_text_into_paragraphs (PangoContext if (wc == (gunichar)-1) { fprintf (stderr, "%s: Invalid character in input\n", g_get_prgname ()); @@ -259,15 +253,19 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c wc = 0; } if (!*p || !wc || wc == '\n' || wc == '\f') -@@ -925,6 +1070,7 @@ void print_postscript_header(FILE *OUT, +@@ -925,21 +1064,32 @@ 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; + char *owner = NULL; /* Keep bounding box non-rotated to make ggv happy */ - if (orientation) -@@ -934,12 +1080,20 @@ void print_postscript_header(FILE *OUT, +- if (orientation) ++ /* ensure the correct bounding box for CUPS */ ++ if (orientation && !page_layout->cups_mode) + { + int tmp = bb_page_width; + bb_page_width = bb_page_height; bb_page_height = tmp; } @@ -281,6 +279,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c + } fprintf(OUT, "%%!PS-Adobe-3.0\n" ++ "%s" "%%%%Title: %s\n" "%%%%Creator: paps version 0.6.7 by Dov Grobgeld\n" "%%%%Pages: (atend)\n" @@ -289,31 +288,35 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c "%%%%BeginProlog\n" "%%%%Orientation: %s\n" "/papsdict 1 dict def\n" -@@ -989,8 +1143,13 @@ void print_postscript_header(FILE *OUT, +@@ -961,7 +1111,7 @@ void print_postscript_header(FILE *OUT, + " pagewidth\n" + " /pagewidth pageheight def\n" + " /pageheight exch def\n" +- " /orientation 3 def\n" ++ " /orientation %d def\n" + " } if\n" + " 2 dict\n" + " dup /PageSize [pagewidth pageheight] put\n" +@@ -986,11 +1136,21 @@ void print_postscript_header(FILE *OUT, + " 90 rotate\n" + " 0 pageheight neg translate\n" + "} def\n", ++ /* ++ * Put %%cupsRotation tag to prevent the rotation in pstops. ++ * This breaks paps's behavior to make it in landscape say. ++ * (RH#222137) ++ */ ++ (page_layout->cups_mode ? "%cupsRotation: 0\n" : ""), title, bb_page_width, bb_page_height, - orientation_names[orientation] + owner, -+ /* Put the fake orientation tag if paps is currently running under -+ * the CUPS filter mode. (#222137) -+ */ -+ orientation_names[orientation && !page_layout->cups_mode] ++ orientation_names[orientation], ++ /* For landscape, rotate page to portrait orientation for CUPS (RH#222137) */ ++ page_layout->cups_mode ? 2 : 3 ); + g_free(owner); fprintf(OUT, "%% User settings\n" -@@ -1015,7 +1174,11 @@ void print_postscript_header(FILE *OUT, - page_layout->left_margin, - page_layout->page_height - bodytop, - bool_name[page_layout->do_separation_line>0], -- bool_name[page_layout->do_landscape>0], -+ /* just ignore the landscape flag when paps is currently running -+ * under the CUPS filter mode. this will stop rotating in PS that -+ * paps generates. (#222137) -+ */ -+ bool_name[page_layout->do_landscape>0 && !page_layout->cups_mode], - bool_name[page_layout->do_tumble>0], - bool_name[page_layout->do_duplex>0] - ); diff --git a/paps-0.6.8-dsc-compliant.patch b/paps-dsc-compliant.patch similarity index 81% rename from paps-0.6.8-dsc-compliant.patch rename to paps-dsc-compliant.patch index 702d52b..3da5f00 100644 --- a/paps-0.6.8-dsc-compliant.patch +++ b/paps-dsc-compliant.patch @@ -1,6 +1,6 @@ diff -pruN paps-0.6.8.orig/src/libpaps.c paps-0.6.8/src/libpaps.c ---- paps-0.6.8.orig/src/libpaps.c 2008-01-15 11:09:30.000000000 +0900 -+++ paps-0.6.8/src/libpaps.c 2008-01-15 11:10:10.000000000 +0900 +--- paps-0.6.8.orig/src/libpaps.c 2008-05-14 23:07:14.000000000 +0900 ++++ paps-0.6.8/src/libpaps.c 2008-05-14 23:11:12.000000000 +0900 @@ -118,7 +118,6 @@ gchar *paps_get_postscript_header_strdup gchar *ret_str; g_string_append_printf(paps->header, @@ -42,9 +42,9 @@ diff -pruN paps-0.6.8.orig/src/libpaps.c paps-0.6.8/src/libpaps.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-01-15 11:09:30.000000000 +0900 -+++ paps-0.6.8/src/paps.c 2008-01-15 11:10:46.000000000 +0900 -@@ -665,7 +665,7 @@ int main(int argc, char *argv[]) +--- paps-0.6.8.orig/src/paps.c 2008-05-14 23:07:14.000000000 +0900 ++++ paps-0.6.8/src/paps.c 2008-05-14 23:12:53.000000000 +0900 +@@ -659,7 +659,7 @@ int main(int argc, char *argv[]) fprintf(OUT, "%s", paps_header); g_free(paps_header); @@ -53,7 +53,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c fprintf(OUT, "%s", ps_pages_string->str); print_postscript_trailer(OUT, num_pages); -@@ -1094,8 +1094,9 @@ void print_postscript_header(FILE *OUT, +@@ -1089,8 +1089,9 @@ void print_postscript_header(FILE *OUT, "%%%%Creator: paps version 0.6.7 by Dov Grobgeld\n" "%%%%Pages: (atend)\n" "%%%%BoundingBox: 0 0 %d %d\n%s" @@ -64,17 +64,17 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c "/papsdict 1 dict def\n" "papsdict begin\n" "\n" -@@ -1139,7 +1140,8 @@ void print_postscript_header(FILE *OUT, +@@ -1134,7 +1135,8 @@ void print_postscript_header(FILE *OUT, "/turnpage {\n" " 90 rotate\n" " 0 pageheight neg translate\n" - "} def\n", + "} def\n" + "%%%%EndProlog\n", - title, - bb_page_width, - bb_page_height, -@@ -1152,6 +1154,7 @@ void print_postscript_header(FILE *OUT, + /* + * Put %%cupsRotation tag to prevent the rotation in pstops. + * This breaks paps's behavior to make it in landscape say. +@@ -1150,6 +1152,7 @@ void print_postscript_header(FILE *OUT, g_free(owner); fprintf(OUT, @@ -82,7 +82,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c "%% User settings\n" "/pagewidth %d def\n" "/pageheight %d def\n" -@@ -1238,8 +1241,8 @@ void print_postscript_trailer(FILE *OUT, +@@ -1232,8 +1235,8 @@ void print_postscript_trailer(FILE *OUT, int num_pages) { fprintf(OUT, diff --git a/paps.spec b/paps.spec index 7dadef4..552d3fc 100644 --- a/paps.spec +++ b/paps.spec @@ -1,6 +1,6 @@ Name: paps Version: 0.6.8 -Release: 5%{?dist} +Release: 6%{?dist} License: LGPLv2+ URL: http://paps.sourceforge.net/ @@ -19,8 +19,8 @@ Patch3: paps-0.6.6-lcnumeric.patch Patch4: paps-0.6.6-exitcode.patch Patch50: paps-cups.patch Patch51: paps-cpilpi.patch -Patch52: paps-0.6.8-dsc-compliant.patch -Patch61: paps-0.6.6-fix-wcswidth.patch +Patch52: paps-dsc-compliant.patch +Patch53: paps-autoconf262.patch Summary: Plain Text to PostScript converter Group: Applications/Publishing @@ -55,7 +55,7 @@ applications using paps API. %patch50 -p1 -b .cups %patch51 -p1 -b .cpilpi %patch52 -p1 -b .dsc -#%patch11 -p1 -b .wcswidth +%patch53 -p1 -b .autoconf262 autoreconf @@ -98,6 +98,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libpaps.so %changelog +* Fri May 16 2008 Akira TAGOH - 0.6.8-6 +- paps-cups.patch: Fix printing with -o landscape in CUPS. (#222137) +- paps-autoconf262.patch: Fix an error on autoreconf. + * Tue Feb 12 2008 Akira TAGOH - 0.6.8-5 - Rebuild for gcc-4.3. From 4f440ac67e0105e83fbb0e670be5009766a07ba4 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 17 Nov 2008 09:37:17 +0000 Subject: [PATCH 3/5] - Courier font to be a default font for texttopaps. (#469325) --- paps-cpilpi.patch | 20 ++++++------- paps-cups.patch | 28 ++++++++++--------- ....6.6-exitcode.patch => paps-exitcode.patch | 22 +++++++-------- ....6.6-langinfo.patch => paps-langinfo.patch | 18 ++++++------ paps.spec | 14 ++++++++-- 5 files changed, 56 insertions(+), 46 deletions(-) rename paps-0.6.6-exitcode.patch => paps-exitcode.patch (69%) rename paps-0.6.6-langinfo.patch => paps-langinfo.patch (61%) diff --git a/paps-cpilpi.patch b/paps-cpilpi.patch index f64859a..522bda6 100644 --- a/paps-cpilpi.patch +++ b/paps-cpilpi.patch @@ -1,6 +1,6 @@ -diff -pruN -x .libs -x '*o' -x '*ps' ../paps-0.6.8.orig/src/paps.c ../paps-0.6.8/src/paps.c ---- paps-0.6.8.orig/src/paps.c 2007-11-28 16:20:56.000000000 +0900 -+++ paps-0.6.8/src/paps.c 2007-11-30 17:53:06.000000000 +0900 +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:27:54.000000000 +0900 ++++ paps-0.6.8/src/paps.c 2008-11-07 08:29:08.000000000 +0900 @@ -92,8 +92,8 @@ typedef struct { gchar *filename; gchar *header_font_desc; @@ -12,15 +12,15 @@ diff -pruN -x .libs -x '*o' -x '*ps' ../paps-0.6.8.orig/src/paps.c ../paps-0.6.8 } page_layout_t; typedef struct { -@@ -376,6 +376,7 @@ int main(int argc, char *argv[]) - bottom_margin = 36; - page_width = 612; +@@ -378,6 +378,7 @@ int main(int argc, char *argv[]) page_height = 792; + font = g_strdup(MAKE_FONT_NAME ("Courier", DEFAULT_FONT_SIZE)); + header_font_desc = g_strdup(MAKE_FONT_NAME ("Courier", HEADER_FONT_SCALE)); + do_stretch_chars = TRUE; if (argc < 6 || argc > 7) { fprintf(stderr, "ERROR: %s job-id user title copies options [file]\n", prgname); -@@ -596,7 +597,8 @@ int main(int argc, char *argv[]) +@@ -595,7 +596,8 @@ int main(int argc, char *argv[]) /* calculate x-coordinate scale */ if (page_layout.cpi > 0.0L) { @@ -30,7 +30,7 @@ diff -pruN -x .libs -x '*o' -x '*ps' ../paps-0.6.8.orig/src/paps.c ../paps-0.6.8 fontmap = pango_ft2_font_map_new (); fontset = pango_font_map_load_fontset (fontmap, pango_context, font_description, get_language ()); metrics = pango_fontset_get_metrics (fontset); -@@ -608,13 +610,10 @@ int main(int argc, char *argv[]) +@@ -607,13 +609,10 @@ int main(int argc, char *argv[]) pango_font_metrics_unref (metrics); g_object_unref (G_OBJECT (fontmap)); @@ -46,7 +46,7 @@ diff -pruN -x .libs -x '*o' -x '*ps' ../paps-0.6.8.orig/src/paps.c ../paps-0.6.8 } page_layout.scale_x = page_layout.scale_y = 1.0; -@@ -1002,6 +1001,7 @@ output_pages(FILE *OUT, +@@ -1001,6 +1000,7 @@ output_pages(FILE *OUT, int column_y_pos = 0; int page_idx = 1; int pango_column_height = page_layout->column_height * page_layout->pt_to_pixel * PANGO_SCALE; @@ -54,7 +54,7 @@ diff -pruN -x .libs -x '*o' -x '*ps' ../paps-0.6.8.orig/src/paps.c ../paps-0.6.8 LineLink *prev_line_link = NULL; start_page(OUT, page_idx); -@@ -1039,17 +1039,17 @@ output_pages(FILE *OUT, +@@ -1038,17 +1038,17 @@ output_pages(FILE *OUT, ); } } diff --git a/paps-cups.patch b/paps-cups.patch index 9d00ec6..286ced2 100644 --- a/paps-cups.patch +++ b/paps-cups.patch @@ -1,6 +1,6 @@ diff -pruN paps-0.6.8.orig/configure.in paps-0.6.8/configure.in --- paps-0.6.8.orig/configure.in 2007-01-19 20:06:10.000000000 +0900 -+++ paps-0.6.8/configure.in 2008-05-15 22:46:49.000000000 +0900 ++++ paps-0.6.8/configure.in 2008-11-07 08:21:19.000000000 +0900 @@ -7,6 +7,19 @@ AC_LANG_C AC_PROG_CC AM_PROG_LIBTOOL @@ -22,8 +22,8 @@ diff -pruN paps-0.6.8.orig/configure.in paps-0.6.8/configure.in DX_CHM_FEATURE(OFF) DX_CHI_FEATURE(OFF) diff -pruN paps-0.6.8.orig/src/Makefile.am paps-0.6.8/src/Makefile.am ---- paps-0.6.8.orig/src/Makefile.am 2008-05-15 22:46:34.000000000 +0900 -+++ paps-0.6.8/src/Makefile.am 2008-05-15 22:46:49.000000000 +0900 +--- paps-0.6.8.orig/src/Makefile.am 2008-11-07 08:21:05.000000000 +0900 ++++ paps-0.6.8/src/Makefile.am 2008-11-07 08:21:19.000000000 +0900 @@ -5,10 +5,10 @@ libpapsinc_HEADERS = libpaps.h libpapsincdir = $(includedir) @@ -38,8 +38,8 @@ diff -pruN paps-0.6.8.orig/src/Makefile.am paps-0.6.8/src/Makefile.am EXTRA_DIST = test_libpaps.c paps.1 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-05-15 22:46:34.000000000 +0900 -+++ paps-0.6.8/src/paps.c 2008-05-15 22:48:42.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 @@ -31,6 +31,7 @@ #include #include @@ -80,7 +80,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c /* Set locale from environment. */ setlocale(LC_ALL, ""); -@@ -348,6 +353,128 @@ int main(int argc, char *argv[]) +@@ -348,6 +353,130 @@ int main(int argc, char *argv[]) g_option_context_add_main_entries(ctxt, entries, NULL); #endif @@ -107,6 +107,8 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c + bottom_margin = 36; + page_width = 612; + page_height = 792; ++ font = g_strdup(MAKE_FONT_NAME ("Courier", DEFAULT_FONT_SIZE)); ++ header_font_desc = g_strdup(MAKE_FONT_NAME ("Courier", HEADER_FONT_SCALE)); + + if (argc < 6 || argc > 7) { + fprintf(stderr, "ERROR: %s job-id user title copies options [file]\n", prgname); @@ -209,7 +211,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c /* Parse command line */ if (!g_option_context_parse(ctxt, &argc, &argv, &error)) { -@@ -374,6 +501,8 @@ int main(int argc, char *argv[]) +@@ -374,6 +503,8 @@ int main(int argc, char *argv[]) IN = stdin; } title = filename_in; @@ -218,7 +220,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c paps = paps_new(); pango_context = paps_get_pango_context (paps); -@@ -392,8 +521,10 @@ int main(int argc, char *argv[]) +@@ -392,8 +523,10 @@ int main(int argc, char *argv[]) pango_context_set_font_description (pango_context, font_description); /* Page layout */ @@ -231,7 +233,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c if (num_columns == 1) total_gutter_width = 0; -@@ -456,6 +587,8 @@ int main(int argc, char *argv[]) +@@ -456,6 +589,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; @@ -240,7 +242,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c /* calculate x-coordinate scale */ if (page_layout.cpi > 0.0L) -@@ -756,6 +889,12 @@ split_text_into_paragraphs (PangoContext +@@ -756,6 +891,12 @@ split_text_into_paragraphs (PangoContext if (wc == (gunichar)-1) { fprintf (stderr, "%s: Invalid character in input\n", g_get_prgname ()); @@ -253,7 +255,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c wc = 0; } if (!*p || !wc || wc == '\n' || wc == '\f') -@@ -925,21 +1064,32 @@ void print_postscript_header(FILE *OUT, +@@ -925,21 +1066,32 @@ 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; @@ -288,7 +290,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c "%%%%BeginProlog\n" "%%%%Orientation: %s\n" "/papsdict 1 dict def\n" -@@ -961,7 +1111,7 @@ void print_postscript_header(FILE *OUT, +@@ -961,7 +1113,7 @@ void print_postscript_header(FILE *OUT, " pagewidth\n" " /pagewidth pageheight def\n" " /pageheight exch def\n" @@ -297,7 +299,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c " } if\n" " 2 dict\n" " dup /PageSize [pagewidth pageheight] put\n" -@@ -986,11 +1136,21 @@ void print_postscript_header(FILE *OUT, +@@ -986,11 +1138,21 @@ void print_postscript_header(FILE *OUT, " 90 rotate\n" " 0 pageheight neg translate\n" "} def\n", diff --git a/paps-0.6.6-exitcode.patch b/paps-exitcode.patch similarity index 69% rename from paps-0.6.6-exitcode.patch rename to paps-exitcode.patch index 6108798..032b889 100644 --- a/paps-0.6.6-exitcode.patch +++ b/paps-exitcode.patch @@ -1,7 +1,7 @@ -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 02:51:39.000000000 +0900 -+++ paps-0.6.6/src/paps.c 2006-09-30 03:00:26.000000000 +0900 -@@ -346,7 +346,7 @@ +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-09-01 15:54:11.000000000 +0900 ++++ paps-0.6.8/src/paps.c 2008-09-01 15:54:47.000000000 +0900 +@@ -365,7 +365,7 @@ int main(int argc, char *argv[]) if (!IN) { fprintf(stderr, "Failed to open %s!\n", filename_in); @@ -10,7 +10,7 @@ diff -ruN paps-0.6.6.orig/src/paps.c paps-0.6.6/src/paps.c } } else -@@ -457,7 +457,7 @@ +@@ -499,7 +499,7 @@ int main(int argc, char *argv[]) if (cvh == NULL) { fprintf(stderr, "%s: Invalid encoding: %s\n", g_get_prgname (), encoding); @@ -19,7 +19,7 @@ diff -ruN paps-0.6.6.orig/src/paps.c paps-0.6.6/src/paps.c } } -@@ -517,7 +517,7 @@ +@@ -559,7 +559,7 @@ read_file (FILE *file, { fprintf(stderr, "%s: Error reading file.\n", g_get_prgname ()); g_string_free (inbuf, TRUE); @@ -28,7 +28,7 @@ diff -ruN paps-0.6.6.orig/src/paps.c paps-0.6.6/src/paps.c } else if (bp == NULL) break; -@@ -531,7 +531,7 @@ +@@ -573,7 +573,7 @@ read_file (FILE *file, if (g_iconv (handle, &ib, &iblen, &ob, &oblen) == -1) { fprintf (stderr, "%s: Error while converting strings.\n", g_get_prgname ()); @@ -37,7 +37,7 @@ diff -ruN paps-0.6.6.orig/src/paps.c paps-0.6.6/src/paps.c } obuffer[BUFSIZE * 6 - 1 - oblen] = 0; } -@@ -591,7 +591,7 @@ +@@ -637,7 +637,7 @@ split_text_into_paragraphs (PangoContext if (wtext == NULL) { fprintf (stderr, "Failed to convert UTF-8 to UCS-4.\n"); @@ -45,8 +45,8 @@ diff -ruN paps-0.6.6.orig/src/paps.c paps-0.6.6/src/paps.c + exit(1); } - len = wcswidth (wtext); -@@ -604,7 +604,7 @@ + len = g_utf8_strlen (para->text, para->length); +@@ -650,7 +650,7 @@ split_text_into_paragraphs (PangoContext { fprintf (stderr, "Failed to allocate a memory.\n"); g_free (wtext); @@ -55,7 +55,7 @@ diff -ruN paps-0.6.6.orig/src/paps.c paps-0.6.6/src/paps.c } for (i = 0; i < len; i++) { -@@ -619,7 +619,7 @@ +@@ -665,7 +665,7 @@ split_text_into_paragraphs (PangoContext if (newtext == NULL) { fprintf (stderr, "Failed to convert UCS-4 to UTF-8.\n"); diff --git a/paps-0.6.6-langinfo.patch b/paps-langinfo.patch similarity index 61% rename from paps-0.6.6-langinfo.patch rename to paps-langinfo.patch index 70f172d..2e5b59f 100644 --- a/paps-0.6.6-langinfo.patch +++ b/paps-langinfo.patch @@ -1,6 +1,6 @@ -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 +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-09-01 15:07:03.000000000 +0900 ++++ paps-0.6.8/src/paps.c 2008-09-01 15:49:10.000000000 +0900 @@ -25,6 +25,7 @@ #include #include "libpaps.h" @@ -9,19 +9,19 @@ diff -pruN paps-0.6.6.orig/src/paps.c paps-0.6.6/src/paps.c #include #include #include -@@ -324,6 +325,9 @@ int main(int argc, char *argv[]) - int max_width = 0, w; +@@ -331,6 +332,9 @@ int main(int argc, char *argv[]) GIConv cvh = NULL; + GOptionGroup *options; + /* 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)); - } + +@@ -480,6 +484,15 @@ int main(int argc, char *argv[]) + page_layout.scale_x = page_layout.scale_y = 1.0; + + if (encoding == NULL) + { diff --git a/paps.spec b/paps.spec index 552d3fc..9532aa5 100644 --- a/paps.spec +++ b/paps.spec @@ -1,6 +1,6 @@ Name: paps Version: 0.6.8 -Release: 6%{?dist} +Release: 8%{?dist} License: LGPLv2+ URL: http://paps.sourceforge.net/ @@ -12,11 +12,11 @@ Patch0: paps-0.6.8-shared.patch ## https://sourceforge.net/tracker/index.php?func=detail&aid=1832924&group_id=153049&atid=786241 Patch1: paps-0.6.8-wordwrap.patch ## https://sourceforge.net/tracker/index.php?func=detail&aid=1832926&group_id=153049&atid=786241 -Patch2: paps-0.6.6-langinfo.patch +Patch2: paps-langinfo.patch ## https://sourceforge.net/tracker/index.php?func=detail&aid=1832929&group_id=153049&atid=786241 Patch3: paps-0.6.6-lcnumeric.patch ## https://sourceforge.net/tracker/index.php?func=detail&aid=1832935&group_id=153049&atid=786241 -Patch4: paps-0.6.6-exitcode.patch +Patch4: paps-exitcode.patch Patch50: paps-cups.patch Patch51: paps-cpilpi.patch Patch52: paps-dsc-compliant.patch @@ -56,6 +56,7 @@ applications using paps API. %patch51 -p1 -b .cpilpi %patch52 -p1 -b .dsc %patch53 -p1 -b .autoconf262 +libtoolize -f -c autoreconf @@ -98,6 +99,13 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libpaps.so %changelog +* Mon Nov 17 2008 Akira TAGOH - 0.6.8-8 +- Courier font to be a default font for texttopaps. (#469325) + +* Mon Sep 1 2008 Akira TAGOH - 0.6.8-7 +- paps-langinfo.patch: Updated. +- paps-exitcode.patch: Updated. + * Fri May 16 2008 Akira TAGOH - 0.6.8-6 - paps-cups.patch: Fix printing with -o landscape in CUPS. (#222137) - paps-autoconf262.patch: Fix an error on autoreconf. From 3db1da9c27c0bdc9e010ecb52e7112247dae3ee8 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:50:45 +0000 Subject: [PATCH 4/5] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2525be0..c2725d6 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: paps -# $Id: Makefile,v 1.1 2006/06/27 07:10:51 tagoh Exp $ +# $Id: Makefile,v 1.2 2007/10/15 19:12:57 notting Exp $ NAME := paps SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From ed42d378d8b3510e65e92674ccce39d34a958c3f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 05:31:58 +0000 Subject: [PATCH 5/5] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index c2725d6..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: paps -# $Id: Makefile,v 1.2 2007/10/15 19:12:57 notting Exp $ -NAME := paps -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attempt a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index 1c26f78..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -F-9