Accepting request 102960 from home:elvigia:branches:Base:System

- Update to PCRE 8.30, upstream SONAME bump, libpcre1 
- Drop no longer needed ppc patch.
- move library back to %{_libdir}

OBS-URL: https://build.opensuse.org/request/show/102960
OBS-URL: https://build.opensuse.org/package/show/Base:System/pcre?expand=0&rev=34
This commit is contained in:
Cristian Rodríguez 2012-02-07 04:56:54 +00:00 committed by Git OBS Bridge
parent c4213577dd
commit 75882c2972
6 changed files with 85 additions and 201 deletions

View File

@ -1,112 +0,0 @@
Fix cache-flush on PPC
From:
r742 | zherczeg | 2011-11-06 09:05:33 +0100 (Ne, 06 lis 2011) | 3 lines
Fix cache-flush issue on PowerPC, adding some comments and a check for
disabled PCRE_EXTRA_TABLES.
Fix cache-flush issue on PowerPC (It is still an experimental JIT port).
PCRE_EXTRA_TABLES is not suported by JIT, and should be checked before
calling _pcre_jit_exec. Some extra comments are added.
Petr Pisar: Changelog removed
Index: pcre_exec.c
===================================================================
--- pcre_exec.c (revision 741)
+++ pcre_exec.c (revision 742)
@@ -6011,6 +6011,7 @@
if (extra_data != NULL
&& (extra_data->flags & PCRE_EXTRA_EXECUTABLE_JIT) != 0
&& extra_data->executable_jit != NULL
+ && (extra_data->flags & PCRE_EXTRA_TABLES) == 0
&& (options & ~(PCRE_NO_UTF8_CHECK | PCRE_NOTBOL | PCRE_NOTEOL |
PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART)) == 0)
return _pcre_jit_exec(re, extra_data->executable_jit, subject, length,
Index: sljit/sljitLir.h
===================================================================
--- sljit/sljitLir.h (revision 741)
+++ sljit/sljitLir.h (revision 742)
@@ -56,6 +56,9 @@
- mainly position independent code
- Optimizations (perhaps later)
- Only for basic blocks (when no labels inserted between LIR instructions)
+
+ For valgrind users:
+ - pass --smc-check=all argument to valgrind, since JIT is a "self-modifying code"
*/
#if !(defined SLJIT_NO_DEFAULT_CONFIG && SLJIT_NO_DEFAULT_CONFIG)
@@ -87,6 +90,7 @@
#define SLJIT_UNUSED 0
+/* Temporary (scratch) registers may not preserve their values across function calls. */
#define SLJIT_TEMPORARY_REG1 1
#define SLJIT_TEMPORARY_REG2 2
#define SLJIT_TEMPORARY_REG3 3
@@ -95,6 +99,7 @@
#define SLJIT_TEMPORARY_EREG1 4
#define SLJIT_TEMPORARY_EREG2 5
+/* General (saved) registers preserve their values across function calls. */
#define SLJIT_GENERAL_REG1 6
#define SLJIT_GENERAL_REG2 7
#define SLJIT_GENERAL_REG3 8
Index: sljit/sljitNativePPC_common.c
===================================================================
--- sljit/sljitNativePPC_common.c (revision 741)
+++ sljit/sljitNativePPC_common.c (revision 742)
@@ -37,6 +37,18 @@
Both for ppc-32 and ppc-64. */
typedef sljit_ui sljit_ins;
+static void ppc_cache_flush(sljit_ins *from, sljit_ins *to)
+{
+ while (from < to) {
+#ifdef __GNUC__
+ asm volatile ( "icbi 0, %0" : : "r"(from) );
+#else
+#error "Must implement icbi"
+#endif
+ from++;
+ }
+}
+
#define TMP_REG1 (SLJIT_NO_REGISTERS + 1)
#define TMP_REG2 (SLJIT_NO_REGISTERS + 2)
#define TMP_REG3 (SLJIT_NO_REGISTERS + 3)
Index: sljit/sljitConfigInternal.h
===================================================================
--- sljit/sljitConfigInternal.h (revision 741)
+++ sljit/sljitConfigInternal.h (revision 742)
@@ -178,13 +178,23 @@
#ifndef SLJIT_CACHE_FLUSH
-#if !(defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) && !(defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
- /* Just call __ARM_NR_cacheflush on Linux. */
+#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+
+/* The __clear_cache() implementation of GCC is a dummy function on PowerPC. */
#define SLJIT_CACHE_FLUSH(from, to) \
+ ppc_cache_flush((from), (to))
+
+#elif (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+
+/* Not required to implement on archs with unified caches. */
+#define SLJIT_CACHE_FLUSH(from, to)
+
+#else
+
+/* Calls __ARM_NR_cacheflush on ARM-Linux. */
+#define SLJIT_CACHE_FLUSH(from, to) \
__clear_cache((char*)(from), (char*)(to))
-#else
- /* Not required to implement on archs with unified caches. */
-#define SLJIT_CACHE_FLUSH(from, to)
+
#endif
#endif /* !SLJIT_CACHE_FLUSH */

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e06b0943ce4b0f15324a20020d6086760a75b72f5ad7c23b9b2bfe690ed49acd
size 1164103

3
pcre-8.30.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c1113fd7db934e97ad8b3917d432e5b642e9eb9afd127eb797804937c965f4ac
size 1248556

View File

@ -1,19 +1,31 @@
Index: configure.ac
===================================================================
--- configure.ac (revisión: 741)
+++ configure.ac (copia de trabajo)
@@ -42,6 +42,7 @@
--- configure.ac.orig
+++ configure.ac
@@ -45,8 +45,12 @@ AC_CONFIG_MACRO_DIR([m4])
remember_set_CFLAGS="$CFLAGS"
remember_set_CXXFLAGS="$CXXFLAGS"
AC_PROG_CC
-AC_PROG_CC
+AC_PROG_CC_STDC
+AC_USE_SYSTEM_EXTENSIONS
+AC_SYS_LARGEFILE
+AM_PROG_CC_C_O
AC_PROG_CXX
+PCRE_VISIBILITY
if test "x$remember_set_CFLAGS" = "x"
then
Index: m4/visibility.m4
===================================================================
--- m4/visibility.m4 (revisión: 0)
+++ m4/visibility.m4 (revisión: 0)
@@ -80,8 +84,7 @@ AC_LANG_POP
AC_TYPE_INT64_T
AC_PROG_INSTALL
-AC_LIBTOOL_WIN32_DLL
-LT_INIT
+LT_INIT([win32-dll pic-only disable-static])
AC_PROG_LN_S
PCRE_MAJOR="pcre_major"
--- /dev/null
+++ m4/visibility.m4
@@ -0,0 +1,89 @@
+# visibility.m4 serial 4 (gettext-0.18.2)
+dnl Copyright (C) 2005, 2008, 2010-2011 Free Software Foundation, Inc.
@ -104,32 +116,42 @@ Index: m4/visibility.m4
+ AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
+ [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
+])
Index: Makefile.am
===================================================================
--- Makefile.am (revisión: 741)
+++ Makefile.am (copia de trabajo)
@@ -171,6 +171,9 @@
## The main pcre library
--- Makefile.am.orig
+++ Makefile.am
@@ -178,6 +178,9 @@ BUILT_SOURCES = pcre_chartables.c
# Build the 8 bit library if it is enabled.
if WITH_PCRE8
lib_LTLIBRARIES += libpcre.la
+
+libpcre_la_CFLAGS = $(CFLAG_VISIBILITY)
+
libpcre_la_SOURCES = \
pcre_byte_order.c \
pcre_compile.c \
pcre_config.c \
@@ -224,7 +227,7 @@
sljit/sljitNativeX86_common.c \
@@ -211,6 +214,7 @@ endif # WITH_PCRE8
# Build the 16 bit library if it is enabled.
if WITH_PCRE16
lib_LTLIBRARIES += libpcre16.la
+libpcre16_la_CFLAGS = $(CFLAG_VISIBILITY)
libpcre16_la_SOURCES = \
pcre16_byte_order.c \
pcre16_chartables.c \
@@ -266,10 +270,10 @@ EXTRA_DIST += \
sljit/sljitUtils.c
if WITH_PCRE8
-libpcre_la_LDFLAGS = $(EXTRA_LIBPCRE_LDFLAGS)
+libpcre_la_LDFLAGS = -no-undefined $(EXTRA_LIBPCRE_LDFLAGS)
endif # WITH_PCRE8
if WITH_PCRE16
-libpcre16_la_LDFLAGS = $(EXTRA_LIBPCRE16_LDFLAGS)
+libpcre16_la_LDFLAGS = -no-undefined $(EXTRA_LIBPCRE16_LDFLAGS)
endif # WITH_PCRE16
CLEANFILES += pcre_chartables.c
@@ -238,21 +241,23 @@
@@ -291,9 +295,10 @@ endif # WITH_JIT
## A version of the main pcre library that has a posix re API.
if WITH_PCRE8
lib_LTLIBRARIES += libpcreposix.la
+libpcreposix_la_CFLAGS = $(CFLAG_VISIBILITY)
libpcreposix_la_SOURCES = \
@ -137,12 +159,13 @@ Index: Makefile.am
-libpcreposix_la_LDFLAGS = $(EXTRA_LIBPCREPOSIX_LDFLAGS)
+libpcreposix_la_LDFLAGS = -no-undefined $(EXTRA_LIBPCREPOSIX_LDFLAGS)
libpcreposix_la_LIBADD = libpcre.la
endif # WITH_PCRE8
## There's a C++ library as well.
@@ -301,12 +306,13 @@ endif # WITH_PCRE8
if WITH_PCRE_CPP
lib_LTLIBRARIES += libpcrecpp.la
+libpcrecpp_la_CXXFLAGS = $(CFLAG_VISIBILITY) $(CXXFLAG_INLINES_HIDDEN)
+libpcrecpp_la_CXXFLAGS = $(CFLAG_VISIBILITY)
libpcrecpp_la_SOURCES = \
pcrecpp_internal.h \
pcrecpp.cc \
@ -153,12 +176,11 @@ Index: Makefile.am
libpcrecpp_la_LIBADD = libpcre.la
TESTS += pcrecpp_unittest
@@ -288,7 +293,7 @@
@@ -350,6 +356,7 @@ if WITH_PCRE8
TESTS += RunGrepTest
dist_noinst_SCRIPTS += RunGrepTest
bin_PROGRAMS += pcregrep
+pcregrep_CFLAGS = -fwhole-program
pcregrep_SOURCES = pcregrep.c
-pcregrep_LDADD = libpcreposix.la $(LIBZ) $(LIBBZ2)
+pcregrep_LDADD = libpcreposix.la libpcre.la $(LIBZ) $(LIBBZ2)
EXTRA_DIST += \
testdata/grepinput \
pcregrep_LDADD = $(LIBZ) $(LIBBZ2)
pcregrep_LDADD += libpcreposix.la

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Feb 7 04:40:59 UTC 2012 - crrodriguez@opensuse.org
- Update to PCRE 8.30, upstream SONAME bump, libpcre1
- Drop no longer needed ppc patch.
- move library back to %{_libdir}
-------------------------------------------------------------------
Wed Feb 1 10:44:38 UTC 2012 - dvaleev@suse.com

