[packages/poco] update pcre patch, add unbundled patch, update BuildRequires and files. It builds (with -flto too).

bszx bszx at pld-linux.org
Sun Mar 6 23:37:56 CET 2016


commit eacd55413e0aeac8a49ec43dced60bcc3d40ad28
Author: Bartek Szady <bszx at bszx.eu>
Date:   Sun Mar 6 23:34:40 2016 +0100

    update pcre patch, add unbundled patch, update BuildRequires and files.
    It builds (with -flto too).

 pcre.patch      |   8 ++-
 poco.spec       | 124 +++++++++++++++++++++++++++++++++++-----------
 unbundled.patch | 149 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 250 insertions(+), 31 deletions(-)
---
diff --git a/poco.spec b/poco.spec
index cc0bc8a..49e5ca5 100644
--- a/poco.spec
+++ b/poco.spec
@@ -5,6 +5,8 @@
 %bcond_without	tests		# build without tests
 %bcond_without	samples		# build without tests
 
+%define		so_version 31
+
 Summary:	C++ class libraries and frameworks for building network- and internet-based applications
 Name:		poco
 Version:	1.6.1
@@ -14,15 +16,25 @@ Group:		Libraries
 Source0:	http://pocoproject.org/releases/poco-%{version}/%{name}-%{version}-all.tar.gz
 # Source0-md5:	05961d10195d0f760b707752e88938e9
 Patch0:		pcre.patch
+Patch1:		unbundled.patch
 URL:		http://pocoproject.org/
 BuildRequires:	expat-devel
-BuildRequires:	libiodbc-devel
 BuildRequires:	libstdc++-devel
 BuildRequires:	mysql-devel
 BuildRequires:	openssl-devel
 BuildRequires:	pcre-devel
 BuildRequires:	sqlite3-devel
+BuildRequires:	unixODBC-devel
 BuildRequires:	zlib-devel
+BuildRequires:	glibc-static
+BuildRequires:	expat-static
+BuildRequires:	libltdl-static
+BuildRequires:	libstdc++-static
+BuildRequires:	mysql-static
+BuildRequires:	openssl-static
+BuildRequires:	pcre-static
+BuildRequires:	sqlite3-static
+BuildRequires:	unixODBC-static
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -120,6 +132,22 @@ Group:		Libraries
 This package contains the Zip component of POCO. (POCO is a set of C++
 class libraries for network-centric applications.)
 
+%package json
+Summary:	The JSON POCO component
+Group:		Libraries
+
+%description json
+This package contains the JSON component of POCO. (POCO is a set of C++
+class libraries for network-centric applications.)
+
+%package mongodb
+Summary:	The MongoDB POCO component
+Group:		Libraries
+
+%description mongodb
+This package contains the MongoDB component of POCO. (POCO is a set of C++
+class libraries for network-centric applications.)
+
 %package devel
 Summary:	Headers for developing programs that will use POCO
 Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki POCO C++
@@ -128,6 +156,8 @@ Requires:	%{name}-crypto = %{version}-%{release}
 Requires:	%{name}-data = %{version}-%{release}
 Requires:	%{name}-debug = %{version}-%{release}
 Requires:	%{name}-foundation = %{version}-%{release}
+Requires:	%{name}-json = %{version}-%{release}
+Requires:	%{name}-mongodb = %{version}-%{release}
 Requires:	%{name}-mysql = %{version}-%{release}
 Requires:	%{name}-net = %{version}-%{release}
 Requires:	%{name}-netssl = %{version}-%{release}
@@ -184,6 +214,7 @@ application testing purposes.
 %prep
 %setup -q -n %{name}-%{version}-all
 %patch0 -p1
+%patch1 -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
@@ -220,7 +251,7 @@ application testing purposes.
 %{__rm} Foundation/src/zutil.h
 
 # Foundation/src/pcre* with manual overview
-%{__rm} Foundation/src/pcre.h
+#%{__rm} Foundation/src/pcre.h
 %{__rm} Foundation/src/pcre_chartables.c
 %{__rm} Foundation/src/pcre_compile.c
 %{__rm} Foundation/src/pcre_exec.c
@@ -234,15 +265,15 @@ application testing purposes.
 %{__rm} Foundation/src/pcre_xclass.c
 %{__rm} Foundation/src/pcre_byte_order.c
 %{__rm} Foundation/src/pcre_config.c
