auto-import changelog data from psutils-1.17-13.src.rpm
Thu Jul 19 2001 Than Ngo <than@redhat.com> 1.17-13 - add patch from enrico.scholz@informatik.tu-chemnitz.de Fri Jul 13 2001 Than Ngo <than@redhat.com> 1.17-12 - media size as letter (Bug #48831) - Copyright->License - don't hardcode manpath
This commit is contained in:
parent
349b975e7d
commit
e7b00f5fcf
202
psutils-p17-paper.patch
Normal file
202
psutils-p17-paper.patch
Normal file
@ -0,0 +1,202 @@
|
||||
--- psutils/pstops.man.paper Tue Mar 11 23:53:04 1997
|
||||
+++ psutils/pstops.man Thu Jul 19 15:21:51 2001
|
||||
@@ -108,10 +108,11 @@
|
||||
The
|
||||
.I \-p
|
||||
option can be used as an alternative, to set the paper size to
|
||||
-.B a3, a4, a5, b5, letter, legal, tabloid, statement, executive, folio, quarto
|
||||
+.B a3, a4, a5, b5, letter, legal, tabloid, statement, executive, folio, quarto, 10x14
|
||||
or
|
||||
-.B 10x14.
|
||||
-The default paper size is
|
||||
+.B _glibc,
|
||||
+where latter one means the format of the current locale. The default
|
||||
+paper size is
|
||||
.B @PAPER@.
|
||||
.PP
|
||||
The
|
||||
@@ -154,6 +155,12 @@
|
||||
4:1L@.7(21cm,0)+-2L@.7(21cm,14.85cm)
|
||||
.sp
|
||||
for the reverse sides (or join them with a comma for duplex printing).
|
||||
+.SH "ENVIRONMENT VARIABLES"
|
||||
+.TP
|
||||
+.B LC_ALL, LC_PAPER
|
||||
+These variables are specifying the papertype when used paper is
|
||||
+.B _glibc.
|
||||
+For details see the locale(7) manpage.
|
||||
.SH AUTHOR
|
||||
Copyright (C) Angus J. C. Duggan 1991-1995
|
||||
.SH "SEE ALSO"
|
||||
--- psutils/psutil.c.paper Tue Mar 11 23:53:04 1997
|
||||
+++ psutils/psutil.c Thu Jul 19 15:21:51 2001
|
||||
@@ -21,6 +21,11 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
+#ifdef HAVE_LANGINFO_H
|
||||
+# include <langinfo.h>
|
||||
+# include <locale.h>
|
||||
+#endif
|
||||
+
|
||||
#define iscomment(x,y) (strncmp(x,y,strlen(y)) == 0)
|
||||
|
||||
extern char *program ;
|
||||
@@ -31,6 +36,16 @@
|
||||
extern char pagelabel[BUFSIZ];
|
||||
extern int pageno;
|
||||
|
||||
+#ifdef HAVE_LANGINFO_H
|
||||
+/* When using papertype _glibc we are comparing floating point values. Therefore
|
||||
+ * and because values in the papersize table are not exactly we are needing an
|
||||
+ * epsilon value. */
|
||||
+static float PT_EPSILON = 2.0;
|
||||
+
|
||||
+/* The factor needed to convert lengths given in mm to length in pt.*/
|
||||
+static float MM_TO_PT_FACTOR = 72/25.4;
|
||||
+#endif /* HAVE_LANGINFO_H */
|
||||
+
|
||||
static char buffer[BUFSIZ];
|
||||
static long bytes = 0;
|
||||
static long pagescmt = 0;
|
||||
@@ -64,16 +79,52 @@
|
||||
{ NULL, 0, 0 }
|
||||
};
|
||||
|
||||
+#ifdef HAVE_LANGINFO_H
|
||||
+/* Called if papertype is '_glibc'. It uses the current locale to determine the
|
||||
+ * height and width of the current LC_PAPER and compares it with the items of
|
||||
+ * the 'papersizes' list. */
|
||||
+Paper* findpaperglibc()
|
||||
+{
|
||||
+ float height, width;
|
||||
+ char *old_locale = setlocale (LC_PAPER, "");
|
||||
+ Paper *result = 0, *pp;
|
||||
+
|
||||
+ height = MM_TO_PT_FACTOR * (unsigned int)(nl_langinfo(_NL_PAPER_HEIGHT));
|
||||
+ width = MM_TO_PT_FACTOR * (unsigned int)(nl_langinfo(_NL_PAPER_WIDTH));
|
||||
+
|
||||
+ for (pp = papersizes; PaperName(pp) && result==0; pp++) {
|
||||
+ if ( abs(PaperWidth(pp)-width)<PT_EPSILON &&
|
||||
+ abs(PaperHeight(pp)-height)<PT_EPSILON )
|
||||
+ result = pp;
|
||||
+ }
|
||||
+
|
||||
+ setlocale(LC_PAPER, old_locale);
|
||||
+
|
||||
+ return result;
|
||||
+}
|
||||
+#endif /* HAVE_LANGINFO_H */
|
||||
+
|
||||
/* return pointer to paper size struct or NULL */
|
||||
Paper* findpaper(char *name)
|
||||
{
|
||||
- Paper *pp;
|
||||
- for (pp = papersizes; PaperName(pp); pp++) {
|
||||
- if (strcmp(PaperName(pp), name) == 0) {
|
||||
+ Paper *pp = 0;
|
||||
+
|
||||
+#ifdef HAVE_LANGINFO_H
|
||||
+ if (strcmp(name, "_glibc") == 0) {
|
||||
+ pp = findpaperglibc();
|
||||
+ if (pp==0) name = "a4"; /* Paper in C locale */
|
||||
+ }
|
||||
+#endif /* HAVE_LANGINFO_H */
|
||||
+
|
||||
+ if (pp==0) {
|
||||
+ for (pp = papersizes; PaperName(pp); pp++) {
|
||||
+ if (strcmp(PaperName(pp), name) == 0) {
|
||||
return pp;
|
||||
- }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
- return (Paper *)NULL;
|
||||
+
|
||||
+ return pp;
|
||||
}
|
||||
|
||||
/* Make a file seekable, using temporary files if necessary */
|
||||
--- psutils/psresize.man.paper Tue Mar 11 23:53:03 1997
|
||||
+++ psutils/psresize.man Thu Jul 19 15:21:51 2001
|
||||
@@ -42,10 +42,11 @@
|
||||
The
|
||||
.I \-p
|
||||
option can be used as an alternative, to set the output paper size to
|
||||
-.B a3, a4, a5, b5, letter, legal, tabloid, statement, executive, folio, quarto
|
||||
+.B a3, a4, a5, b5, letter, legal, tabloid, statement, executive, folio, quarto, 10x24
|
||||
or
|
||||
-.B 10x14.
|
||||
-The default output paper size is
|
||||
+.B _glibc,
|
||||
+where latter one means the format of the current locale. The default
|
||||
+output paper size is
|
||||
.B @PAPER@.
|
||||
.PP
|
||||
The
|
||||
@@ -69,6 +70,12 @@
|
||||
.sp
|
||||
psresize -PA4 -pletter in.ps out.ps
|
||||
.sp
|
||||
+.SH "ENVIRONMENT VARIABLES"
|
||||
+.TP
|
||||
+.B LC_ALL, LC_PAPER
|
||||
+These variables are specifying the papertype when used paper is
|
||||
+.B _glibc.
|
||||
+For details see the locale(7) manpage.
|
||||
.SH AUTHOR
|
||||
Copyright (C) Angus J. C. Duggan 1991-1995
|
||||
.SH "SEE ALSO"
|
||||
--- psutils/psnup.man.paper Tue Mar 11 23:53:02 1997
|
||||
+++ psutils/psnup.man Thu Jul 19 15:21:51 2001
|
||||
@@ -61,9 +61,11 @@
|
||||
The
|
||||
.I \-p
|
||||
option can be used as an alternative, to set the paper size to
|
||||
-.B a3, a4, a5, b5, letter, legal, tabloid, statement, executive, folio, quarto
|
||||
+.B a3, a4, a5, b5, letter, legal, tabloid, statement, executive, folio, quarto,
|
||||
+.B 10x14
|
||||
or
|
||||
-.B 10x14.
|
||||
+.B _glibc,
|
||||
+where latter one means the format of the current locale.
|
||||
The default paper size is
|
||||
.B @PAPER@.
|
||||
The
|
||||
@@ -148,6 +150,12 @@
|
||||
on the first output page and
|
||||
pages 2 then 3 of the input document
|
||||
on the second output page.
|
||||
+.SH "ENVIRONMENT VARIABLES"
|
||||
+.TP
|
||||
+.B LC_ALL, LC_PAPER
|
||||
+These variables are specifying the papertype when used paper is
|
||||
+.B _glibc.
|
||||
+For details see the locale(7) manpage.
|
||||
.SH AUTHOR
|
||||
Copyright (C) Angus J. C. Duggan 1991-1995
|
||||
.SH "SEE ALSO"
|
||||
--- psutils/Makefile.unix.paper Thu Jul 19 15:21:51 2001
|
||||
+++ psutils/Makefile.unix Thu Jul 19 15:24:07 2001
|
||||
@@ -19,7 +19,11 @@
|
||||
# psnup puts multiple logical pages on one physical page
|
||||
# psresize scales and moves pages to fit on different paper sizes
|
||||
|
||||
-PAPER=a4
|
||||
+PAPER="_glibc"
|
||||
+
|
||||
+# Comment it out if your machine does not have the <langutil.h> header
|
||||
+# or does not know nl_langinfo()
|
||||
+LANGINFO_FLAG = -DHAVE_LANGINFO_H
|
||||
|
||||
# Makefile for PSUtils under Unix
|
||||
|
||||
@@ -39,7 +43,7 @@
|
||||
MANDIR = $(DESTDIR)/usr/man/man$(MANEXT)
|
||||
|
||||
CC = gcc
|
||||
-CFLAGS = -DPAPER=\"$(PAPER)\" -DUNIX $(RPM_OPT_FLAGS) -Wall
|
||||
+CFLAGS = -DPAPER=\"$(PAPER)\" -DUNIX $(RPM_OPT_FLAGS) $(LANGINFO_FLAG) -Wall
|
||||
|
||||
BIN = psbook psselect pstops epsffit psnup \
|
||||
psresize
|
27
psutils.spec
27
psutils.spec
@ -1,17 +1,15 @@
|
||||
Summary: PostScript Utilities
|
||||
Name: psutils
|
||||
Version: 1.17
|
||||
Release: 11
|
||||
Copyright: distributable
|
||||
Release: 13
|
||||
License: distributable
|
||||
Group: Applications/Publishing
|
||||
Source: ftp://ftp.dcs.ed.ac.uk/pub/ajcd/psutils-p17.tar.gz
|
||||
Patch0: psutils-p17-Makefile.patch
|
||||
Patch1: psutils-p17-misc.patch
|
||||
Patch2: psutils-p17-paper.patch
|
||||
BuildRoot: %{_tmppath}/psutils-root
|
||||
|
||||
# Patch1 derived from
|
||||
# jurix.jura.uni-sb.de/pub/linux/source/networking/printing/psutils.dif
|
||||
|
||||
%description
|
||||
This archive contains some utilities for manipulating PostScript documents.
|
||||
Page selection and rearrangement are supported, including arrangement into
|
||||
@ -19,8 +17,9 @@ signatures for booklet printing, and page merging for n-up printing.
|
||||
|
||||
%prep
|
||||
%setup -q -n psutils
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch0 -p1 -b .makefile
|
||||
%patch1 -p1 -b .misc
|
||||
%patch2 -p1 -b .paper
|
||||
|
||||
%build
|
||||
make -f Makefile.unix RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
|
||||
@ -28,7 +27,9 @@ make -f Makefile.unix RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
make -f Makefile.unix MANDIR=$RPM_BUILD_ROOT/usr/share/man/man1 DESTDIR=$RPM_BUILD_ROOT install
|
||||
make -f Makefile.unix \
|
||||
MANDIR=$RPM_BUILD_ROOT%{_mandir}/man1 \
|
||||
DESTDIR=$RPM_BUILD_ROOT install
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
@ -37,10 +38,18 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%defattr(0644, root, root, 0755)
|
||||
%doc README LICENSE
|
||||
%attr(0755, root, root) /usr/bin/*
|
||||
/usr/share/man/*/*
|
||||
%{_mandir}/*/*
|
||||
/usr/lib/psutils
|
||||
|
||||
%changelog
|
||||
* Thu Jul 19 2001 Than Ngo <than@redhat.com> 1.17-13
|
||||
- add patch from enrico.scholz@informatik.tu-chemnitz.de
|
||||
|
||||
* Fri Jul 13 2001 Than Ngo <than@redhat.com> 1.17-12
|
||||
- media size as letter (Bug #48831)
|
||||
- Copyright->License
|
||||
- don't hardcode manpath
|
||||
|
||||
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
|
||||
- Bump release + rebuild.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user