[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - 4 commits - configure.ac download.lst external/serf RepositoryExternal.mk ucb/source

Andras Timar (via logerrit) logerrit at kemper.freedesktop.org
Sun May 2 09:47:53 UTC 2021


 RepositoryExternal.mk                 |   31 ++++++++++++++---
 configure.ac                          |    8 ----
 download.lst                          |    4 +-
 external/serf/ExternalProject_serf.mk |   48 ---------------------------
 external/serf/Module_serf.mk          |    2 -
 external/serf/StaticLibrary_serf.mk   |   60 ++++++++++++++++++++++++++++++++++
 external/serf/UnpackedTarball_serf.mk |    5 --
 external/serf/windows.build.patch.1   |   29 ----------------
 ucb/source/ucp/webdav/SerfUri.cxx     |    6 +--
 9 files changed, 92 insertions(+), 101 deletions(-)

New commits:
commit 471933433d3a2f3031c8ae6b4041823c4c62f2fc
Author:     Andras Timar <andras.timar at collabora.com>
AuthorDate: Fri Apr 30 15:44:58 2021 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Sat May 1 22:17:13 2021 +0200

    serf should use bundled openssl headers, not system openssl headers
    
    Change-Id: I4431e5141a80394950f5711051065df42fe85f8d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114918
    Tested-by: Andras Timar <andras.timar at collabora.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/external/serf/StaticLibrary_serf.mk b/external/serf/StaticLibrary_serf.mk
index e04eef72da44..b6bef228a009 100644
--- a/external/serf/StaticLibrary_serf.mk
+++ b/external/serf/StaticLibrary_serf.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_StaticLibrary_use_unpacked,serf,serf))
 $(eval $(call gb_StaticLibrary_use_externals,serf,\
     apr \
     openssl \
+    openssl_headers \
     zlib \
 ))
 
commit 2fc45464e94c6f71eb57da96dd732b24380c8d3c
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Thu Apr 22 22:07:48 2021 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Sat May 1 22:16:53 2021 +0200

    handle properly missing URI components for webdav/serf
    
    Username is not mandatory for http://, and files require only path.
    
    Change-Id: Iab4e81692b288d17dd8a35954e34a1bbe7c943ef
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114526
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
    (cherry picked from commit 8313e7fe55d4ad147df0b5b1f9f94c6882197132)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114503
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/ucb/source/ucp/webdav/SerfUri.cxx b/ucb/source/ucp/webdav/SerfUri.cxx
index f146dfade70b..1d0745f10260 100644
--- a/ucb/source/ucp/webdav/SerfUri.cxx
+++ b/ucb/source/ucp/webdav/SerfUri.cxx
@@ -90,9 +90,9 @@ SerfUri::SerfUri( const OUString & inUri )
 
 void SerfUri::init( const apr_uri_t * pUri )
 {
-    mScheme   = OStringToOUString( pUri->scheme, RTL_TEXTENCODING_UTF8 );
-    mUserInfo = OStringToOUString( pUri->user, RTL_TEXTENCODING_UTF8 );
-    mHostName = OStringToOUString( pUri->hostname, RTL_TEXTENCODING_UTF8 );
+    mScheme   = pUri->scheme ? OStringToOUString( pUri->scheme, RTL_TEXTENCODING_UTF8 ) : "";
+    mUserInfo = pUri->user ? OStringToOUString( pUri->user, RTL_TEXTENCODING_UTF8 ) : "";
+    mHostName = pUri->hostname ? OStringToOUString( pUri->hostname, RTL_TEXTENCODING_UTF8 ) : "";
     mPort     = pUri->port;
     mPath     = OStringToOUString( pUri->path, RTL_TEXTENCODING_UTF8 );
 
commit d470e30e1138661638f89ca8c9ef2ff65730a10c
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Thu Apr 15 12:24:39 2021 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Sat May 1 22:16:27 2021 +0200

    fix serf dependencies
    
    RepositoryExternal.mk treats apr and apr_util as one external, but
    technically they are two, so both of it must be built for 'apr'
    to be ready to be used by serf.
    
    Change-Id: If00fb10a698fd926437e18ac0e4fa66b2722ebae
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114135
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index a323f78f6f62..7a4fd496d654 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1073,14 +1073,14 @@ $(call gb_LinkTarget_add_defs,$(1),\
 	-DAPR_DECLARE_STATIC \
 	-DAPU_DECLARE_STATIC \
 )
-$(call gb_LinkTarget_use_external_project,$(1),apr_util)
+$(call gb_LinkTarget_use_external_project,$(1),apr_util,full)
 endif
 
 endef
 
 define gb_ExternalProject__use_apr
 ifeq ($(SYSTEM_APR),)
-$(call gb_ExternalProject_use_external_project,$(1),apr_util)
+$(call gb_ExternalProject_use_external_project,$(1),apr_util,full)
 endif
 
 endef
diff --git a/external/serf/StaticLibrary_serf.mk b/external/serf/StaticLibrary_serf.mk
index f202ddc1da4b..e04eef72da44 100644
--- a/external/serf/StaticLibrary_serf.mk
+++ b/external/serf/StaticLibrary_serf.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_StaticLibrary_use_unpacked,serf,serf))
 $(eval $(call gb_StaticLibrary_use_externals,serf,\
     apr \
     openssl \
+    zlib \
 ))
 
 $(eval $(call gb_StaticLibrary_set_include,serf,\
commit cf051f1caa14bec9291bfced69040a72cbea0706
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Wed Apr 14 20:37:13 2021 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Sat May 1 22:15:57 2021 +0200

    update serf to 1.3.9
    
    Its build system has switches to scons, so build the library
    using gbuild.
    
    Change-Id: I45b784e65e4987c25baf3fa1477816c744663bf0

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 8cb8582d2ace..a323f78f6f62 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1085,21 +1085,40 @@ endif
 
 endef
 
+ifneq ($(SYSTEM_SERF),)
+
 define gb_LinkTarget__use_serf
+$(call gb_LinkTarget_add_defs,$(1),\
+	$(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(SERF_CFLAGS))) \
+)
+
 $(call gb_LinkTarget_set_include,$(1),\
-	$(SERF_CFLAGS) \
+	$(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(SERF_CFLAGS)))) \
 	$$(INCLUDE) \
 )