-%{__rm} Foundation/src/pcre_config.h
+#%{__rm} Foundation/src/pcre_config.h
 %{__rm} Foundation/src/pcre_dfa_exec.c
 %{__rm} Foundation/src/pcre_get.c
 #%{__rm} Foundation/src/pcre_internal.h
 %{__rm} Foundation/src/pcre_jit_compile.c
 %{__rm} Foundation/src/pcre_refcount.c
 %{__rm} Foundation/src/pcre_string_utils.c
-%{__rm} Foundation/src/pcre_tables.c
-%{__rm} Foundation/src/pcre_ucd.c
+#%{__rm} Foundation/src/pcre_tables.c
+#%{__rm} Foundation/src/pcre_ucd.c
 %{__rm} Foundation/src/pcre_version.c
 
 %{__rm} Data/SQLite/src/sqlite3.h
@@ -278,7 +309,6 @@ find -regextype posix-extended -regex '.*\.(vc.?proj|sln|progen|cmd)' | xargs -r
 	--unbundled \
 	%{!?with_tests:--no-tests} \
 	%{!?with_samples:--no-samples} \
-	--include-path=%{_includedir}/libiodbc \
 	--library-path=%{_libdir}/mysql
 
 # POCO_BASE needs to be absolute real path (symlinks confuse it)
@@ -289,7 +319,7 @@ find -regextype posix-extended -regex '.*\.(vc.?proj|sln|progen|cmd)' | xargs -r
 	CXX="%{__cxx}" \
 	CFLAGS="%{rpmcflags}" \
 	CXXFLAGS="%{rpmcxxflags}" \
-	LINKFLAGS="%{rpmldflags}"
+	LINKFLAGS="%{rpmldflags}" \
 	STRIP=/bin/true
 
 %install
@@ -334,6 +364,12 @@ rm -rf $RPM_BUILD_ROOT
 %post	zip -p /sbin/ldconfig
 %postun	zip -p /sbin/ldconfig
 
+%post	json -p /sbin/ldconfig
+%postun	json -p /sbin/ldconfig
+
+%post	mongodb -p /sbin/ldconfig
+%postun	mongodb -p /sbin/ldconfig
+
 %post	debug -p /sbin/ldconfig
 %postun	debug -p /sbin/ldconfig
 
@@ -342,47 +378,55 @@ rm -rf $RPM_BUILD_ROOT
 
 %files foundation
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libPocoFoundation.so.17
+%attr(755,root,root) %{_libdir}/libPocoFoundation.so.%{so_version}
 
 %files xml
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libPocoXML.so.17
+%attr(755,root,root) %{_libdir}/libPocoXML.so.%{so_version}
 
 %files util
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libPocoUtil.so.17
+%attr(755,root,root) %{_libdir}/libPocoUtil.so.%{so_version}
 
 %files net
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libPocoNet.so.17
+%attr(755,root,root) %{_libdir}/libPocoNet.so.%{so_version}
 
 %files crypto
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libPocoCrypto.so.17
+%attr(755,root,root) %{_libdir}/libPocoCrypto.so.%{so_version}
 
 %files netssl
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libPocoNetSSL.so.17
+%attr(755,root,root) %{_libdir}/libPocoNetSSL.so.%{so_version}
 
 %files data
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libPocoData.so.17
+%attr(755,root,root) %{_libdir}/libPocoData.so.%{so_version}
 
 %files sqlite
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libPocoDataSQLite.so.17
+%attr(755,root,root) %{_libdir}/libPocoDataSQLite.so.%{so_version}
 
 %files odbc
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libPocoDataODBC.so.17
+%attr(755,root,root) %{_libdir}/libPocoDataODBC.so.%{so_version}
 
 %files mysql
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libPocoDataMySQL.so.17
+%attr(755,root,root) %{_libdir}/libPocoDataMySQL.so.%{so_version}
 
 %files zip
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libPocoZip.so.17
+%attr(755,root,root) %{_libdir}/libPocoZip.so.%{so_version}
+
+%files json
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libPocoJSON.so.%{so_version}
+
+%files mongodb
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libPocoMongoDB.so.%{so_version}
 
 %files pagecompiler
 %defattr(644,root,root,755)
@@ -393,17 +437,19 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/cpspcd
 %attr(755,root,root) %{_bindir}/f2cpspd
