summaryrefslogtreecommitdiffstats
path: root/external/serf
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:51:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:51:28 +0000
commit940b4d1848e8c70ab7642901a68594e8016caffc (patch)
treeeb72f344ee6c3d9b80a7ecc079ea79e9fba8676d /external/serf
parentInitial commit. (diff)
downloadlibreoffice-upstream.tar.xz
libreoffice-upstream.zip
Adding upstream version 1:7.0.4.upstream/1%7.0.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'external/serf')
-rw-r--r--external/serf/ExternalProject_serf.mk52
-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
6 files changed, 131 insertions, 0 deletions
diff --git a/external/serf/ExternalProject_serf.mk b/external/serf/ExternalProject_serf.mk
new file mode 100644
index 000000000..043045654
--- /dev/null
+++ b/external/serf/ExternalProject_serf.mk
@@ -0,0 +1,52 @@
+# -*- 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_Trace_StartRange,serf,EXTERNAL)
+ $(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 \
+ )
+ $(call gb_Trace_EndRange,serf,EXTERNAL)
+
+else
+# serf is using SERF_LIBS variable, so pass it empty
+$(call gb_ExternalProject_get_state_target,serf,build):
+ $(call gb_Trace_StartRange,serf,EXTERNAL)
+ +$(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 \
+ )
+ $(call gb_Trace_EndRange,serf,EXTERNAL)
+
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/serf/Makefile b/external/serf/Makefile
new file mode 100644
index 000000000..e4968cf85
--- /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 000000000..10ec03935
--- /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 000000000..0cfe55fb2
--- /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 000000000..e6e950920
--- /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 000000000..c659d41cd
--- /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 = \