View File

@ -15,15 +15,14 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: pcre
BuildRequires: gcc-c++ libtool pkg-config
Version: 8.20
Release: 1
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: pkg-config
Version: 8.30
Release: 0
Summary: A library for Perl-compatible regular expressions
License: BSD3c(or similar) ; Other uncritical OpenSource License
License: BSD-3-Clause
Group: System/Libraries
# bug437293
%ifarch ppc64
@ -36,8 +35,6 @@ Source2: baselibs.conf
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#PATCH-FIX-UPSTREAM crrodriguez@opensuse.org http://bugs.exim.org/show_bug.cgi?id=1173
Patch: pcre-visibility.patch
Patch2: pcre-8.20-ppcjit.patch
%description
The PCRE library is a set of functions that implement regular
@ -45,11 +42,10 @@ expression pattern matching using the same syntax and semantics
as Perl 5.
%package devel
License: BSD3c(or similar) ; Other uncritical OpenSource License
Summary: A library for Perl-compatible regular expressions
Group: System/Libraries
Requires: libstdc++-devel
Requires: libpcre0 = %{version}
Requires: libpcre1 = %{version}
Requires: libpcreposix0 = %{version}
Requires: libpcrecpp0 = %{version}
# bug437293
@ -58,68 +54,57 @@ Obsoletes: pcre-devel-64bit
%endif
#
%description devel
The PCRE library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.
%package -n libpcre0
License: BSD3c(or similar) ; Other uncritical OpenSource License
%package -n libpcre1
Summary: A library for Perl-compatible regular expressions
Group: System/Libraries
Provides: %{name} = %{version}
Obsoletes: %{name} < %{version}
%description -n libpcre0
%description -n libpcre1
The PCRE library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.
%package -n libpcreposix0
License: BSD3c(or similar) ; Other uncritical OpenSource License
Summary: A library for Perl-compatible regular expressions
Group: System/Libraries
%description -n libpcreposix0
The PCRE library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.
%package -n libpcrecpp0
License: BSD3c(or similar) ; Other uncritical OpenSource License
Summary: A library for Perl-compatible regular expressions
Group: System/Libraries
%description -n libpcrecpp0
The PCRE library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.
%package doc
License: BSD3c(or similar) ; Other uncritical OpenSource License
Summary: A library for Perl-compatible regular expressions
Group: System/Libraries
%if 0%{?suse_version} >= 1120
BuildArch: noarch
%endif
%description doc
The PCRE library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
as Perl 5.
%package tools
License: BSD3c(or similar) ; Other uncritical OpenSource License
Summary: A library for Perl-compatible regular expressions
Group: System/Libraries
Recommends: %{name}-doc
%description tools
The PCRE library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics
@ -128,8 +113,6 @@ as Perl 5.
%prep
%setup -q
%patch
%patch2
%build
autoreconf -fiv
@ -141,22 +124,21 @@ autoreconf -fiv
--enable-unicode-properties
%{__make} %{?_smp_mflags}
%install
%makeinstall
%{__mkdir_p} %{buildroot}/%{_defaultdocdir}
mv %{buildroot}/usr/share/doc/pcre %{buildroot}/%{_defaultdocdir}/pcre-doc
#empty dependecy_libs
%{__rm} -f %{buildroot}%{_libdir}/*.la
#move pcre and pcreposix library into /lib
%{__mkdir_p} %{buildroot}/%{_lib}
for l in libpcre libpcreposix; do
ldest=$(readlink %{buildroot}/%{_libdir}/$l.so)
mv %{buildroot}%{_libdir}/$l.so.* %{buildroot}/%{_lib}
#update the symlinks for linking.
%{__ln_s} -vf /%{_lib}/$ldest %{buildroot}%{_libdir}/$l.so
done
#ove pcre and pcreposix library into /lib
#%{__mkdir_p} %{buildroot}/%{_lib}
#for l in libpcre libpcreposix; do
# ldest=$(readlink %{buildroot}/%{_libdir}/$l.so)
# mv %{buildroot}%{_libdir}/$l.so.* %{buildroot}/%{_lib}
# #update the symlinks for linking.
# %{__ln_s} -vf /%{_lib}/$ldest %{buildroot}%{_libdir}/$l.so
#done
%check
export LANG=POSIX
@ -166,44 +148,33 @@ make test || echo make test failed
make test
%endif
%clean
%{__rm} -rf %{buildroot}
%post -n libpcre1 -p /sbin/ldconfig
%post -n libpcre0 -p /sbin/ldconfig
%postun -n libpcre0 -p /sbin/ldconfig
%postun -n libpcre1 -p /sbin/ldconfig
%post -n libpcrecpp0 -p /sbin/ldconfig
%postun -n libpcrecpp0 -p /sbin/ldconfig
%post -n libpcreposix0 -p /sbin/ldconfig
%postun -n libpcreposix0 -p /sbin/ldconfig
%files -n libpcre0
%files -n libpcre1
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog LICENCE NEWS README
/%{_lib}/libpcre.so.*
%{_libdir}/libpcre.so.*
%files -n libpcrecpp0
%defattr(-,root,root)
%{_libdir}/libpcrecpp.so.*
%files -n libpcreposix0
%defattr(-,root,root)
/%{_lib}/libpcreposix.so.*
%{_libdir}/libpcreposix.so.*
%files tools
%defattr(-,root,root)
@ -212,12 +183,10 @@ make test
%{_mandir}/man1/pcregrep.*
%{_mandir}/man1/pcretest.*
%files doc
%defattr(-,root,root)
%doc doc/html doc/*.txt
%files devel
%defattr(-,root,root)
%{_bindir}/pcre-config
@ -229,6 +198,4 @@ make test
%{_mandir}/man1/pcre-config.*
%{_mandir}/man3/*.gz
%changelog