From 1940a74145dbbe86243068d63312667dd0b46111 Mon Sep 17 00:00:00 2001 From: Daniel Stonier Date: Wed, 2 May 2012 17:06:54 +1000 Subject: new packages: apr, apr-util, log4cxx --- src/apr-util.mk | 48 +++++++++++++++++++++++++++++ src/apr.mk | 58 +++++++++++++++++++++++++++++++++++ src/log4cxx-1-gcc.4.4.patch | 47 ++++++++++++++++++++++++++++ src/log4cxx-2-pkgconfig.patch | 17 ++++++++++ src/log4cxx-3-warnings.patch | 20 ++++++++++++ src/log4cxx-4-mingw.definitions.patch | 26 ++++++++++++++++ src/log4cxx.mk | 46 +++++++++++++++++++++++++++ 7 files changed, 262 insertions(+) create mode 100644 src/apr-util.mk create mode 100644 src/apr.mk create mode 100644 src/log4cxx-1-gcc.4.4.patch create mode 100644 src/log4cxx-2-pkgconfig.patch create mode 100644 src/log4cxx-3-warnings.patch create mode 100644 src/log4cxx-4-mingw.definitions.patch create mode 100644 src/log4cxx.mk diff --git a/src/apr-util.mk b/src/apr-util.mk new file mode 100644 index 0000000..7c02066 --- /dev/null +++ b/src/apr-util.mk @@ -0,0 +1,48 @@ +# This file is part of mingw-cross-env. +# See doc/index.html for further information. + +# Special flags +# +# -no-undefined +# +# Can't find any documentation on this option +# (--no-undefined is there, but this aint!) +# Anyway, it bombs when gcc tries to use it, +# but seems to help libtool at the final +# linking stage. If its not there, then +# mingw aborts with unfound symbol errors. +# That too is a problem, and maybe should +# resolved better than just by saying +# -no-undefined. + +PKG := apr-util +$(PKG)_IGNORE := +$(PKG)_VERSION := 1.3.10 +$(PKG)_CHECKSUM := f5aaf15542209fee479679299dc4cb1ac0924a59 +$(PKG)_SUBDIR := apr-util-$($(PKG)_VERSION) +$(PKG)_FILE := apr-util-$($(PKG)_VERSION).tar.gz +$(PKG)_WEBSITE := http://apr.apache.org/ +$(PKG)_URL := http://mirror.apache-kr.org/apr/$($(PKG)_FILE) +$(PKG)_URL_2 := http://apache.mirror.cdnetworks.com/apr/$($(PKG)_FILE) +$(PKG)_DEPS := gcc libiconv apr + +#define $(PKG)_UPDATE +# wget -q -O- 'http://www.ijg.org/' | \ +# $(SED) -n 's,.*jpegsrc\.v\([0-9][^>]*\)\.tar.*,\1,p' | \ +# head -1 +#endef + +define $(PKG)_BUILD + cd '$(1)' && ./configure \ + --prefix='$(PREFIX)/$(TARGET)' \ + --host='$(TARGET)' \ + --disable-shared \ + --enable-static \ + --without-pgsql \ + --without-sqlite2 \ + --without-sqlite3 \ + --with-apr='$(PREFIX)/$(TARGET)' \ + CFLAGS=-D_WIN32_WINNT=0x0500 \ + LDFLAGS=-no-undefined + $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= man_MANS= +endef diff --git a/src/apr.mk b/src/apr.mk new file mode 100644 index 0000000..7f4a425 --- /dev/null +++ b/src/apr.mk @@ -0,0 +1,58 @@ +# This file is part of mingw-cross-env. +# See doc/index.html for further information. + +# Special flags +# +# -no-undefined +# +# Can't find any documentation on this option +# (--no-undefined is there, but this aint!) +# Anyway, it bombs when gcc tries to use it, +# but seems to help libtool at the final +# linking stage. If its not there, then +# mingw aborts with unfound symbol errors. +# That too is a problem, and maybe should +# resolved better than just by saying +# -no-undefined. +# +# Type sizes +# +# Sometimes wine has an emulation environment which runs conf tests, +# unfortunately these return like a 4^M, not 4 which breaks all the +# configure script logic. +# ac_cv_sizeof_off_t=4 +# ac_cv_sizeof_pid_t=4 +# ac_cv_sizeof_size_t=4 +# ac_cv_sizeof_ssize_t=4 + +PKG := apr +$(PKG)_IGNORE := +$(PKG)_VERSION := 1.4.2 +$(PKG)_CHECKSUM := d48324efb0280749a5d7ccbb053d68545c568b4b +$(PKG)_SUBDIR := apr-$($(PKG)_VERSION) +$(PKG)_FILE := apr-$($(PKG)_VERSION).tar.gz +$(PKG)_WEBSITE := http://apr.apache.org/ +$(PKG)_URL := http://mirror.apache-kr.org/apr/$($(PKG)_FILE) +$(PKG)_URL_2 := http://apache.mirror.cdnetworks.com/apr/$($(PKG)_FILE) +$(PKG)_DEPS := gcc + +#define $(PKG)_UPDATE +# wget -q -O- 'http://www.ijg.org/' | \ +# $(SED) -n 's,.*jpegsrc\.v\([0-9][^>]*\)\.tar.*,\1,p' | \ +# head -1 +#endef + +define $(PKG)_BUILD + cd '$(1)' && ./configure \ + --prefix='$(PREFIX)/$(TARGET)' \ + --host='$(TARGET)' \ + --disable-shared \ + --enable-static \ + ac_cv_sizeof_off_t=4 \ + ac_cv_sizeof_pid_t=4 \ + ac_cv_sizeof_size_t=4 \ + ac_cv_sizeof_ssize_t=4 \ + CFLAGS=-D_WIN32_WINNT=0x0500 \ + LDFLAGS=-no-undefined + $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= man_MANS= +endef diff --git a/src/log4cxx-1-gcc.4.4.patch b/src/log4cxx-1-gcc.4.4.patch new file mode 100644 index 0000000..d1d9b16 --- /dev/null +++ b/src/log4cxx-1-gcc.4.4.patch @@ -0,0 +1,47 @@ +This file is part of mingw-cross-env. +See doc/index.html for further information. + +These changes have already been applied to log4cxx trunk to update inclusions +for recent gcc's. + +diff -NBaur vanilla/src/examples/cpp/console.cpp mingw_cross/src/examples/cpp/console.cpp +--- vanilla/src/examples/cpp/console.cpp 2008-04-01 07:34:52.000000000 +0900 ++++ mingw_cross/src/examples/cpp/console.cpp 2011-05-09 10:27:52.923808248 +0900 +@@ -15,6 +15,7 @@ + * limitations under the License. + */ + ++#include + #include + #include + #include +@@ -22,6 +23,7 @@ + #include + #include + #include ++#include + + using namespace log4cxx; + using namespace log4cxx::helpers; +diff -NBaur vanilla/src/main/cpp/inputstreamreader.cpp mingw_cross/src/main/cpp/inputstreamreader.cpp +--- vanilla/src/main/cpp/inputstreamreader.cpp 2008-04-01 07:34:09.000000000 +0900 ++++ mingw_cross/src/main/cpp/inputstreamreader.cpp 2011-05-09 10:27:27.991842868 +0900 +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + using namespace log4cxx; + using namespace log4cxx::helpers; +diff -NBaur vanilla/src/main/cpp/socketoutputstream.cpp mingw_cross/src/main/cpp/socketoutputstream.cpp +--- vanilla/src/main/cpp/socketoutputstream.cpp 2008-04-01 07:34:09.000000000 +0900 ++++ mingw_cross/src/main/cpp/socketoutputstream.cpp 2011-05-09 10:27:27.999058156 +0900 +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + + using namespace log4cxx; + using namespace log4cxx::helpers; diff --git a/src/log4cxx-2-pkgconfig.patch b/src/log4cxx-2-pkgconfig.patch new file mode 100644 index 0000000..a322568 --- /dev/null +++ b/src/log4cxx-2-pkgconfig.patch @@ -0,0 +1,17 @@ +This file is part of mingw-cross-env. +See doc/index.html for further information. + +This patch ensures that the correct dependencies can always be found for +static mingw builds. Not yet submitted upstream. + +diff -NBaur vanilla/liblog4cxx.pc.in mingw_cross/liblog4cxx.pc.in +--- vanilla/liblog4cxx.pc.in 2008-04-01 07:34:52.000000000 +0900 ++++ mingw_cross/liblog4cxx.pc.in 2011-05-09 10:31:00.175584637 +0900 +@@ -20,6 +20,7 @@ + Name: log4cxx + Description: log4cxx C++ logging framework + Version: @VERSION@ ++Requires: apr-util-1, apr-1 + Libs: -L${libdir} -llog4cxx + Cflags: -I${includedir} + diff --git a/src/log4cxx-3-warnings.patch b/src/log4cxx-3-warnings.patch new file mode 100644 index 0000000..c7f0890 --- /dev/null +++ b/src/log4cxx-3-warnings.patch @@ -0,0 +1,20 @@ +This file is part of mingw-cross-env. +See doc/index.html for further information. + +Already applied to log4cxx trunk. + +diff -NBaur vanilla/src/main/include/log4cxx/helpers/objectptr.h mingw_cross/src/main/include/log4cxx/helpers/objectptr.h +--- vanilla/src/main/include/log4cxx/helpers/objectptr.h 2008-04-01 07:34:26.000000000 +0900 ++++ mingw_cross/src/main/include/log4cxx/helpers/objectptr.h 2011-05-09 10:30:03.767560165 +0900 +@@ -28,9 +28,9 @@ + // switching between the initialization styles. + // + #if LOG4CXX_HELGRIND +-#define _LOG4CXX_OBJECTPTR_INIT(x) { exchange(x); ++#define _LOG4CXX_OBJECTPTR_INIT(x) : ObjectPtrBase() { exchange(x); + #else +-#define _LOG4CXX_OBJECTPTR_INIT(x) : p(x) { ++#define _LOG4CXX_OBJECTPTR_INIT(x) : ObjectPtrBase(), p(x) { + #endif + + namespace log4cxx diff --git a/src/log4cxx-4-mingw.definitions.patch b/src/log4cxx-4-mingw.definitions.patch new file mode 100644 index 0000000..2e1b1eb --- /dev/null +++ b/src/log4cxx-4-mingw.definitions.patch @@ -0,0 +1,26 @@ +This file is part of mingw-cross-env. +See doc/index.html for further information. + +Fixes a problem with the mismatched calling conventions in apr and log4cxx. +See http://www.mail-archive.com/log4cxx-user@logging.apache.org/msg02671.html +Not yet submitted upstream. + +diff -NBaur vanilla/src/main/include/log4cxx/helpers/thread.h mingw_cross/src/main/include/log4cxx/helpers/thread.h +--- vanilla/src/main/include/log4cxx/helpers/thread.h 2008-04-01 07:34:26.000000000 +0900 ++++ mingw_cross/src/main/include/log4cxx/helpers/thread.h 2011-05-09 11:08:23.123558232 +0900 +@@ -23,9 +23,13 @@ + + #if !defined(LOG4CXX_THREAD_FUNC) + #if defined(_WIN32) +-#define LOG4CXX_THREAD_FUNC __stdcall ++ #if defined(__MINGW32__) ++ #define LOG4CXX_THREAD_FUNC ++ #else ++ #define LOG4CXX_THREAD_FUNC __stdcall ++ #endif + #else +-#define LOG4CXX_THREAD_FUNC ++ #define LOG4CXX_THREAD_FUNC + #endif + #endif + diff --git a/src/log4cxx.mk b/src/log4cxx.mk new file mode 100644 index 0000000..b26bfaa --- /dev/null +++ b/src/log4cxx.mk @@ -0,0 +1,46 @@ +# This file is part of mingw-cross-env. +# See doc/index.html for further information. + +# Special flags +# +# -no-undefined +# +# Can't find any documentation on this option +# (--no-undefined is there, but this aint!) +# Anyway, it bombs when gcc tries to use it, +# but seems to help libtool at the final +# linking stage. If its not there, then +# mingw aborts with unfound symbol errors. +# That too is a problem, and maybe should +# resolved better than just by saying +# -no-undefined. + +PKG := log4cxx +$(PKG)_IGNORE := +$(PKG)_VERSION := 0.10.0 +$(PKG)_CHECKSUM := d79c053e8ac90f66c5e873b712bb359fd42b648d +$(PKG)_SUBDIR := apache-log4cxx-$($(PKG)_VERSION) +$(PKG)_FILE := apache-log4cxx-$($(PKG)_VERSION).tar.gz +$(PKG)_WEBSITE := http://logging.apache.org/log4cxx/index.html +$(PKG)_URL := http://apache.naggo.co.kr//logging/log4cxx/0.10.0/$($(PKG)_FILE) +$(PKG)_URL_2 := http://apache.mirror.cdnetworks.com//logging/log4cxx/0.10.0/$($(PKG)_FILE) +$(PKG)_DEPS := gcc apr-util + +#define $(PKG)_UPDATE +# wget -q -O- 'http://www.ijg.org/' | \ +# $(SED) -n 's,.*jpegsrc\.v\([0-9][^>]*\)\.tar.*,\1,p' | \ +# head -1 +#endef + +define $(PKG)_BUILD + cd '$(1)' && ./configure \ + --prefix='$(PREFIX)/$(TARGET)' \ + --host='$(TARGET)' \ + --disable-shared \ + --enable-static \ + --with-apr='$(PREFIX)/$(TARGET)' \ + --with-apr-util='$(PREFIX)/$(TARGET)' \ + CFLAGS=-D_WIN32_WINNT=0x0500 \ + CXXFLAGS=-D_WIN32_WINNT=0x0500 + $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= man_MANS= +endef -- cgit v0.12