Hi,

Here's a patch that forces the kazehakase in Etch to build against the system's
libpcre rather than the bundled pcre.  I'd rather see kaz linked against
the system's pcre; it's much easier to deal w/.  Does the security team
agree?




diff --git a/debian/control b/debian/control
index 6c9c76c..f37ad30 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: kazehakase
 Section: web
 Priority: optional
 Maintainer: Hidetaka Iwai <[EMAIL PROTECTED]>
-Build-Depends: automake1.7, libtool, debhelper(>> 4.0.0), dpatch, 
libatk1.0-dev, libglib2.0-dev, libgtk2.0-dev, libpango1.0-dev, libxul-dev, 
libgnutls-dev (>= 1.2.6), ruby (>=1.8.0), ruby(<< 1.9.0), ruby1.8-dev, 
libgtk2-ruby, libgettext-ruby1.8
+Build-Depends: automake1.7, libtool, debhelper(>> 4.0.0), dpatch, 
libatk1.0-dev, libglib2.0-dev, libgtk2.0-dev, libpango1.0-dev, libxul-dev, 
libgnutls-dev (>= 1.2.6), ruby (>=1.8.0), ruby(<< 1.9.0), ruby1.8-dev, 
libgtk2-ruby, libgettext-ruby1.8, libpcre3-dev
 Standards-Version: 3.7.2
 
 Package: kazehakase
diff --git a/src/libegg/regex/Makefile.am b/src/libegg/regex/Makefile.am
index 8751809..ce1a133 100644
--- a/src/libegg/regex/Makefile.am
+++ b/src/libegg/regex/Makefile.am
@@ -1,5 +1,3 @@
-SUBDIRS = pcre
-
 INCLUDES = \
   $(GTK_CFLAGS) \
   -DEGG_COMPILATION \
@@ -15,8 +13,8 @@ noinst_LTLIBRARIES = libeggregex.la
 libeggregex_la_SOURCES = \
   eggregex.c
 
-libeggregex_la_LIBADD = \
-       $(top_builddir)/src/libegg/regex/pcre/libpcre.la 
+libeggregex_la_LDFLAGS = \
+  `pcre-config --libs`
 
 noinst_HEADERS = \
   eggregex.h
diff --git a/src/libegg/regex/eggregex.c b/src/libegg/regex/eggregex.c
index 7d373cb..e365490 100644
--- a/src/libegg/regex/eggregex.c
+++ b/src/libegg/regex/eggregex.c
@@ -45,7 +45,7 @@
 #include <glib/glist.h>
 #include <glib/gi18n-lib.h>
 #include <glib/gstrfuncs.h>
-#include "pcre/pcre.h"
+#include <pcre.h>
 
 struct _EggRegex
 {
@@ -108,7 +108,7 @@ egg_regex_new (const gchar         *pattern,
   regex->match_opts = match_options | PCRE_NO_UTF8_CHECK;
 
   /* compile the pattern */
-  regex->regex = _pcre_compile (pattern, regex->compile_opts,
+  regex->regex = pcre_compile (pattern, regex->compile_opts,
                                 &errmsg, &erroffset, NULL);
 
   /* if the compilation failed, set the error member and return 
@@ -127,7 +127,7 @@ egg_regex_new (const gchar         *pattern,
 
   /* otherwise, find out how many sub patterns exist in this pattern,
    * and setup the offsets array and n_offsets accordingly */
-  _pcre_fullinfo (regex->regex, regex->extra, 
+  pcre_fullinfo (regex->regex, regex->extra, 
                  PCRE_INFO_CAPTURECOUNT, &capture_count);
   regex->n_offsets = (capture_count + 1) * 3;
   regex->offsets = g_new0 (gint, regex->n_offsets);
@@ -192,7 +192,7 @@ egg_regex_optimize (EggRegex  *regex,
 {
   const gchar *errmsg;
 
-  regex->extra = _pcre_study (regex->regex, 0, &errmsg);
+  regex->extra = pcre_study (regex->regex, 0, &errmsg);
 
   if (errmsg)
     {
@@ -237,7 +237,7 @@ egg_regex_match (EggRegex          *regex,
   regex->string_len = string_len;
 
   /* perform the match */
-  regex->matches = _pcre_exec (regex->regex, regex->extra, 
+  regex->matches = pcre_exec (regex->regex, regex->extra, 
                               string, regex->string_len, 0,
                               regex->match_opts | match_options,
                               regex->offsets, regex->n_offsets);
@@ -295,7 +295,7 @@ egg_regex_match_next (EggRegex          *regex,
     }
 
   /* perform the match */
-  regex->matches = _pcre_exec (regex->regex, regex->extra,
+  regex->matches = pcre_exec (regex->regex, regex->extra,
                               string + regex->pos, 
                               regex->string_len - regex->pos,
                               0, regex->match_opts | match_options,
@@ -345,7 +345,7 @@ egg_regex_fetch (EggRegex      *regex,
   if (match_num >= regex->matches)
     return NULL;
 
-  _pcre_get_substring (string, regex->offsets, regex->matches, 
+  pcre_get_substring (string, regex->offsets, regex->matches, 
                       match_num, (const char **)&match);
 
   return match;
@@ -399,7 +399,7 @@ egg_regex_fetch_named (EggRegex      *regex,
 {
   gchar *match;
 
-  _pcre_get_named_substring (regex->regex, 
+  pcre_get_named_substring (regex->regex, 
                             string, regex->offsets, regex->matches, 
                             name, (const char **)&match);
 
@@ -427,7 +427,7 @@ egg_regex_fetch_all (EggRegex      *regex,
   if (regex->matches < 0)
     return NULL;
   
-  _pcre_get_substring_list (string, regex->offsets, 
+  pcre_get_substring_list (string, regex->offsets, 
                            regex->matches, (const char ***)&listptr);
 
   if (listptr)


-- 
Need a kernel or Debian developer?  Contact me, I'm looking for contracts.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to