Update contribs for Windows

This brings various improvements in the Makefile as well.
Qt is currently broken though.
This commit is contained in:
Olivier Teulière 2018-11-10 13:09:13 +01:00
parent 5f669aef53
commit 0a1a46942e
7 changed files with 299 additions and 193 deletions

11
.gitignore vendored
View file

@ -83,16 +83,9 @@ utils/eliotcurses
utils/eliottxt
linux
win32
extras/contrib/*.tar.gz
extras/contrib/*.tar.bz2
extras/contrib/.*
extras/contrib/lib*
extras/contrib/archives
extras/contrib/build
extras/contrib/inst
extras/contrib/wx*
extras/contrib/qt*
extras/contrib/boost*
extras/contrib/expat*
extras/contrib/arabica*
extras/reports/*.pyc
qt/ui/*.h
qt/*.moc.cpp

View file

@ -1,205 +1,133 @@
ICONV_VERSION = 1.14
LIBCONFIG_VERSION = 1.4.8
BOOST_VERSION = 1_49_0
QT_VERSION = 4.8.2
EXPAT_VERSION = 2.0.1
ARABICA_VERSION = 2010-November
LIBXML2_VERSION = 2.7.8
XERCES_VERSION = 3.1.1
LOG4CXX_VERSION = 0.10.0
APR_VERSION := 1.6.5
APU_VERSION := 1.6.1
ARABICA_VERSION := 2016-January
BOOST_VERSION := 1.68.0
EXPAT_VERSION := 2.2.6
ICONV_VERSION := 1.15
LIBCONFIG_VERSION := 1.7.2
LIBXML2_VERSION := 2.9.8
LOG4CXX_VERSION := 0.10.0
QT_VERSION := 4.5.3
QT2_VERSION := 5.6.3
XERCES_VERSION := 3.2.2
HOST := x86_64-w64-mingw32
BUILD := i386-linux
PREFIX = $(shell pwd)/inst
BASE = $(shell pwd)
PREFIX = $(BASE)/inst
PREFIX_FLAG = $(PREFIX)/.flag
WGET = wget -c
SVN = svn
ARCHIVE_DIR = $(BASE)/archives
BUILD_DIR = $(BASE)/build
WGET = wget -c -P $(ARCHIVE_DIR)
TAR = tar -C $(BUILD_DIR)
# XXX: Hardcoded for mingw on linux, at the moment
CC = i586-mingw32msvc-gcc
CXX = i586-mingw32msvc-g++
CC = x86_64-w64-mingw32-gcc
CXX = x86_64-w64-mingw32-g++
CPPFLAGS += -I$(PREFIX)/include
CONFIGURE = CC="$(CC)" CXX="$(CXX)" CPPFLAGS="$(CPPFLAGS)" ./configure --host=i586-mingw32msvc --build=i386-linux --prefix=$(PREFIX)
CONFIGURE = CC="$(CC)" CXX="$(CXX)" CPPFLAGS="$(CPPFLAGS)" ./configure --host=$(HOST) --build=$(BUILD) --prefix=$(PREFIX)
.PHONY: help all
# Dependencies (incomplete list):
# expat <- apr <- apu <- log4cxx
LIBS := iconv boost expat apr apu libconfig log4cxx arabica qt2
TARGETS = $(LIBS:%=.%)
all: .iconv .boost .expat .arabica .libconfig .apr2-svn .log4cxx-svn .qt
.PHONY: help all clean clean-% distclean distclean-%
all: $(TARGETS)
# Remove the extracted directory and the marker flag
clean-%:
rm -rf $($(shell echo $* | tr a-z A-Z)_DIR) .$*
# Also remove the archive
distclean-%: clean-%
rm -rf $($(shell echo $* | tr a-z A-Z)_ARCHIVE)
clean: $(LIBS:%=clean-%)
distclean:
rm -rf $(PREFIX)
rm -rf $(ARCHIVE_DIR)
rm -rf $(BUILD_DIR)
help:
@echo "Usage: make all"
$(PREFIX_FLAG):
mkdir -p $(PREFIX)
mkdir -p $(PREFIX) $(ARCHIVE_DIR) $(BUILD_DIR)
touch $@
### iconv ###
### APR (needed by log4cxx) ###
ICONV_DIR = libiconv-$(ICONV_VERSION)
ICONV_DIR_FLAG = $(ICONV_DIR)/.flag
ICONV_ARCHIVE = libiconv-$(ICONV_VERSION).tar.gz
APR_DIR = $(BUILD_DIR)/apr-$(APR_VERSION)
APR_DIR_FLAG = $(APR_DIR)/.flag
APR_ARCHIVE = $(ARCHIVE_DIR)/apr-$(APR_VERSION).tar.bz2
$(ICONV_ARCHIVE): $(PREFIX_FLAG)
$(WGET) http://ftp.gnu.org/pub/gnu/libiconv/$@
$(APR_ARCHIVE): $(PREFIX_FLAG)
# $(WGET) http://www-eu.apache.org/dist/apr/$(shell basename $@)
$(WGET) http://archive.apache.org/dist/apr/$(shell basename $@)
$(ICONV_DIR_FLAG): $(ICONV_ARCHIVE)
tar xzf $<
$(APR_DIR_FLAG): $(APR_ARCHIVE)
$(TAR) -xjf $<
touch $@
.iconv: $(ICONV_DIR_FLAG)
(cd $(ICONV_DIR) && $(CONFIGURE) --enable-static --disable-shared && make && make install)
.apr: $(APR_DIR_FLAG)
(cd $(APR_DIR) && patch -p0 < $(BASE)/apr-bugzilla-56342.patch && patch -p0 < $(BASE)/apr.patch && $(CONFIGURE) --enable-static --disable-shared && make && make install)
touch $@
### Expat ###
### APU (needed by log4cxx) ###
EXPAT_DIR = expat-$(EXPAT_VERSION)
EXPAT_DIR_FLAG = $(EXPAT_DIR)/.flag
EXPAT_ARCHIVE = expat-$(EXPAT_VERSION).tar.gz
APU_DIR = $(BUILD_DIR)/apr-util-$(APU_VERSION)
APU_DIR_FLAG = $(APU_DIR)/.flag
APU_ARCHIVE = $(ARCHIVE_DIR)/apr-util-$(APU_VERSION).tar.bz2
$(EXPAT_ARCHIVE): $(PREFIX_FLAG)
$(WGET) http://kent.dl.sf.net/project/expat/expat/$(EXPAT_VERSION)/$@
$(APU_ARCHIVE): $(PREFIX_FLAG)
$(WGET) http://www-eu.apache.org/dist/apr/$(shell basename $@)
$(EXPAT_DIR_FLAG): $(EXPAT_ARCHIVE)
tar xzf $<
$(APU_DIR_FLAG): $(APU_ARCHIVE)
$(TAR) -xjf $<
touch $@
.expat: $(EXPAT_DIR_FLAG)
(cd $(EXPAT_DIR) && $(CONFIGURE) --enable-static --disable-shared && make install)
.apu: $(APU_DIR_FLAG)
(cd $(APU_DIR) && $(CONFIGURE) --with-apr=$(PREFIX) --enable-static --disable-shared && make && make install)
touch $@
### Arabica ###
ARABICA_DIR = arabica-$(ARABICA_VERSION)
ARABICA_DIR = $(BUILD_DIR)/arabica-$(ARABICA_VERSION)
ARABICA_DIR_FLAG = $(ARABICA_DIR)/.flag
ARABICA_ARCHIVE = arabica-$(ARABICA_VERSION).tar.bz2
ARABICA_ARCHIVE = $(ARCHIVE_DIR)/$(ARABICA_VERSION).tar.gz
$(ARABICA_ARCHIVE): $(PREFIX_FLAG)
$(WGET) http://downloads.sf.net/project/arabica/arabica/November-10/$@
$(WGET) https://github.com/jezhiggins/arabica/archive/$(shell basename $@)
$(ARABICA_DIR_FLAG): $(ARABICA_ARCHIVE)
tar xjf $<
$(TAR) -xzf $<
touch $@
.arabica: $(ARABICA_DIR_FLAG)
(cd $(ARABICA_DIR) && patch -p0 < ../arabica-no-example.patch && $(CONFIGURE) --enable-static --disable-shared --with-parser=expat --with-expat=$(PREFIX) --with-boost=$(PREFIX) --with-tests=no --with-dom=no && make install)
touch $@
### LibXML 2 ###
LIBXML2_DIR = libxml2-$(LIBXML2_VERSION)
LIBXML2_DIR_FLAG = $(LIBXML2_DIR)/.flag
LIBXML2_ARCHIVE = libxml2-$(LIBXML2_VERSION).tar.gz
$(LIBXML2_ARCHIVE): $(PREFIX_FLAG)
$(WGET) ftp://xmlsoft.org/libxml2/$@
$(LIBXML2_DIR_FLAG): $(LIBXML2_ARCHIVE)
tar xzf $<
touch $@
# TODO: add more --without-xxx flags (apparently needed for build: pattern, debug)
# --with-legacy and --with-html are needed for arabica
.libxml2: $(LIBXML2_DIR_FLAG)
(cd $(LIBXML2_DIR) && $(CONFIGURE) --enable-static --disable-shared --with-legacy --without-schematron --without-tree --without-zlib --without-http --without-ftp --without-html --without-python --without-docbook --without-regexps && make install)
touch $@
### Xerces ###
XERCES_DIR = xerces-c-$(XERCES_VERSION)
XERCES_DIR_FLAG = $(XERCES_DIR)/.flag
XERCES_ARCHIVE = xerces-c-$(XERCES_VERSION).tar.gz
$(XERCES_ARCHIVE): $(PREFIX_FLAG)
$(WGET) http://mirrors.24-7-solutions.net/pub/apache/xerces/c/3/sources/$@
$(XERCES_DIR_FLAG): $(XERCES_ARCHIVE)
tar xzf $<
touch $@
.xerces: $(XERCES_DIR_FLAG)
(cd $(XERCES_DIR) && $(CONFIGURE) --enable-static --disable-shared --disable-network && make install)
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)
(cd $(ARABICA_DIR) && autoreconf -i && $(CONFIGURE) --enable-static --disable-shared --with-parser=expat --with-expat=$(PREFIX) --with-boost=$(PREFIX) --with-tests=no --with-dom=no && make install)
touch $@
### Boost ###
BOOST_DIR = boost_$(BOOST_VERSION)
BOOST_UNDERSCORE_VERSION = $(subst .,_,$(BOOST_VERSION))
BOOST_DIR = $(BUILD_DIR)/boost_$(BOOST_UNDERSCORE_VERSION)
BOOST_DIR_FLAG = $(BOOST_DIR)/.flag
BOOST_ARCHIVE = boost_$(BOOST_VERSION).tar.bz2
BOOST_ARCHIVE = $(ARCHIVE_DIR)/boost_$(BOOST_UNDERSCORE_VERSION).tar.bz2
$(BOOST_ARCHIVE): $(PREFIX_FLAG)
$(WGET) http://garr.dl.sourceforge.net/sourceforge/boost/$@
$(WGET) https://dl.bintray.com/boostorg/release/$(BOOST_VERSION)/source/$(shell basename $@)
$(BOOST_DIR_FLAG): $(BOOST_ARCHIVE)
tar xjf $<
$(TAR) -xjf $<
touch $@
# We don't build any library, because we don't need them (and it is really
@ -210,26 +138,158 @@ $(BOOST_DIR_FLAG): $(BOOST_ARCHIVE)
touch $@
### Expat ###
EXPAT_UNDERSCORE_VERSION = $(subst .,_,$(EXPAT_VERSION))
EXPAT_DIR = $(BUILD_DIR)/libexpat-R_$(EXPAT_UNDERSCORE_VERSION)
EXPAT_DIR_FLAG = $(EXPAT_DIR)/.flag
EXPAT_ARCHIVE = $(ARCHIVE_DIR)/R_$(EXPAT_UNDERSCORE_VERSION).tar.gz
$(EXPAT_ARCHIVE): $(PREFIX_FLAG)
$(WGET) https://github.com/libexpat/libexpat/archive/$(shell basename $@)
$(EXPAT_DIR_FLAG): $(EXPAT_ARCHIVE)
$(TAR) -xzf $<
touch $@
.expat: $(EXPAT_DIR_FLAG)
(cd $(EXPAT_DIR)/expat && ./buildconf.sh && $(CONFIGURE) --without-xmlwf --enable-static --disable-shared && make install)
touch $@
### iconv ###
ICONV_DIR = $(BUILD_DIR)/libiconv-$(ICONV_VERSION)
ICONV_DIR_FLAG = $(ICONV_DIR)/.flag
ICONV_ARCHIVE = $(ARCHIVE_DIR)/libiconv-$(ICONV_VERSION).tar.gz
$(ICONV_ARCHIVE): $(PREFIX_FLAG)
$(WGET) https://ftp.gnu.org/pub/gnu/libiconv/$(shell basename $@)
$(ICONV_DIR_FLAG): $(ICONV_ARCHIVE)
$(TAR) -xzf $<
touch $@
.iconv: $(ICONV_DIR_FLAG)
(cd $(ICONV_DIR) && $(CONFIGURE) --enable-static --disable-shared && make && make install)
touch $@
### libconfig ###
LIBCONFIG_DIR = $(BUILD_DIR)/libconfig-$(LIBCONFIG_VERSION)
LIBCONFIG_DIR_FLAG = $(LIBCONFIG_DIR)/.flag
LIBCONFIG_ARCHIVE = $(ARCHIVE_DIR)/v$(LIBCONFIG_VERSION).tar.gz
$(LIBCONFIG_ARCHIVE): $(PREFIX_FLAG)
$(WGET) https://github.com/hyperrealm/libconfig/archive/$(shell basename $@)
$(LIBCONFIG_DIR_FLAG): $(LIBCONFIG_ARCHIVE)
$(TAR) -xvf $<
touch $@
.libconfig: $(LIBCONFIG_DIR_FLAG)
(cd $(LIBCONFIG_DIR) && autoreconf -i && patch -p0 < $(BASE)/libconfig++-ignore-docs.patch && patch -p0 < $(BASE)/libconfig++-static-build.patch && CFLAGS=-DLIBCONFIG_STATIC CXXFLAGS=-DLIBCONFIGXX_STATIC $(CONFIGURE) --disable-examples --enable-static --disable-shared && make && make install)
touch $@
### LibXML 2 ###
LIBXML2_DIR = $(BUILD_DIR)/libxml2-$(LIBXML2_VERSION)
LIBXML2_DIR_FLAG = $(LIBXML2_DIR)/.flag
LIBXML2_ARCHIVE = $(ARCHIVE_DIR)/libxml2-$(LIBXML2_VERSION).tar.gz
$(LIBXML2_ARCHIVE): $(PREFIX_FLAG)
$(WGET) ftp://xmlsoft.org/libxml2/$(shell basename $@)
$(LIBXML2_DIR_FLAG): $(LIBXML2_ARCHIVE)
$(TAR) -xzf $<
touch $@
# TODO: add more --without-xxx flags (apparently needed for build: pattern, debug)
# --with-legacy and --with-html are needed for arabica
.libxml2: $(LIBXML2_DIR_FLAG)
(cd $(LIBXML2_DIR) && $(CONFIGURE) --enable-static --disable-shared --with-legacy --without-schematron --without-zlib --without-http --without-ftp --without-html --without-python --without-docbook --without-regexps && make install)
touch $@
### log4cxx ###
LOG4CXX_DIR = $(BUILD_DIR)/apache-log4cxx-$(LOG4CXX_VERSION)
LOG4CXX_DIR_FLAG = $(LOG4CXX_DIR)/.flag
LOG4CXX_ARCHIVE = $(ARCHIVE_DIR)/apache-log4cxx-$(LOG4CXX_VERSION).tar.gz
$(LOG4CXX_ARCHIVE): $(PREFIX_FLAG)
$(WGET) http://www-eu.apache.org/dist/logging/log4cxx/$(LOG4CXX_VERSION)/$(shell basename $@)
$(LOG4CXX_DIR_FLAG): $(LOG4CXX_ARCHIVE)
$(TAR) -xzf $<
touch $@
.log4cxx: $(LOG4CXX_DIR_FLAG)
(cd $(LOG4CXX_DIR) && patch -p0 < $(BASE)/log4cxx-no-example.patch && patch -p0 < $(BASE)/log4cxx-build-fixes.patch && CXXFLAGS=-Wno-narrowing $(CONFIGURE) --with-apr=$(PREFIX) --with-apu=$(PREFIX) --with-apr-util=$(PREFIX) --disable-doxygen --disable-dot --enable-static --disable-shared && make && make install)
touch $@
### Qt ###
# FIXME: No automated way to build it at the moment :-(
QT_DIR = qt4-$(QT_VERSION)-win32-bin
QT_DIR = $(BUILD_DIR)/qt4-$(QT_VERSION)-win32-bin
QT_DIR_FLAG = $(QT_DIR)/.flag
QT_ARCHIVE = qt4-$(QT_VERSION)-win32-bin.tar.bz2
QT_ARCHIVE = $(ARCHIVE_DIR)/qt4-$(QT_VERSION)-win32-bin.tar.bz2
$(QT_ARCHIVE): $(PREFIX_FLAG)
$(WGET) http://dl.sv.nongnu.org/releases-noredirect/eliot/other/$@
$(WGET) http://dl.sv.nongnu.org/releases-noredirect/eliot/other/$(shell basename $@)
$(QT_DIR_FLAG): $(QT_ARCHIVE)
tar xjf $<
$(TAR) -xjf $<
touch $@
.qt: $(QT_DIR_FLAG)
(cd $(QT_DIR); \
cp -r bin include lib share $(PREFIX); \
for i in QtCore QtGui QtNetwork; do \
sed 's,@@PREFIX@@,$(PREFIX),' $(PREFIX)/lib/pkgconfig/$$i.pc.in > $(PREFIX)/lib/pkgconfig/$$i.pc; \
done; \
rm $(PREFIX)/lib/pkgconfig/*.in)
#(cd $<; mkdir -p $(PREFIX)/bin; mkdir -p $(PREFIX)/include; mkdir -p $(PREFIX)/lib/pkgconfig; rm -f $(PREFIX)/lib/pkgconfig/Qt*; sed 's,@@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; cp -r include/* $(PREFIX)/include; cp lib/*a $(PREFIX)/lib; mkdir -p $(PREFIX)/share/qt4/translations; cp -r share/translations/* $(PREFIX)/share/qt4/translations)
(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)
touch $@
QT2_DIR = $(BUILD_DIR)/qtbase-opensource-src-$(QT2_VERSION)
QT2_DIR_FLAG = $(QT2_DIR)/.flag
QT2_ARCHIVE = $(ARCHIVE_DIR)/qtbase-opensource-src-$(QT2_VERSION).tar.xz
$(QT2_ARCHIVE): $(PREFIX_FLAG)
$(WGET) https://download.qt.io/official_releases/qt/5.6/$(QT2_VERSION)/submodules/$(shell basename $@)
$(QT2_DIR_FLAG): $(QT2_ARCHIVE)
$(TAR) -xJf $<
touch $@
.qt2: $(QT2_DIR_FLAG)
(cd $(QT2_DIR) && CPPFLAGS="$(PREFIX)/include" ./configure -xplatform win32-g++ -device-option CROSS_COMPILE=$(HOST)- --prefix=$(PREFIX) -static -opensource -confirm-license -release -no-pkg-config -no-gif -qt-libjpeg -no-openssl -no-opengl -no-dbus -no-qml-debug -no-audio-backend -no-sql-sqlite -no-sql-odbc -no-pch -no-compile-examples -nomake examples)
# Build
(cd $(QT2_DIR) && make)
# Fix .pc files to remove debug version (d)
(cd $(QT2_DIR)/lib/pkgconfig && for i in *.pc; do sed -i -e 's/d\.a/.a/g' -e 's/d $$/ /' $$i; done)
# Fix Qt5Core.pc file to include qwindows (QWindowsIntegrationPlugin) and Qt5Platform Support
(cd $(QT2_DIR)/lib/pkgconfig; sed -i -e 's/ -lQt5Core/ -lqwindows -lQt5PlatformSupport -lQt5Core/g' Qt5Core.pc)
# Install
(cd $(QT2_DIR) && make install)
# Keep only the qwindows plugin
mv $(PREFIX)/plugins/platforms/libqwindows.a $(PREFIX)/lib/ && rm -rf $(PREFIX)/plugins
touch $@
### Xerces ###
XERCES_DIR = $(BUILD_DIR)/xerces-c-$(XERCES_VERSION)
XERCES_DIR_FLAG = $(XERCES_DIR)/.flag
XERCES_ARCHIVE = $(ARCHIVE_DIR)/xerces-c-$(XERCES_VERSION).tar.gz
$(XERCES_ARCHIVE): $(PREFIX_FLAG)
$(WGET) http://www-eu.apache.org/dist/xerces/c/3/sources/$(shell basename $@)
$(XERCES_DIR_FLAG): $(XERCES_ARCHIVE)
$(TAR) -xzf $<
touch $@
.xerces: $(XERCES_DIR_FLAG)
(cd $(XERCES_DIR) && $(CONFIGURE) --enable-static --disable-shared --disable-network && make install)
touch $@

View file

@ -0,0 +1,31 @@
# From https://bz.apache.org/bugzilla/show_bug.cgi?id=56342
--- include/arch/win32/apr_private.h.orig 2014-07-03 14:34:47 -0500
+++ include/arch/win32/apr_private.h 2014-07-03 14:35:51 -0500
@@ -45,13 +45,9 @@
*/
#ifndef _WIN32_WCE
#define HAVE_ACLAPI 1
-#ifdef __wtypes_h__
+#define COM_NO_WINDOWS_H
#include <accctrl.h>
-#else
-#define __wtypes_h__
-#include <accctrl.h>
-#undef __wtypes_h__
-#endif
+#undef COM_NO_WINDOWS_H
#else
#define HAVE_ACLAPI 0
#endif
--- file_io/win32/filestat.c.orig 2014-07-03 14:42:41 -0500
+++ file_io/win32/filestat.c 2014-07-03 14:43:09 -0500
@@ -15,7 +15,9 @@
*/
#include "apr.h"
+#define COM_NO_WINDOWS_H
#include <aclapi.h>
+#undef COM_NO_WINDOWS_H
#include "apr_private.h"
#include "apr_arch_file_io.h"
#include "apr_file_io.h"