+
 $(call gb_LinkTarget_add_libs,$(1),\
 	$(SERF_LIBS) \
 )
 
-ifeq ($(SYSTEM_SERF),)
-$(call gb_LinkTarget_use_external_project,$(1),serf)
-endif
+endef
+
+else # !SYSTEM_SERF
+
+define gb_LinkTarget__use_serf
+$(call gb_LinkTarget_set_include,$(1),\
+	-I$(call gb_UnpackedTarball_get_dir,serf) \
+	$$(INCLUDE) \
+)
+
+$(call gb_LinkTarget_use_static_libraries,$(1),\
+	serf \
+)
 
 endef
 
+endif # SYSTEM_SERF
+
 else ifeq ($(WITH_WEBDAV),neon)
 
 ifneq ($(SYSTEM_NEON),)
diff --git a/configure.ac b/configure.ac
index 0f7ae6202408..39c50e3260b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10006,13 +10006,7 @@ serf)
     fi
 
     # Check for system serf
-    libo_CHECK_SYSTEM_MODULE([serf],[SERF],[serf-1 >= 1.1.0],["-I${WORKDIR}/UnpackedTarball/serf"],
-                             ["-L${WORKDIR}/UnpackedTarball/serf/.libs -lserf-1"])
-    if test "$COM" = "MSC"; then
-        SERF_LIB_DIR="Release"
-        test -n "${MSVC_USE_DEBUG_RUNTIME}" && SERF_LIB_DIR="Debug"
-        SERF_LIBS="${WORKDIR}/UnpackedTarball/serf/${SERF_LIB_DIR}/serf-1.lib"
-    fi
+    libo_CHECK_SYSTEM_MODULE([serf],[SERF],[serf-1 >= 1.3.9])
     ;;
 neon)
     AC_MSG_RESULT([neon])
diff --git a/download.lst b/download.lst
index 53225f404bfe..5837f378154e 100644
--- a/download.lst
+++ b/download.lst
@@ -251,8 +251,8 @@ export REVENGE_VERSION_MICRO := 4
 export REVENGE_TARBALL := librevenge-0.0.$(REVENGE_VERSION_MICRO).tar.bz2
 export RHINO_SHA256SUM := 1fb458d6aab06932693cc8a9b6e4e70944ee1ff052fa63606e3131df34e21753
 export RHINO_TARBALL := 798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
-export SERF_SHA256SUM := 6988d394b62c3494635b6f0760bc3079f9a0cd380baf0f6b075af1eb9fa5e700
-export SERF_TARBALL := serf-1.2.1.tar.bz2
+export SERF_SHA256SUM := 549c2d21c577a8a9c0450facb5cca809f26591f048e466552240947bdf7a87cc
+export SERF_TARBALL := serf-1.3.9.tar.bz2
 export STAROFFICE_SHA256SUM := 6b00e1ed8194e6072be4441025d1b888e39365727ed5b23e0e8c92c4009d1ec4
 export STAROFFICE_VERSION_MICRO := 6
 export STAROFFICE_TARBALL := libstaroffice-0.0.$(STAROFFICE_VERSION_MICRO).tar.xz