-%attr(755,root,root) %{_libdir}/libPocoCryptod.so.17
-%attr(755,root,root) %{_libdir}/libPocoDataMySQLd.so.17
-%attr(755,root,root) %{_libdir}/libPocoDataODBCd.so.17
-%attr(755,root,root) %{_libdir}/libPocoDataSQLited.so.17
-%attr(755,root,root) %{_libdir}/libPocoDatad.so.17
-%attr(755,root,root) %{_libdir}/libPocoFoundationd.so.17
-%attr(755,root,root) %{_libdir}/libPocoNetSSLd.so.17
-%attr(755,root,root) %{_libdir}/libPocoNetd.so.17
-%attr(755,root,root) %{_libdir}/libPocoUtild.so.17
-%attr(755,root,root) %{_libdir}/libPocoXMLd.so.17
-%attr(755,root,root) %{_libdir}/libPocoZipd.so.17
+%attr(755,root,root) %{_libdir}/libPocoCryptod.so.%{so_version}
+%attr(755,root,root) %{_libdir}/libPocoDataMySQLd.so.%{so_version}
+%attr(755,root,root) %{_libdir}/libPocoDataODBCd.so.%{so_version}
+%attr(755,root,root) %{_libdir}/libPocoDataSQLited.so.%{so_version}
+%attr(755,root,root) %{_libdir}/libPocoDatad.so.%{so_version}
+%attr(755,root,root) %{_libdir}/libPocoFoundationd.so.%{so_version}
+%attr(755,root,root) %{_libdir}/libPocoJSONd.so.%{so_version}
+%attr(755,root,root) %{_libdir}/libPocoMongoDBd.so.%{so_version}
+%attr(755,root,root) %{_libdir}/libPocoNetSSLd.so.%{so_version}
+%attr(755,root,root) %{_libdir}/libPocoNetd.so.%{so_version}
+%attr(755,root,root) %{_libdir}/libPocoUtild.so.%{so_version}
+%attr(755,root,root) %{_libdir}/libPocoXMLd.so.%{so_version}
+%attr(755,root,root) %{_libdir}/libPocoZipd.so.%{so_version}
 
 %files devel
 %defattr(644,root,root,755)
@@ -420,6 +466,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libPocoDatad.so
 %{_libdir}/libPocoFoundation.so
 %{_libdir}/libPocoFoundationd.so
+%{_libdir}/libPocoJSON.so
+%{_libdir}/libPocoJSONd.so
+%{_libdir}/libPocoMongoDB.so
+%{_libdir}/libPocoMongoDBd.so
 %{_libdir}/libPocoNet.so
 %{_libdir}/libPocoNetSSL.so
 %{_libdir}/libPocoNetSSLd.so
@@ -431,3 +481,19 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libPocoZip.so
 %{_libdir}/libPocoZipd.so
 %{_includedir}/Poco
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libPocoCrypto.a
+%{_libdir}/libPocoData.a
+%{_libdir}/libPocoDataMySQL.a
+%{_libdir}/libPocoDataODBC.a
+%{_libdir}/libPocoDataSQLite.a
+%{_libdir}/libPocoFoundation.a
+%{_libdir}/libPocoJSON.a
+%{_libdir}/libPocoMongoDB.a
+%{_libdir}/libPocoNet.a
+%{_libdir}/libPocoNetSSL.a
+%{_libdir}/libPocoUtil.a
+%{_libdir}/libPocoXML.a
+%{_libdir}/libPocoZip.a
diff --git a/pcre.patch b/pcre.patch
index 0f8f261..ad4cca2 100644
--- a/pcre.patch
+++ b/pcre.patch
@@ -39,7 +39,7 @@ diff --git a/Foundation/src/pcre_internal.h b/Foundation/src/pcre_internal.h
 index f3e69fc..c6f1d44 100644
 --- a/Foundation/src/pcre_internal.h
 +++ b/Foundation/src/pcre_internal.h
-@@ -2636,6 +2636,17 @@ typedef struct {
+@@ -2636,6 +2636,20 @@ typedef struct {
  } ucp_type_table;
  
  
@@ -53,11 +53,14 @@ index f3e69fc..c6f1d44 100644
 +#define _pcre_utt_size         _poco__pcre_utt_size
 +#define _pcre_utt_names        _poco__pcre_utt_names
 +#define _pcre_OP_lengths       _poco__pcre_OP_lengths
++#define _pcre_ucp_gbtable      _poco__pcre_ucp_gbtable
++#define _pcre_vspace_list      _poco__pcre_vspace_list
++#define _pcre_hspace_list      _poco__pcre_hspace_list
 +
  /* 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
-@@ -2749,6 +2760,12 @@ typedef struct {
+@@ -2749,6 +2763,13 @@ typedef struct {
    pcre_int32 other_case; /* offset to other case, or zero if none */
  } ucd_record;
  
