rpms/paps/FC-5 paps-0.6.3-formfeed.patch, NONE, 1.1 paps-0.6.6-encoding.patch, NONE, 1.1 paps-0.6.6-segfault.patch, NONE, 1.1 paps-makefile.patch, NONE, 1.1 .cvsignore, 1.6, 1.7 paps.spec, 1.7, 1.8 sources, 1.6, 1.7 paps-0.6.1-makefile.patch, 1.1, NONE paps-0.6.3-fix-pagesize.patch, 1.1, NONE
Akira Tagoh (tagoh)
fedora-extras-commits at redhat.com
Mon Jun 12 03:28:30 UTC 2006
Author: tagoh
Update of /cvs/extras/rpms/paps/FC-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12539
Modified Files:
.cvsignore paps.spec sources
Added Files:
paps-0.6.3-formfeed.patch paps-0.6.6-encoding.patch
paps-0.6.6-segfault.patch paps-makefile.patch
Removed Files:
paps-0.6.1-makefile.patch paps-0.6.3-fix-pagesize.patch
Log Message:
sync with devel
paps-0.6.3-formfeed.patch:
--- NEW FILE paps-0.6.3-formfeed.patch ---
diff -ruN paps-0.6.3.orig/src/paps.c paps-0.6.3/src/paps.c
--- paps-0.6.3.orig/src/paps.c 2006-03-28 12:10:36.000000000 +0900
+++ paps-0.6.3/src/paps.c 2006-03-28 15:54:21.000000000 +0900
@@ -83,6 +83,7 @@
PangoLayoutLine *pango_line;
PangoRectangle logical_rect;
PangoRectangle ink_rect;
+ int formfeed;
} LineLink;
typedef struct _Paragraph Paragraph;
@@ -93,6 +94,7 @@
char *text;
int length;
int height; /* Height, in pixels */
+ int formfeed;
PangoLayout *layout;
};
@@ -431,7 +433,7 @@
fprintf (stderr, "%s: Invalid character in input\n", g_get_prgname ());
wc = 0;
}
- if (!*p || !wc || wc == '\n')
+ if (!*p || !wc || wc == '\n' || wc == '\f')
{
Paragraph *para = g_new (Paragraph, 1);
para->text = last_para;
@@ -445,6 +447,11 @@
pango_layout_set_width (para->layout, paint_width * PANGO_SCALE);
para->height = 0;
+ if (wc == '\f')
+ para->formfeed = 1;
+ else
+ para->formfeed = 0;
+
last_para = next;
result = g_list_prepend (result, para);
@@ -472,6 +479,7 @@
while(par_list)
{
int para_num_lines, i;
+ LineLink *line_link;
Paragraph *para = par_list->data;
para_num_lines = pango_layout_get_line_count(para->layout);
@@ -479,12 +487,15 @@
for (i=0; i<para_num_lines; i++)
{
PangoRectangle logical_rect, ink_rect;
- LineLink *line_link = g_new(LineLink, 1);
+ line_link = g_new(LineLink, 1);
+ line_link->formfeed = 0;
line_link->pango_line = pango_layout_get_line(para->layout, i);
pango_layout_line_get_extents(line_link->pango_line,
&ink_rect, &logical_rect);
line_link->logical_rect = logical_rect;
+ if (para->formfeed && i == (para_num_lines - 1))
+ line_link->formfeed = 1;
line_link->ink_rect = ink_rect;
line_list = g_list_prepend(line_list, line_link);
}
@@ -513,8 +524,8 @@
PangoLayoutLine *line = line_link->pango_line;
/* Check if we need to move to next column */
- if (column_y_pos + line_link->logical_rect.height
- >= pango_column_height)
+ if ((column_y_pos + line_link->logical_rect.height
+ >= pango_column_height) || line_link->formfeed)
{
column_idx++;
column_y_pos = 0;
paps-0.6.6-encoding.patch:
--- NEW FILE paps-0.6.6-encoding.patch ---
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-05-25 13:23:07.000000000 +0900
+++ paps-0.6.6/src/paps.c 2006-05-25 14:55:03.000000000 +0900
@@ -105,7 +105,8 @@
/* Information passed in user data when drawing outlines */
GList *split_paragraphs_into_lines (GList *paragraphs);
-static char *read_file (FILE *file);
+static char *read_file (FILE *file,
+ GIConv *handle);
static GList *split_text_into_paragraphs (PangoContext *pango_context,
page_layout_t *page_layout,
int paint_width,
@@ -188,7 +189,7 @@
gboolean do_landscape = FALSE, do_rtl = FALSE, do_justify = FALSE, do_draw_header = FALSE;
int num_columns = 1, font_scale = 12;
int top_margin = 36, bottom_margin = 36, right_margin = 36, left_margin = 36;
- char *font_family = "Monospace";
+ char *font_family = "Monospace", *encoding = NULL;
GOptionContext *ctxt = g_option_context_new("[text file]");
GOptionEntry entries[] = {
{"landscape", 0, 0, G_OPTION_ARG_NONE, &do_landscape, "Landscape output. (Default: portrait)", NULL},
@@ -205,6 +206,7 @@
{"right-margin", 0, 0, G_OPTION_ARG_INT, &right_margin, "Set right margin. (Default: 36)", "NUM"},
{"left-margin", 0, 0, G_OPTION_ARG_INT, &left_margin, "Set left margin. (Default: 36)", "NUM"},
{"header", 0, 0, G_OPTION_ARG_NONE, &do_draw_header, "Draw page header for each page.", NULL},
+ {"encoding", 0, 0, G_OPTION_ARG_STRING, &encoding, "Assume the documentation encoding.", "ENCODING"},
{NULL}
};
GError *error = NULL;
@@ -228,6 +230,7 @@
gchar *paps_header = NULL;
gchar *header_font_desc = "Monospace Bold 12";
int header_sep = 20;
+ GIConv *cvh = NULL;
/* Prerequisite when using glib. */
g_type_init();
@@ -339,7 +342,21 @@
page_layout.filename = filename_in;
page_layout.header_font_desc = header_font_desc;
- text = read_file(IN);
+ if (encoding != NULL)
+ {
+ cvh = g_iconv_open ("UTF-8", encoding);
+ if (cvh == NULL)
+ {
+ fprintf(stderr, "%s: Invalid encoding: %s\n", g_get_prgname (), encoding);
+ exit(-1);
+ }
+ }
+
+ text = read_file(IN, cvh);
+
+ if (encoding != NULL && cvh != NULL)
+ g_iconv_close(cvh);
+
paragraphs = split_text_into_paragraphs(pango_context,
&page_layout,
page_layout.column_width * page_layout.pt_to_pixel,
@@ -373,7 +390,8 @@
/* Read an entire file into a string
*/
static char *
-read_file (FILE *file)
+read_file (FILE *file,
+ GIConv *handle)
{
GString *inbuf;
char *text;
@@ -382,7 +400,9 @@
inbuf = g_string_new (NULL);
while (1)
{
- char *bp = fgets (buffer, BUFSIZE-1, file);
+ char *ib, *ob, obuffer[BUFSIZE * 6], *bp = fgets (buffer, BUFSIZE-1, file);
+ gsize iblen, oblen;
+
if (ferror (file))
{
fprintf(stderr, "%s: Error reading file.\n", g_get_prgname ());
@@ -392,7 +412,19 @@
else if (bp == NULL)
break;
- g_string_append (inbuf, buffer);
+ if (handle != NULL)
+ {
+ ib = bp;
+ iblen = strlen (ib);
+ ob = bp = obuffer;
+ oblen = BUFSIZE * 6 - 1;
+ if (g_iconv (handle, &ib, &iblen, &ob, &oblen) == -1)
+ {
+ fprintf (stderr, "%s: Error while converting strings.\n", g_get_prgname ());
+ return NULL;
+ }
+ }
+ g_string_append (inbuf, bp);
}
fclose (file);
paps-0.6.6-segfault.patch:
--- NEW FILE paps-0.6.6-segfault.patch ---
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-05-25 15:12:02.000000000 +0900
+++ paps-0.6.6/src/paps.c 2006-05-25 15:15:58.000000000 +0900
@@ -453,7 +453,7 @@
GList *result = NULL;
char *last_para = text;
- while (*p)
+ while (p != NULL && *p)
{
wc = g_utf8_get_char (p);
next = g_utf8_next_char (p);
paps-makefile.patch:
--- NEW FILE paps-makefile.patch ---
diff -ruN paps-0.6.5.orig/doc/Makefile.am paps-0.6.5/doc/Makefile.am
--- paps-0.6.5.orig/doc/Makefile.am 2005-12-21 04:35:35.000000000 +0900
+++ paps-0.6.5/doc/Makefile.am 2006-04-17 17:28:52.000000000 +0900
@@ -10,7 +10,7 @@
EXTRA_DIST = Doxyfile example-output.png mainpage.h
-htmldir = share/doc/libpaps/html
-install-data-hook:
- mkdir -p $(prefix)/$(htmldir)
- cp -dpR doxygen-html/* $(prefix)/$(htmldir)
+htmldir = $(datadir)/doc/paps-$(VERSION)/html
+#install-data-hook:
+# mkdir -p $(prefix)/$(htmldir)
+# cp -dpR doxygen-html/* $(prefix)/$(htmldir)
diff -ruN paps-0.6.5.orig/src/Makefile.am paps-0.6.5/src/Makefile.am
--- paps-0.6.5.orig/src/Makefile.am 2006-04-17 15:04:13.000000000 +0900
+++ paps-0.6.5/src/Makefile.am 2006-04-17 17:30:01.000000000 +0900
@@ -1,5 +1,5 @@
man_MANS = paps.1
-lib_LIBRARIES = libpaps.a
+noinst_LIBRARIES = libpaps.a
libpaps_a_SOURCES = libpaps.c
libpaps_a_inc_HEADERS = libpaps.h
libpaps_a_incdir = $(includedir)
@@ -7,9 +7,9 @@
bin_PROGRAMS = paps
paps_CFLAGS = -Wall
paps_SOURCES = paps.c
-paps_LDADD = $(lib_LIBRARIES) $(all_libraries)
+paps_LDADD = $(noinst_LIBRARIES) $(all_libraries)
paps_LDFLAGS = `pkg-config --libs pangoft2`
-paps_DEPENDENCIES = $(lib_LIBRARIES)
+paps_DEPENDENCIES = $(noinst_LIBRARIES)
EXTRA_DIST = test_libpaps.c paps.1
@@ -21,7 +21,7 @@
test_libpaps_SOURCES = test_libpaps.c
-test_libpaps_LDADD = $(lib_LIBRARIES) $(all_libraries)
+test_libpaps_LDADD = $(noinst_LIBRARIES) $(all_libraries)
test_libpaps_LDFLAGS = `pkg-config --libs pangoft2`
-test_libpaps_DEPENDENCIES = $(lib_LIBRARIES)
+test_libpaps_DEPENDENCIES = $(noinst_LIBRARIES)
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/paps/FC-5/.cvsignore,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- .cvsignore 11 Jan 2006 06:13:52 -0000 1.6
+++ .cvsignore 12 Jun 2006 03:28:30 -0000 1.7
@@ -6,3 +6,4 @@
paps-0.6.1.tar.gz
paps-0.6.2.tar.gz
paps-0.6.3.tar.gz
+paps-0.6.6.tar.gz
Index: paps.spec
===================================================================
RCS file: /cvs/extras/rpms/paps/FC-5/paps.spec,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- paps.spec 24 Mar 2006 09:46:45 -0000 1.7
+++ paps.spec 12 Jun 2006 03:28:30 -0000 1.8
@@ -1,14 +1,16 @@
Name: paps
-Version: 0.6.3
+Version: 0.6.6
Release: 3%{?dist}
License: LGPL
URL: http://paps.sourceforge.net/
Source0: http://prdownloads.sourceforge.net/paps/paps-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: pango-devel
-Patch0: paps-0.6.1-makefile.patch
-Patch1: paps-0.6.3-fix-pagesize.patch
+BuildRequires: pango-devel automake autoconf
+Patch0: paps-makefile.patch
+Patch2: paps-0.6.3-formfeed.patch
+Patch3: paps-0.6.6-encoding.patch
+Patch4: paps-0.6.6-segfault.patch
Summary: Plain Text to PostScript converter
Group: Applications/Publishing
@@ -19,7 +21,9 @@
%prep
%setup -q
%patch0 -p1 -b .makefile
-%patch1 -p1 -b .pagesize
+%patch2 -p1 -b .formfeed
+%patch3 -p1 -b .encoding
+%patch4 -p1 -b .segfault
aclocal
automake
autoconf
@@ -33,7 +37,7 @@
%install
rm -rf $RPM_BUILD_ROOT
-%makeinstall
+make install DESTDIR=$RPM_BUILD_ROOT
rm -rf $RPM_BUILD_ROOT%{_includedir}
%clean
@@ -43,9 +47,36 @@
%defattr(-, root, root, -)
%doc AUTHORS COPYING.LIB README NEWS TODO
%{_bindir}/paps
+%{_mandir}/man1/paps.1*
%changelog
+* Mon Jun 12 2006 Akira TAGOH <tagoh at redhat.com> - 0.6.6-3
+- use make install DESTDIR=... instead of %%makeinstall
+- add automake and autoconf to BuildReq.
+
+* Thu May 25 2006 Akira TAGOH <tagoh at redhat.com> - 0.6.6-2
+- paps-0.6.6-encoding.patch: support --encoding option to be able to convert
+ the input file to UTF-8.
+- paps-0.6.6-segfault.patch: fixed a possible segfault issue when reading is
+ failed.
+
+* Fri May 19 2006 Akira TAGOH <tagoh at redhat.com> - 0.6.6-1
+- New upstream release.
+
+* Mon Apr 17 2006 Akira TAGOH <tagoh at redhat.com> - 0.6.5-1
+- New upstream release.
+ - paps-0.6.3-fix-pagesize.patch: removed. it has been merged in upstream.
+ - paps-0.6.3-goption.patch: removed. it has been merged in upstream.
+ - paps-0.6.3-header.patch: removed. it has been merged in upstream.
+- paps-makefile.patch: rework to be applied.
+
+* Fri Mar 31 2006 Akira TAGOH <tagoh at redhat.com> - 0.6.3-4
+- paps-0.6.3-formfeed.patch: applied to deal with the formfeed mark properly.
+- paps-0.6.3-goption.patch: rewritten option parser using GOption. and segfault
+ gone as well. (#187205)
+- paps-0.6.3-header.patch: applied to support the output of the page header.
+
* Fri Mar 24 2006 Akira TAGOH <tagoh at redhat.com> - 0.6.3-3
- paps-0.6.3-fix-pagesize.patch: fixed displaying the beginning of line at out of page. (#176207)
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/paps/FC-5/sources,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- sources 11 Jan 2006 06:13:52 -0000 1.6
+++ sources 12 Jun 2006 03:28:30 -0000 1.7
@@ -1 +1 @@
-6f36fd52b6254c99ac2710527ef413d6 paps-0.6.3.tar.gz
+cc0975e70fe1e704e16f2fb08c71cee2 paps-0.6.6.tar.gz
--- paps-0.6.1-makefile.patch DELETED ---
--- paps-0.6.3-fix-pagesize.patch DELETED ---
More information about the fedora-extras-commits
mailing list