--- xcal-4.1.orig/debian/menu
+++ xcal-4.1/debian/menu
@@ -0,0 +1,2 @@
+?package(xcal):needs="X11" section="Applications/Normal applications"\
+ title="xcal" command="/usr/bin/xcal"
--- xcal-4.1.orig/debian/postinst
+++ xcal-4.1/debian/postinst
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# postinst for xcal
+#############################################
+set -e
+
+#DEBHELPER#
+
+# clean up the symlink to xcal.real that was created by the xaw wrappers
+# to point to xcal.real (which is no longer part of the package)
+if [ -L /etc/alternatives/xcal ] ; then
+ update-alternatives --remove xcal /usr/bin/xcal.real
+ update-alternatives --remove xcal /usr/share/xaw-wrappers/wrapper
+fi
--- xcal-4.1.orig/debian/copyright
+++ xcal-4.1/debian/copyright
@@ -0,0 +1,55 @@
+This package was debianized by tony mancill <tmancill@debian.org> on
+Sun, 19 Dec 1999 01:50:27 -0700, with assistance from Austin Donnelly
+<and1000@debian.org> who put together the package originally.
+
+It was downloaded from ftp.hillside.co.uk:/xcal/xcal41.tar.Z
+
+The sources were unshar'ed, patched with the author's patches
+(PATCH.xcalpr, PATCHES and PATCHES95) and repacked to form a tar file.
+
+Upstream Author: Peter Collinon <pc@hillside.co.uk>
+
+Copyright:
+
+From the README:
+
+ This is free... however, if you are going to make some profit from
+ this, then perhaps you should consider passing something back to me
+ since I am freelance and mostly don't get paid everyday.
+
+ Peter Collinson
+ Hillside Systems
+ 61 Hillside Avenue
+ Canterbury
+ Kent, CT2 8HA
+
+ Phone: +44 227 761824
+ Fax: +44 227 762554
+ Email: pc@hillside.co.uk
+
+ 7/November/1993
+
+And from xcal.c:
+
+* (C) Copyright: 1989 Hillside Systems/Peter Collinson
+
+ Permission to use, copy, modify, and distribute this software
+ and its documentation for any purpose is hereby granted to
+ anyone, provided that the above copyright notice appear
+ in all copies and that both that copyright notice and this
+ permission notice appear in supporting documentation, and that
+ the name of Peter Collinson not be used in advertising or
+ publicity pertaining to distribution of the software without
+ specific, written prior permission. Hillside Systems makes no
+ representations about the suitability of this software for any
+ purpose. It is provided "as is" without express or implied
+ warranty.
+
+ Peter Collinson DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS, IN NO EVENT SHALL Peter Collinson BE LIABLE FOR
+ ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ PERFORMANCE OF THIS SOFTWARE.
--- xcal-4.1.orig/debian/docs
+++ xcal-4.1/debian/docs
@@ -0,0 +1,7 @@
+README
+README.contents
+README.install
+README.install
+README.sunos
+TODO
+debian/patches/xcal-brederlow.patch
--- xcal-4.1.orig/debian/control
+++ xcal-4.1/debian/control
@@ -0,0 +1,19 @@
+Source: xcal
+Section: misc
+Priority: optional
+Maintainer: Lars Bahner <bahner@debian.org>
+Build-Depends: debhelper, libxt-dev, libxaw7-dev, xutils-dev, dpatch
+Standards-Version: 3.8.0
+
+Package: xcal
+Architecture: any
+Depends: ${shlibs:Depends}
+Recommends: lpr
+Description: a graphical calendar with memos and reminder alarms
+ The "classic" calendar app with memos and alarms, xcal normally
+ sits idle and displays the date. When clicked on, pops up a `strip'
+ for this month. Clicking on a day allows you to enter details.
+ Automatically parses times entered, and reminds you 5 minutes
+ before your appointment.
+ .
+ Supports daily and weekly repeating events and context-sensitive help.
--- xcal-4.1.orig/debian/README.Debian
+++ xcal-4.1/debian/README.Debian
@@ -0,0 +1,3 @@
+It would seem the internationalization patches applied to pscal were not really working, so I reverted them. I someone screams loudly enough I might reapply them , but i somewhat doubt that.
+
+The patch is added to /usr/share/doc/xcal/, so you might reapply it yourself if desperately needed.
--- xcal-4.1.orig/debian/manpages
+++ xcal-4.1/debian/manpages
@@ -0,0 +1,5 @@
+xcal.man
+pscal/pscal.man
+xcal_cal/xcal_cal.man
+xcalev/xcalev.man
+xcalpr/xcalpr.man
--- xcal-4.1.orig/debian/rules
+++ xcal-4.1/debian/rules
@@ -0,0 +1,81 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# modification history:
+#
+####################################################################
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+include /usr/share/dpatch/dpatch.make
+
+build: build-stamp patch
+build-stamp:
+ dh_testdir
+
+ # Add here commands to compile the package.
+ xmkmf
+ make Makefiles
+ make derived
+ make depend
+ make
+
+
+ touch build-stamp
+
+clean: unpatch
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp
+
+ # Add here commands to clean up after the build process.
+ [ ! -f Makefile ] || $(MAKE) clean
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ # Add here commands to install the package into debian/xcal.
+ #$(MAKE) install DESTDIR=`pwd`/debian/xcal
+ install -D xcal debian/xcal/usr/bin/xcal
+ install -D xcalpr/xcalpr debian/xcal/usr/bin/xcalpr
+ install -D xcalev/xcalev debian/xcal/usr/bin/xcalev
+ install -D xcal_cal/xcal_cal debian/xcal/usr/bin/xcal_cal
+ install -D pscal/pscal.script debian/xcal/usr/bin/pscal
+
+ # install the app-defaults
+ install -D -p -m 644 XCal.ad debian/xcal/etc/X11/app-defaults/XCal
+
+ touch install-stamp
+
+# 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
+ dh_installmenu
+ dh_installman
+ dh_installchangelogs CHANGES
+
+ 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
--- xcal-4.1.orig/debian/changelog
+++ xcal-4.1/debian/changelog
@@ -0,0 +1,181 @@
+xcal (4.1-19) unstable; urgency=low
+
+ * Applied the patch to correct #496393 instead of reverting it :(
+ (closes: #496393). Thanks to Thijs Kinkhorst for noticing.
+
+ -- Lars Bahner <bahner@debian.org> Mon, 25 Aug 2008 11:54:26 +0200
+
+xcal (4.1-18.5) unstable; urgency=low
+
+ * Removed internationlization patch from pscal. As it didn't work
+ properly.
+ * Fixed incorrect tempfile handling in pscal (closes: #496393)
+ * Added recommendation on lpr
+
+ -- Lars Bahner <bahner@debian.org> Sun, 24 Aug 2008 21:26:18 +0000
+
+xcal (4.1-18.4) unstable; urgency=low
+
+ * Fixed build-depends (closes: #485537)
+ * Cleaned lintian warnings
+
+ -- Lars Bahner <bahner@debian.org> Thu, 21 Aug 2008 19:31:25 +0000
+
+xcal (4.1-18.3) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Migrate from /usr/X11R6 to /usr. Closes: #362907, #377445.
+ * xcal_cal/xcal_cal.man: Fix section for dh_installman.
+
+ -- Matej Vela <vela@debian.org> Sun, 16 Jul 2006 10:37:15 +0200
+
+xcal (4.1-18.2) unstable; urgency=high
+
+ * Non-maintainer upload.
+ * High-urgency upload for RC bugfix.
+ * Build-depend on libxt-dev and x-dev instead of on the obsolete xlibs-dev;
+ thanks to Justin Pryzby <justinpryzby@users.sf.net> for testing.
+ Closes: #346778.
+
+ -- Steve Langasek <vorlon@debian.org> Fri, 20 Jan 2006 11:08:03 -0800
+
+xcal (4.1-18.1) unstable; urgency=low
+
+ * Non-Maintainer Upload (BSP 2005-08-07).
+ * Fixed FTBFS with gcc 3.4 / 4.0 by applying patch from
+ Andreas Jochens (Closes: #259930).
+
+ -- Uwe Hermann <uwe@debian.org> Sun, 7 Aug 2005 01:19:54 +0200
+
+xcal (4.1-18) unstable; urgency=low
+
+ * New maintainer (closes: #202226)
+ * Standards 3.6.1
+ * debian rules/cleanup
+
+ -- Lars Bahner <bahner@debian.org> Tue, 18 Nov 2003 21:38:48 +0100
+
+xcal (4.1-17) unstable; urgency=low
+
+ * orphaned; maintainer set to packages@qa.debian.org
+
+ -- tony mancill <tmancill@debian.org> Sun, 20 Jul 2003 20:27:31 -0700
+
+xcal (4.1-16) unstable; urgency=low
+
+ * fix for non-portable shell problem in postinst (closes: #186075)
+
+ -- tony mancill <tmancill@debian.org> Sun, 30 Mar 2003 10:16:25 -0800
+
+xcal (4.1-15) unstable; urgency=low
+
+ * removed bogus #ifdef for MIPS includes (closes: #184734)
+
+ -- tony mancill <tmancill@debian.org> Sun, 16 Mar 2003 17:02:25 -0800
+
+xcal (4.1-14) unstable; urgency=low
+
+ * fixed menu file (closes: #153212)
+ * removing the alternative created by the Xaw wrappers
+
+ -- tony mancill <tmancill@debian.org> Sat, 8 Feb 2003 21:00:13 -0800
+
+xcal (4.1-13) unstable; urgency=low
+
+ * explicit dependency on xaw (no more dh_installxaw) (closes: #164073)
+
+ -- tony mancill <tmancill@debian.org> Thu, 2 Jan 2003 21:16:22 -0800
+
+xcal (4.1-12) unstable; urgency=low
+
+ * updated debian/control description text (closes: #131311)
+ * added /etc/X11/app-defaults/XCal resource file (closes: #131286)
+
+ -- tony mancill <tmancill@debian.org> Mon, 28 Jan 2002 21:11:48 -0800
+
+xcal (4.1-11) unstable; urgency=low
+
+ * removed xaw-wrappers support/call to dh_installxaw (closes: #120230)
+ * rebuilt binary against xfree 4.x for woody release
+
+ -- tony mancill <tmancill@debian.org> Sun, 25 Nov 2001 23:14:11 -0800
+
+xcal (4.1-10) unstable; urgency=low
+
+ * closes: Bug#81784 (build dependency on xutils)
+
+ -- tony mancill <tmancill@mancill.com> Fri, 12 Jan 2001 01:08:09 -0700
+
+xcal (4.1-9) stable unstable; urgency=low
+
+ * closes Bug#80504 (pscal gets January 2001 wrong!)
+ * cleaned up debian/ directory and updated standards
+
+ -- tony mancill <tmancill@debian.org> Wed, 27 Dec 2000 00:33:31 -0700
+
+xcal (4.1-8) frozen unstable; urgency=low
+
+ * closes bug #56393 (bad date in pscal), introduced by patches in -7
+ * upload into frozen b/c pscal is worthless (prints incorrect dates)
+
+ -- tony mancill <tmancill@debian.org> Sun, 30 Jan 2000 20:53:43 -0700
+
+xcal (4.1-7) unstable; urgency=low
+
+ * fixed the glaring lack of manpages in the Debian package
+ * patches (all submitted by <goswin.brederlow@student.uni-tuebingen.de>)
+ * pscal: internationalization (added german)
+ * pscal: added option to exclude mini calendars
+ * pscal: added option to use Monday as first day of the week
+ * pscal: added option to write big numbers centered in the boxes
+ * pscal: small typos fixed in the manpage (spaces left out)
+ * Fixes Bug#53078 (wishlist for the above patches)
+
+ -- tony mancill <tmancill@debian.org> Fri, 31 Dec 1999 01:07:18 -0700
+
+xcal (4.1-6) unstable; urgency=low
+
+ * converted package to debhelper.
+ * added xaw-wrapper support (fixes bug #38702)
+ * conffiles present during build (fixes bug #52790
+
+ -- tony mancill <tmancill@debian.org> Sun, 19 Dec 1999 01:50:27 -0700
+
+xcal (4.1-5) unstable; urgency=low
+
+ * new maintainer
+ * recompiled for potato
+ * app.defaults no longer a conffile - fixes Bug#21652, Bug#18503
+ * copyright no longer compressed - fixed Bug#14458
+
+ -- tony mancill <tmancill@debian.org> Sun, 5 Dec 1999 13:09:21 -0700
+
+xcal (4.1-4) unstable; urgency=low
+
+ * recompiled for libc6
+
+ -- Austin Donnelly <and1000@debian.org> Sun, 5 Dec 1999 12:41:32 -0700
+
+
+xcal (4.1-3) unstable; urgency=low
+
+ * Moved to the new source packaging scheme (finally). Fixes Bug#9516.
+ * App-defaults is not a conffile anymore. Fixes Bug#3292.
+ * Man pages now compressed.
+ * Ship with upstream README, CHANGES, and sample.regular file.
+ * Strip binaries. Fixes Bug#5114.
+
+ -- Austin Donnelly <and1000@debian.org> Sun, 22 Jun 1997 15:40:07 +0100
+
+
+Tue Apr 16 16:36:47 1996 Austin Donnelly <and1000@valour.pem.cam.ac.uk>
+
+ * recompiled as ELF
+ * release xcal-4.1-2
+
+
+Tue Nov 14 21:56:17 1995 Austin Donnelly <and1000@valour.pem.cam.ac.uk>
+
+ * added Debian GNU/Linux package maintenance system files
+ * Patched with author's patches, PATCH.xcalpr, PATCHES and
+ PATCHES95
--- xcal-4.1.orig/debian/compat
+++ xcal-4.1/debian/compat
@@ -0,0 +1 @@
+5
--- xcal-4.1.orig/debian/patches/00List
+++ xcal-4.1/debian/patches/00List
@@ -0,0 +1,3 @@
+00List
+01_pscal_tempfile.patch
+xcal-brederlow.patch
--- xcal-4.1.orig/debian/patches/xcal-brederlow.patch
+++ xcal-4.1/debian/patches/xcal-brederlow.patch
@@ -0,0 +1,347 @@
+--- xcal-4.1/pscal/pscal.man Wed Oct 11 18:37:46 1995
++++ xcal-4.1-mrvn/pscal/pscal.man Sun Dec 19 17:15:54 1999
+@@ -71,10 +71,21 @@
+ output in a file, or if you want to use options with the
+ .IR lpr (1)
+ command.
+-.IP "\-F\fIfont\fR" 1i
++.IP "\-F \fIfont\fR" 1i
+ Sets the font family for the title text (the month and year).
+-.IP "\-f\fIfont\fR" 1i
++.IP "\-f \fIfont\fR" 1i
+ Sets the font family for the day-of-month numbers.
++.IP "\-\-no-mini" 1i
++Don´t insert previous and next month mini calendars.
++.IP "\-\-big-num" 1i
++Print big numbers centered in the boxes (as in the mini calendars).
++.IP "\-\-german-week-days" 1i
++Start the week with Monday.
++.IP "\-\-lang \fiLANG\fR" 1i
++Print Month and Day names in LANG. Currently de_DE will give german
++text, everything else defaults to english. The default enviroment
++variable LANG will be used normaly but gets overwritten by this
++option.
+ .PP
+ Other arguments starting with `\-' are passed through to
+ .IR lpr (1).
+--- xcal-4.1/pscal/pscal.script Wed Oct 11 18:38:06 1995
++++ xcal-4.1-mrvn/pscal/pscal.script Sun Dec 19 17:08:20 1999
+@@ -67,7 +67,7 @@
+ # Doesn't deal well with September 1752 or before.
+ #
+
+-USAGE="Usage: pscal [ -Rrt ] [ -F hfont ] [ -f font ] [-d directory] [ month [ year ] ]"
++USAGE="Usage: pscal [ -Rrt ] [ -F hfont ] [ -f font ] [-d directory] [ --no-mini ] [ --big-num ] [ --german-week-days ] [ --lang LANG ] [ month [ year ] ]"
+
+ TFONT=Times-Bold
+ DFONT=Helvetica-Bold
+@@ -82,6 +82,10 @@
+
+ LPR="lpr"
+
++NO_MINI=0
++BIG_NUM=0
++GERMAN_WEEK_DAYS=0
++
+ while test $# != 0
+ do
+ case $1 in
+@@ -99,6 +103,10 @@
+ -R) ROTATE=0; SCALE="0.75 0.75"; TRANSLATE="50 900"; shift;;
+ -d) test $# -lt 2 && { echo "$USAGE" 1>&2; exit 1; }
+ Calendar="$2"; shift; shift;;
++ --no-mini) NO_MINI=1; shift;;
++ --big-num) BIG_NUM=1; shift;;
++ --german-week-days) GERMAN_WEEK_DAYS=1; shift;;
++ --lang) LANG="$2"; shift; shift;;
+ --|-) break;;
+ -*) eval ENVAR=\"$ENVAR $1\"; shift;;
+ *) break
+@@ -181,6 +189,19 @@
+ for(i = 4; i <= NF; i++) printf(":%s", $i);printf(")\n"); }'`
+ esac
+
++case "$LANG" in
++ de_DE)
++ MONTH_NAMES="[ (Januar) (Februar) (März) (April) (Mai) (Juni) (Juli) (August) (September) (October) (November) (December) ]"
++ WEEK_NAMES="[ (Sonntag) (Montag) (Dienstag) (Mittwoch) (Donnerstag) (Freitag) (Samstag) ]"
++ WEEK_NAMES_GERMAN="[ (Montag) (Dienstag) (Mittwoch) (Donnerstag) (Freitag) (Samstag) (Sonntag) ]"
++ ;;
++ *)
++ MONTH_NAMES="[ (January) (February) (March) (April) (May) (June) (July) (August) (September) (October) (November) (December) ]"
++ WEEK_NAMES="[ (Sunday) (Monday) (Tuesday) (Wednesday) (Thursday) (Friday) (Saturday) ]"
++ WEEK_NAMES_GERMAN="[ (Monday) (Tuesday) (Wednesday) (Thursday) (Friday) (Saturday) (Sunday) ]"
++ ;;
++esac
++
+ $LPR $ENVAR <<END-OF-CALENDAR
+ %!
+ % PostScript program to draw calendar
+@@ -210,16 +231,27 @@
+ % "August", "April" and "February" could stand to be kerned even if you do
+
+ /month_names
+-[ (January) (February) (March) (April) (May) (June) (July)
+-(August) (September) (October) (November) (December) ]
++$MONTH_NAMES
+ def
+
+-/day_names
+-[ (Sunday) (Monday) (Tuesday) (Wednesday) (Thursday) (Friday) (Saturday) ]
+-def
++/germanweekdays $GERMAN_WEEK_DAYS def
++germanweekdays 0 eq
++{
++ /day_names
++ $WEEK_NAMES
++ def
++}
++{
++ /day_names
++ $WEEK_NAMES_GERMAN
++ def
++} ifelse
+
+ % layout parameters - you can change these, but things may not look nice
+
++/nomini $NO_MINI def
++/bignum $BIG_NUM def
++
+ /daywidth 100 def
+ /dayheight 95 def
+
+@@ -236,7 +268,10 @@
+ % layout constants - don't change these, things probably won't work
+
+ /rows 5 def
+-/subrows 6 def
++bignum 0 ne {
++/rows rows 1 add def
++} if
++/last_row_y dayheight rows mul topgridmarg sub neg def
+
+ % calendar constants - change these if you want a French revolutionary calendar
+
+@@ -260,7 +295,7 @@
+ } def
+
+ /weekday { % weekday (range 0-6) for integer date
+- days_week mod
++ days_week mod
+ } def
+
+ /startday { % starting day-of-week for this month
+@@ -281,7 +316,7 @@
+ } if
+ /off exch off add def
+ } for
+- off weekday % 0--Sunday, 1--monday, etc.
++ off 1 sub weekday % 0--Sunday, 1--monday, etc.
+ } def
+
+ /prtevent { % event-string day prtevent
+@@ -349,8 +384,13 @@
+ {
+ /rowsused rows 1 sub def
+ }
+- {
+- /rowsused rows def
++ {bignum 0 ne
++ {
++ /rowsused rows 1 sub def
++ }
++ {
++ /rowsused rows def
++ } ifelse
+ }
+ ifelse
+ 0 1 rowsused {
+@@ -367,14 +407,14 @@
+
+ /drawnums { % place day numbers on calendar
+ dayfont findfont datefontsize
+- submonth 0 ne
++ submonth 0 ne bignum 0 ne or
+ {
+ 2.5 mul
+ } if scalefont setfont
+ /start startday def
+ /days ndays def
+ start daywidth mul dayleftmarg add daytopmarg rmoveto
+- submonth 0 ne
++ submonth 0 ne bignum 0 ne or
+ {
+ dayleftmarg neg dayheight -2 div rmoveto
+ } if
+@@ -401,8 +441,13 @@
+ {
+ day prtdouble
+ }
+- {
+- day prtnum
++ { bignum 0 eq
++ {
++ day prtnum
++ }
++ {
++ day daywidth centernum
++ } ifelse
+ } ifelse
+ }
+ {
+@@ -469,7 +514,7 @@
+ /start startday def
+ /days ndays def
+ currentpoint /y0 exch def /x0 exch def
+- submonth 0 eq
++ submonth 0 eq nomini 0 eq and
+ {
+ usefirst
+ {
+@@ -497,15 +542,28 @@
+ daywidth 0 rmoveto
+ } for
+ x0 y0 moveto
+- submonth 0 ne
+- {
+- /lastday rows 1 add days_week mul def
+- days_week 1 sub daywidth mul -440 rmoveto
++ submonth 0 ne
++ { bignum 0 eq
++ {
++ /lastday rows 1 add days_week mul def
++ days_week 1 sub daywidth mul last_row_y rmoveto
++ }
++ {
++ /lastday rows days_week mul def
++ days_week 1 sub daywidth mul last_row_y dayheight add rmoveto
++ } ifelse
+ }
+- {
+- /lastday rows days_week mul 2 sub fillstart add def
+- days_week 3 sub fillstart add daywidth mul
+- -440 dayheight add rmoveto
++ { nomini 0 ne
++ {
++ /lastday rows days_week mul fillstart add def
++ days_week 1 sub fillstart add daywidth mul
++ last_row_y dayheight add rmoveto
++ }
++ {
++ /lastday rows days_week mul 2 sub fillstart add def
++ days_week 3 sub fillstart add daywidth mul
++ last_row_y dayheight add rmoveto
++ } ifelse
+ } ifelse
+ lastday -1 ndays start 1 add add
+ {
+@@ -519,8 +577,8 @@
+ grestore
+ day weekday 1 eq
+ {
+- x0 y0 moveto
+- days_week 1 sub daywidth mul -440 dayheight add rmoveto
++% x0 y0 moveto
++ days_week 1 sub daywidth mul dayheight rmoveto
+ }
+ {
+ daywidth neg 0 rmoveto
+@@ -586,52 +644,52 @@
+ $TRANSLATE translate
+ /submonth 0 def
+ calendar
+-/eventflag false def
+-month 1 sub 0 eq
+-{
+- /lmonth 12 def
+- /lyear year 1 sub def
+-}
+-{
+- /lmonth month 1 sub def
+- /lyear year def
+-} ifelse
+-month 1 add 13 eq
+-{
+- /nmonth 1 def
+- /nyear year 1 add def
+-}
+-{
+- /nmonth month 1 add def
+- /nyear year def
+-} ifelse
+-usefirst
+-{
+- 0 30 translate
+-}
+-{
+- days_week 2 sub daywidth mul -350 translate
+-}
+-ifelse
+-/submonth 1 def
+-/year lyear def
+-/month lmonth def
+-gsave
+-.138 .138 scale
+-12 -120 translate
+-calendar
+-grestore
+-/submonth 1 def
+-/year nyear def
+-/month nmonth def
+-daywidth 0 translate
+-gsave
+-.138 .138 scale
+-12 -120 translate
+-calendar
+-grestore
+-
++nomini 0 eq {
++ /eventflag false def
++ month 1 sub 0 eq
++ {
++ /lmonth 12 def
++ /lyear year 1 sub def
++ }
++ {
++ /lmonth month 1 sub def
++ /lyear year def
++ } ifelse
++ month 1 add 13 eq
++ {
++ /nmonth 1 def
++ /nyear year 1 add def
++ }
++ {
++ /nmonth month 1 add def
++ /nyear year def
++ } ifelse
++ usefirst
++ {
++ 0 30 translate
++ }
++ {
++% days_week 2 sub daywidth mul -350 translate
++ days_week 2 sub daywidth mul last_row_y dayheight add daytopmarg 2 div sub translate
++ } ifelse
++ /submonth 1 def
++ /year lyear def
++ /month lmonth def
++ gsave
++ .138 .138 scale
++ 12 -120 translate
++ calendar
++ grestore
++ /submonth 1 def
++ /year nyear def
++ /month nmonth def
++ daywidth 0 translate
++ gsave
++ .138 .138 scale
++ 12 -120 translate
++ calendar
++ grestore
++} if
+ showpage
+
+ END-OF-CALENDAR
+-
--- xcal-4.1.orig/debian/patches/01_pscal_tempfile.patch
+++ xcal-4.1/debian/patches/01_pscal_tempfile.patch
@@ -0,0 +1,48 @@
+#!/bin/sh -e
+## DP: Debian conformance patch for the Debian pyca-package
+## DP: This patch consists mainly of FHS (2.2) stuff
+## Copyright @ 2003 by Lars Bahner <bahner@debian.org>
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -Naur xcal-4.1/pscal/pscal.script xcal-4.1.new/pscal/pscal.script
+--- xcal-4.1/pscal/pscal.script 2008-08-25 11:50:34.000000000 +0200
++++ xcal-4.1.new/pscal/pscal.script 2008-08-25 11:52:30.000000000 +0200
+@@ -161,6 +161,7 @@
+ xc\*$MONTHNAME$YEAR)
+ ;;
+ *)
++ PSCAL_TEMPFILE=$(mktemp -t pscal.XXXXXXXXXX)
+ for file in $list
+ do
+ day=`expr $file : 'xc\([0-9]*\)'`
+@@ -171,9 +172,9 @@
+ s/^/$day ( /
+ s/\$/ )/
+ p"
+- done > /tmp/pscal$$
+- holidays=`cat /tmp/pscal$$`
+- rm -f /tmp/pscal$$
++ done > ${PSCAL_TEMPFILE}
++ holidays=`cat ${PSCAL_TEMPFILE}`
++ rm -f ${PSCAL_TEMPFILE}
+ esac
+ fi
+