File poco-1.3.5-syslibs.patch of Package poco-c++

diff -up poco-1.3.5-all/Data/SQLite/Makefile.orig poco-1.3.5-all/Data/SQLite/Makefile
--- poco-1.3.5-all/Data/SQLite/Makefile.orig	2009-05-12 22:22:14.000000000 +0400
+++ poco-1.3.5-all/Data/SQLite/Makefile	2009-11-10 17:09:22.957867329 +0300
@@ -8,13 +8,14 @@
 
 include $(POCO_BASE)/build/rules/global
 
+SYSLIBS += -lsqlite3
+
 SYSFLAGS += -DSQLITE_THREADSAFE=1 -DSQLITE_DISABLE_LFS \
 	-DSQLITE_OMIT_UTF16 -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_COMPLETE \
 	-DSQLITE_OMIT_TCL_VARIABLE -DSQLITE_OMIT_DEPRECATED
 
 objects = Binder Extractor SessionImpl Connector \
-	SQLiteException SQLiteStatementImpl Utility \
-	sqlite3
+	SQLiteException SQLiteStatementImpl Utility
 
 target         = PocoSQLite
 target_version = $(LIBVERSION)
diff -up poco-1.3.5-all/Foundation/include/Poco/DeflatingStream.h.orig poco-1.3.5-all/Foundation/include/Poco/DeflatingStream.h
--- poco-1.3.5-all/Foundation/include/Poco/DeflatingStream.h.orig	2009-05-12 22:22:09.000000000 +0400
+++ poco-1.3.5-all/Foundation/include/Poco/DeflatingStream.h	2009-11-10 12:38:48.314866556 +0300
@@ -44,7 +44,7 @@
 #include "Poco/BufferedStreamBuf.h"
 #include <istream>
 #include <ostream>
-#include "Poco/zlib.h"
+#include <zlib.h>
 
 
 namespace Poco {
diff -up poco-1.3.5-all/Foundation/include/Poco/InflatingStream.h.orig poco-1.3.5-all/Foundation/include/Poco/InflatingStream.h
--- poco-1.3.5-all/Foundation/include/Poco/InflatingStream.h.orig	2009-05-12 22:22:09.000000000 +0400
+++ poco-1.3.5-all/Foundation/include/Poco/InflatingStream.h	2009-11-10 12:46:42.097867271 +0300
@@ -44,7 +44,7 @@
 #include "Poco/BufferedStreamBuf.h"
 #include <istream>
 #include <ostream>
-#include "Poco/zlib.h"
+#include <zlib.h>
 
 
 namespace Poco {
diff -up poco-1.3.5-all/Foundation/Makefile.orig poco-1.3.5-all/Foundation/Makefile
--- poco-1.3.5-all/Foundation/Makefile.orig	2009-05-12 22:22:09.000000000 +0400
+++ poco-1.3.5-all/Foundation/Makefile	2009-11-10 17:14:06.332866868 +0300
@@ -8,6 +8,8 @@
 
 include $(POCO_BASE)/build/rules/global
 
+SYSLIBS += -lz -lpcre
+
 objects = ArchiveStrategy ASCIIEncoding AsyncChannel Base64Decoder Base64Encoder \
 	BinaryReader BinaryWriter Bugcheck ByteOrder Channel Checksum Configurable ConsoleChannel \
 	CountingStream DateTime LocalDateTime DateTimeFormat DateTimeFormatter DateTimeParser \
@@ -31,12 +33,7 @@ objects = ArchiveStrategy ASCIIEncoding 
 	FileStreamFactory URIStreamFactory URIStreamOpener UTF16Encoding Windows1252Encoding \
 	UTF8Encoding UnicodeConverter UUID UUIDGenerator Void Format \
 	Pipe PipeImpl PipeStream DynamicAny DynamicAnyHolder SharedMemory \
-	FileStream Unicode UTF8String AtomicCounter \
-	adler32 compress crc32  deflate gzio infback inffast inflate inftrees  \
-	trees zutil \
-	pcre_chartables pcre_compile pcre_globals pcre_maketables pcre_study \
-	pcre_tables pcre_try_flipped pcre_ucd pcre_valid_utf8 \
-	pcre_exec pcre_ord2utf8 pcre_newline pcre_fullinfo pcre_xclass
+	FileStream Unicode UTF8String AtomicCounter
 
 ifeq ($(POCO_CONFIG),MinGW)
 	objects += EventLogChannel WindowsConsoleChannel
diff -up poco-1.3.5-all/Foundation/src/Checksum.cpp.orig poco-1.3.5-all/Foundation/src/Checksum.cpp
--- poco-1.3.5-all/Foundation/src/Checksum.cpp.orig	2009-05-12 22:22:09.000000000 +0400
+++ poco-1.3.5-all/Foundation/src/Checksum.cpp	2009-11-10 12:43:27.317866563 +0300
@@ -35,7 +35,7 @@
 
 
 #include "Poco/Checksum.h"
-#include "Poco/zlib.h"
+#include <zlib.h>
 
 
 namespace Poco {
diff -up poco-1.3.5-all/Foundation/src/Unicode.cpp.orig poco-1.3.5-all/Foundation/src/Unicode.cpp
--- poco-1.3.5-all/Foundation/src/Unicode.cpp.orig	2009-05-12 22:22:09.000000000 +0400
+++ poco-1.3.5-all/Foundation/src/Unicode.cpp	2009-11-11 15:02:28.189540436 +0300
@@ -37,56 +37,47 @@
 #include "Poco/Unicode.h"
 
 
-extern "C"
-{
-#include "pcre_config.h"
-#include "pcre_internal.h"
-}
+#include <wctype.h>
+#include <locale.h>
 
 
 namespace Poco {
 
 
-void Unicode::properties(int ch, CharacterProperties& props)
-{
-	const ucd_record* ucd = GET_UCD(ch);
-	props.category = static_cast<CharacterCategory>(_pcre_ucp_gentype[ucd->chartype]);
-	props.type     = static_cast<CharacterType>(ucd->chartype);
-	props.script   = static_cast<Script>(ucd->script);
+//void Unicode::properties(int ch, CharacterProperties& props)
+//{
+//}
+
+
+locale_t get_ctype_locale() {
+	static locale_t locale= NULL;
+	if(!locale)
+		locale= newlocale(LC_CTYPE_MASK, "en_US.UTF-8", NULL);
+	return locale;
 }
 
 	
 bool Unicode::isLower(int ch)
 {
-	CharacterProperties props;
-	properties(ch, props);
-	return props.category == UCP_LETTER && props.type == UCP_LOWER_CASE_LETTER;
+	return iswlower_l(ch, get_ctype_locale());
 }
 
 	
 bool Unicode::isUpper(int ch)
 {
-	CharacterProperties props;
-	properties(ch, props);
-	return props.category == UCP_LETTER && props.type == UCP_UPPER_CASE_LETTER;
+	return iswupper_l(ch, get_ctype_locale());
 }
 
 	
 int Unicode::toLower(int ch)
 {
-	if (isUpper(ch))
-		return static_cast<int>(UCD_OTHERCASE(static_cast<unsigned>(ch)));
-	else
-		return ch;
+	return towlower_l(ch, get_ctype_locale());
 }
 
 
 int Unicode::toUpper(int ch)
 {
-	if (isLower(ch))
-		return static_cast<int>(UCD_OTHERCASE(static_cast<unsigned>(ch)));
-	else
-		return ch;
+	return towupper_l(ch, get_ctype_locale());
 }
 
 
diff -up poco-1.3.5-all/XML/include/Poco/XML/ParserEngine.h.orig poco-1.3.5-all/XML/include/Poco/XML/ParserEngine.h
--- poco-1.3.5-all/XML/include/Poco/XML/ParserEngine.h.orig	2009-05-12 22:22:11.000000000 +0400
+++ poco-1.3.5-all/XML/include/Poco/XML/ParserEngine.h	2009-11-11 11:56:28.373540121 +0300
@@ -40,7 +40,7 @@
 
 
 #include "Poco/XML/XML.h"
-#include "Poco/XML/expat.h"
+#include <expat.h>
 #include "Poco/XML/XMLString.h"
 #include "Poco/XML/XMLStream.h"
 #include "Poco/SAX/Locator.h"
diff -up poco-1.3.5-all/XML/Makefile.orig poco-1.3.5-all/XML/Makefile
--- poco-1.3.5-all/XML/Makefile.orig	2009-05-12 22:22:11.000000000 +0400
+++ poco-1.3.5-all/XML/Makefile	2009-11-11 11:43:26.166540987 +0300
@@ -8,6 +8,8 @@
 
 include $(POCO_BASE)/build/rules/global
 
+SYSLIBS += -lexpat
+
 COMMONFLAGS += -DXML_NS -DXML_DTD -DHAVE_EXPAT_CONFIG_H
 
 objects = AbstractContainerNode AbstractNode Attr AttrMap Attributes \
@@ -22,7 +24,7 @@ objects = AbstractContainerNode Abstract
 	NamespaceSupport Node NodeFilter NodeIterator NodeList Notation \
 	ParserEngine ProcessingInstruction SAXException SAXParser Text \
 	TreeWalker WhitespaceFilter XMLException XMLFilter XMLFilterImpl XMLReader \
-	XMLString XMLWriter NodeAppender xmlparse xmlrole xmltok
+	XMLString XMLWriter NodeAppender
 
 target         = PocoXML
 target_version = $(LIBVERSION)
diff -up poco-1.3.5-all/Zip/src/ZipStream.cpp.orig poco-1.3.5-all/Zip/src/ZipStream.cpp
--- poco-1.3.5-all/Zip/src/ZipStream.cpp.orig	2009-05-12 22:22:14.000000000 +0400
+++ poco-1.3.5-all/Zip/src/ZipStream.cpp	2009-11-10 13:33:44.681866874 +0300
@@ -35,7 +35,7 @@
 
 
 #include "Poco/Zip/ZipStream.h"
-#include "Poco/zlib.h"
+#include <zlib.h>
 #include "Poco/Zip/ZipArchive.h"
 #include "Poco/Zip/AutoDetectStream.h"
 #include "Poco/Zip/PartialStream.h"
openSUSE Build Service is sponsored by