[packages/poco] add patch for system pcre
glen
glen at pld-linux.org
Fri Dec 5 11:04:04 CET 2014
commit 12d83d49b759ac2eac23df779f1981a92b79272b
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Fri Dec 5 12:03:42 2014 +0200
add patch for system pcre
pcre.patch | 47 +++++++++++++++++++++++++++++++++++++++++++++++
poco.spec | 2 ++
2 files changed, 49 insertions(+)
---
diff --git a/poco.spec b/poco.spec
index 76046ca..11f4cf7 100644
--- a/poco.spec
+++ b/poco.spec
@@ -11,6 +11,7 @@ License: Boost
Group: Libraries
Source0: http://pocoproject.org/releases/poco-1.4.7/%{name}-%{version}-all.tar.gz
# Source0-md5: 12551b729456c985cffd14e977526c01
+Patch0: pcre.patch
URL: http://pocoproject.org/
BuildRequires: expat-devel
BuildRequires: libiodbc-devel
@@ -53,6 +54,7 @@ Statyczna biblioteka POCO C++.
%prep
%setup -q -n %{name}-%{version}-all
+%patch0 -p1
%{__sed} -i -e 's|$(INSTALLDIR)/lib\b|$(INSTALLDIR)/%{_lib}|g' Makefile
%{__sed} -i -e 's|ODBCLIBDIR = /usr/lib\b|ODBCLIBDIR = %{_libdir}|g' Data/ODBC/Makefile Data/ODBC/testsuite/Makefile
diff --git a/pcre.patch b/pcre.patch
new file mode 100644
index 0000000..084bd09
--- /dev/null
+++ b/pcre.patch
@@ -0,0 +1,47 @@
+https://github.com/pocoproject/poco/issues/120#issuecomment-15488808
+
+Index: poco-1.5.0/Foundation/Makefile
+===================================================================
+--- poco-1.5.0.orig/Foundation/Makefile
++++ poco-1.5.0/Foundation/Makefile
+@@ -45,6 +45,7 @@ pcre_utf8_objects = pcre_ucd pcre_tables
+
+ ifdef POCO_UNBUNDLED
+ SYSLIBS += -lpcre -lz
++ objects += $(pcre_utf8_objects) # unicode.cpp uses internal pcre tables
+ else
+ objects += $(zlib_objects) $(pcre_objects) $(pcre_utf8_objects)
+ endif
+Index: poco-1.5.0/Foundation/src/pcre_internal.h
+===================================================================
+--- poco-1.5.0.orig/Foundation/src/pcre_internal.h
++++ poco-1.5.0/Foundation/src/pcre_internal.h
+@@ -1109,6 +1109,16 @@ typedef struct {
+ } ucp_type_table;
+
+
++/* renamed to avoid clashes with system pcre */
++#define _pcre_utf8_table1 _poco__pcre_utf8_table1
++#define _pcre_utf8_table1_size _poco__pcre_utf8_table1_size
++#define _pcre_utf8_table2 _poco__pcre_utf8_table2
++#define _pcre_utf8_table3 _poco__pcre_utf8_table3
++#define _pcre_utf8_table4 _poco__pcre_utf8_table4
++#define _pcre_utt _poco__pcre_utt
++#define _pcre_utt_size _poco__pcre_utt_size
++#define _pcre_utt_names _poco__pcre_utt_names
++#define _pcre_OP_lengths _poco__pcre_OP_lengths
+ /* Internal shared data tables. These are tables that are used by more than one
+ of the exported public functions. They have to be "external" in the C sense,
+ but are not part of the PCRE public API. The data for these tables is in the
+@@ -1153,6 +1163,11 @@ typedef struct {
+ pcre_int32 other_case;
+ } ucd_record;
+
++/* renamed to avoid clashes with system pcre */
++#define _pcre_ucd_records _poco__pcre_ucd_records
++#define _pcre_ucd_stage1 _poco__pcre_ucd_stage1
++#define _pcre_ucd_stage2 _poco__pcre_ucd_stage2
++#define _pcre_ucp_gentype _poco__pcre_ucp_gentype
+ extern const ucd_record _pcre_ucd_records[];
+ extern const uschar _pcre_ucd_stage1[];
+ extern const pcre_uint16 _pcre_ucd_stage2[];
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/poco.git/commitdiff/12d83d49b759ac2eac23df779f1981a92b79272b
More information about the pld-cvs-commit
mailing list