Commit c1e72bcf authored by Aaron Griffin's avatar Aaron Griffin
Browse files

Initial import of all packages

parents
--- 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 '/'
# $Id: PKGBUILD,v 1.13 2007/04/27 20:20:41 jgc Exp $
# Maintainer: eric <eric@archlinux.org>
# Contributor: Sarah Hay <sarahhay@mb.sympatico.ca>
pkgname=a2ps
pkgver=4.13c
pkgrel=1
pkgdesc="a2ps is an Any to PostScript filter"
arch=(i686 x86_64)
license=('GPL')
depends=('ghostscript' 'psutils' 'imagemagick' 'perl')
options=('nolibtool')
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)
url="http://www.inf.enst.fr/~demaille/a2ps/"
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
libtoolize --force --copy || return 1
autoreconf -I m4 || return 1
./configure --prefix=/usr --sysconfdir=/etc/a2ps \
--includedir=/usr/include --enable-nls
export LANG=C
make || return 1
make DESTDIR=${startdir}/pkg install
sed -i "s:^countdictstack: \0:" ${startdir}/pkg/usr/bin/psset || return 1
}
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;
diff -ur a2ps-4.13.orig/man/Makefile.maint a2ps-4.13/man/Makefile.maint
--- a2ps-4.13.orig/man/Makefile.maint 2002-03-04 20:46:26.000000000 +0200
+++ a2ps-4.13/man/Makefile.maint 2007-02-19 21:50:29.000000000 +0200
@@ -20,7 +20,7 @@
--include=$(basename $@).x \
--include=common.x \
$(executable) > $@-t || exit 1; \
- chmod -w $@-t || exit 1; \
+ chmod a-w $@-t || exit 1; \
rm -f $@ || exit 1; \
mv $@-t $@ || exit 1; \
else \
--- 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");
--- 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
--- 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
Markdown is supported
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