[arch-commits] CVS update of core/base/pcre (PKGBUILD no_arg.patch)

Jan de Groot jgc at archlinux.org
Fri Feb 15 17:50:06 UTC 2008


    Date: Friday, February 15, 2008 @ 12:50:06
  Author: jgc
    Path: /home/cvs-core/core/base/pcre

Modified: PKGBUILD (1.32 -> 1.33) no_arg.patch (1.1 -> 1.2)

upgpkg: pcre 7.6-3
Replace patch with upstream version. Makes pcre compatible with both old and new pcre versions


--------------+
 PKGBUILD     |   10 +++------
 no_arg.patch |   63 +++++++++++++--------------------------------------------
 2 files changed, 19 insertions(+), 54 deletions(-)


Index: core/base/pcre/PKGBUILD
diff -u core/base/pcre/PKGBUILD:1.32 core/base/pcre/PKGBUILD:1.33
--- core/base/pcre/PKGBUILD:1.32	Sun Feb  3 09:33:49 2008
+++ core/base/pcre/PKGBUILD	Fri Feb 15 12:50:05 2008
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD,v 1.32 2008/02/03 14:33:49 jgc Exp $
+# $Id: PKGBUILD,v 1.33 2008/02/15 17:50:05 jgc Exp $
 # Maintainer: Eric Belanger <eric at archlinux.org>
 # Contributor: John Proctor <jproctor at prium.net>
 
 pkgname=pcre
 pkgver=7.6
-pkgrel=2
+pkgrel=3
 pkgdesc="A library that implements Perl 5-style regular expressions"
 arch=('i686' 'x86_64') 
 url="http://pcre.sourceforge.net"
@@ -15,14 +15,12 @@
 source=(ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/${pkgname}-${pkgver}.tar.bz2
 	no_arg.patch)
 md5sums=('2af38e083fb90ef60fa9eda7cc290e86'
-	 '2f19449c2a370eb9340f9c3e0d347885')
-sha1sums=('e1ed4d3c90d0657bb1967123e90a525744fd12f9'
-	  'b102793bc8ff1c31ed07c8bbbe75412f1a160251')
+         '9adcec8fce27628753a89f67b52c6ff2')
 
 build() {
   cd ${startdir}/src/${pkgname}-${pkgver}
   [ "${CARCH}" = "x86_64" ] && export CFLAGS="${CFLAGS} -fPIC"
-  patch -Np1 -i ${startdir}/src/no_arg.patch || return 1
+  patch -Np0 -i ${startdir}/src/no_arg.patch || return 1
   ./configure --prefix=/usr --enable-utf8 --enable-unicode-properties
   make || return 1
   make DESTDIR=${startdir}/pkg install
Index: core/base/pcre/no_arg.patch
diff -u core/base/pcre/no_arg.patch:1.1 core/base/pcre/no_arg.patch:1.2
--- core/base/pcre/no_arg.patch:1.1	Sun Feb  3 09:33:49 2008
+++ core/base/pcre/no_arg.patch	Fri Feb 15 12:50:06 2008
@@ -1,51 +1,18 @@
-diff -ruN pcre-7.6/pcre_scanner.h pcre-7.5/pcre_scanner.h
---- pcre-7.6/pcre_scanner.h	2008-01-21 14:54:16.000000000 +0000
-+++ pcre-7.5/pcre_scanner.h	2007-07-31 14:14:54.000000000 +0000
-@@ -80,9 +80,9 @@
-   // If it returns true, it skips over the matched input and any
-   // following input that matches the "skip" regular expression.
-   bool Consume(const RE& re,
--               const Arg& arg0 = RE::no_arg,
--               const Arg& arg1 = RE::no_arg,
--               const Arg& arg2 = RE::no_arg
-+               const Arg& arg0 = no_arg,
-+               const Arg& arg1 = no_arg,
-+               const Arg& arg2 = no_arg
-                // TODO: Allow more arguments?
-                );
- 
-diff -ruN pcre-7.6/pcrecpp.cc pcre-7.5/pcrecpp.cc
---- pcre-7.6/pcrecpp.cc	2008-01-21 14:54:16.000000000 +0000
-+++ pcre-7.5/pcrecpp.cc	2008-01-04 19:41:06.000000000 +0000
-@@ -55,7 +55,7 @@
- static const int kVecSize = (1 + kMaxArgs) * 3;  // results + PCRE workspace
- 
+Index: pcrecpp.cc
+===================================================================
+--- pcrecpp.cc  (revision 319)
++++ pcrecpp.cc  (working copy)
+@@ -57,6 +57,14 @@
  // Special object that stands-in for no argument
--Arg RE::no_arg((void*)NULL);
-+PCRECPP_EXP_DEFN Arg no_arg((void*)NULL);
- 
+ Arg RE::no_arg((void*)NULL);
+
++// This is for ABI compatibility with old versions of pcre (pre-7.6),
++// which defined a global no_arg variable instead of putting it in the
++// RE class.  This works on GCC >= 3, at least.  We could probably have
++// a more inclusive test if we ever needed it.
++#if defined(__GNUC__) && __GNUC__ >= 3
++extern Arg no_arg __attribute__((alias("_ZN7pcrecpp2RE6no_argE")));
++#endif
++
  // If a regular expression has no error, its error_ field points here
  static const string empty_string;
-diff -ruN pcre-7.6/pcrecpp.h pcre-7.5/pcrecpp.h
---- pcre-7.6/pcrecpp.h	2008-01-21 14:54:16.000000000 +0000
-+++ pcre-7.5/pcrecpp.h	2007-09-19 08:53:03.000000000 +0000
-@@ -346,6 +346,9 @@
- #define PCRE_IS_SET(o)  \
-         (all_options_ & o) == o
- 
-+// We convert user-passed pointers into special Arg objects
-+PCRECPP_EXP_DECL Arg no_arg;
-+
- /***** Compiling regular expressions: the RE class *****/
- 
- // RE_Options allow you to set options to be passed along to pcre,
-@@ -643,9 +646,6 @@
-   // regexp wasn't valid on construction.
-   int NumberOfCapturingGroups() const;
- 
--  // The default value for an argument, to indicate no arg was passed in
--  static Arg no_arg;
--
-  private:
- 
-   void Init(const string& pattern, const RE_Options* options);




More information about the arch-commits mailing list