Commit 8986a72e authored by Eric Bélanger's avatar Eric Bélanger
Browse files

upgpkg: 4.14-1

    Upstream update, Added/Removed patches, Updated license, Added backup array, Added gperf makedepends, Added install scriptlet to handle info pages, Added ChangeLog
parent 781a5f9c
--- a2ps-4.13/lib/path-concat.c 2002-03-04 13:46:25.000000000 -0500
+++ a2ps-4.13/lib/path-concat_.c 2004-04-13 01:47:03.596895984 -0400
@@ -31,7 +31,8 @@
#endif
#include <sys/types.h>
-char *malloc ();
+/* Commented out by Tamran to work with gcc 3.4 */
+/* char *malloc (); */
#ifndef DIRECTORY_SEPARATOR
# define DIRECTORY_SEPARATOR '/'
2009-03-22 Eric Belanger <eric@archlinux.org>
* a2ps 4.14-1
* Upstream update
* Added/Removed patches
* Updated license
* Added backup array
* Added gperf makedepends
* Added install scriptlet to handle info pages
* Added ChangeLog
# Maintainer: eric <eric@archlinux.org>
# Maintainer: Eric Belanger <eric@archlinux.org>
# Contributor: Sarah Hay <sarahhay@mb.sympatico.ca>
pkgname=a2ps
pkgver=4.13c
pkgver=4.14
pkgrel=1
pkgdesc="a2ps is an Any to PostScript filter"
arch=(i686 x86_64)
license=('GPL')
url="http://www.inf.enst.fr/~demaille/a2ps/"
arch=('i686' 'x86_64')
url="http://www.gnu.org/software/a2ps/"
license=('GPL3')
depends=('ghostscript' 'psutils' 'imagemagick' 'perl')
options=('!libtool')
makedepends=('gperf')
replaces=('a2ps-lprng')
provides=('a2ps-lprng')
source=(http://www.archlinux.org/~jgc/${pkgname}/${pkgname}-${pkgver}.tar.gz
http://www.archlinux.org/~jgc/${pkgname}/${pkgname}-4.13c-ja_nls.patch.gz
4.13c-gcc34.patch
a2ps-4.13-fixcachecheck.patch
a2ps-4.13-manpage-chmod.patch
a2ps-4.13-select-freebsd.patch
a2ps-4.13c-fixps.patch
a2ps-4.13c-psmandup.diff
a2ps-4.13c-psset.patch
a2ps-4.13c-stdarg.patch)
md5sums=('97164e84ba911e4604155507e0893669' 'e315466f75d99c0c1ca563d82f2ace2e'\
'449b2445dc0949a990a2b29cab89dc59' '6432b1da449b96b531b0843259839236'\
'09cc5ed4d3d8ff1b2103e519191e8286' 'b62538dbd828d995bdc3ce36188b0768'\
'df6bc895cc6fb0fd47f22fd1c36d1ed3' 'd68d0bfab547ef1ce70576c7a5570f13'\
'b8ef4708f4a65e9b373f9f42df11b92d' '2e24d355a977969b83fce03510ebd7b8')
backup=('etc/a2ps/a2ps.cfg' 'etc/a2ps/a2ps-site.cfg')
options=('!libtool')
install=a2ps.install
source=(ftp://ftp.gnu.org/gnu/a2ps/${pkgname}-${pkgver}.tar.gz \
a2ps-4.13c-fnmatch-replacement.patch a2ps-4.13c-emacs.patch a2ps-4.13-manpage-chmod.patch \
a2ps-4.14-check-mempcpy.patch a2ps-4.14-fix-stpcpy-proto.patch)
md5sums=('781ac3d9b213fa3e1ed0d79f986dc8c7' '93011b58e9f20a7fafa31287a51884a4'\
'2e493d0bc00d71eb3e8a9b6febc52b69' '09cc5ed4d3d8ff1b2103e519191e8286'\
'42aa39b74f6da8cf6e94185c4fc3e601' '066f9327fee6b6eca3a57d657d1097d1')
sha1sums=('365abbbe4b7128bf70dad16d06e23c5701874852' '8783952d3410d8d59ed953e1db45e2ef1a0b8f65'\
'94e35a6ad9268161bec22a56d4cfb696d635994a' '2bb3d0a2ef2f3ff9262723e35c742a80ab0235ce'\
'6aed29c1399e79f3914b408059610f9e7c0fc38e' '58fa90134f1027e3f05aeb08212cbcc10f420738')
build() {
cd ${startdir}/src/${pkgname}-4.13
patch -Np0 -i ${startdir}/src/a2ps-4.13-select-freebsd.patch || return 1
patch -Np1 -i ${startdir}/src/a2ps-4.13c-stdarg.patch || return 1
patch -Np1 -i ${startdir}/src/4.13c-gcc34.patch || return 1
patch -Np1 -i ${startdir}/src/a2ps-4.13c-ja_nls.patch || return 1
patch -Np0 -i ${startdir}/src/a2ps-4.13c-fixps.patch || return 1
patch -Np0 -i ${startdir}/src/a2ps-4.13c-psmandup.diff || return 1
patch -Np1 -i ${startdir}/src/a2ps-4.13c-psset.patch || return 1
patch -Np1 -i ${startdir}/src/a2ps-4.13-fixcachecheck.patch || return 1
patch -Np1 -i ${startdir}/src/a2ps-4.13-manpage-chmod.patch || return 1
cd ${srcdir}/${pkgname}-${pkgver}
patch -p1 < ../a2ps-4.13c-fnmatch-replacement.patch || return 1
patch -p1 < ../a2ps-4.13c-emacs.patch || return 1
patch -p1 < ../a2ps-4.13-manpage-chmod.patch || return 1
patch -p1 < ../a2ps-4.14-check-mempcpy.patch || return 1
patch -p0 < ../a2ps-4.14-fix-stpcpy-proto.patch || return 1
libtoolize --force --copy || return 1
autoreconf -I m4 || return 1
./configure --prefix=/usr --sysconfdir=/etc/a2ps \
--includedir=/usr/include --enable-nls
--includedir=/usr/include --enable-nls || return 1
export LANG=C
make || return 1
make DESTDIR=${startdir}/pkg install
sed -i "s:^countdictstack: \0:" ${startdir}/pkg/usr/bin/psset || return 1
make DESTDIR=${pkgdir} install || return 1
sed -i "s:^countdictstack: \0:" ${pkgdir}/usr/bin/psset || return 1
rm ${pkgdir}/usr/share/info/dir
gzip ${pkgdir}/usr/share/info/*
}
Index: a2ps-4.13/configure.in
===================================================================
--- a2ps-4.13.orig/configure.in
+++ a2ps-4.13/configure.in
@@ -158,8 +158,9 @@ if test $ac_cv_func_fnmatch_works = no;
fi
# Check for C99 va_copy
-AC_CACHE_CHECK([
- AC_TRY_LINK([#include <stdarg.h>],
+AC_CACHE_CHECK([if compiler supports C99 va_copy],
+ [ac_cv_va_copy],
+ [AC_TRY_LINK([#include <stdarg.h>],
[
va_list va1, va2;
--- src/select.c.orig Thu Dec 16 02:04:56 1999
+++ src/select.c Sat Aug 21 12:05:31 2004
@@ -131,6 +131,36 @@
return 1;
}
+/* escapes the name of a file so that the shell groks it in 'single' q.marks.
+ The resulting pointer has to be free()ed when not longer used. */
+char *
+shell_escape(const char *fn)
+{
+ size_t len = 0;
+ const char *inp;
+ char *retval, *outp;
+
+ for(inp = fn; *inp; ++inp)
+ switch(*inp)
+ {
+ case '\'': len += 4; break;
+ default: len += 1; break;
+ }
+
+ outp = retval = malloc(len + 1);
+ if(!outp)
+ return NULL; /* perhaps one should do better error handling here */
+ for(inp = fn; *inp; ++inp)
+ switch(*inp)
+ {
+ case '\'': *outp++ = '\''; *outp++ = '\\'; *outp++ = '\'', *outp++ = '\''; break;
+ default: *outp++ = *inp; break;
+ }
+ *outp = 0;
+
+ return retval;
+}
+
/* What says file about the type of a file (result is malloc'd). NULL
if could not be run. */
@@ -144,11 +174,15 @@
if (IS_EMPTY (job->file_command))
return NULL;
+ filename = shell_escape(filename);
+ if(filename == NULL)
+ return NULL;
/* Call file(1) with the correct option */
- command = ALLOCA (char, (2
+ command = ALLOCA (char, (4
+ strlen (job->file_command)
+ ustrlen (filename)));
- sprintf (command, "%s %s", job->file_command, (const char *) filename);
+ sprintf (command, "%s '%s'", job->file_command, (const char *) filename);
+ free(filename);
message (msg_tool, (stderr, "Reading pipe: `%s'\n", command));
file_out = popen (command, "r");
--- a2ps-4.13/contrib/emacs/a2ps-print.el.orig 2005-12-05 08:03:48.000000000 +0100
+++ a2ps-4.13/contrib/emacs/a2ps-print.el 2005-12-06 16:38:14.000000000 +0100
@@ -93,6 +93,7 @@
(concat "--center-title=" name)
(concat "--footer=" (concat name " Emacs buffer"))
(concat "--pretty-print=" filetype)
+ (concat "-d")
;Uncommenting the following gives a print preview (only):
; (concat "--output=/tmp/foo.ps")
)
--- contrib/fixps.in.orig 2004-12-20 00:11:40.000000000 +0100
+++ contrib/fixps.in 2004-12-20 00:14:12.000000000 +0100
@@ -38,7 +38,7 @@
run_gs=0
# What action to perform: fixps, cat, check, and gs
task=fixps
-tmpdir=/tmp/$program.$$
+tmpdir=`mktemp -d -t fixps.XXXXXX` || { echo "$program: Cannot create temporary dir!" >&2 ; exit 1; }
verbose=echo
# The version/usage strings
@@ -191,7 +191,6 @@
trap "/bin/rm -rf $tmpdir" 0 1 2 3 13 15
fi
-mkdir $tmpdir
fixps_sed=$tmpdir/fixps.sed
# If printing from stdin, save into a tmp file
diff -Naurp a2ps-4.13.orig/lib/fnmatch.c a2ps-4.13/lib/fnmatch.c
--- a2ps-4.13.orig/lib/fnmatch.c 2002-03-04 12:46:25 -0600
+++ a2ps-4.13/lib/fnmatch.c 2006-05-27 11:41:15 -0500
@@ -27,18 +27,6 @@
#include <fnmatch.h>
#include <ctype.h>
-
-/* Comment out all this code if we are using the GNU C Library, and are not
- actually compiling the library itself. This code is part of the GNU C
- Library, but also included in many other GNU distributions. Compiling
- and linking in this code is a waste when using the GNU C library
- (especially if it is a shared library). Rather than having every GNU
- program understand `configure --with-gnu-libc' and omit the object files,
- it is simpler to just do this in the source for each such file. */
-
-#if defined _LIBC || !defined __GNU_LIBRARY__
-
-
# if defined STDC_HEADERS || !defined isascii
# define ISASCII(c) 1
# else
@@ -52,10 +40,13 @@
extern int errno;
# endif
+/* fnmatch replacement taken from the GNU C Library for systems that
+ provide a broken implementation. */
+
/* Match STRING against the filename pattern PATTERN, returning zero if
it matches, nonzero if not. */
int
-fnmatch (const char *pattern, const char *string, int flags)
+rpl_fnmatch (const char *pattern, const char *string, int flags)
{
register const char *p = pattern, *n = string;
register char c;
@@ -233,5 +224,3 @@ fnmatch (const char *pattern, const char
# undef FOLD
}
-
-#endif /* _LIBC or not __GNU_LIBRARY__. */
--- contrib/psmandup.in.orig 2004-12-20 00:16:07.000000000 +0100
+++ contrib/psmandup.in 2004-12-20 00:16:39.000000000 +0100
@@ -36,7 +36,7 @@
message=
psselect=${PSSELECT:-psselect}
psset=${PSSET:-psset}
-tmpdir=/tmp/$program.$$
+tmpdir=`mktemp -d -t fixps.XXXXXX` || { echo "$program: Cannot create temporary dir!" >&2 ; exit 1; }
# These two must be kept in synch. They are opposed.
verbose=echo
@@ -185,7 +185,6 @@
trap "/bin/rm -rf $tmpdir" 0 1 2 3 13 15
fi
-mkdir $tmpdir
# If printing from stdin, save into a tmp file
if test $file = '-'; then
--- a2ps-4.13/contrib/psset.in.orig 2006-03-16 12:30:48.000000000 +0100
+++ a2ps-4.13/contrib/psset.in 2006-03-16 12:28:14.000000000 +0100
@@ -241,7 +241,7 @@
# spaces with a `\' too...
pspagedevicelen=`echo "$pspagedevice" | wc -l`
pspagedevice=`echo "$pspagedevice" | \
- sed -e "$pspagedevicelen!s/\$/\\\\\\/;s/^/\\\\\\/"`
+ sed -e "$pspagedevicelen!s/\$/\\\\\\/;s/^ /\\\\\\/"`
case $at in
0) # Insert last in the Setup, so that we win over other requests.
--- a2ps-4.13-orig/configure.in 2005-08-14 14:13:42.000000000 +0200
+++ a2ps-4.13/configure.in 2005-08-14 14:18:20.000000000 +0200
@@ -157,6 +157,22 @@
[Define to rpl_fnmatch if the replacement function should be used.])
fi
+# Check for C99 va_copy
+AC_CACHE_CHECK([
+ AC_TRY_LINK([#include <stdarg.h>],
+ [
+ va_list va1, va2;
+
+ va_copy(va2, va1);
+ va_end(va2);
+ ],
+ [ac_cv_va_copy="yes"],[ac_cv_va_copy="no"]
+ )
+])
+if test "x$ac_cv_va_copy"="xyes"; then
+ AC_DEFINE(HAVE_VA_COPY,1,[Define to 1 if C99 va_copy function should be used])
+fi
+
# Needed checks for tinyterm.[ch]
ad_TINYTERM_CHECKS
--- a2ps-4.13-orig/lib/printlen.c 2002-03-04 19:46:25.000000000 +0100
+++ a2ps-4.13/lib/printlen.c 2005-08-14 14:29:08.000000000 +0200
@@ -27,15 +27,24 @@
unsigned long strtoul ();
+#if !defined(HAVE_VA_COPY)
static int
int_printflen (const char *format, va_list *args)
+#else
+static int
+int_printflen (const char *format, va_list args)
+#endif
{
const char *cp;
int total_width = 0;
int width = 0;
va_list ap;
+#ifndef HAVE_VA_COPY
memcpy (&ap, args, sizeof (va_list));
+#else
+ va_copy(ap, args);
+#endif
for (cp = format ; *cp ; cp++)
{
@@ -93,13 +102,21 @@
}
}
}
+
+#ifdef HAVE_VA_COPY
+ va_end(ap);
+#endif
return total_width;
}
int
vprintflen (const char *format, va_list args)
{
+#if !defined(HAVE_VA_COPY)
return int_printflen (format, &args);
+#else
+ return int_printflen (format, args);
+#endif
}
int
--- a2ps-4.14-orig/configure.in 2008-04-16 08:36:03.000000000 +0200
+++ a2ps-4.14/configure.in 2008-04-16 08:36:29.000000000 +0200
@@ -137,7 +137,8 @@
ad_REPLACE_FUNC_STRCASECMP
ad_REPLACE_FUNC_STRNCASECMP
ad_REPLACE_FUNC_RENAME
-AC_CHECK_FUNCS(uname strchr strerror strerror_r getcwd bcopy bzero tempnam strsignal psignal setlocale)
+AC_CHECK_FUNCS(uname strchr strerror strerror_r getcwd bcopy bzero \
+ tempnam strsignal psignal setlocale mempcpy)
ad_FUNC_SYSTEMPAPERNAME
ad_FUNC_ATEXIT
ad_FUNC_STRFTIME
=== modified file 'lib/xstrrpl.c'
--- lib/xstrrpl.c 2008-04-14 18:04:50 +0000
+++ lib/xstrrpl.c 2008-04-14 18:20:20 +0000
@@ -20,12 +20,10 @@
#include "system.h"
#include <assert.h>
#include "xstrrpl.h"
-extern char * stpcpy();
-
/* Perform subsitutions in string. Result is malloc'd
E.g., result = xstrrrpl ("1234", subst) gives result = "112333"
where subst = { {"1", "11"}, {"3", "333"}, { "4", ""}}
*/
char *
infodir=/usr/share/info
filelist=(a2ps.info.gz ogonkify.info.gz regex.info.gz)
post_install() {
[ -x usr/bin/install-info ] || return 0
for file in ${filelist[@]}; do
install-info $infodir/$file $infodir/dir 2> /dev/null
done
}
post_upgrade() {
post_install $1
}
pre_remove() {
[ -x usr/bin/install-info ] || return 0
for file in ${filelist[@]}; do
install-info --delete $infodir/$file $infodir/dir 2> /dev/null
done
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment