summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-02-06 12:28:36 +0100
committerMatúš Kukan <matus.kukan@collabora.com>2014-04-02 15:35:21 +0200
commit372fe84b66848dd6cbb60ed4f9327416f9620f7f (patch)
tree52eb46226aa8b1e5b8effd80bc48bfc173ec333b /external
parente9b805e62739ae6327b8f3d1f5fa1746b6b8560e (diff)
Add apr and serf externals for alternative webdav implementation.
Change-Id: I5e93bb6fb53537b889c6ba9888f0f32a0d6f8050 (cherry picked from commit 0b27253aff771e104a9fd5d17595b205b2fc39fd)
Diffstat (limited to 'external')
-rw-r--r--external/Module_external.mk2
-rw-r--r--external/apr/ExternalProject_apr.mk38
-rw-r--r--external/apr/ExternalProject_apr_util.mk41
-rw-r--r--external/apr/Makefile7
-rw-r--r--external/apr/Module_apr.mk19
-rw-r--r--external/apr/README5
-rw-r--r--external/apr/UnpackedTarball_apr.mk14
-rw-r--r--external/apr/UnpackedTarball_apr_util.mk22
-rw-r--r--external/apr/windows.build.patch.153
-rw-r--r--external/serf/ExternalProject_serf.mk48
-rw-r--r--external/serf/Makefile7
-rw-r--r--external/serf/Module_serf.mk17
-rw-r--r--external/serf/README4
-rw-r--r--external/serf/UnpackedTarball_serf.mk22
-rw-r--r--external/serf/windows.build.patch.129
15 files changed, 328 insertions, 0 deletions
diff --git a/external/Module_external.mk b/external/Module_external.mk
index 0c21a7c5ebb3..da77a2c4634d 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -24,6 +24,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,ABW,libabw) \
$(call gb_Helper_optional,AFMS,afms) \
$(call gb_Helper_optional,APACHE_COMMONS,apache-commons) \
+ $(call gb_Helper_optional,APR,apr) \
$(call gb_Helper_optional,BOOST,boost) \
$(call gb_Helper_optional,BSH,beanshell) \
$(call gb_Helper_optional,CAIRO,cairo) \
@@ -80,6 +81,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,PYTHON,python3) \
$(call gb_Helper_optional,REDLAND,redland) \
$(call gb_Helper_optional,RHINO,rhino) \
+ $(call gb_Helper_optional,SERF,serf) \
$(call gb_Helper_optional,UCPP,ucpp) \
$(call gb_Helper_optional,VIGRA,vigra) \
$(call gb_Helper_optional,VISIO,libvisio) \
diff --git a/external/apr/ExternalProject_apr.mk b/external/apr/ExternalProject_apr.mk
new file mode 100644
index 000000000000..093cdde71a5f
--- /dev/null
+++ b/external/apr/ExternalProject_apr.mk
@@ -0,0 +1,38 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_ExternalProject_ExternalProject,apr))
+
+$(eval $(call gb_ExternalProject_register_targets,apr,\
+ build \
+))
+
+$(eval $(call gb_ExternalProject_use_nmake,apr,build))
+
+ifeq ($(COM),MSC)
+$(call gb_ExternalProject_get_state_target,apr,build):
+ $(call gb_ExternalProject_run,build,\
+ nmake -nologo -f apr.mak \
+ CFG="apr - Win32 $(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)" \
+ RECURSE=0 \
+ )
+
+else
+$(call gb_ExternalProject_get_state_target,apr,build):
+ +$(call gb_ExternalProject_run,build,\
+ ./configure \
+ --enable-static --disable-shared \
+ --with-pic \
+ $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM))\
+ && $(MAKE) libapr-1.la \
+ )
+
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/apr/ExternalProject_apr_util.mk b/external/apr/ExternalProject_apr_util.mk
new file mode 100644
index 000000000000..4de76ba4c43a
--- /dev/null
+++ b/external/apr/ExternalProject_apr_util.mk
@@ -0,0 +1,41 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_ExternalProject_ExternalProject,apr_util))
+
+$(eval $(call gb_ExternalProject_use_external_project,apr_util,apr))
+
+$(eval $(call gb_ExternalProject_register_targets,apr_util,\
+ build \
+))
+
+$(eval $(call gb_ExternalProject_use_nmake,apr_util,build))
+
+ifeq ($(COM),MSC)
+$(call gb_ExternalProject_get_state_target,apr_util,build):
+ $(call gb_ExternalProject_run,build,\
+ nmake -nologo -f aprutil.mak \
+ CFG="aprutil - Win32 $(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)" \
+ RECURSE=0 \
+ )
+
+else
+$(call gb_ExternalProject_get_state_target,apr_util,build):
+ +$(call gb_ExternalProject_run,build,\
+ ./configure \
+ --enable-static --disable-shared \
+ --with-pic \
+ $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM))\
+ --with-apr=$(call gb_UnpackedTarball_get_dir,apr)/apr-1-config \
+ && $(MAKE) libaprutil-1.la \
+ )
+
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/apr/Makefile b/external/apr/Makefile
new file mode 100644
index 000000000000..e4968cf85fb6
--- /dev/null
+++ b/external/apr/Makefile
@@ -0,0 +1,7 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/apr/Module_apr.mk b/external/apr/Module_apr.mk
new file mode 100644
index 000000000000..6bb85fb76204
--- /dev/null
+++ b/external/apr/Module_apr.mk
@@ -0,0 +1,19 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Module_Module,apr))
+
+$(eval $(call gb_Module_add_targets,apr,\
+ UnpackedTarball_apr \
+ UnpackedTarball_apr_util \
+ ExternalProject_apr \
+ ExternalProject_apr_util \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/apr/README b/external/apr/README
new file mode 100644
index 000000000000..778bdfdf692f
--- /dev/null
+++ b/external/apr/README
@@ -0,0 +1,5 @@
+The mission of the Apache Portable Runtime (APR) project is to create
+and maintain software libraries that provide a predictable and consistent
+interface to underlying platform-specific implementations.
+
+From [http://apr.apache.org/].
diff --git a/external/apr/UnpackedTarball_apr.mk b/external/apr/UnpackedTarball_apr.mk
new file mode 100644
index 000000000000..5fa9d05082a7
--- /dev/null
+++ b/external/apr/UnpackedTarball_apr.mk
@@ -0,0 +1,14 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UnpackedTarball_UnpackedTarball,apr))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,apr,$(APR_TARBALL)))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/apr/UnpackedTarball_apr_util.mk b/external/apr/UnpackedTarball_apr_util.mk
new file mode 100644
index 000000000000..06860f13967e
--- /dev/null
+++ b/external/apr/UnpackedTarball_apr_util.mk
@@ -0,0 +1,22 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UnpackedTarball_UnpackedTarball,apr_util))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,apr_util,$(APR_UTIL_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_fix_end_of_line,apr_util,\
+ aprutil.mak \
+))
+
+$(eval $(call gb_UnpackedTarball_add_patches,apr_util,\
+ external/apr/windows.build.patch.1 \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/apr/windows.build.patch.1 b/external/apr/windows.build.patch.1
new file mode 100644
index 000000000000..929910beaccb
--- /dev/null
+++ b/external/apr/windows.build.patch.1
@@ -0,0 +1,53 @@
+diff -ur apr_util.org/aprutil.mak apr_util/aprutil.mak
+--- apr_util.org/aprutil.mak 2014-03-05 16:40:02.385701779 +0100
++++ apr_util/aprutil.mak 2014-03-05 16:40:49.409702332 +0100
+@@ -210,8 +210,6 @@
+ "$(INTDIR)\apr_uri.obj" \
+ "$(INTDIR)\xlate.obj" \
+ "$(INTDIR)\apr_xml.obj" \
+- "..\apr-iconv\LibR\apriconv-1.lib" \
+- ".\xml\expat\lib\LibR\xml.lib"
+
+ "$(OUTDIR)\aprutil-1.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
+ $(LIB32) @<<
+@@ -406,8 +404,6 @@
+ "$(INTDIR)\apr_uri.obj" \
+ "$(INTDIR)\xlate.obj" \
+ "$(INTDIR)\apr_xml.obj" \
+- "..\apr-iconv\LibD\apriconv-1.lib" \
+- ".\xml\expat\lib\LibD\xml.lib"
+
+ "$(OUTDIR)\aprutil-1.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
+ $(LIB32) @<<
+@@ -602,8 +598,6 @@
+ "$(INTDIR)\apr_uri.obj" \
+ "$(INTDIR)\xlate.obj" \
+ "$(INTDIR)\apr_xml.obj" \
+- "..\apr-iconv\x64\LibR\apriconv-1.lib" \
+- ".\xml\expat\lib\x64\LibR\xml.lib"
+
+ "$(OUTDIR)\aprutil-1.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
+ $(LIB32) @<<
+@@ -798,8 +792,6 @@
+ "$(INTDIR)\apr_uri.obj" \
+ "$(INTDIR)\xlate.obj" \
+ "$(INTDIR)\apr_xml.obj" \
+- "..\apr-iconv\x64\LibD\apriconv-1.lib" \
+- ".\xml\expat\lib\x64\LibD\xml.lib"
+
+ "$(OUTDIR)\aprutil-1.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
+ $(LIB32) @<<
+diff -ur apr_util.org/include/apu.hw apr_util/include/apu.hw
+--- apr_util.org/include/apu.hw 2014-03-05 16:40:02.377701779 +0100
++++ apr_util/include/apu.hw 2014-03-05 16:40:38.769702207 +0100
+@@ -138,8 +138,8 @@
+ #define APU_HAVE_NSS 0
+ #endif
+
+-#define APU_HAVE_APR_ICONV 1
+-#define APU_HAVE_ICONV 0
++#undef APU_HAVE_APR_ICONV
++#undef APU_HAVE_ICONV
+ #define APR_HAS_XLATE (APU_HAVE_APR_ICONV || APU_HAVE_ICONV)
+
+ #endif /* APU_H */
diff --git a/external/serf/ExternalProject_serf.mk b/external/serf/ExternalProject_serf.mk
new file mode 100644
index 000000000000..afa2018a73fa
--- /dev/null
+++ b/external/serf/ExternalProject_serf.mk
@@ -0,0 +1,48 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_ExternalProject_ExternalProject,serf))
+
+$(eval $(call gb_ExternalProject_use_externals,serf,\
+ apr \
+))
+
+$(eval $(call gb_ExternalProject_register_targets,serf,\
+ build \
+))
+
+$(eval $(call gb_ExternalProject_use_nmake,serf,build))
+
+ifeq ($(COM),MSC)
+$(call gb_ExternalProject_get_state_target,serf,build):
+ $(call gb_ExternalProject_run,build,\
+ APR_SRC="..\apr" \
+ APRUTIL_SRC="..\apr_util" \
+ OPENSSL_SRC="..\openssl" \
+ ZLIB_SRC="..\zlib" \
+ nmake -nologo -f serf.mak \
+ $(if $(MSVC_USE_DEBUG_RUNTIME),DEBUG_BUILD=T Debug,Release)/serf-1.lib \
+ )
+
+else
+# serf is using SERF_LIBS variable, so pass it empty
+$(call gb_ExternalProject_get_state_target,serf,build):
+ +$(call gb_ExternalProject_run,build,\
+ ./configure SERF_LIBS= \
+ --enable-option-checking=fatal \
+ $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM))\
+ $(if $(SYSTEM_APR),,--with-apr=$(call gb_UnpackedTarball_get_dir,apr)/apr-1-config) \
+ $(if $(SYSTEM_APR),,--with-apr-util=$(call gb_UnpackedTarball_get_dir,apr_util)/apu-1-config) \
+ $(if $(SYSTEM_OPENSSL),,--with-openssl=$(call gb_UnpackedTarball_get_dir,openssl)) \
+ && $(MAKE) libserf-1.la \
+ )
+
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/serf/Makefile b/external/serf/Makefile
new file mode 100644
index 000000000000..e4968cf85fb6
--- /dev/null
+++ b/external/serf/Makefile
@@ -0,0 +1,7 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/serf/Module_serf.mk b/external/serf/Module_serf.mk
new file mode 100644
index 000000000000..10ec039359a2
--- /dev/null
+++ b/external/serf/Module_serf.mk
@@ -0,0 +1,17 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Module_Module,serf))
+
+$(eval $(call gb_Module_add_targets,serf,\
+ UnpackedTarball_serf \
+ ExternalProject_serf \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/serf/README b/external/serf/README
new file mode 100644
index 000000000000..0cfe55fb26c0
--- /dev/null
+++ b/external/serf/README
@@ -0,0 +1,4 @@
+The serf library is a high performance C-based HTTP client library
+built upon the Apache Portable Runtime (APR) library.
+
+From [http://code.google.com/p/serf/].
diff --git a/external/serf/UnpackedTarball_serf.mk b/external/serf/UnpackedTarball_serf.mk
new file mode 100644
index 000000000000..e6e950920b95
--- /dev/null
+++ b/external/serf/UnpackedTarball_serf.mk
@@ -0,0 +1,22 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UnpackedTarball_UnpackedTarball,serf))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,serf,$(SERF_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_fix_end_of_line,serf,\
+ serf.mak \
+))
+
+$(eval $(call gb_UnpackedTarball_add_patches,serf,\
+ external/serf/windows.build.patch.1 \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/serf/windows.build.patch.1 b/external/serf/windows.build.patch.1
new file mode 100644
index 000000000000..c659d41cdf43
--- /dev/null
+++ b/external/serf/windows.build.patch.1
@@ -0,0 +1,29 @@
+diff -ur serf.org/serf.mak serf/serf.mak
+--- serf.org/serf.mak 2014-03-05 16:31:26.681695709 +0100
++++ serf/serf.mak 2014-03-05 16:32:20.969696348 +0100
+@@ -93,7 +93,7 @@
+ WIN32_DEFS = /D WIN32 /D WIN32_LEAN_AND_MEAN /D NOUSER /D NOGDI /D NONLS /D NOCRYPT /D SERF_HAVE_SSPI
+
+ CPP=cl.exe
+-CPP_PROJ = /c /nologo $(CFLAGS) $(WIN32_DEFS) $(APR_FLAGS) $(APRUTIL_FLAGS) $(OPENSSL_FLAGS) $(ZLIB_FLAGS) /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\"
++CPP_PROJ = /c /nologo /D APR_DECLARE_STATIC /D APU_DECLARE_STATIC $(CFLAGS) $(WIN32_DEFS) $(APR_FLAGS) $(APRUTIL_FLAGS) $(OPENSSL_FLAGS) $(ZLIB_FLAGS) /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\"
+ LIB32=link.exe
+ LIB32_FLAGS=/nologo
+
+@@ -127,16 +127,6 @@
+ "$(INTDIR)\socket_buckets.obj" \
+ "$(INTDIR)\ssl_buckets.obj" \
+
+-!IFDEF OPENSSL_STATIC
+-LIB32_OBJS = $(LIB32_OBJS) "$(OPENSSL_SRC)\out32\libeay32.lib" \
+- "$(OPENSSL_SRC)\out32\ssleay32.lib"
+-!ELSE
+-LIB32_OBJS = $(LIB32_OBJS) "$(OPENSSL_SRC)\out32dll\libeay32.lib" \
+- "$(OPENSSL_SRC)\out32dll\ssleay32.lib"
+-!ENDIF
+-
+-LIB32_OBJS = $(LIB32_OBJS) $(APR_LIBS) $(APRUTIL_LIBS) $(ZLIB_LIBS)
+-
+ SYS_LIBS = secur32.lib
+
+ TEST_OBJS = \