Compare commits
5 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ed42d378d8 | ||
|
|
3db1da9c27 | ||
|
|
4f440ac67e | ||
|
|
7bf71e48b1 | ||
|
|
fbf777aee3 |
10 changed files with 127 additions and 154 deletions
0
.cvsignore → .gitignore
vendored
0
.cvsignore → .gitignore
vendored
21
Makefile
21
Makefile
|
|
@ -1,21 +0,0 @@
|
||||||
# Makefile for source rpm: paps
|
|
||||||
# $Id: Makefile,v 1.1 2006/06/27 07:10:51 tagoh 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
|
|
||||||
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)
|
|
||||||
|
|
@ -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];
|
|
||||||
24
paps-autoconf262.patch
Normal file
24
paps-autoconf262.patch
Normal file
|
|
@ -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,
|
||||||
|
|
@ -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
|
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-28 16:20:56.000000000 +0900
|
--- paps-0.6.8.orig/src/paps.c 2008-11-07 08:27:54.000000000 +0900
|
||||||
+++ paps-0.6.8/src/paps.c 2007-11-30 17:53:06.000000000 +0900
|
+++ paps-0.6.8/src/paps.c 2008-11-07 08:29:08.000000000 +0900
|
||||||
@@ -92,8 +92,8 @@ typedef struct {
|
@@ -92,8 +92,8 @@ typedef struct {
|
||||||
gchar *filename;
|
gchar *filename;
|
||||||
gchar *header_font_desc;
|
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;
|
} page_layout_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@@ -376,6 +376,7 @@ int main(int argc, char *argv[])
|
@@ -378,6 +378,7 @@ int main(int argc, char *argv[])
|
||||||
bottom_margin = 36;
|
|
||||||
page_width = 612;
|
|
||||||
page_height = 792;
|
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;
|
+ do_stretch_chars = TRUE;
|
||||||
|
|
||||||
if (argc < 6 || argc > 7) {
|
if (argc < 6 || argc > 7) {
|
||||||
fprintf(stderr, "ERROR: %s job-id user title copies options [file]\n", prgname);
|
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 */
|
/* calculate x-coordinate scale */
|
||||||
if (page_layout.cpi > 0.0L)
|
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 ();
|
fontmap = pango_ft2_font_map_new ();
|
||||||
fontset = pango_font_map_load_fontset (fontmap, pango_context, font_description, get_language ());
|
fontset = pango_font_map_load_fontset (fontmap, pango_context, font_description, get_language ());
|
||||||
metrics = pango_fontset_get_metrics (fontset);
|
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);
|
pango_font_metrics_unref (metrics);
|
||||||
g_object_unref (G_OBJECT (fontmap));
|
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;
|
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 column_y_pos = 0;
|
||||||
int page_idx = 1;
|
int page_idx = 1;
|
||||||
int pango_column_height = page_layout->column_height * page_layout->pt_to_pixel * PANGO_SCALE;
|
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;
|
LineLink *prev_line_link = NULL;
|
||||||
|
|
||||||
start_page(OUT, page_idx);
|
start_page(OUT, page_idx);
|
||||||
@@ -1039,17 +1039,17 @@ output_pages(FILE *OUT,
|
@@ -1038,17 +1038,17 @@ output_pages(FILE *OUT,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
diff -pruN paps-0.6.8.orig/configure.in paps-0.6.8/configure.in
|
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.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-11-07 08:21:19.000000000 +0900
|
||||||
@@ -7,6 +7,19 @@ AC_LANG_C
|
@@ -7,6 +7,19 @@ AC_LANG_C
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AM_PROG_LIBTOOL
|
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_CHM_FEATURE(OFF)
|
||||||
DX_CHI_FEATURE(OFF)
|
DX_CHI_FEATURE(OFF)
|
||||||
diff -pruN paps-0.6.8.orig/src/Makefile.am paps-0.6.8/src/Makefile.am
|
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.orig/src/Makefile.am 2008-11-07 08:21:05.000000000 +0900
|
||||||
+++ paps-0.6.8/src/Makefile.am 2007-11-30 18:40:32.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
|
@@ -5,10 +5,10 @@ libpapsinc_HEADERS = libpaps.h
|
||||||
libpapsincdir = $(includedir)
|
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
|
EXTRA_DIST = test_libpaps.c paps.1
|
||||||
diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.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 2007-11-30 18:40:15.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 2007-11-30 18:47:28.000000000 +0900
|
+++ paps-0.6.8/src/paps.c 2008-11-07 08:26:28.000000000 +0900
|
||||||
@@ -31,6 +31,7 @@
|
@@ -31,6 +31,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
@ -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. */
|
/* Set locale from environment. */
|
||||||
setlocale(LC_ALL, "");
|
setlocale(LC_ALL, "");
|
||||||
@@ -348,6 +353,134 @@ 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);
|
g_option_context_add_main_entries(ctxt, entries, NULL);
|
||||||
#endif
|
#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;
|
+ bottom_margin = 36;
|
||||||
+ page_width = 612;
|
+ page_width = 612;
|
||||||
+ page_height = 792;
|
+ 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) {
|
+ if (argc < 6 || argc > 7) {
|
||||||
+ fprintf(stderr, "ERROR: %s job-id user title copies options [file]\n", prgname);
|
+ fprintf(stderr, "ERROR: %s job-id user title copies options [file]\n", prgname);
|
||||||
|
|
@ -148,14 +150,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 ((val = cupsGetOption("landscape", num_options, options)) != NULL) {
|
||||||
+ if (g_ascii_strcasecmp(val, "no") &&
|
+ if (g_ascii_strcasecmp(val, "no") &&
|
||||||
+ g_ascii_strcasecmp(val, "off") &&
|
+ g_ascii_strcasecmp(val, "off") &&
|
||||||
+ g_ascii_strcasecmp(val, "false")) {
|
+ 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.
|
|
||||||
+ */
|
|
||||||
+ do_landscape = TRUE;
|
+ do_landscape = TRUE;
|
||||||
+ }
|
|
||||||
+ }
|
+ }
|
||||||
+ /* XXX: need to support orientation-requested? */
|
+ /* XXX: need to support orientation-requested? */
|
||||||
+ if ((val = cupsGetOption("page-left", num_options, options)) != NULL) {
|
+ if ((val = cupsGetOption("page-left", num_options, options)) != NULL) {
|
||||||
|
|
@ -215,7 +211,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c
|
||||||
/* Parse command line */
|
/* Parse command line */
|
||||||
if (!g_option_context_parse(ctxt, &argc, &argv, &error))
|
if (!g_option_context_parse(ctxt, &argc, &argv, &error))
|
||||||
{
|
{
|
||||||
@@ -374,6 +507,8 @@ int main(int argc, char *argv[])
|
@@ -374,6 +503,8 @@ int main(int argc, char *argv[])
|
||||||
IN = stdin;
|
IN = stdin;
|
||||||
}
|
}
|
||||||
title = filename_in;
|
title = filename_in;
|
||||||
|
|
@ -224,7 +220,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c
|
||||||
|
|
||||||
paps = paps_new();
|
paps = paps_new();
|
||||||
pango_context = paps_get_pango_context (paps);
|
pango_context = paps_get_pango_context (paps);
|
||||||
@@ -392,8 +527,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);
|
pango_context_set_font_description (pango_context, font_description);
|
||||||
|
|
||||||
/* Page layout */
|
/* Page layout */
|
||||||
|
|
@ -237,7 +233,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c
|
||||||
|
|
||||||
if (num_columns == 1)
|
if (num_columns == 1)
|
||||||
total_gutter_width = 0;
|
total_gutter_width = 0;
|
||||||
@@ -456,6 +593,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.pango_dir = pango_dir;
|
||||||
page_layout.filename = filename_in;
|
page_layout.filename = filename_in;
|
||||||
page_layout.header_font_desc = header_font_desc;
|
page_layout.header_font_desc = header_font_desc;
|
||||||
|
|
@ -246,7 +242,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c
|
||||||
|
|
||||||
/* calculate x-coordinate scale */
|
/* calculate x-coordinate scale */
|
||||||
if (page_layout.cpi > 0.0L)
|
if (page_layout.cpi > 0.0L)
|
||||||
@@ -756,6 +895,12 @@ split_text_into_paragraphs (PangoContext
|
@@ -756,6 +891,12 @@ split_text_into_paragraphs (PangoContext
|
||||||
if (wc == (gunichar)-1)
|
if (wc == (gunichar)-1)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "%s: Invalid character in input\n", g_get_prgname ());
|
fprintf (stderr, "%s: Invalid character in input\n", g_get_prgname ());
|
||||||
|
|
@ -259,15 +255,19 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c
|
||||||
wc = 0;
|
wc = 0;
|
||||||
}
|
}
|
||||||
if (!*p || !wc || wc == '\n' || wc == '\f')
|
if (!*p || !wc || wc == '\n' || wc == '\f')
|
||||||
@@ -925,6 +1070,7 @@ 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 orientation = page_layout->page_width > page_layout->page_height;
|
||||||
int bb_page_width = page_layout->page_width;
|
int bb_page_width = page_layout->page_width;
|
||||||
int bb_page_height = page_layout->page_height;
|
int bb_page_height = page_layout->page_height;
|
||||||
+ char *owner = NULL;
|
+ char *owner = NULL;
|
||||||
|
|
||||||
/* Keep bounding box non-rotated to make ggv happy */
|
/* Keep bounding box non-rotated to make ggv happy */
|
||||||
if (orientation)
|
- if (orientation)
|
||||||
@@ -934,12 +1080,20 @@ void print_postscript_header(FILE *OUT,
|
+ /* 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;
|
bb_page_height = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -281,6 +281,7 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c
|
||||||
+ }
|
+ }
|
||||||
fprintf(OUT,
|
fprintf(OUT,
|
||||||
"%%!PS-Adobe-3.0\n"
|
"%%!PS-Adobe-3.0\n"
|
||||||
|
+ "%s"
|
||||||
"%%%%Title: %s\n"
|
"%%%%Title: %s\n"
|
||||||
"%%%%Creator: paps version 0.6.7 by Dov Grobgeld\n"
|
"%%%%Creator: paps version 0.6.7 by Dov Grobgeld\n"
|
||||||
"%%%%Pages: (atend)\n"
|
"%%%%Pages: (atend)\n"
|
||||||
|
|
@ -289,31 +290,35 @@ diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c
|
||||||
"%%%%BeginProlog\n"
|
"%%%%BeginProlog\n"
|
||||||
"%%%%Orientation: %s\n"
|
"%%%%Orientation: %s\n"
|
||||||
"/papsdict 1 dict def\n"
|
"/papsdict 1 dict def\n"
|
||||||
@@ -989,8 +1143,13 @@ 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"
|
||||||
|
- " /orientation 3 def\n"
|
||||||
|
+ " /orientation %d def\n"
|
||||||
|
" } if\n"
|
||||||
|
" 2 dict\n"
|
||||||
|
" dup /PageSize [pagewidth pageheight] put\n"
|
||||||
|
@@ -986,11 +1138,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,
|
title,
|
||||||
bb_page_width,
|
bb_page_width,
|
||||||
bb_page_height,
|
bb_page_height,
|
||||||
- orientation_names[orientation]
|
- orientation_names[orientation]
|
||||||
+ owner,
|
+ owner,
|
||||||
+ /* Put the fake orientation tag if paps is currently running under
|
+ orientation_names[orientation],
|
||||||
+ * the CUPS filter mode. (#222137)
|
+ /* For landscape, rotate page to portrait orientation for CUPS (RH#222137) */
|
||||||
+ */
|
+ page_layout->cups_mode ? 2 : 3
|
||||||
+ orientation_names[orientation && !page_layout->cups_mode]
|
|
||||||
);
|
);
|
||||||
+ g_free(owner);
|
+ g_free(owner);
|
||||||
|
|
||||||
fprintf(OUT,
|
fprintf(OUT,
|
||||||
"%% User settings\n"
|
"%% 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]
|
|
||||||
);
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
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/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.orig/src/libpaps.c 2008-05-14 23:07:14.000000000 +0900
|
||||||
+++ paps-0.6.8/src/libpaps.c 2008-01-15 11:10:10.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
|
@@ -118,7 +118,6 @@ gchar *paps_get_postscript_header_strdup
|
||||||
gchar *ret_str;
|
gchar *ret_str;
|
||||||
g_string_append_printf(paps->header,
|
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
|
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.orig/src/paps.c 2008-05-14 23:07:14.000000000 +0900
|
||||||
+++ paps-0.6.8/src/paps.c 2008-01-15 11:10:46.000000000 +0900
|
+++ paps-0.6.8/src/paps.c 2008-05-14 23:12:53.000000000 +0900
|
||||||
@@ -665,7 +665,7 @@ int main(int argc, char *argv[])
|
@@ -659,7 +659,7 @@ int main(int argc, char *argv[])
|
||||||
fprintf(OUT, "%s", paps_header);
|
fprintf(OUT, "%s", paps_header);
|
||||||
g_free(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);
|
fprintf(OUT, "%s", ps_pages_string->str);
|
||||||
print_postscript_trailer(OUT, num_pages);
|
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"
|
"%%%%Creator: paps version 0.6.7 by Dov Grobgeld\n"
|
||||||
"%%%%Pages: (atend)\n"
|
"%%%%Pages: (atend)\n"
|
||||||
"%%%%BoundingBox: 0 0 %d %d\n%s"
|
"%%%%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 1 dict def\n"
|
||||||
"papsdict begin\n"
|
"papsdict begin\n"
|
||||||
"\n"
|
"\n"
|
||||||
@@ -1139,7 +1140,8 @@ void print_postscript_header(FILE *OUT,
|
@@ -1134,7 +1135,8 @@ void print_postscript_header(FILE *OUT,
|
||||||
"/turnpage {\n"
|
"/turnpage {\n"
|
||||||
" 90 rotate\n"
|
" 90 rotate\n"
|
||||||
" 0 pageheight neg translate\n"
|
" 0 pageheight neg translate\n"
|
||||||
- "} def\n",
|
- "} def\n",
|
||||||
+ "} def\n"
|
+ "} def\n"
|
||||||
+ "%%%%EndProlog\n",
|
+ "%%%%EndProlog\n",
|
||||||
title,
|
/*
|
||||||
bb_page_width,
|
* Put %%cupsRotation tag to prevent the rotation in pstops.
|
||||||
bb_page_height,
|
* This breaks paps's behavior to make it in landscape say.
|
||||||
@@ -1152,6 +1154,7 @@ void print_postscript_header(FILE *OUT,
|
@@ -1150,6 +1152,7 @@ void print_postscript_header(FILE *OUT,
|
||||||
g_free(owner);
|
g_free(owner);
|
||||||
|
|
||||||
fprintf(OUT,
|
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"
|
"%% User settings\n"
|
||||||
"/pagewidth %d def\n"
|
"/pagewidth %d def\n"
|
||||||
"/pageheight %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)
|
int num_pages)
|
||||||
{
|
{
|
||||||
fprintf(OUT,
|
fprintf(OUT,
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
diff -ruN paps-0.6.6.orig/src/paps.c paps-0.6.6/src/paps.c
|
diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c
|
||||||
--- paps-0.6.6.orig/src/paps.c 2006-09-30 02:51:39.000000000 +0900
|
--- paps-0.6.8.orig/src/paps.c 2008-09-01 15:54:11.000000000 +0900
|
||||||
+++ paps-0.6.6/src/paps.c 2006-09-30 03:00:26.000000000 +0900
|
+++ paps-0.6.8/src/paps.c 2008-09-01 15:54:47.000000000 +0900
|
||||||
@@ -346,7 +346,7 @@
|
@@ -365,7 +365,7 @@ int main(int argc, char *argv[])
|
||||||
if (!IN)
|
if (!IN)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Failed to open %s!\n", filename_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
|
else
|
||||||
@@ -457,7 +457,7 @@
|
@@ -499,7 +499,7 @@ int main(int argc, char *argv[])
|
||||||
if (cvh == NULL)
|
if (cvh == NULL)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s: Invalid encoding: %s\n", g_get_prgname (), encoding);
|
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 ());
|
fprintf(stderr, "%s: Error reading file.\n", g_get_prgname ());
|
||||||
g_string_free (inbuf, TRUE);
|
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)
|
else if (bp == NULL)
|
||||||
break;
|
break;
|
||||||
@@ -531,7 +531,7 @@
|
@@ -573,7 +573,7 @@ read_file (FILE *file,
|
||||||
if (g_iconv (handle, &ib, &iblen, &ob, &oblen) == -1)
|
if (g_iconv (handle, &ib, &iblen, &ob, &oblen) == -1)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "%s: Error while converting strings.\n", g_get_prgname ());
|
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;
|
obuffer[BUFSIZE * 6 - 1 - oblen] = 0;
|
||||||
}
|
}
|
||||||
@@ -591,7 +591,7 @@
|
@@ -637,7 +637,7 @@ split_text_into_paragraphs (PangoContext
|
||||||
if (wtext == NULL)
|
if (wtext == NULL)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "Failed to convert UTF-8 to UCS-4.\n");
|
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);
|
+ exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
len = wcswidth (wtext);
|
len = g_utf8_strlen (para->text, para->length);
|
||||||
@@ -604,7 +604,7 @@
|
@@ -650,7 +650,7 @@ split_text_into_paragraphs (PangoContext
|
||||||
{
|
{
|
||||||
fprintf (stderr, "Failed to allocate a memory.\n");
|
fprintf (stderr, "Failed to allocate a memory.\n");
|
||||||
g_free (wtext);
|
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++)
|
for (i = 0; i < len; i++)
|
||||||
{
|
{
|
||||||
@@ -619,7 +619,7 @@
|
@@ -665,7 +665,7 @@ split_text_into_paragraphs (PangoContext
|
||||||
if (newtext == NULL)
|
if (newtext == NULL)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "Failed to convert UCS-4 to UTF-8.\n");
|
fprintf (stderr, "Failed to convert UCS-4 to UTF-8.\n");
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
diff -pruN paps-0.6.6.orig/src/paps.c paps-0.6.6/src/paps.c
|
diff -pruN paps-0.6.8.orig/src/paps.c paps-0.6.8/src/paps.c
|
||||||
--- paps-0.6.6.orig/src/paps.c 2007-01-23 18:56:04.000000000 +0900
|
--- paps-0.6.8.orig/src/paps.c 2008-09-01 15:07:03.000000000 +0900
|
||||||
+++ paps-0.6.6/src/paps.c 2007-01-23 18:59:15.000000000 +0900
|
+++ paps-0.6.8/src/paps.c 2008-09-01 15:49:10.000000000 +0900
|
||||||
@@ -25,6 +25,7 @@
|
@@ -25,6 +25,7 @@
|
||||||
#include <pango/pangoft2.h>
|
#include <pango/pangoft2.h>
|
||||||
#include "libpaps.h"
|
#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 <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -324,6 +325,9 @@ int main(int argc, char *argv[])
|
@@ -331,6 +332,9 @@ int main(int argc, char *argv[])
|
||||||
int max_width = 0, w;
|
|
||||||
GIConv cvh = NULL;
|
GIConv cvh = NULL;
|
||||||
|
GOptionGroup *options;
|
||||||
|
|
||||||
+ /* Set locale from environment. */
|
+ /* Set locale from environment. */
|
||||||
+ setlocale(LC_ALL, "");
|
+ setlocale(LC_ALL, "");
|
||||||
+
|
+
|
||||||
/* Prerequisite when using glib. */
|
/* Prerequisite when using glib. */
|
||||||
g_type_init();
|
g_type_init();
|
||||||
|
|
||||||
@@ -451,6 +455,15 @@ int main(int argc, char *argv[])
|
@@ -480,6 +484,15 @@ int main(int argc, char *argv[])
|
||||||
g_object_unref (G_OBJECT (fontmap));
|
page_layout.scale_x = page_layout.scale_y = 1.0;
|
||||||
}
|
|
||||||
|
|
||||||
+ if (encoding == NULL)
|
+ if (encoding == NULL)
|
||||||
+ {
|
+ {
|
||||||
24
paps.spec
24
paps.spec
|
|
@ -1,6 +1,6 @@
|
||||||
Name: paps
|
Name: paps
|
||||||
Version: 0.6.8
|
Version: 0.6.8
|
||||||
Release: 5%{?dist}
|
Release: 8%{?dist}
|
||||||
|
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: http://paps.sourceforge.net/
|
URL: http://paps.sourceforge.net/
|
||||||
|
|
@ -12,15 +12,15 @@ Patch0: paps-0.6.8-shared.patch
|
||||||
## https://sourceforge.net/tracker/index.php?func=detail&aid=1832924&group_id=153049&atid=786241
|
## https://sourceforge.net/tracker/index.php?func=detail&aid=1832924&group_id=153049&atid=786241
|
||||||
Patch1: paps-0.6.8-wordwrap.patch
|
Patch1: paps-0.6.8-wordwrap.patch
|
||||||
## https://sourceforge.net/tracker/index.php?func=detail&aid=1832926&group_id=153049&atid=786241
|
## 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
|
## https://sourceforge.net/tracker/index.php?func=detail&aid=1832929&group_id=153049&atid=786241
|
||||||
Patch3: paps-0.6.6-lcnumeric.patch
|
Patch3: paps-0.6.6-lcnumeric.patch
|
||||||
## https://sourceforge.net/tracker/index.php?func=detail&aid=1832935&group_id=153049&atid=786241
|
## 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
|
Patch50: paps-cups.patch
|
||||||
Patch51: paps-cpilpi.patch
|
Patch51: paps-cpilpi.patch
|
||||||
Patch52: paps-0.6.8-dsc-compliant.patch
|
Patch52: paps-dsc-compliant.patch
|
||||||
Patch61: paps-0.6.6-fix-wcswidth.patch
|
Patch53: paps-autoconf262.patch
|
||||||
|
|
||||||
Summary: Plain Text to PostScript converter
|
Summary: Plain Text to PostScript converter
|
||||||
Group: Applications/Publishing
|
Group: Applications/Publishing
|
||||||
|
|
@ -55,7 +55,8 @@ applications using paps API.
|
||||||
%patch50 -p1 -b .cups
|
%patch50 -p1 -b .cups
|
||||||
%patch51 -p1 -b .cpilpi
|
%patch51 -p1 -b .cpilpi
|
||||||
%patch52 -p1 -b .dsc
|
%patch52 -p1 -b .dsc
|
||||||
#%patch11 -p1 -b .wcswidth
|
%patch53 -p1 -b .autoconf262
|
||||||
|
libtoolize -f -c
|
||||||
autoreconf
|
autoreconf
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -98,6 +99,17 @@ rm -rf $RPM_BUILD_ROOT
|
||||||
%{_libdir}/libpaps.so
|
%{_libdir}/libpaps.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 17 2008 Akira TAGOH <tagoh@redhat.com> - 0.6.8-8
|
||||||
|
- Courier font to be a default font for texttopaps. (#469325)
|
||||||
|
|
||||||
|
* Mon Sep 1 2008 Akira TAGOH <tagoh@redhat.com> - 0.6.8-7
|
||||||
|
- paps-langinfo.patch: Updated.
|
||||||
|
- paps-exitcode.patch: Updated.
|
||||||
|
|
||||||
|
* Fri May 16 2008 Akira TAGOH <tagoh@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.
|
||||||
|
|
||||||
* Tue Feb 12 2008 Akira TAGOH <tagoh@redhat.com> - 0.6.8-5
|
* Tue Feb 12 2008 Akira TAGOH <tagoh@redhat.com> - 0.6.8-5
|
||||||
- Rebuild for gcc-4.3.
|
- Rebuild for gcc-4.3.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue