Contribs: update all the libs, except Qt. This fixes linking with log4cxx on win32.

This commit is contained in:
Olivier Teulière 2012-04-28 15:31:21 +02:00
parent f83b397549
commit 4620d90f61
3 changed files with 136 additions and 120 deletions

View file

@ -1,19 +1,18 @@
ICONV_VERSION = 1.13.1 ICONV_VERSION = 1.14
LIBCONFIG_VERSION = 1.4.7 LIBCONFIG_VERSION = 1.4.8
BOOST_VERSION = 1_42_0 BOOST_VERSION = 1_49_0
QT_VERSION = 4.5.3 QT_VERSION = 4.7.2
EXPAT_VERSION = 2.0.1 EXPAT_VERSION = 2.0.1
ARABICA_VERSION = 2010-November ARABICA_VERSION = 2010-November
LIBXML2_VERSION = 2.7.8 LIBXML2_VERSION = 2.7.8
XERCES_VERSION = 3.1.1 XERCES_VERSION = 3.1.1
APR_VERSION = 1.4.5
APU_VERSION = 1.3.12
LOG4CXX_VERSION = 0.10.0 LOG4CXX_VERSION = 0.10.0
PREFIX = $(shell pwd)/inst PREFIX = $(shell pwd)/inst
PREFIX_FLAG = $(PREFIX)/.flag PREFIX_FLAG = $(PREFIX)/.flag
WGET = wget -c WGET = wget -c
SVN = svn
# XXX: Hardcoded for mingw on linux, at the moment # XXX: Hardcoded for mingw on linux, at the moment
CC = i586-mingw32msvc-gcc CC = i586-mingw32msvc-gcc
@ -23,7 +22,7 @@ CONFIGURE = CC="$(CC)" CXX="$(CXX)" CPPFLAGS="$(CPPFLAGS)" ./configure --host=i5
.PHONY: help all .PHONY: help all
all: .iconv .boost .qt .apr .apu .log4cxx .libconfig .expat .arabica all: .iconv .boost .expat .arabica .libconfig .apr2-svn .log4cxx-svn .qt
help: help:
@echo "Usage: make all" @echo "Usage: make all"
@ -51,119 +50,6 @@ $(ICONV_DIR_FLAG): $(ICONV_ARCHIVE)
touch $@ touch $@
### APR (needed by log4cxx) ###
APR_DIR = apr-$(APR_VERSION)
APR_DIR_FLAG = $(APR_DIR)/.flag
APR_ARCHIVE = apr-$(APR_VERSION).tar.bz2
$(APR_ARCHIVE): $(PREFIX_FLAG)
$(WGET) http://www.motorlogy.com/apachemirror/apr/$@
$(APR_DIR_FLAG): $(APR_ARCHIVE)
tar xjf $<
touch $@
.apr: $(APR_DIR_FLAG)
(cd $(APR_DIR) && $(CONFIGURE) --enable-static --disable-shared && make && make install)
touch $@
### APU (needed by log4cxx) ###
APU_DIR = apr-util-$(APU_VERSION)
APU_DIR_FLAG = $(APU_DIR)/.flag
APU_ARCHIVE = apr-util-$(APU_VERSION).tar.bz2
$(APU_ARCHIVE): $(PREFIX_FLAG)
$(WGET) http://www.motorlogy.com/apachemirror/apr/$@
$(APU_DIR_FLAG): $(APU_ARCHIVE)
tar xjf $<
touch $@
.apu: $(APU_DIR_FLAG)
(cd $(APU_DIR) && $(CONFIGURE) --with-apr=$(PREFIX) --enable-static --disable-shared && make && make install)
touch $@
### log4cxx ###
LOG4CXX_DIR = apache-log4cxx-$(LOG4CXX_VERSION)
LOG4CXX_DIR_FLAG = $(LOG4CXX_DIR)/.flag
LOG4CXX_ARCHIVE = apache-log4cxx-$(LOG4CXX_VERSION).tar.gz
$(LOG4CXX_ARCHIVE): $(PREFIX_FLAG)
$(WGET) http://apache.cyberuse.com/logging/log4cxx/$(LOG4CXX_VERSION)/$@
$(LOG4CXX_DIR_FLAG): $(LOG4CXX_ARCHIVE)
tar xzf $<
touch $@
.log4cxx: $(LOG4CXX_DIR_FLAG)
(cd $(LOG4CXX_DIR) && patch -p0 < ../log4cxx-no-example.patch && patch -p0 < ../log4cxx-build-fixes.patch && $(CONFIGURE) --with-apr=$(PREFIX) --with-apu=$(PREFIX) --with-apr-util=$(PREFIX) --disable-doxygen --disable-dot --enable-static --disable-shared && make && make install)
touch $@
### libconfig ###
LIBCONFIG_DIR = libconfig-$(LIBCONFIG_VERSION)
LIBCONFIG_DIR_FLAG = $(LIBCONFIG_DIR)/.flag
LIBCONFIG_ARCHIVE = libconfig-$(LIBCONFIG_VERSION).tar.gz
$(LIBCONFIG_ARCHIVE): $(PREFIX_FLAG)
$(WGET) http://www.hyperrealm.com/libconfig/$@
$(LIBCONFIG_DIR_FLAG): $(LIBCONFIG_ARCHIVE)
tar xvf $<
touch $@
.libconfig: $(LIBCONFIG_DIR_FLAG)
(cd $(LIBCONFIG_DIR) && patch -p0 < ../libconfig++-static-build.patch && CFLAGS=-DLIBCONFIG_STATIC CXXFLAGS=-DLIBCONFIGXX_STATIC $(CONFIGURE) --disable-examples --enable-static --disable-shared && make && make install)
touch $@
### Boost ###
BOOST_DIR = boost_$(BOOST_VERSION)
BOOST_DIR_FLAG = $(BOOST_DIR)/.flag
BOOST_ARCHIVE = boost_$(BOOST_VERSION).tar.bz2
$(BOOST_ARCHIVE): $(PREFIX_FLAG)
$(WGET) http://garr.dl.sourceforge.net/sourceforge/boost/$@
$(BOOST_DIR_FLAG): $(BOOST_ARCHIVE)
tar xjf $<
touch $@
# We don't build any library, because we don't need them (and it is really
# hard to cross-compile with their crappy build system)
.boost: $(BOOST_DIR_FLAG)
#(cd $(BOOST_DIR) && ./configure --prefix=$(PREFIX) && ./tools/jam/src/bin.linuxx86/bjam --toolset=gcc --prefix=$(PREFIX) --without-date_time --without-filesystem --without-graph --without-iostreams --without-program_options --without-python --without-regex --without-serialization --without-signals --without-test --without-thread --without-wave install)
cp -r $(BOOST_DIR)/boost $(PREFIX)/include
touch $@
### Qt ###
# FIXME: No automated way to build it at the moment :-(
QT_DIR = qt4-$(QT_VERSION)-win32-bin
QT_DIR_FLAG = $(QT_DIR)/.flag
QT_ARCHIVE = qt4-$(QT_VERSION)-win32-bin.tar.bz2
$(QT_ARCHIVE): $(PREFIX_FLAG)
$(WGET) http://dl.sv.nongnu.org/releases-noredirect/eliot/other/$@
$(QT_DIR_FLAG): $(QT_ARCHIVE)
tar xjf $<
touch $@
.qt: $(QT_DIR_FLAG)
# The final mv is needed, because of the way the QT4LOCALEDIR variable is computed
(cd $(QT_DIR); cp -r bin include lib share $(PREFIX); sed 's,@@PREFIX@@,$(PREFIX),' $(PREFIX)/lib/pkgconfig/QtCore.pc.in > $(PREFIX)/lib/pkgconfig/QtCore.pc; sed 's,@@PREFIX@@,$(PREFIX),' lib/pkgconfig/QtGui.pc.in > $(PREFIX)/lib/pkgconfig/QtGui.pc; rm $(PREFIX)/lib/pkgconfig/*.in; mkdir -p $(PREFIX)/share/qt4; mv $(PREFIX)/share/translations $(PREFIX)/share/qt4)
touch $@
### Expat ### ### Expat ###
EXPAT_DIR = expat-$(EXPAT_VERSION) EXPAT_DIR = expat-$(EXPAT_VERSION)
@ -237,3 +123,109 @@ $(XERCES_DIR_FLAG): $(XERCES_ARCHIVE)
(cd $(XERCES_DIR) && $(CONFIGURE) --enable-static --disable-shared --disable-network && make install) (cd $(XERCES_DIR) && $(CONFIGURE) --enable-static --disable-shared --disable-network && make install)
touch $@ touch $@
### APR 2 SVN (needed by log4cxx) ###
# APR 2 is not yet released, so we have to use the SVN version (last known to work: 28/04/2012)
APR_DIR2 = apr
APR_DIR_FLAG2 = $(APR_DIR2)/.flag
$(APR_DIR_FLAG2):
$(SVN) co http://svn.apache.org/repos/asf/apr/apr/trunk/ apr
touch $@
.apr2-svn: $(APR_DIR_FLAG2)
(cd $(APR_DIR2) && patch -p0 < ../apr-force-large-files-support.patch && ./buildconf && $(CONFIGURE) --enable-static --disable-shared --with-expat=$(PREFIX) && make && make install)
touch $@
### log4cxx SVN ###
LOG4CXX_DIR2 = apache-log4cxx
LOG4CXX_DIR_FLAG2 = $(LOG4CXX_DIR2)/.flag
$(LOG4CXX_DIR_FLAG2):
$(SVN) checkout http://svn.apache.org/repos/asf/logging/log4cxx/trunk apache-log4cxx
touch $@
.log4cxx-svn: $(LOG4CXX_DIR_FLAG2)
(cd $(LOG4CXX_DIR2) && ./autogen.sh && patch -p0 < ../log4cxx-no-example.patch && patch -p0 < ../log4cxx-build-fixes.patch && patch -p0 < ../log4cxx-pkg-config.patch && $(CONFIGURE) --with-apr=$(PREFIX)/bin/apr-2-config --disable-doxygen --disable-dot --enable-static --disable-shared && make && make -i install)
touch $@
### log4cxx ###
LOG4CXX_DIR = apache-log4cxx-$(LOG4CXX_VERSION)
LOG4CXX_DIR_FLAG = $(LOG4CXX_DIR)/.flag
LOG4CXX_ARCHIVE = apache-log4cxx-$(LOG4CXX_VERSION).tar.gz
$(LOG4CXX_ARCHIVE): $(PREFIX_FLAG)
$(WGET) http://apache.cyberuse.com/logging/log4cxx/$(LOG4CXX_VERSION)/$@
$(LOG4CXX_DIR_FLAG): $(LOG4CXX_ARCHIVE)
tar xzf $<
touch $@
.log4cxx: $(LOG4CXX_DIR_FLAG)
(cd $(LOG4CXX_DIR) && patch -p0 < ../log4cxx-no-example.patch && patch -p0 < ../log4cxx-build-fixes.patch && patch -p0 < ../log4cxx-pkg-config.patch && $(CONFIGURE) --with-apr=$(PREFIX)/bin/apr-2-config --disable-doxygen --disable-dot --enable-static --disable-shared && make && make install)
touch $@
### libconfig ###
LIBCONFIG_DIR = libconfig-$(LIBCONFIG_VERSION)
LIBCONFIG_DIR_FLAG = $(LIBCONFIG_DIR)/.flag
LIBCONFIG_ARCHIVE = libconfig-$(LIBCONFIG_VERSION).tar.gz
$(LIBCONFIG_ARCHIVE): $(PREFIX_FLAG)
$(WGET) http://www.hyperrealm.com/libconfig/$@
$(LIBCONFIG_DIR_FLAG): $(LIBCONFIG_ARCHIVE)
tar xvf $<
touch $@
.libconfig: $(LIBCONFIG_DIR_FLAG)
(cd $(LIBCONFIG_DIR) && patch -p0 < ../libconfig++-static-build.patch && CFLAGS=-DLIBCONFIG_STATIC CXXFLAGS=-DLIBCONFIGXX_STATIC $(CONFIGURE) --disable-examples --enable-static --disable-shared && make && make install)
touch $@
### Boost ###
BOOST_DIR = boost_$(BOOST_VERSION)
BOOST_DIR_FLAG = $(BOOST_DIR)/.flag
BOOST_ARCHIVE = boost_$(BOOST_VERSION).tar.bz2
$(BOOST_ARCHIVE): $(PREFIX_FLAG)
$(WGET) http://garr.dl.sourceforge.net/sourceforge/boost/$@
$(BOOST_DIR_FLAG): $(BOOST_ARCHIVE)
tar xjf $<
touch $@
# We don't build any library, because we don't need them (and it is really
# hard to cross-compile with their crappy build system)
.boost: $(BOOST_DIR_FLAG)
#(cd $(BOOST_DIR) && ./configure --prefix=$(PREFIX) && ./tools/jam/src/bin.linuxx86/bjam --toolset=gcc --prefix=$(PREFIX) --without-date_time --without-filesystem --without-graph --without-iostreams --without-program_options --without-python --without-regex --without-serialization --without-signals --without-test --without-thread --without-wave install)
cp -r $(BOOST_DIR)/boost $(PREFIX)/include
touch $@
### Qt ###
# FIXME: No automated way to build it at the moment :-(
QT_DIR = qt4-$(QT_VERSION)-win32-bin
QT_DIR_FLAG = $(QT_DIR)/.flag
QT_ARCHIVE = qt4-$(QT_VERSION)-win32-bin.tar.bz2
$(QT_ARCHIVE): $(PREFIX_FLAG)
$(WGET) http://dl.sv.nongnu.org/releases-noredirect/eliot/other/$@
$(QT_DIR_FLAG): $(QT_ARCHIVE)
tar xjf $<
touch $@
.qt: $(QT_DIR_FLAG)
# The final mv is needed, because of the way the QT4LOCALEDIR variable is computed
(cd $(QT_DIR); cp -r bin include lib share $(PREFIX); sed 's,@@PREFIX@@,$(PREFIX),' $(PREFIX)/lib/pkgconfig/QtCore.pc.in > $(PREFIX)/lib/pkgconfig/QtCore.pc; sed 's,@@PREFIX@@,$(PREFIX),' lib/pkgconfig/QtGui.pc.in > $(PREFIX)/lib/pkgconfig/QtGui.pc; rm $(PREFIX)/lib/pkgconfig/*.in; mkdir -p $(PREFIX)/share/qt4; mv $(PREFIX)/share/translations $(PREFIX)/share/qt4)
touch $@

View file

@ -0,0 +1,15 @@
# Force support of large files, to avoid the following link error:
# /home/ipkiss/dev/eliot/contribs/extras/contrib-win32/inst/lib/libapr-2.a(apr_strings.o): In function `apr_strtoff@16':
# /home/ipkiss/dev/eliot/contribs/extras/contrib-win32/apr/strings/apr_strings.c:240: undefined reference to `_strtoi'
diff -ur ./configure.in.orig ./configure.in
--- ./configure.in.orig 2012-04-28 14:51:17.772384679 +0200
+++ ./configure.in 2012-04-28 14:55:05.636390009 +0200
@@ -1698,7 +1698,7 @@
# off_t can legitimately be smaller than size_t
aprlfs=1
else
- aprlfs=0
+ aprlfs=1
fi
AC_MSG_CHECKING([which type to use for apr_off_t])

View file

@ -0,0 +1,9 @@
--- liblog4cxx.pc.in.orig 2012-04-28 15:04:38.732403412 +0200
+++ liblog4cxx.pc.in 2012-04-28 15:06:50.172406490 +0200
@@ -22,5 +22,5 @@
Version: @VERSION@
Libs: -L${libdir} -llog4cxx
Cflags: -I${includedir}
-Requires.private: apr-util-1
+Requires: apr-2