aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authornibbles 2bits2012-10-26 08:29:55 -0700
committerAdam Vandenberg2012-10-26 09:25:04 -0700
commit14e6f70f0286ffe42ca70b1e3ef227936e5fbcca (patch)
tree83575254c1a0fae77f12665b73a6dec82f018768 /Library
parentc31fdf1825d1c7154416a4083a1aa8a68cf7c420 (diff)
downloadhomebrew-14e6f70f0286ffe42ca70b1e3ef227936e5fbcca.tar.bz2
tiny-fugue: change to using HB pcre
tiny-fugue was crafted in 2007 to use pcre, and it uses system pcre or HB pcre over its own internal pcre-2.08 by linking against `-lpcre`. However it uses a removed API, `pcre_info` like goffice tries to do. - Add a dep on HB pcre. - patch this to change to using `pcre_fullinfo` - design the patch like the goffice patch. Fixes #15105 Closes #15681. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/tiny-fugue.rb43
1 files changed, 39 insertions, 4 deletions
diff --git a/Library/Formula/tiny-fugue.rb b/Library/Formula/tiny-fugue.rb
index 9590d379a..94fdfa02d 100644
--- a/Library/Formula/tiny-fugue.rb
+++ b/Library/Formula/tiny-fugue.rb
@@ -7,7 +7,11 @@ class TinyFugue < Formula
version '5.0b8'
depends_on 'libnet'
+ depends_on 'pcre'
+ # pcre deprecated pcre_info. Switch to HB pcre-8.31 and pcre_fullinfo.
+ # Not reported upstream. The project is in stasis since 2007. The patch
+ # is crafted like the patch for goffice.
def patches
DATA
end
@@ -22,10 +26,8 @@ end
__END__
-diff --git a/src/malloc.c b/src/malloc.c
-index 03ca393..7282f02 100644
---- a/src/malloc.c
-+++ b/src/malloc.c
+--- a/src/malloc.c 2007-01-13 15:12:39.000000000 -0800
++++ b/src/malloc.c 2012-10-26 08:23:30.000000000 -0700
@@ -7,6 +7,7 @@
************************************************************************/
static const char RCSid[] = "$Id: malloc.c,v 35004.22 2007/01/13 23:12:39 kkeys Exp $";
@@ -34,3 +36,36 @@ index 03ca393..7282f02 100644
#include "tfconfig.h"
#include "port.h"
#include "signals.h"
+--- a/src/macro.c 2007-01-13 15:12:39.000000000 -0800
++++ b/src/macro.c 2012-10-26 08:15:31.000000000 -0700
+@@ -893,7 +893,7 @@
+ }
+ 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, 0, NULL);
+ for (i = 0; i < spec->nsubattr; i++) {
+ spec->subattr[i].attr &= ~F_NONE;
+ if (spec->subattr[i].subexp > n) {
+--- a/src/pattern.c 2007-01-13 15:12:39.000000000 -0800
++++ b/src/pattern.c 2012-10-26 08:16:19.000000000 -0700
+@@ -151,7 +151,7 @@
+ emsg ? emsg : "unknown error");
+ goto tf_reg_compile_error;
+ }
+- n = pcre_info(ri->re, NULL, NULL);
++ n = pcre_fullinfo(ri->re, NULL, 0, NULL);
+ if (n < 0) goto tf_reg_compile_error;
+ ri->ovecsize = 3 * (n + 1);
+ ri->ovector = dmalloc(NULL, sizeof(int) * ri->ovecsize, file, line);
+--- a/src/pattern.h 2007-01-13 15:12:39.000000000 -0800
++++ b/src/pattern.h 2012-10-26 08:17:54.000000000 -0700
+@@ -10,7 +10,7 @@
+ #ifndef PATTERN_H
+ #define PATTERN_H
+
+-#include "pcre-2.08/pcre.h"
++#include <pcre.h>
+
+ typedef struct RegInfo {
+ pcre *re;