rpms/paps/F-9 paps-exitcode.patch, NONE, 1.1 paps-langinfo.patch, NONE, 1.1 paps-cpilpi.patch, 1.1, 1.2 paps-cups.patch, 1.13, 1.14 paps.spec, 1.32, 1.33 paps-0.6.6-exitcode.patch, 1.1, NONE paps-0.6.6-langinfo.patch, 1.1, NONE

Akira TAGOH tagoh at fedoraproject.org
Mon Nov 17 09:37:48 UTC 2008


Author: tagoh

Update of /cvs/pkgs/rpms/paps/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2563

Modified Files:
	paps-cpilpi.patch paps-cups.patch paps.spec 
Added Files:
	paps-exitcode.patch paps-langinfo.patch 
Removed Files:
	paps-0.6.6-exitcode.patch paps-0.6.6-langinfo.patch 
Log Message:
* Mon Nov 17 2008 Akira TAGOH <tagoh at redhat.com> - 0.6.8-8
- Courier font to be a default font for texttopaps. (#469325)

paps-exitcode.patch:

--- NEW FILE paps-exitcode.patch ---
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);
-          exit(-1);
+          exit(1);
         }
     }
   else
@@ -499,7 +499,7 @@ int main(int argc, char *argv[])
       if (cvh == NULL)
         {
           fprintf(stderr, "%s: Invalid encoding: %s\n", g_get_prgname (), encoding);
-          exit(-1);
+          exit(1);
         }
     }
 
@@ -559,7 +559,7 @@ read_file (FILE   *file,
         {
           fprintf(stderr, "%s: Error reading file.\n", g_get_prgname ());
           g_string_free (inbuf, TRUE);
-          return NULL;
+          exit(1);
         }
       else if (bp == NULL)
         break;
@@ -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 ());
-              return NULL;
+              exit(1);
             }
           obuffer[BUFSIZE * 6 - 1 - oblen] = 0;
         }
@@ -637,7 +637,7 @@ split_text_into_paragraphs (PangoContext
 	      if (wtext == NULL)
 	        {
 		  fprintf (stderr, "Failed to convert UTF-8 to UCS-4.\n");
-		  return NULL;
+                  exit(1);
 		}
 
 	      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);
-		      return NULL;
+                      exit(1);
 		    }
 		  for (i = 0; i < len; i++)
 		    {
@@ -665,7 +665,7 @@ split_text_into_paragraphs (PangoContext
 		  if (newtext == NULL)
 		    {
 		      fprintf (stderr, "Failed to convert UCS-4 to UTF-8.\n");
-		      return NULL;
+                      exit(1);
 		    }
 
 		  pango_layout_set_text (para->layout, newtext, -1);

paps-langinfo.patch:

--- NEW FILE paps-langinfo.patch ---
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 <pango/pangoft2.h>
 #include "libpaps.h"
 #include <errno.h>
+#include <langinfo.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -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();
 
@@ -480,6 +484,15 @@ int main(int argc, char *argv[])
   page_layout.scale_x = page_layout.scale_y = 1.0;
       
 
+  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-cpilpi.patch:

Index: paps-cpilpi.patch
===================================================================
RCS file: /cvs/pkgs/rpms/paps/F-9/paps-cpilpi.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- paps-cpilpi.patch	30 Nov 2007 11:29:46 -0000	1.1
+++ paps-cpilpi.patch	17 Nov 2008 09:37:17 -0000	1.2
@@ -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 @@
  } 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 @@
        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 @@
      }
  
    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 @@
    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,
                             );
              }
          }

paps-cups.patch:

Index: paps-cups.patch
===================================================================
RCS file: /cvs/pkgs/rpms/paps/F-9/paps-cups.patch,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- paps-cups.patch	16 May 2008 12:04:09 -0000	1.13
+++ paps-cups.patch	17 Nov 2008 09:37:17 -0000	1.14
@@ -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 @@
  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 @@
  
  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 <string.h>
  #include <time.h>
@@ -80,7 +80,7 @@
  
    /* 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 @@
 +		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 @@
    /* 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 @@
    
    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 @@
    
    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 @@
  
    /* 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 @@
                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 @@
            "%%%%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 @@
            "         } 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",


Index: paps.spec
===================================================================
RCS file: /cvs/pkgs/rpms/paps/F-9/paps.spec,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- paps.spec	16 May 2008 12:04:09 -0000	1.32
+++ paps.spec	17 Nov 2008 09:37:17 -0000	1.33
@@ -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 @@
 ## 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 @@
 %patch51 -p1 -b .cpilpi
 %patch52 -p1 -b .dsc
 %patch53 -p1 -b .autoconf262
+libtoolize -f -c
 autoreconf
 
 
@@ -98,6 +99,13 @@
 %{_libdir}/libpaps.so
 
 %changelog
+* Mon Nov 17 2008 Akira TAGOH <tagoh at redhat.com> - 0.6.8-8
+- Courier font to be a default font for texttopaps. (#469325)
+
+* Mon Sep  1 2008 Akira TAGOH <tagoh at redhat.com> - 0.6.8-7
+- paps-langinfo.patch: Updated.
+- paps-exitcode.patch: Updated.
+
 * Fri May 16 2008 Akira TAGOH <tagoh at redhat.com> - 0.6.8-6
 - paps-cups.patch: Fix printing with -o landscape in CUPS. (#222137)
 - paps-autoconf262.patch: Fix an error on autoreconf.


--- paps-0.6.6-exitcode.patch DELETED ---


--- paps-0.6.6-langinfo.patch DELETED ---




More information about the fedora-extras-commits mailing list