@@ -66,6 +69,7 @@ index f3e69fc..c6f1d44 100644
 +#define _pcre_ucd_stage1 _poco__pcre_ucd_stage1
 +#define _pcre_ucd_stage2 _poco__pcre_ucd_stage2
 +#define _pcre_ucp_gentype _poco__pcre_ucp_gentype
++#define _pcre_ucd_caseless_sets _poco__pcre_ucd_caseless_sets
 +
  extern const pcre_uint32 PRIV(ucd_caseless_sets)[];
  extern const ucd_record  PRIV(ucd_records)[];
diff --git a/unbundled.patch b/unbundled.patch
new file mode 100644
index 0000000..a462aaa
--- /dev/null
+++ b/unbundled.patch
@@ -0,0 +1,149 @@
+--- poco-1.6.1-all/build/config/Linux.orig	2016-03-06 12:23:25.000000000 +0100
++++ poco-1.6.1-all/build/config/Linux	2016-03-06 15:17:01.123833319 +0100
+@@ -68,4 +68,4 @@
+ #
+ # System Specific Libraries
+ #
+-SYSLIBS  = -lpthread -ldl -lrt
++SYSLIBS  = -pthread -ldl -lrt
+--- poco-1.6.1-all/Foundation/include/Poco/RegularExpression.h.orig	2015-08-04 07:20:55.000000000 +0200
++++ poco-1.6.1-all/Foundation/include/Poco/RegularExpression.h	2016-03-05 21:50:13.634745461 +0100
+@@ -26,7 +26,9 @@
+ #include "Poco/Foundation.h"
+ #include <vector>
+ 
+-
++#if defined(POCO_UNBUNDLED)
++#include <pcre.h>
++#else
+ //
+ // Copy these definitions from pcre.h
+ // to avoid pulling in the entire header file
+@@ -37,7 +39,7 @@
+ 	typedef struct real_pcre8_or_16 pcre;
+ 	struct pcre_extra;
+ }
+-
++#endif
+ 
+ namespace Poco {
+ 
+--- poco-1.6.1-all/Net/testsuite/Makefile.orig	2015-08-04 07:21:00.000000000 +0200
++++ poco-1.6.1-all/Net/testsuite/Makefile	2016-03-06 13:22:05.393678530 +0100
+@@ -37,5 +37,5 @@
+ include $(POCO_BASE)/build/rules/exec
+ 
+ ifdef POCO_UNBUNDLED
+-        SYSLIBS += -lz
++        SYSLIBS += -lz -lpcre
+ endif
+--- poco-1.6.1-all/NetSSL_OpenSSL/testsuite/Makefile.orig	2015-08-04 07:21:02.000000000 +0200
++++ poco-1.6.1-all/NetSSL_OpenSSL/testsuite/Makefile	2016-03-06 13:31:19.920357644 +0100
+@@ -24,3 +24,7 @@
+ target_libs    = PocoNetSSL PocoNet PocoCrypto PocoUtil PocoJSON PocoXML PocoFoundation CppUnit
+ 
+ include $(POCO_BASE)/build/rules/exec
++
++ifdef POCO_UNBUNDLED
++        SYSLIBS += -lpcre -lexpat
++endif
+--- poco-1.6.1-all/Data/SQLite/testsuite/Makefile.orig	2015-08-04 07:21:04.000000000 +0200
++++ poco-1.6.1-all/Data/SQLite/testsuite/Makefile	2016-03-06 13:37:47.430366343 +0100
+@@ -16,3 +16,7 @@
+ target_libs    = PocoDataSQLite PocoData PocoFoundation CppUnit
+ 
+ include $(POCO_BASE)/build/rules/exec
++
++ifdef POCO_UNBUNDLED
++        SYSLIBS += -lsqlite3
++endif
+--- poco-1.6.1-all/Data/MySQL/testsuite/Makefile.orig	2015-08-04 07:21:04.000000000 +0200
++++ poco-1.6.1-all/Data/MySQL/testsuite/Makefile	2016-03-06 14:11:08.043744584 +0100
+@@ -20,3 +20,7 @@
+ target_libs    = PocoDataMySQL PocoData PocoFoundation CppUnit
+ 
+ include $(POCO_BASE)/build/rules/exec
++
++ifdef POCO_UNBUNDLED
++        SYSLIBS += -lssl -lcrypto
++endif
+--- poco-1.6.1-all/MongoDB/testsuite/Makefile.orig	2015-08-04 07:21:05.000000000 +0200
++++ poco-1.6.1-all/MongoDB/testsuite/Makefile	2016-03-06 14:25:21.713763747 +0100
+@@ -12,6 +12,6 @@
+ 
+ target         = testrunner
+ target_version = 1
+-target_libs    = PocoMongoDB PocoFoundation PocoNet CppUnit
++target_libs    = PocoMongoDB PocoNet PocoFoundation CppUnit
+ 
+ include $(POCO_BASE)/build/rules/exec
+--- poco-1.6.1-all/Zip/testsuite/Makefile.orig	2015-08-04 07:21:05.000000000 +0200
++++ poco-1.6.1-all/Zip/testsuite/Makefile	2016-03-06 14:28:01.057100657 +0100
+@@ -16,3 +16,7 @@
+ target_libs    = PocoZip PocoNet PocoFoundation CppUnit
+ 
+ include $(POCO_BASE)/build/rules/exec
++
++ifdef POCO_UNBUNDLED
++        SYSLIBS += -lz
++endif
+--- poco-1.6.1-all/Net/samples/httpget/Makefile.orig	2015-08-04 07:21:01.000000000 +0200
++++ poco-1.6.1-all/Net/samples/httpget/Makefile	2016-03-06 16:14:54.937244628 +0100
+@@ -15,3 +15,7 @@
+ target_libs    = PocoUtil PocoNet PocoXML PocoFoundation
+ 
+ include $(POCO_BASE)/build/rules/exec
++
++ifdef POCO_UNBUNDLED
++        SYSLIBS += -lpcre
++endif
+--- poco-1.6.1-all/Net/samples/download/Makefile.orig	2015-08-04 07:21:01.000000000 +0200
++++ poco-1.6.1-all/Net/samples/download/Makefile	2016-03-06 16:17:39.090581646 +0100
+@@ -15,3 +15,7 @@
+ target_libs    = PocoUtil PocoNet PocoXML PocoFoundation
+ 
+ include $(POCO_BASE)/build/rules/exec
++
++ifdef POCO_UNBUNDLED
++        SYSLIBS += -lpcre
++endif
+--- poco-1.6.1-all/NetSSL_OpenSSL/samples/download/Makefile.orig	2015-08-04 07:21:02.000000000 +0200
++++ poco-1.6.1-all/NetSSL_OpenSSL/samples/download/Makefile	2016-03-06 16:21:43.380587130 +0100
+@@ -22,3 +22,7 @@
+ target_libs    = PocoNetSSL PocoCrypto PocoNet PocoUtil PocoJSON PocoXML PocoFoundation
+ 
+ include $(POCO_BASE)/build/rules/exec
++
++ifdef POCO_UNBUNDLED
++        SYSLIBS += -lpcre
++endif
+--- poco-1.6.1-all/NetSSL_OpenSSL/samples/Mail/Makefile.orig	2015-08-04 07:21:02.000000000 +0200
++++ poco-1.6.1-all/NetSSL_OpenSSL/samples/Mail/Makefile	2016-03-06 16:23:56.090590109 +0100
+@@ -22,3 +22,7 @@
+ target_libs    = PocoNetSSL PocoNet PocoCrypto PocoUtil PocoJSON PocoXML PocoFoundation
+ 
+ include $(POCO_BASE)/build/rules/exec
++
++ifdef POCO_UNBUNDLED
++        SYSLIBS += -lpcre
++endif
+--- poco-1.6.1-all/Data/samples/RowFormatter/Makefile.orig	2015-08-04 07:21:03.000000000 +0200
++++ poco-1.6.1-all/Data/samples/RowFormatter/Makefile	2016-03-06 16:31:35.680600426 +0100
+@@ -15,3 +15,7 @@
+ target_libs    = PocoDataSQLite PocoData PocoFoundation 
+ 
+ include $(POCO_BASE)/build/rules/exec
++
++ifdef POCO_UNBUNDLED
++        SYSLIBS += -lsqlite3
++endif
+--- poco-1.6.1-all/Data/samples/WebNotifier/Makefile.orig	2015-08-04 07:21:03.000000000 +0200
++++ poco-1.6.1-all/Data/samples/WebNotifier/Makefile	2016-03-06 16:34:05.787270462 +0100
+@@ -15,3 +15,7 @@
+ target_libs    = PocoDataSQLite PocoData PocoNet PocoFoundation
+ 
+ include $(POCO_BASE)/build/rules/exec
++
++ifdef POCO_UNBUNDLED
++        SYSLIBS += -lsqlite3
++endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/poco.git/commitdiff/eacd55413e0aeac8a49ec43dced60bcc3d40ad28



More information about the pld-cvs-commit mailing list