View file

@ -1,15 +0,0 @@
# 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.ac.orig ./configure.ac
--- ./configure.ac.orig 2012-04-28 14:51:17.772384679 +0200
+++ ./configure.ac 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])

35
extras/contrib/apr.patch Normal file
View file

@ -0,0 +1,35 @@
--- configure.orig 2017-10-18 16:50:19.000000000 +0200
+++ configure 2018-07-26 00:01:19.399233574 +0200
@@ -24542,6 +24542,10 @@
ssize_t_fmt="ld"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: %ld" >&5
$as_echo "%ld" >&6; }
+elif test "$ac_cv_sizeof_ssize_t" = "$ac_cv_sizeof_long_long"; then
+ ssize_t_fmt="lld"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: %lld" >&5
+$as_echo "%lld" >&6; }
else
as_fn_error $? "could not determine the proper format for apr_ssize_t" "$LINENO" 5
fi
@@ -24605,6 +24609,10 @@
size_t_fmt="ld"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: %ld" >&5
$as_echo "%ld" >&6; }
+elif test "$ac_cv_sizeof_size_t" = "$ac_cv_sizeof_long_long"; then
+ size_t_fmt="lld"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: %lld" >&5
+$as_echo "%lld" >&6; }
else
as_fn_error $? "could not determine the proper format for apr_size_t" "$LINENO" 5
fi
--- Makefile.in.orig 2017-05-31 17:04:18.000000000 +0200
+++ Makefile.in 2018-07-26 09:09:47.318476559 +0200
@@ -141,7 +141,7 @@
include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@
$(APR_MKDIR) include/private
- tools/gen_test_char@EXEEXT@ > $@
+ wine tools/gen_test_char@EXEEXT@ > $@
LINK_PROG = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LT_LDFLAGS) \
@LT_NO_INSTALL@ $(ALL_LDFLAGS) -o $@

View file

@ -0,0 +1,11 @@
--- Makefile.am.orig 2018-01-06 05:58:31.000000000 +0100
+++ Makefile.am 2018-07-26 00:18:30.256491382 +0200
@@ -1,7 +1,7 @@
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = lib doc tinytest tests
+SUBDIRS = lib tinytest tests
if BUILDEXAMPLES
SUBDIRS += examples

View file

@ -1,9 +0,0 @@
--- 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