aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/a2ps/APKBUILD51
-rw-r--r--main/a2ps/a2ps-4.13-manpage-chmod.patch12
-rw-r--r--main/a2ps/a2ps-4.13c-emacs.patch10
-rw-r--r--main/a2ps/a2ps-4.13c-fnmatch-replacement.patch43
-rw-r--r--main/a2ps/a2ps-4.14-check-mempcpy.patch12
-rw-r--r--main/a2ps/a2ps-4.14-fix-stpcpy-proto.patch17
6 files changed, 145 insertions, 0 deletions
diff --git a/main/a2ps/APKBUILD b/main/a2ps/APKBUILD
new file mode 100644
index 00000000000..18409a28d63
--- /dev/null
+++ b/main/a2ps/APKBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=a2ps
+pkgver=4.14
+pkgrel=0
+pkgdesc="a2ps is an Any to PostScript filter"
+url="http://www.gnu.org/software/a2ps/"
+license="GPL3"
+depends="ghostscript imagemagick perl"
+makedepends="gperf autoconf automake libtool"
+install=
+subpackages="$pkgname-dev $pkgname-doc"
+source="ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz
+ $pkgname-4.13c-fnmatch-replacement.patch
+ $pkgname-4.13c-emacs.patch
+ $pkgname-4.13-manpage-chmod.patch
+ $pkgname-$pkgver-check-mempcpy.patch
+ $pkgname-$pkgver-fix-stpcpy-proto.patch
+ "
+
+prepare() {
+ cd "$srcdir"/$pkgname-$pkgver
+ for i in ../*.patch; do
+ msg "Apllying $i"
+ patch -p1 -i $i || return 1
+ done
+ sed -i -e 's/__mempcpy/mempcpy/g' lib/strftime.c src/regex.c \
+ || return 1
+ libtoolize --force --copy || return 1
+ autoreconf -I m4 || return 1
+}
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc/a2ps \
+ --includedir=/usr/include \
+ --disable-nls || return 1
+ make
+}
+
+package() {
+ cd "$srcdir"/$pkgname-$pkgver
+ make -j1 DESTDIR="$pkgdir" install || return 1
+ sed -i "s:^countdictstack: \0:" "$pkgdir"/usr/bin/psset || return 1
+}
+md5sums="781ac3d9b213fa3e1ed0d79f986dc8c7 a2ps-4.14.tar.gz
+93011b58e9f20a7fafa31287a51884a4 a2ps-4.13c-fnmatch-replacement.patch
+2e493d0bc00d71eb3e8a9b6febc52b69 a2ps-4.13c-emacs.patch
+09cc5ed4d3d8ff1b2103e519191e8286 a2ps-4.13-manpage-chmod.patch
+42aa39b74f6da8cf6e94185c4fc3e601 a2ps-4.14-check-mempcpy.patch
+4b4fbc19a6b79fa64df7e26945fcdcf9 a2ps-4.14-fix-stpcpy-proto.patch"
diff --git a/main/a2ps/a2ps-4.13-manpage-chmod.patch b/main/a2ps/a2ps-4.13-manpage-chmod.patch
new file mode 100644
index 00000000000..e0c61124e9d
--- /dev/null
+++ b/main/a2ps/a2ps-4.13-manpage-chmod.patch
@@ -0,0 +1,12 @@
+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 \
diff --git a/main/a2ps/a2ps-4.13c-emacs.patch b/main/a2ps/a2ps-4.13c-emacs.patch
new file mode 100644
index 00000000000..f1cd5d9ebdf
--- /dev/null
+++ b/main/a2ps/a2ps-4.13c-emacs.patch
@@ -0,0 +1,10 @@
+--- 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")
+ )
diff --git a/main/a2ps/a2ps-4.13c-fnmatch-replacement.patch b/main/a2ps/a2ps-4.13c-fnmatch-replacement.patch
new file mode 100644
index 00000000000..c49ab78c93c
--- /dev/null
+++ b/main/a2ps/a2ps-4.13c-fnmatch-replacement.patch
@@ -0,0 +1,43 @@
+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__. */
diff --git a/main/a2ps/a2ps-4.14-check-mempcpy.patch b/main/a2ps/a2ps-4.14-check-mempcpy.patch
new file mode 100644
index 00000000000..7b820cead05
--- /dev/null
+++ b/main/a2ps/a2ps-4.14-check-mempcpy.patch
@@ -0,0 +1,12 @@
+--- 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
diff --git a/main/a2ps/a2ps-4.14-fix-stpcpy-proto.patch b/main/a2ps/a2ps-4.14-fix-stpcpy-proto.patch
new file mode 100644
index 00000000000..c5bdfc57cd8
--- /dev/null
+++ b/main/a2ps/a2ps-4.14-fix-stpcpy-proto.patch
@@ -0,0 +1,17 @@
+=== modified file 'lib/xstrrpl.c'
+--- a/lib/xstrrpl.c 2008-04-14 18:04:50 +0000
++++ b/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 *
+