Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37410085
en ru br
Репозитории ALT
S:1.0.1-alt3.20050907.qa1
5.1: 1.0.1-alt3.20050907
4.1: 1.0.1-alt2.M41.1.20050907
4.0: 1.0.1-alt2.20060221
3.0: 1.0.1-alt1
www.altlinux.org/Changes

Группа :: Издательство
Пакет: poster

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: poster_20050907-1.diff
Скачать


--- poster-20050907.orig/poster.c
+++ poster-20050907/poster.c
@@ -42,10 +42,20 @@
 #  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 #  Boston, MA 02111-1307, USA.
 #
+# Modification for Debian by Antti-Juhani Kaijanaho <ajk@debian.org>
+# on 1999-05-20
+# 
+# Adaptation of version 20050907 by Daniel Hermann <hermann@tfp.uka.de>
+#
 */
 
 #define Gv_gs_orientbug 1
-#define DefaultMedia  "A4"
+#ifdef HAVE_LIBPAPER
+#  include <paper.h>
+#  define DefaultMedia (systempapername())
+#else /* HAVE_LIBPAPER */
+#  define DefaultMedia  "A4"
+#endif /* HAVE_LIBPAPER */
 #define DefaultImage  "A4"
 #define DefaultCutMargin "5%"
 #define DefaultWhiteMargin "0"
@@ -955,6 +965,7 @@
 	        "tiledict begin\n"
 	        "%% delay users showpage until cropmark is printed.\n"
 	        "/showpage {} def\n"
+	        "/setpagedevice { pop } def\n"
 	        "end\n",
 	        scale, (int)(cutmargin[0]), (int)(cutmargin[1]),
 	        (int)(mediasize[2]-2.0*cutmargin[0]), (int)(mediasize[3]-2.0*cutmargin[1]),
@@ -1012,16 +1023,26 @@
 	/* fill first buffer for the first time */
 	fgets( buf[bp=0], BUFSIZE, stdin);
 
+/* DSC comment starts with %% and has at least 1 more character.  */
+#define IS_DSC(x) ( x[0]&&x[1]&&x[2] && (x[0]=='%')&&(x[1]=='%') )
+
 	/* read subsequent lines by rotating the buffers */
 	while (fgets(buf[1-bp], BUFSIZE, stdin))
 	{	
-		if ( !strncmp( buf[ bp ], "%%Page:", 7 ) )
-			currentpage++;
+	        /* We can not rely on DSC compliant input that correctly
+		   uses "%%Page:" comments. Embedded figures may also have
+		   such comments. So multi-page poster printing seems to be
+		   broken anyway. Break it a little more in favour of
+		   single-page posters until a better page separator is
+		   implemented (DH).
+		*/
+		/* if ( !strncmp( buf[ bp ], "%%Page:", 7 ) )
+			currentpage++; */
 
 		/* print line from the previous fgets */
 		/* do not print postscript comment lines: those (DSC) lines */
 		/* sometimes disturb proper previewing of the result with ghostview */
-		if (buf[bp][0] != '%' && ( currentpage == -1 || currentpage == pagetoprint ))
+		if (!IS_DSC(buf[bp]) && ( currentpage == -1 || currentpage == pagetoprint ))
 			fputs( buf[bp], stdout);
 		bp = 1-bp;
 	}
@@ -1032,8 +1053,9 @@
 	{	tail_cntl_D = 1;
 		*c = '\0';
 	}
-	if (buf[bp][0] != '%' && strlen( buf[bp]))
+	if (!IS_DSC(buf[bp]) && strlen( buf[bp]))
 		fputs( buf[bp], stdout);
+#undef IS_DSC
 }
 
 static int mystrncasecmp( const char *s1, const char *s2, int n)
--- poster-20050907.orig/Makefile
+++ poster-20050907/Makefile
@@ -1,8 +1,14 @@
-CFLAGS = -g -Wall
-#CFLAGS = -O2 -Wall
+# on Debian:
+DEFINES  = -DHAVE_LIBPAPER
+CFLAGS = -O2 -g -Wall
+LIBS = -lm -lpaper
+# elsewhere
+#DEFINES = # nothing
+#CFLAGS = -g -Wall
+#LIBS = -lm
 
 poster: poster.c
-	gcc $(CFLAGS) -o poster poster.c -lm
+	gcc $(CFLAGS) -o poster $(DEFINES) poster.c $(LIBS)
 
 # HPUX:	cc -O -Aa -D_POSIX_SOURCE -o poster poster.c -lm
 #       Note that this program might trigger a stupid bug in the HPUX C library,
