summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-02-25 21:47:33 +0100
committerMatúš Kukan <matus.kukan@collabora.com>2014-04-02 15:35:22 +0200
commit5c85ba488732e41c31af50ca3013d3fcce2a7e0f (patch)
tree40346bebc11642a5acea49e5cd4add568981c179
parent372fe84b66848dd6cbb60ed4f9327416f9620f7f (diff)
Build webdav based on serf if neon is disabled.
(cherry picked from commit dcae0509135c2067635ae3cf84b05dc9fb3d2d02) Conflicts: Repository.mk postprocess/CustomTarget_registry.mk ucb/Module_ucb.mk ucb/source/ucp/webdav/webdavservices.cxx Change-Id: I0cbb89c8d5ac65eda8bb21aaf0d07996a015d281
-rw-r--r--Repository.mk2
-rw-r--r--RepositoryExternal.mk10
-rw-r--r--config_host.mk.in2
-rw-r--r--configure.ac52
-rw-r--r--postprocess/CustomTarget_registry.mk2
-rwxr-xr-xpostprocess/Rdb_services.mk2
-rw-r--r--ucb/Library_ucpdav1.mk55
-rw-r--r--ucb/Module_ucb.mk7
-rw-r--r--ucb/source/ucp/webdav/ContentProperties.hxx4
-rw-r--r--ucb/source/ucp/webdav/PropertyMap.hxx4
-rw-r--r--ucb/source/ucp/webdav/webdavresponseparser.cxx4
-rw-r--r--ucb/source/ucp/webdav/webdavservices.cxx10
12 files changed, 104 insertions, 50 deletions
diff --git a/Repository.mk b/Repository.mk
index 596db953558d..0d7c07d1ecaf 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -537,6 +537,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
tvhlp1 \
ucb1 \
ucbhelper \
+ $(if $(WITH_WEBDAV),ucpdav1) \
ucpfile1 \
ucpftp1 \
ucpchelp1 \
@@ -569,7 +570,6 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
pyuno \
pyuno_wrapper \
recentfile \
- ucpdav1 \
xsec_xmlsec \
$(if $(filter $(OS),ANDROID), \
lo-bootstrap \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index cb0b4b552bc8..23bee81cd501 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -902,7 +902,9 @@ gb_LinkTarget__use_liblangtag :=
endif # ENABLE_LIBLANGTAG
-ifneq ($(DISABLE_NEON),)
+gb_ExternalProject__use_apr :=
+
+ifeq ($(WITH_WEBDAV),serf)
define gb_LinkTarget__use_apr
$(call gb_LinkTarget_set_include,$(1),\
@@ -950,9 +952,7 @@ endif
endef
-else
-
-gb_ExternalProject__use_apr :=
+else ifeq ($(WITH_WEBDAV),neon)
ifeq ($(SYSTEM_NEON),YES)
@@ -990,7 +990,7 @@ endef
endif # SYSTEM_NEON
-endif # DISABLE_NEON
+endif # WITH_WEBDAV
ifeq ($(SYSTEM_REDLAND),YES)
diff --git a/config_host.mk.in b/config_host.mk.in
index c4efc56a49ac..fd4c56098590 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -96,7 +96,6 @@ export DISABLE_CVE_TESTS=@DISABLE_CVE_TESTS@
export DISABLE_DBCONNECTIVITY=@DISABLE_DBCONNECTIVITY@
export DISABLE_DYNLOADING=@DISABLE_DYNLOADING@
export DISABLE_EXPORT=@DISABLE_EXPORT@
-export DISABLE_NEON=@DISABLE_NEON@
export DISABLE_OPENSSL=@DISABLE_OPENSSL@
export DISABLE_PYTHON=@DISABLE_PYTHON@
export DISABLE_SCRIPTING=@DISABLE_SCRIPTING@
@@ -608,6 +607,7 @@ export WITH_MOZAB4WIN=@WITH_MOZAB4WIN@
export WITH_MYSPELL_DICTS=@WITH_MYSPELL_DICTS@
export WITH_POOR_HELP_LOCALIZATIONS=@WITH_POOR_HELP_LOCALIZATIONS@
export WITH_THEMES=@WITH_THEMES@
+export WITH_WEBDAV=@WITH_WEBDAV@
export WORKDIR=@WORKDIR@
export WORKDIR_FOR_BUILD=@WORKDIR_FOR_BUILD@
export WORK_STAMP=@SOURCEVERSION@
diff --git a/configure.ac b/configure.ac
index 78a388683105..288d2b661a77 100644
--- a/configure.ac
+++ b/configure.ac
@@ -635,7 +635,6 @@ linux-android*)
build_gstreamer=no
build_gstreamer_0_10=no
enable_lotuswordpro=no
- enable_neon=no
enable_mpl_subset=yes
enable_opengl=no
enable_coinmp=no
@@ -1768,6 +1767,14 @@ AC_ARG_WITH(system-npapi-headers,
[with_system_npapi_headers="$with_system_headers"]
)
+AC_ARG_WITH(webdav,
+ AS_HELP_STRING([--with-webdav],
+ [Specify which library to use for webdav implementation.
+ Possible values: "neon", "serf", "no". The default value is "neon".
+ Example: --with-webdav="serf"]),
+ WITH_WEBDAV=$withval,
+ WITH_WEBDAV="neon")
+
AC_ARG_WITH(linker-hash-style,
AS_HELP_STRING([--with-linker-hash-style],
[Use linker with --hash-style=<style> when linking shared objects.
@@ -7458,7 +7465,6 @@ if test $_os = iOS; then
enable_lpsolve=no
enable_postgresql_sdbc=no
enable_lotuswordpro=no
- enable_neon=no
enable_extension_integration=no
enable_report_builder=no
with_theme="tango"
@@ -9262,15 +9268,16 @@ AC_SUBST(XRANDR_CFLAGS)
AC_SUBST(XRANDR_LIBS)
AC_SUBST(ENABLE_RANDR)
-dnl ===================================================================
-dnl Check for building neon
-dnl ===================================================================
-AC_MSG_CHECKING([whether to use neon])
-if test "$enable_neon" = "no"; then
- AC_MSG_RESULT([no])
- DISABLE_NEON=TRUE
- AC_SUBST(DISABLE_NEON)
-
+if test "$enable_neon" = "no" -o "$enable_mpl_subset" = "yes"; then
+ WITH_WEBDAV="serf"
+fi
+if test $_os = iOS -o $_os = Android; then
+ WITH_WEBDAV="no"
+fi
+AC_MSG_CHECKING([for webdav library])
+case "$WITH_WEBDAV" in
+serf)
+ AC_MSG_RESULT([serf])
# Check for system apr-util
libo_CHECK_SYSTEM_MODULE([apr],[APR],[apr-util-1],
["-I${WORKDIR}/UnpackedTarball/apr/include -I${WORKDIR}/UnpackedTarball/apr_util/include"],
@@ -9285,11 +9292,10 @@ if test "$enable_neon" = "no"; then
if test "$COM" = "MSC"; then
SERF_LIBS="${WORKDIR}/UnpackedTarball/serf/Release/serf-1.lib"
fi
-else
- AC_MSG_RESULT([yes])
- dnl ===================================================================
- dnl Check for system neon
- dnl ===================================================================
+ ;;
+neon)
+ AC_MSG_RESULT([neon])
+ # Check for system neon
libo_CHECK_SYSTEM_MODULE([neon],[NEON],[neon >= 0.26.0])
if test "$with_system_neon" = "yes"; then
NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`"
@@ -9300,7 +9306,13 @@ else
NEON_VERSION=0295
fi
AC_SUBST(NEON_VERSION)
-fi
+ ;;
+*)
+ AC_MSG_RESULT([none, disabled])
+ WITH_WEBDAV=""
+ ;;
+esac
+AC_SUBST(WITH_WEBDAV)
dnl ===================================================================
dnl Check for disabling cve_tests
@@ -9371,7 +9383,7 @@ dnl ===================================================================
dnl Check for building gnutls
dnl ===================================================================
AC_MSG_CHECKING([whether to use gnutls])
-if test "$enable_neon" != "no" && test "$enable_openssl" = "no"; then
+if test "$WITH_WEBDAV" = "neon" && test "$enable_openssl" = "no"; then
AC_MSG_RESULT([yes])
AM_PATH_LIBGCRYPT()
PKG_CHECK_MODULES(GNUTLS, [gnutls],,
@@ -12637,8 +12649,8 @@ if test "$enable_mpl_subset" = "yes"; then
if test "$enable_lotuswordpro" = "yes"; then
AC_MSG_ERROR([need to --disable-lotuswordpro - a Lotus Word Pro file format import filter.])
fi
- if test "$enable_neon" != "no" -o "x$DISABLE_NEON" != "xTRUE"; then
- AC_MSG_ERROR([need to --disable-neon - webdav support.])
+ if test "$WITH_WEBDAV" = "neon"; then
+ AC_MSG_ERROR([need --with-webdav=serf or --without-webdav - webdav support.])
fi
if test "x$enable_ext_mariadb_connector" = "xyes"; then
AC_MSG_ERROR([need to --disable-ext-mariadb-connector - mariadb/mysql support.])
diff --git a/postprocess/CustomTarget_registry.mk b/postprocess/CustomTarget_registry.mk
index afa7065d0fc3..364bb2c88f79 100644
--- a/postprocess/CustomTarget_registry.mk
+++ b/postprocess/CustomTarget_registry.mk
@@ -331,7 +331,7 @@ postprocess_FILES_main += \
# Inet-wnt.xcu must come after Inet.xcu
postprocess_DRIVERS += ado
endif
-ifeq ($(DISABLE_NEON),$(false))
+ifneq ($(WITH_WEBDAV),)
postprocess_FILES_main += $(postprocess_MOD)/org/openoffice/ucb/Configuration-neon.xcu
endif
ifeq ($(ENABLE_EVOAB2),TRUE)
diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk
index fd25399126a7..6ecb57d2b5df 100755
--- a/postprocess/Rdb_services.mk
+++ b/postprocess/Rdb_services.mk
@@ -160,7 +160,7 @@ $(eval $(call gb_Rdb_add_components,services,\
extensions/source/ole/oleautobridge \
) \
) \
- $(if $(DISABLE_NEON),, \
+ $(if $(WITH_WEBDAV), \
ucb/source/ucp/webdav-neon/ucpdav1 \
) \
$(if $(DISABLE_SCRIPTING),, \
diff --git a/ucb/Library_ucpdav1.mk b/ucb/Library_ucpdav1.mk
index 55b3a323b83b..42d273fe39c8 100644
--- a/ucb/Library_ucpdav1.mk
+++ b/ucb/Library_ucpdav1.mk
@@ -24,6 +24,8 @@ $(eval $(call gb_Library_use_libraries,ucpdav1,\
$(gb_UWINAPI) \
))
+ifeq ($(WITH_WEBDAV),neon)
+
$(eval $(call gb_Library_use_externals,ucpdav1,\
boost_headers \
libxml2 \
@@ -55,6 +57,59 @@ $(eval $(call gb_Library_add_exception_objects,ucpdav1,\
ucb/source/ucp/webdav-neon/webdavservices \
))
+else # WITH_WEBDAV == serf
+
+$(eval $(call gb_Library_set_warnings_not_errors,ucpdav1))
+
+$(eval $(call gb_Library_use_externals,ucpdav1,\
+ boost_headers \
+ apr \
+ openssl \
+ serf \
+ zlib \
+))
+
+$(eval $(call gb_Library_add_libs,ucpdav1,\
+ $(if $(filter $(OS),LINUX),-lpthread) \
+))
+
+$(eval $(call gb_Library_add_exception_objects,ucpdav1,\
+ ucb/source/ucp/webdav/AprEnv \
+ ucb/source/ucp/webdav/ContentProperties \
+ ucb/source/ucp/webdav/DAVProperties \
+ ucb/source/ucp/webdav/DAVResourceAccess \
+ ucb/source/ucp/webdav/DAVSessionFactory \
+ ucb/source/ucp/webdav/DateTimeHelper \
+ ucb/source/ucp/webdav/SerfCallbacks \
+ ucb/source/ucp/webdav/SerfCopyReqProcImpl \
+ ucb/source/ucp/webdav/SerfDeleteReqProcImpl \
+ ucb/source/ucp/webdav/SerfGetReqProcImpl \
+ ucb/source/ucp/webdav/SerfHeadReqProcImpl \
+ ucb/source/ucp/webdav/SerfInputStream \
+ ucb/source/ucp/webdav/SerfMkColReqProcImpl \
+ ucb/source/ucp/webdav/SerfMoveReqProcImpl \
+ ucb/source/ucp/webdav/SerfPostReqProcImpl \
+ ucb/source/ucp/webdav/SerfPropFindReqProcImpl \
+ ucb/source/ucp/webdav/SerfPropPatchReqProcImpl \
+ ucb/source/ucp/webdav/SerfPutReqProcImpl \
+ ucb/source/ucp/webdav/SerfRequestProcessor \
+ ucb/source/ucp/webdav/SerfRequestProcessorImpl \
+ ucb/source/ucp/webdav/SerfRequestProcessorImplFac \
+ ucb/source/ucp/webdav/SerfSession \
+ ucb/source/ucp/webdav/SerfUri \
+ ucb/source/ucp/webdav/UCBDeadPropertyValue \
+ ucb/source/ucp/webdav/webdavcontent \
+ ucb/source/ucp/webdav/webdavcontentcaps \
+ ucb/source/ucp/webdav/webdavdatasupplier \
+ ucb/source/ucp/webdav/webdavprovider \
+ ucb/source/ucp/webdav/webdavresponseparser \
+ ucb/source/ucp/webdav/webdavresultset \
+ ucb/source/ucp/webdav/webdavservices \
+ ))
+ #ucb/source/ucp/webdav/SerfLockStore
+
+endif # WITH_WEBDAV
+
ifeq ($(OS),WNT)
$(eval $(call gb_Library_use_system_win32_libs,ucpdav1,\
ws2_32 \
diff --git a/ucb/Module_ucb.mk b/ucb/Module_ucb.mk
index 0ea37f61bba2..8bbf78994df3 100644
--- a/ucb/Module_ucb.mk
+++ b/ucb/Module_ucb.mk
@@ -14,6 +14,7 @@ $(eval $(call gb_Module_add_targets,ucb,\
Library_srtrs1 \
Library_ucb1 \
Library_ucpcmis1 \
+ $(if $(WITH_WEBDAV),Library_ucpdav1) \
Library_ucpexpand1 \
Library_ucpext \
Library_ucpfile1 \
@@ -23,12 +24,6 @@ $(eval $(call gb_Module_add_targets,ucb,\
Library_ucptdoc1 \
))
-ifneq ($(DISABLE_NEON),TRUE)
-$(eval $(call gb_Module_add_targets,ucb,\
- Library_ucpdav1 \
-))
-endif
-
ifeq ($(ENABLE_GIO),TRUE)
$(eval $(call gb_Module_add_targets,ucb,\
Library_ucpgio1 \
diff --git a/ucb/source/ucp/webdav/ContentProperties.hxx b/ucb/source/ucp/webdav/ContentProperties.hxx
index 2e7054be0646..1776306357c2 100644
--- a/ucb/source/ucp/webdav/ContentProperties.hxx
+++ b/ucb/source/ucp/webdav/ContentProperties.hxx
@@ -24,7 +24,7 @@
#include <memory>
#include <vector>
-#include <unordered_map>
+#include <boost/unordered_map.hpp>
#include <rtl/ustring.hxx>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
@@ -82,7 +82,7 @@ public:
};
-typedef std::unordered_map
+typedef boost::unordered_map
<
OUString,
PropertyValue,
diff --git a/ucb/source/ucp/webdav/PropertyMap.hxx b/ucb/source/ucp/webdav/PropertyMap.hxx
index 1729e07caeef..30c1aa934059 100644
--- a/ucb/source/ucp/webdav/PropertyMap.hxx
+++ b/ucb/source/ucp/webdav/PropertyMap.hxx
@@ -22,7 +22,7 @@
#ifndef _WEBDAV_UCP_PROPERTYMAP_HXX
#define _WEBDAV_UCP_PROPERTYMAP_HXX
-#include <unordered_set>
+#include <boost/unordered_set.hpp>
#include <com/sun/star/beans/Property.hpp>
namespace http_dav_ucp {
@@ -46,7 +46,7 @@ struct hashPropertyName
}
};
-typedef std::unordered_set
+typedef boost::unordered_set
<
::com::sun::star::beans::Property,
hashPropertyName,
diff --git a/ucb/source/ucp/webdav/webdavresponseparser.cxx b/ucb/source/ucp/webdav/webdavresponseparser.cxx
index b3a97eba248e..075b35daab38 100644
--- a/ucb/source/ucp/webdav/webdavresponseparser.cxx
+++ b/ucb/source/ucp/webdav/webdavresponseparser.cxx
@@ -28,7 +28,7 @@
#include <com/sun/star/ucb/LockScope.hpp>
#include <com/sun/star/ucb/LockType.hpp>
#include <map>
-#include <unordered_map>
+#include <boost/unordered_map.hpp>
//////////////////////////////////////////////////////////////////////////////
@@ -99,7 +99,7 @@ namespace
WebDAVName StrToWebDAVName(const OUString& rStr)
{
- typedef std::unordered_map< OUString, WebDAVName, OUStringHash > WebDAVNameMapper;
+ typedef boost::unordered_map< OUString, WebDAVName, OUStringHash > WebDAVNameMapper;
typedef std::pair< OUString, WebDAVName > WebDAVNameValueType;
static WebDAVNameMapper aWebDAVNameMapperList;
diff --git a/ucb/source/ucp/webdav/webdavservices.cxx b/ucb/source/ucp/webdav/webdavservices.cxx
index 6bf9f78b62fc..93374cbb996e 100644
--- a/ucb/source/ucp/webdav/webdavservices.cxx
+++ b/ucb/source/ucp/webdav/webdavservices.cxx
@@ -24,15 +24,7 @@
using namespace com::sun::star;
-//=========================================================================
-extern "C" void SAL_CALL component_getImplementationEnvironment(
- const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
-{
- *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
-}
-
-//=========================================================================
-extern "C" void * SAL_CALL component_getFactory(
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucpdav1_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
void * pRet = 0;