diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-02-25 21:47:33 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-03-06 12:36:22 +0100 |
commit | dcae0509135c2067635ae3cf84b05dc9fb3d2d02 (patch) | |
tree | bf27a61ace258b814b37e3cfc9980e047e9f4d4c | |
parent | 0b27253aff771e104a9fd5d17595b205b2fc39fd (diff) |
Build webdav based on serf if neon is disabled.
Change-Id: I0cbb89c8d5ac65eda8bb21aaf0d07996a015d281
-rw-r--r-- | Repository.mk | 2 | ||||
-rw-r--r-- | RepositoryExternal.mk | 10 | ||||
-rw-r--r-- | config_host.mk.in | 2 | ||||
-rw-r--r-- | configure.ac | 52 | ||||
-rw-r--r-- | postprocess/CustomTarget_registry.mk | 2 | ||||
-rwxr-xr-x | postprocess/Rdb_services.mk | 2 | ||||
-rw-r--r-- | ucb/Library_ucpdav1.mk | 55 | ||||
-rw-r--r-- | ucb/Module_ucb.mk | 7 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/ContentProperties.hxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/PropertyMap.hxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavcontent.cxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavresponseparser.cxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavservices.cxx | 10 |
13 files changed, 106 insertions, 52 deletions
diff --git a/Repository.mk b/Repository.mk index 79d7089d8588..5072b708f146 100644 --- a/Repository.mk +++ b/Repository.mk @@ -533,7 +533,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \ textconv_dict \ ucb1 \ ucbhelper \ - $(if $(DISABLE_NEON),,ucpdav1) \ + $(if $(WITH_WEBDAV),ucpdav1) \ ucpfile1 \ ucpftp1 \ ucpchelp1 \ diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index eec50bd83019..a4daea749060 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -1000,7 +1000,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),\ @@ -1048,9 +1050,7 @@ endif endef -else - -gb_ExternalProject__use_apr := +else ifeq ($(WITH_WEBDAV),neon) ifneq ($(SYSTEM_NEON),) @@ -1088,7 +1088,7 @@ endef endif # SYSTEM_NEON -endif # DISABLE_NEON +endif # WITH_WEBDAV ifneq ($(SYSTEM_REDLAND),) diff --git a/config_host.mk.in b/config_host.mk.in index cbe2978bf86f..1c2d25bb371b 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -95,7 +95,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@ @@ -607,6 +606,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 6c78067acb95..cdae8b5cb983 100644 --- a/configure.ac +++ b/configure.ac @@ -652,7 +652,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_report_builder=no @@ -1777,6 +1776,14 @@ AC_ARG_WITH(lpsolver, WITH_LPSOLVER=$withval, WITH_LPSOLVER="lpsolve") +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. @@ -7333,7 +7340,6 @@ if test $_os = iOS; then enable_lotuswordpro=no enable_postgresql_sdbc=no enable_lotuswordpro=no - enable_neon=no enable_extension_integration=no enable_report_builder=no with_theme="tango" @@ -9156,15 +9162,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"], @@ -9179,11 +9186,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'`" @@ -9194,7 +9200,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 @@ -9257,7 +9269,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],, @@ -12481,8 +12493,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 ebd2afeb9bab..76f722c8b64f 100644 --- a/postprocess/CustomTarget_registry.mk +++ b/postprocess/CustomTarget_registry.mk @@ -335,7 +335,7 @@ ifneq (unx,$(GUIBASE)) postprocess_FILES_main += \ $(postprocess_MOD)/org/openoffice/Office/Paths-notunixdesktop.xcu 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 41f30777cef6..f6a9b17be901 100755 --- a/postprocess/Rdb_services.mk +++ b/postprocess/Rdb_services.mk @@ -152,7 +152,7 @@ $(eval $(call gb_Rdb_add_components,services,\ winaccessibility/source/service/winaccessibility \ ) \ ) \ - $(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 1e64c2498bee..c07d751014a0 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 \ $(if $(ENABLE_CMIS),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 286a699d9fc3..374ad4652748 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 c1ec9828eeec..bc61ebfb8831 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/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx index 8c1b5269ab7b..ad60a93900b1 100644 --- a/ucb/source/ucp/webdav/webdavcontent.cxx +++ b/ucb/source/ucp/webdav/webdavcontent.cxx @@ -285,7 +285,7 @@ void SAL_CALL Content::release() // virtual uno::Any SAL_CALL Content::queryInterface( const uno::Type & rType ) - throw ( uno::RuntimeException ) + throw ( uno::RuntimeException, std::exception ) { // Note: isFolder may require network activities! So call it only // if it is really necessary!!! @@ -341,7 +341,7 @@ XTYPEPROVIDER_COMMON_IMPL( Content ); // virtual uno::Sequence< uno::Type > SAL_CALL Content::getTypes() - throw( uno::RuntimeException ) + throw( uno::RuntimeException, std::exception ) { sal_Bool bFolder = sal_False; try diff --git a/ucb/source/ucp/webdav/webdavresponseparser.cxx b/ucb/source/ucp/webdav/webdavresponseparser.cxx index 8be333a1be34..cb9535b544ca 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> @@ -94,7 +94,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 4b85a977d73f..47509dd326fe 100644 --- a/ucb/source/ucp/webdav/webdavservices.cxx +++ b/ucb/source/ucp/webdav/webdavservices.cxx @@ -25,15 +25,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; |