--- poster-20050907.orig/poster.1
+++ poster-20050907/poster.1
@@ -75,7 +75,12 @@
 -m <box>
 Specify the desired media size to print on. See below for <box>.
 .br
-The default is set at compile time, being A4 in the standard package.
+The default is obtained from the PAPERCONF environment variable.  If
+it is not set, it is read from the file whose name is in the PAPERSIZE
+environment variable.  If that too is not set, the default is read
+from the file /etc/papersize.  See
+.BR papersize (5)
+for a full description of the format of the config file.
 .TP
 -p <box>
 Specify the poster size. See below for <box>.
@@ -142,7 +147,7 @@
 In general:
      <box> = [<multiplier>][<offset>]<unit>
 .br
-with multipier and offset being specified optionally.
+with multiplier and offset being specified optionally.
      <multiplier> = <number>*<number>
 .br
      <offset> = +<number>,<number>
@@ -188,11 +193,11 @@
 to just vector data which is essentially resolution independent),
 you might have this problem.
 Such pixel images are normally made to fit well to standard 300 (or 600) dpi devices.
-Scaling such a picture with an uncarefully chosen factor,
+Scaling such a picture with an carelessly chosen factor,
 can easily lead to hazy edges and interference patterns on the output.
 The solution is to provide \fIposter\fP with an exact scaling factor
 (with the -s option), chosen as an integer. If integer scaling is
-unpractical for your purpose,
+impractical for your purpose,
 choose a fractional number made from a small integer denominator (2, 3, 4).
 .SS "Can I select only a small part of a given input picture?"
 Yes, for this purpose you can define both the size (width and height)
@@ -295,11 +300,11 @@
 fonts.
 .P
 However the copy(s) of the input file included in the output,
