summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Pustjens2015-07-21 22:23:33 +0200
committerMark Pustjens2015-07-21 22:23:33 +0200
commit5e196109fa5dfbb92225a7e3d2c309ce6f47377c (patch)
tree090d2f557182890622762237d20745052bbb8cc5
parentb931721f68f07008bb9db0e7b9c3c939b43fbf9f (diff)
downloadaur-tinyfugue-patched.tar.gz
Updated with pcre and amd64 patch.
-rw-r--r--PKGBUILD28
-rw-r--r--tf-50b8.amd64.patch30
-rw-r--r--tf-50b8.pcre.patch37
3 files changed, 88 insertions, 7 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 2629ba156de..c1f7f4d2687 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=tinyfugue-patched
pkgver=5.0b8
-pkgrel=1
+pkgrel=2
pkgdesc="The best MUD client. Patched with log prefix and a more useful alert stream."
url="http://tinyfugue.sourceforge.net/"
depends=(pcre zlib ncurses openssl)
@@ -15,19 +15,33 @@ replaces=('tinyfugue')
source=("http://downloads.sourceforge.net/sourceforge/tinyfugue/tf-50b8.tar.gz"
"tf-50b7.alert.patch"
"tf-50b7.build.patch"
- "tf-50b7.log_prefix.patch")
+ "tf-50b7.log_prefix.patch"
+ "tf-50b8.amd64.patch"
+ "tf-50b8.pcre.patch")
build() {
- cd $startdir/src/tf-50b8
+ cd ${srcdir}/tf-50b8
+
patch -p1 -i "${srcdir}/tf-50b7.alert.patch"
patch -p1 -i "${srcdir}/tf-50b7.build.patch"
patch -p1 -i "${srcdir}/tf-50b7.log_prefix.patch"
- mkdir $startdir/pkg/usr
+ patch -p1 -i "${srcdir}/tf-50b8.amd64.patch"
+ patch -p1 -i "${srcdir}/tf-50b8.pcre.patch"
+
./configure --prefix=/usr --enable-termcap=ncurses
- make || return 1
- make prefix=$startdir/pkg/usr install || return 1
+ make
}
+package()
+{
+ cd ${srcdir}/tf-50b8
+
+ mkdir ${pkgdir}/usr
+ make prefix=${pkgdir}/usr install
+}
+
md5sums=('3e994e791966d274f63b0e61abf2ef59'
'395e6636969c518bafa0f86279a7e183'
'ddb83f770b9fcbcd425143405abef327'
- '3c67ccfc6267502682f12af4fc221d34')
+ '3c67ccfc6267502682f12af4fc221d34'
+ 'e7765f17f4f7d1513b156973d9ebd680'
+ 'f1b711f5cfc05f17dd35976edab0f5c0')
diff --git a/tf-50b8.amd64.patch b/tf-50b8.amd64.patch
new file mode 100644
index 00000000000..ae53b6f83e6
--- /dev/null
+++ b/tf-50b8.amd64.patch
@@ -0,0 +1,30 @@
+diff -U5 -r tf-50b8.orig/src/tfio.c tf-50b8/src/tfio.c
+--- tf-50b8.orig/src/tfio.c 2007-01-13 18:12:39.000000000 -0500
++++ tf-50b8/src/tfio.c 2007-02-02 16:50:12.000000000 -0500
+@@ -495,10 +495,11 @@
+ const char *q, *sval;
+ char *specptr, quote;
+ const conString *Sval;
+ int len, min, max, leftjust, stars;
+ attr_t attrs = buf->attrs;
++ va_list aq;
+
+ if (!(flags & SP_APPEND) && buf->data) Stringtrunc(buf, 0);
+ while (*fmt) {
+ if (*fmt != '%' || *++fmt == '%') {
+ for (q = fmt + 1; *q && *q != '%'; q++);
+@@ -520,11 +521,13 @@
+ switch (*fmt) {
+ case 'd': case 'i':
+ case 'x': case 'X': case 'u': case 'o':
+ case 'f': case 'e': case 'E': case 'g': case 'G':
+ case 'p':
+- vsprintf(tempbuf, spec, ap);
++ va_copy(aq, ap);
++ vsprintf(tempbuf, spec, aq);
++ va_end(aq);
+ Stringcat(buf, tempbuf);
+ /* eat the arguments used by vsprintf() */
+ while (stars--) (void)va_arg(ap, int);
+ switch (*fmt) {
+ case 'd': case 'i':
diff --git a/tf-50b8.pcre.patch b/tf-50b8.pcre.patch
new file mode 100644
index 00000000000..e7ebf31d801
--- /dev/null
+++ b/tf-50b8.pcre.patch
@@ -0,0 +1,37 @@
+diff -u -Naur tf-50b8/src/macro.c tinyfugue/src/macro.c
+--- tf-50b8/src/macro.c 2007-01-14 00:12:39.000000000 +0100
++++ tinyfugue/src/macro.c 2015-07-21 21:43:13.900563427 +0200
+@@ -893,7 +893,8 @@
+ }
+ spec->attr &= ~F_NONE;
+ if (spec->nsubattr) {
+- int n = pcre_info(spec->trig.ri->re, NULL, NULL);
++ int n;
++ pcre_fullinfo(spec->trig.ri->re, NULL, PCRE_INFO_CAPTURECOUNT, &n);
+ for (i = 0; i < spec->nsubattr; i++) {
+ spec->subattr[i].attr &= ~F_NONE;
+ if (spec->subattr[i].subexp > n) {
+diff -u -Naur tf-50b8/src/pattern.c tinyfugue/src/pattern.c
+--- tf-50b8/src/pattern.c 2007-01-14 00:12:39.000000000 +0100
++++ tinyfugue/src/pattern.c 2015-07-21 21:43:13.900563427 +0200
+@@ -151,7 +151,7 @@
+ emsg ? emsg : "unknown error");
+ goto tf_reg_compile_error;
+ }
+- n = pcre_info(ri->re, NULL, NULL);
++ pcre_fullinfo(ri->re, NULL, PCRE_INFO_CAPTURECOUNT, &n);
+ if (n < 0) goto tf_reg_compile_error;
+ ri->ovecsize = 3 * (n + 1);
+ ri->ovector = dmalloc(NULL, sizeof(int) * ri->ovecsize, file, line);
+diff -u -Naur tf-50b8/src/pattern.h tinyfugue/src/pattern.h
+--- tf-50b8/src/pattern.h 2007-01-14 00:12:39.000000000 +0100
++++ tinyfugue/src/pattern.h 2015-07-21 21:43:13.900563427 +0200
+@@ -10,7 +10,7 @@
+ #ifndef PATTERN_H
+ #define PATTERN_H
+
+-#include "pcre-2.08/pcre.h"
++#include <pcre.h>
+
+ typedef struct RegInfo {
+ pcre *re;