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-04 11:34:36 +0200
commita783cea3300ca854fc988e7c47bec088fb457444 (patch)
tree2d37c2bbb9a3a1d2e0470a9ca8f3e54be7ce2d18
parente5884f866f08c6df1dd8884060a4e7b69a510a93 (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.ac53
-rw-r--r--postprocess/CustomTarget_registry.mk2
-rw-r--r--postprocess/Rdb_services.mk2
-rw-r--r--scp2/InstallModule_ooo.mk2
-rw-r--r--scp2/source/ooo/file_library_ooo.scp7
-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
14 files changed, 107 insertions, 57 deletions
diff --git a/Repository.mk b/Repository.mk
index 072d8b7f2e9d..c74ffb1ccad1 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -505,6 +505,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,OOO, \
sofficeapp \
ucb1 \
ucbhelper \
+ $(if $(WITH_WEBDAV),ucpdav1) \
ucpfile1 \
xstor \
))
@@ -541,7 +542,6 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
srtrs1 \
textconv_dict \
tvhlp1 \
- ucpdav1 \
ucpftp1 \
ucpchelp1 \
ucphier1 \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index e911b35d422b..3571b2bad842 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -827,7 +827,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),\
@@ -875,9 +877,7 @@ endif
endef
-else
-
-gb_ExternalProject__use_apr :=
+else ifeq ($(WITH_WEBDAV),neon)
ifeq ($(SYSTEM_NEON),YES)
@@ -915,7 +915,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 65e503e15bb5..13fdb7aa7097 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -96,7 +96,6 @@ export DISABLE_DBCONNECTIVITY=@DISABLE_DBCONNECTIVITY@
export DISABLE_DYNLOADING=@DISABLE_DYNLOADING@
export DISABLE_EXPORT=@DISABLE_EXPORT@
export DISABLE_LINKOO=@DISABLE_LINKOO@
-export DISABLE_NEON=@DISABLE_NEON@
export DISABLE_OPENSSL=@DISABLE_OPENSSL@
export DISABLE_PYTHON=@DISABLE_PYTHON@
export DISABLE_SCRIPTING=@DISABLE_SCRIPTING@
@@ -567,6 +566,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 WORDS_BIGENDIAN=@WORDS_BIGENDIAN@
export WORKDIR=@WORKDIR@
export WORKDIR_FOR_BUILD=@WORKDIR_FOR_BUILD@
diff --git a/configure.ac b/configure.ac
index af74b4ea3b3e..df9c949f62c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -570,7 +570,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
@@ -1646,6 +1645,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.
@@ -7038,7 +7045,6 @@ if test $_os = iOS; then
enable_lpsolve=no
enable_postgresql_sdbc=no
enable_lotuswordpro=no
- enable_neon=no
enable_extension_integration=no
with_theme="tango"
with_ppds=no
@@ -8641,15 +8647,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"],
@@ -8664,11 +8671,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'`"
@@ -8676,10 +8682,17 @@ else
libo_MINGW_TRY_DLL([libtasn1])
libo_MINGW_TRY_DLL([libgnutls])
else
+ SCPDEFS="$SCPDEFS -DNEED_NEON"
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
@@ -8744,7 +8757,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],,
@@ -11884,8 +11897,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 27825f3d4ab5..8999edc10d1f 100644
--- a/postprocess/CustomTarget_registry.mk
+++ b/postprocess/CustomTarget_registry.mk
@@ -325,7 +325,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 3215d5f5743f..b9d6c238a425 100644
--- a/postprocess/Rdb_services.mk
+++ b/postprocess/Rdb_services.mk
@@ -161,7 +161,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_PYTHON),, \
diff --git a/scp2/InstallModule_ooo.mk b/scp2/InstallModule_ooo.mk
index 573ee85f42f7..92042aca55c4 100644
--- a/scp2/InstallModule_ooo.mk
+++ b/scp2/InstallModule_ooo.mk
@@ -19,7 +19,6 @@ $(eval $(call gb_InstallModule_use_auto_install_libs,scp2/ooo,ooo))
$(eval $(call gb_InstallModule_define_if_set,scp2/ooo,\
DISABLE_ATL \
- DISABLE_NEON \
ENABLE_CAIRO_CANVAS \
ENABLE_DIRECTX \
ENABLE_EVOAB2 \
@@ -59,7 +58,6 @@ $(eval $(call gb_InstallModule_define_if_set,scp2/ooo,\
SYSTEM_LIBXSLT \
SYSTEM_LUCENE \
SYSTEM_MYTHES \
- SYSTEM_NEON \
SYSTEM_NSS \
SYSTEM_OPENSSL \
SYSTEM_PANGO \
diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp
index 3716a13fe9b3..ad5acb517ffd 100644
--- a/scp2/source/ooo/file_library_ooo.scp
+++ b/scp2/source/ooo/file_library_ooo.scp
@@ -829,11 +829,8 @@ File gid_File_Lib_Ucpchelp1
Styles = (PACKED);
End
-#ifndef DISABLE_NEON
-SPECIAL_LIB_FILE(gid_File_Lib_Ucpdav1,ucpdav1)
- #ifndef SYSTEM_NEON
- SPECIAL_LIB_FILE(gid_File_Lib_Neon,neon)
- #endif
+#ifdef NEED_NEON
+SPECIAL_LIB_FILE(gid_File_Lib_Neon,neon)
#endif
#if !defined(ANDROID) && !defined(IOS) //FIXME: get nss&xmlsec building
diff --git a/ucb/Library_ucpdav1.mk b/ucb/Library_ucpdav1.mk
index 55b3a323b83b..1e4016573364 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 -ldl) \
+))
+
+$(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 ce250f5cc450..3314f3a9ee64 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 35f7f9c0e9b7..9f530b326ec6 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;