-are stripped from all lines starting with a `%', since they tend to
+are stripped from all lines starting with a `%%', since they tend to
 disturb our `ghostview' previewer and take useless space anyhow.
 
 .SH "SEE ALSO"
-ghostview(1)
+.BR ghostview "(1), " papersize (5)
 
 .SH "CONTRIBUTED BY"
 .nf
--- poster-20050907.orig/debian/copyright
+++ poster-20050907/debian/copyright
@@ -0,0 +1,27 @@
+This package was debianized by Antti-Juhani Kaijanaho <ajk@debian.org>
+on 1999-05-20 at the request from J.H.M Dassen (Ray).
+
+The original source was fetched from
+  ftp://ftp.ics.ele.tue.nl/pub/users/jos/poster/poster.tar.gz
+and the newer version (20050907) was downloaded from
+  ftp://ftp.kde.org/pub/kde/printing/poster-20050907.tar.bz2
+
+The program has the following copyright notice:
+
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public
+#  License version 2 as published by the Free Software Foundation.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  General Public License for more details.
+#
+#  You should have received a copy of the GNU Library General Public License
+#  along with this library; see the file COPYING.  If not, write to
+#  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+#  Boston, MA 02111-1307, USA.
+
+The file COPYING in the source distribution contains Version 2 of the
+GNU General Public License.  The same version of the license is
+included in Debian systems as the file /usr/share/common-licenses/GPL .
--- poster-20050907.orig/debian/changelog
+++ poster-20050907/debian/changelog
@@ -0,0 +1,100 @@
+poster (1:20050907-1) unstable; urgency=low
+
+  [ Daniel Hermann ]
+  * New upstream version introducing command line options necessary for
+    kdeprint (Closes: #379378, #379422, #464096)
+  * reapplying patches that previously fixed #255718, #323535
+  * not applying patch that previously fixed #339038, since it no
+    longer fixes the problem. Instead introducing "/setpagedevice {
+    pop } def" (line 968), taken from diff between 19990428 and 20050907).
+  * could not check #361088, test file no longer available
+  * multi-page poster printing may be broken to allow for non-DSC-compliant
+    single-page poster printing (e.g. containing "%%Page:" comments from
+    embedded EPS images).
+
+ -- Peter S Galbraith <psg@debian.org>  Thu, 27 Mar 2008 08:57:17 -0400
+
+poster (1:19990428-8) unstable; urgency=low
+
+  * Bug fix: "poster: Lines starting with '%' stripped from output ",
+    thanks to Antal K for the report and the patch (Closes: #255718).
+  * Bug fix: "Output of poster is not the correct Postscript file", thanks
+    to Wojtek Zabolotny for the report and the patch (Closes: #339038).
+
+ -- Peter S Galbraith <psg@debian.org>  Wed, 17 May 2006 19:54:03 -0400
+
+poster (1:19990428-7) unstable; urgency=low
+
+  * Reverting back to original version since replacement has bugs and was
+    abandoned upstream.  Introduced epoch in version number.
+  * Bug fix: "'man poster' typos: "multipier", "unpractical"; and
+    "uncarefully", thanks to A Costa (Closes: #323535).
+
+ -- Peter S Galbraith <psg@debian.org>  Thu,  6 Apr 2006 21:34:18 -0400
+
+poster (20020830-3) unstable; urgency=low
+
+  * Bug fix: "poster: FTBFS: Build dependency on libpaperg-dev", changed to
+    libpaper-dev thanks to Kurt Roeckx (Closes: #346402).
+  * Bumped Standards-Version to 3.6.2
+
+ -- Peter S Galbraith <psg@debian.org>  Tue, 17 Jan 2006 20:42:47 -0500
+
+poster (20020830-2) unstable; urgency=low
+
+  * Applied band-aid patch for scale factor with the '-s' option
+    contributed by Dylan Thurston <dpt@math.harvard.edu> (closes: #186637)
+  * Use libpaper patch, which somehow didn't get applied in previous
+    upload (closes: #188349)
+  * Bumped Standards-Version to 3.5.9 (okay except for optimization).
+
+ -- Peter S Galbraith <psg@debian.org>  Wed,  9 Apr 2003 13:01:36 -0400
+
+poster (20020830-1) unstable; urgency=low
+
+  * New upstream release with new upstream maintainer (closes: #158795).  
+  * debian/control: better description (closes: #149914)
+  * Switch to debhelper (for easier handling of DEB_BUILD_OPTIONS)
+  * Upgraded Standards-Version to 3.5.7 (except for optimization).
+  
+ -- Peter S Galbraith <psg@debian.org>  Wed, 25 Sep 2002 14:36:35 -0400
+
+poster (19990428-6) unstable; urgency=low
+
+  * Upgraded Standards-Version to 3.2.1 (Added Build-Depends)
+
+ -- Peter S Galbraith <psg@debian.org>  Wed, 21 Feb 2001 13:50:51 -0500
+
+poster (19990428-5) unstable; urgency=low
+
+  * New maintainer.
+
+ -- Peter S Galbraith <psg@debian.org>  Sun, 21 May 2000 23:14:14 -0400
+
+poster (19990428-4) unstable; urgency=low
+
+  * debian/{rules,postinst,prerm}: Implement the /usr/doc transition.
+  * debian/rules: Use -isp with dpkg-gencontrol.
+
+ -- Antti-Juhani Kaijanaho <ajk@debian.org>  Fri,  8 Oct 1999 00:53:12 +0300
+
+poster (19990428-3) unstable; urgency=low
+
+  * Signed the changes and dsc.
+
+ -- Antti-Juhani Kaijanaho <ajk@debian.org>  Thu,  1 Jul 1999 15:39:05 +0300
+
+poster (19990428-2) unstable; urgency=low
+
+  * Upgraded Standards-Version to 3.0.0.0 with necessary
+    changes to debian/rules and debian/changelog
+
+ -- Antti-Juhani Kaijanaho <ajk@debian.org>  Thu,  1 Jul 1999 15:21:34 +0300
+
+poster (19990428-1) unstable; urgency=low
+
+  * Initial release.
+
+ -- Antti-Juhani Kaijanaho <ajk@debian.org>  Thu, 20 May 1999 17:28:45 +0300
+
+
--- poster-20050907.orig/debian/control
+++ poster-20050907/debian/control
@@ -0,0 +1,18 @@
+Source: poster
+Maintainer: Peter S Galbraith <psg@debian.org>
+Section: text
+Priority: optional
+Build-Depends: debhelper (>> 4.0.0), libpaper-dev
+Standards-Version: 3.7.3
+
+Package: poster
+Architecture: any
+Section: text
+Priority: optional
+Depends: ${shlibs:Depends}
+Description: Create large posters out of PostScript pages
+ Poster takes a one-page PostScript file and scales it to a specified
+ size.  It can tile the resulting image into multiple smaller pages
+ that can be pasted together to form the big poster.  Poster prefers
+ EPS as its input although freer forms of PostScript are also
+ understood.
--- poster-20050907.orig/debian/rules
+++ poster-20050907/debian/rules
@@ -0,0 +1,62 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This is the debhelper compatibility version to use.
+export DH_COMPAT=4
+
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -g
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+	STRIP += -s
+endif
+
+build: build-stamp
+
+build-stamp:
+	dh_testdir
+	$(MAKE)
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+	-$(MAKE) clean
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+	install -d debian/poster/usr/bin
+	install $(STRIP) poster debian/poster/usr/bin
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installdocs README
+	dh_installman poster.1
+	dh_installchangelogs
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin