From: Richard W.M. Jones <"Richard W.M. Jones "> Date: Sat, 8 Nov 2008 14:33:43 +0000 (+0000) Subject: Poco 1.3.3p1 added. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=0ebd0ff266ae0602669e45f53ab32c29b40f6466;p=fedora-mingw.git Poco 1.3.3p1 added. --- diff --git a/.hgignore b/.hgignore index 451731d..78927a3 100644 --- a/.hgignore +++ b/.hgignore @@ -69,6 +69,7 @@ pangomm/pangomm-2.14.0.tar.bz2 pdcurses/PDCurses-3.4.tar.gz pixman/pixman-0.11.10.tar.gz pixman/pixman-0.12.0.tar.gz +poco/poco-1.3.3p1.tar.bz2 portablexdr/portablexdr-4.0.10.tar.gz portablexdr/portablexdr-4.0.11.tar.gz pthreads/pthreads-w32-2-8-0-release.tar.gz diff --git a/poco/README b/poco/README new file mode 100644 index 0000000..79778f7 --- /dev/null +++ b/poco/README @@ -0,0 +1,9 @@ +NB: We don't intend to maintain this library for Fedora unless someone +takes on the responsibility for maintenance. + +There is no corresponding native Fedora package. + +Upstream has a strange build system. + +See also: +http://lists.fedoraproject.org/pipermail/fedora-mingw/2008-November/000015.html diff --git a/poco/mingw32-poco.spec b/poco/mingw32-poco.spec new file mode 100644 index 0000000..db2ed21 --- /dev/null +++ b/poco/mingw32-poco.spec @@ -0,0 +1,102 @@ +%define __strip %{_mingw32_strip} +%define __objdump %{_mingw32_objdump} +%define _use_internal_dependency_generator 0 +%define __find_requires %{_mingw32_findrequires} +%define __find_provides %{_mingw32_findprovides} + +Name: mingw32-poco +Version: 1.3.3p1 +Release: 1%{?dist} +Summary: MinGW Windows C++ libraries for network-centric applications + +License: Boost +Group: Development/Libraries +URL: http://pocoproject.org/ +Source0: http://prdownloads.sourceforge.net/poco/poco-%{version}.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +Patch1001: poco-01-buildsystem.patch +Patch1002: poco-02-makefiles.patch +Patch1003: poco-03-memcpy.patch + +BuildArch: noarch + +BuildRequires: mingw32-filesystem >= 33 +BuildRequires: mingw32-gcc +BuildRequires: mingw32-gcc-c++ +BuildRequires: mingw32-binutils +BuildRequires: mingw32-openssl + + +%description +POCO, the C++ Portable Components, is a collection of open source C++ +class libraries that simplify and accelerate the development of +network-centric, portable applications in C++. The libraries integrate +perfectly with the C++ Standard Library and fill many of the +functional gaps left open by it. Their modular and efficient design +and implementation makes the C++ Portable Components extremely well +suited for embedded development, an area where the C++ programming +language is becoming increasingly popular, due to its suitability for +both low-level (device I/O, interrupt handlers, etc.) and high-level +object-oriented development. Of course, POCO is also ready for +enterprise-level challenges. + +The POCO libraries free developers from re-inventing the wheel, and +allow them to spend their time on more worthwhile areas, such as +getting things done quickly and working on the features that make +their application unique. + + +%prep +%setup -q -n poco-%{version} + +cp build/config/MinGW build/config/MinGW-cross +%patch1001 -p0 +%patch1002 -p0 +%patch1003 -p0 + + +%build +./configure --config=MinGW-cross --prefix=%{_mingw32_prefix} +make %{?_smp_flags} + + +%install +rm -rf $RPM_BUILD_ROOT +make DESTDIR=$RPM_BUILD_ROOT install + +# *.dll files should be installed in %{_mingw32_bindir}. +mkdir -p $RPM_BUILD_ROOT%{_mingw32_bindir} +mv $RPM_BUILD_ROOT%{_mingw32_libdir}/*.dll $RPM_BUILD_ROOT%{_mingw32_bindir}/ + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root) +# XXX I think the '*d.dll' libraries are debug versions and +# possibly they should be moved to a subpackage? +%{_mingw32_bindir}/libPocoFoundationd.dll +%{_mingw32_bindir}/libPocoFoundation.dll +%{_mingw32_bindir}/libPocoNetd.dll +%{_mingw32_bindir}/libPocoNet.dll +%{_mingw32_bindir}/libPocoUtild.dll +%{_mingw32_bindir}/libPocoUtil.dll +%{_mingw32_bindir}/libPocoXMLd.dll +%{_mingw32_bindir}/libPocoXML.dll +%{_mingw32_libdir}/libPocoFoundationd.dll.a +%{_mingw32_libdir}/libPocoFoundation.dll.a +%{_mingw32_libdir}/libPocoNetd.dll.a +%{_mingw32_libdir}/libPocoNet.dll.a +%{_mingw32_libdir}/libPocoUtild.dll.a +%{_mingw32_libdir}/libPocoUtil.dll.a +%{_mingw32_libdir}/libPocoXMLd.dll.a +%{_mingw32_libdir}/libPocoXML.dll.a +%{_mingw32_includedir}/Poco + + +%changelog +* Sat Nov 8 2008 Richard W.M. Jones - 1.3.3p1-1 +- Initial RPM release. diff --git a/poco/poco-01-buildsystem.patch b/poco/poco-01-buildsystem.patch new file mode 100644 index 0000000..12f7213 --- /dev/null +++ b/poco/poco-01-buildsystem.patch @@ -0,0 +1,59 @@ +--- build/config/MinGW-cross.old 2008-11-08 13:58:50.000000000 +0000 ++++ build/config/MinGW-cross 2008-11-08 13:44:24.000000000 +0000 +@@ -9,21 +9,22 @@ + # + # General Settings + # +-LINKMODE = STATIC ++LINKMODE = SHARED + POCO_TARGET_OSNAME = MinGW + POCO_TARGET_OSARCH = ia32 + + # + # Define Tools + # +-CC = gcc +-CXX = g++ ++CC = i686-pc-mingw32-gcc ++CXX = i686-pc-mingw32-g++ + LINK = $(CXX) +-LIB = ar -cr +-RANLIB = ranlib +-SHLIB = $(CXX) -shared -mno-cygwin -o $@ -Wl,--out-implib=$(dir $@)$(subst cyg,lib,$(basename $(notdir $@))).a ++LIB = i686-pc-mingw32-ar -cr ++#RANLIB = i686-pc-mingw32-ranlib ++RANLIB = : ++SHLIB = $(CXX) -shared -o $@ -Wl,--out-implib=$(dir $@)$(subst cyg,lib,$(basename $(notdir $@))).dll.a + SHLIBLN = $(POCO_BASE)/build/script/shlibln +-STRIP = strip ++STRIP = i686-pc-mingw32-strip + DEP = $(POCO_BASE)/build/script/makedepend.gcc + SHELL = sh + RM = rm -rf +@@ -36,7 +37,10 @@ + SHAREDLIBEXT = .dll + SHAREDLIBLINKEXT = .dll + +-BINEXT = .exe ++# RWMJ: They do, but only if you specify -o foo.exe. I see now ++# way to do that, so instead pretend that they don't have the .exe ++# extension. ++#BINEXT = .exe + + # + # Compiler and Linker Flags +@@ -66,9 +70,12 @@ + # + # System Specific Flags + # +-SYSFLAGS = -mno-cygwin -D_WIN32 -DMINGW32 -DWINVER=0x500 -DPOCO_NO_FPENVIRONMENT -DPCRE_STATIC -DPOCO_THREAD_STACK_SIZE -DFoundation_Config_INCLUDED -I/usr/local/include -I/usr/include ++SYSFLAGS = -D_WIN32 -DMINGW32 -DWINVER=0x500 -DPOCO_NO_FPENVIRONMENT -DPCRE_STATIC -DPOCO_THREAD_STACK_SIZE -DFoundation_Config_INCLUDED + + # + # System Specific Libraries + # +-SYSLIBS = -L/usr/local/lib -L/usr/lib -liphlpapi -lws2_32 -lssl -lcrypto -lws2_32 -lgdi32 ++# RWMJ: Not clear why, but for some reason the linker cannot find ++# the SSL and libcrypto libraries using just -lssl -lcrypto. (XXX) ++SSLLIBS = /usr/i686-pc-mingw32/sys-root/mingw/lib/libssl.dll.a /usr/i686-pc-mingw32/sys-root/mingw/lib/libcrypto.dll.a ++SYSLIBS = -liphlpapi -lws2_32 $(SSLLIBS) -lws2_32 -lgdi32 diff --git a/poco/poco-02-makefiles.patch b/poco/poco-02-makefiles.patch new file mode 100644 index 0000000..77a822b --- /dev/null +++ b/poco/poco-02-makefiles.patch @@ -0,0 +1,29 @@ +--- Foundation/Makefile.orig 2008-11-08 11:03:03.000000000 +0000 ++++ Foundation/Makefile 2008-11-08 11:03:26.000000000 +0000 +@@ -40,8 +40,12 @@ + ifeq ($(POCO_CONFIG),MinGW) + objects += EventLogChannel WindowsConsoleChannel + else ++ifeq ($(POCO_CONFIG),MinGW-cross) ++ objects += EventLogChannel WindowsConsoleChannel ++else + objects += SyslogChannel + endif ++endif + + target = PocoFoundation + target_version = $(LIBVERSION) +--- Util/Makefile.orig 2008-11-08 11:26:18.000000000 +0000 ++++ Util/Makefile 2008-11-08 11:26:44.000000000 +0000 +@@ -17,7 +17,10 @@ + Validator IntValidator RegExpValidator OptionCallback + + ifeq ($(POCO_CONFIG),MinGW) +- objects += WinService ++ objects += WinService ++endif ++ifeq ($(POCO_CONFIG),MinGW-cross) ++ objects += WinService + endif + + target = PocoUtil diff --git a/poco/poco-03-memcpy.patch b/poco/poco-03-memcpy.patch new file mode 100644 index 0000000..8588811 --- /dev/null +++ b/poco/poco-03-memcpy.patch @@ -0,0 +1,11 @@ +--- Foundation/src/Environment_WIN32.cpp.orig 2008-11-08 10:45:23.000000000 +0000 ++++ Foundation/src/Environment_WIN32.cpp 2008-11-08 10:45:49.000000000 +0000 +@@ -173,7 +173,7 @@ + { + if (pAdapter->Type == MIB_IF_TYPE_ETHERNET && pAdapter->AddressLength == sizeof(id)) + { +- std::memcpy(&id, pAdapter->Address, pAdapter->AddressLength); ++ memcpy(&id, pAdapter->Address, pAdapter->AddressLength); + found = true; + } + pAdapter = pAdapter->Next;