diff --git a/external/serf/ExternalProject_serf.mk b/external/serf/ExternalProject_serf.mk
deleted file mode 100644
index afa2018a73fa..000000000000
--- a/external/serf/ExternalProject_serf.mk
+++ /dev/null
@@ -1,48 +0,0 @@
-# -*- 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/Module_serf.mk b/external/serf/Module_serf.mk
index 10ec039359a2..263ff05223c5 100644
--- a/external/serf/Module_serf.mk
+++ b/external/serf/Module_serf.mk
@@ -10,8 +10,8 @@
 $(eval $(call gb_Module_Module,serf))
 
 $(eval $(call gb_Module_add_targets,serf,\
+	StaticLibrary_serf \
 	UnpackedTarball_serf \
-	ExternalProject_serf \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/serf/StaticLibrary_serf.mk b/external/serf/StaticLibrary_serf.mk
new file mode 100644
index 000000000000..f202ddc1da4b
--- /dev/null
+++ b/external/serf/StaticLibrary_serf.mk
@@ -0,0 +1,58 @@
+# -*- 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_StaticLibrary_StaticLibrary,serf))
+
+$(eval $(call gb_StaticLibrary_set_warnings_disabled,serf))
+
+$(eval $(call gb_StaticLibrary_use_unpacked,serf,serf))
+
+$(eval $(call gb_StaticLibrary_use_externals,serf,\
+    apr \
+    openssl \
+))
+
+$(eval $(call gb_StaticLibrary_set_include,serf,\
+	-I$(call gb_UnpackedTarball_get_dir,serf) \
+	$$(INCLUDE) \
+))
+
+$(eval $(call gb_StaticLibrary_add_generated_cobjects,serf,\
+    UnpackedTarball/serf/context \
+    UnpackedTarball/serf/incoming \
+    UnpackedTarball/serf/outgoing \
+    UnpackedTarball/serf/ssltunnel \
+    UnpackedTarball/serf/auth/auth_basic \
+    UnpackedTarball/serf/auth/auth \
+    UnpackedTarball/serf/auth/auth_digest \
+    UnpackedTarball/serf/auth/auth_spnego \
+    UnpackedTarball/serf/auth/auth_spnego_gss \
+    UnpackedTarball/serf/auth/auth_spnego_sspi \
+    UnpackedTarball/serf/buckets/aggregate_buckets \
+    UnpackedTarball/serf/buckets/allocator \
+    UnpackedTarball/serf/buckets/barrier_buckets \
+    UnpackedTarball/serf/buckets/buckets \
+    UnpackedTarball/serf/buckets/bwtp_buckets \
+    UnpackedTarball/serf/buckets/deflate_buckets \
+    UnpackedTarball/serf/buckets/dechunk_buckets \
+    UnpackedTarball/serf/buckets/file_buckets \
+    UnpackedTarball/serf/buckets/headers_buckets \
+    UnpackedTarball/serf/buckets/chunk_buckets \
+    UnpackedTarball/serf/buckets/iovec_buckets \
+    UnpackedTarball/serf/buckets/limit_buckets \
+    UnpackedTarball/serf/buckets/mmap_buckets \
+    UnpackedTarball/serf/buckets/request_buckets \
+    UnpackedTarball/serf/buckets/response_body_buckets \
+    UnpackedTarball/serf/buckets/response_buckets \
+    UnpackedTarball/serf/buckets/simple_buckets \
+    UnpackedTarball/serf/buckets/socket_buckets \
+    UnpackedTarball/serf/buckets/ssl_buckets \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/serf/UnpackedTarball_serf.mk b/external/serf/UnpackedTarball_serf.mk
index 3cea304dbcc4..8c7f2704693a 100644
--- a/external/serf/UnpackedTarball_serf.mk
+++ b/external/serf/UnpackedTarball_serf.mk
@@ -11,12 +11,7 @@ $(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 \
 	external/serf/ssl.verify.none.patch.1 \
 ))
 
diff --git a/external/serf/windows.build.patch.1 b/external/serf/windows.build.patch.1
deleted file mode 100644
index c659d41cdf43..000000000000
--- a/external/serf/windows.build.patch.1
+++ /dev/null
@@ -1,29 +0,0 @@
-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 = \


More information about the Libreoffice-commits mailing list