--- libreoffice-core-3.6.4.3-orig/configure.in	2012-11-28 17:29:53 +0900
+++ libreoffice-core-3.6.4.3/configure.in	2013-01-12 04:54:48 +0900
@@ -1201,6 +1206,11 @@
         [Use expat already on system.]),,
     [with_system_expat="$with_system_libs"])
 
+AC_ARG_ENABLE(cmis,
+    AS_HELP_STRING([--disable-cmis],
+        [Don't include CMIS support.]),,
+    [enable_cmis="yes"])
+
 AC_ARG_WITH(system-libcmis,
     AS_HELP_STRING([--with-system-libcmis],
         [Use libcmis already on system.]),,
@@ -6290,11 +6311,21 @@
 AC_SUBST(VISIO_CFLAGS)
 AC_SUBST(VISIO_LIBS)
 
+if test "$enable_cmis" = "no"; then
+    BUILD_CMIS=NO
+else
+    BUILD_CMIS=YES
+fi
+AC_SUBST(BUILD_CMIS)
+
 dnl ===================================================================
 dnl Check for system libcmis
 dnl ===================================================================
 AC_MSG_CHECKING([which libcmis to use])
-if test "$with_system_libcmis" = "yes"; then
+if test "$BUILD_CMIS" = "NO"; then
+    AC_MSG_RESULT([none])
+    SYSTEM_LIBCMIS=NO
+elif test "$with_system_libcmis" = "yes"; then
     AC_MSG_RESULT([external])
     SYSTEM_LIBCMIS=YES
     PKG_CHECK_MODULES( LIBCMIS, libcmis-0.2 >= 0.2.1 )
--- libreoffice-core-3.6.4.3-orig/postprocess/packcomponents/makefile.mk	2012-11-28 17:29:53 +0900
+++ libreoffice-core-3.6.4.3/postprocess/packcomponents/makefile.mk	2013-01-12 04:55:41 +0900
@@ -111,7 +111,6 @@
     component/ucb/source/sorter/srtrs1 \
     component/ucb/source/core/ucb1 \
     component/ucb/source/cacher/cached1 \
-    component/ucb/source/ucp/cmis/ucpcmis1 \
     component/ucb/source/ucp/expand/ucpexpand1 \
     component/ucb/source/ucp/ext/ucpext \
     component/ucb/source/ucp/file/ucpfile1 \
@@ -130,6 +129,13 @@
     component/xmlsecurity/util/xmlsecurity \
     component/xmlsecurity/util/xsec_fw \
 
+.IF "$(BUILD_CMIS)" != "NO"
+
+my_components += \
+    component/ucb/source/ucp/cmis/ucpcmis1 \
+
+.ENDIF
+
 .IF "$(BUILD_TYPE)" != "$(BUILD_TYPE:s/DBCONNECTIVITY//)"
 
 my_components += \
--- libreoffice-core-3.6.4.3-orig/RepositoryExternal.mk	2013-01-13 10:54:07 +0900
+++ libreoffice-core-3.6.4.3/RepositoryExternal.mk	2013-01-13 10:52:49 +0900
@@ -304,6 +304,8 @@
 endif # SYSTEM_BOOST
 
 
+ifeq ($(BUILD_CMIS),YES)
+
 ifeq ($(SYSTEM_LIBCMIS),YES)
 
 define gb_LinkTarget__use_cmis
@@ -330,6 +332,8 @@
 
 endif # SYSTEM_LIBCMIS
 
+endif # BUILD_CMIS
+
 
 ifeq ($(SYSTEM_LIBEXTTEXTCAT),YES)
 
--- libreoffice-core-3.6.4.3-orig/ucb/Module_ucb.mk	2013-01-13 11:00:08 +0900
+++ libreoffice-core-3.6.4.3/ucb/Module_ucb.mk	2013-01-13 10:59:55 +0900
@@ -32,7 +32,6 @@
 	Library_cached1 \
 	Library_srtrs1 \
 	Library_ucb1 \
-	Library_ucpcmis1 \
 	Library_ucpexpand1 \
 	Library_ucpext \
 	Library_ucpfile1 \
@@ -43,6 +42,12 @@
 	Package_xml \
 ))
 
+ifeq ($(BUILD_CMIS),YES)
+$(eval $(call gb_Module_add_targets,ucb,\
+	Library_ucpcmis1 \
+))
+endif
+
 ifeq ($(OS),WNT)
 $(eval $(call gb_Module_add_targets,ucb,\
 	Library_ucpodma1 \
--- libreoffice-core-3.6.4.3-orig/config_host.mk.in	2012-11-28 17:29:53 +0900
+++ libreoffice-core-3.6.4.3/config_host.mk.in	2013-01-13 11:27:10 +0900
@@ -26,6 +26,7 @@
 export BOOST_DATE_TIME_LIB=@BOOST_DATE_TIME_LIB@
 export BOOST_LDFLAGS=@BOOST_LDFLAGS@
 export BSH_JAR=@BSH_JAR@
+export BUILD_CMIS=@BUILD_CMIS@
 export BUILD_DMAKE=@BUILD_DMAKE@
 export BUILD_EPM=@BUILD_EPM@
 export BUILD_MOZAB=@BUILD_MOZAB@
--- libreoffice-core-3.6.4.3-orig/scp2/InstallModule_ooo.mk	2012-11-28 17:29:53 +0900
+++ libreoffice-core-3.6.4.3/scp2/InstallModule_ooo.mk	2013-01-13 17:39:29 +0900
@@ -33,6 +33,7 @@
 ))
 
 $(eval $(call gb_InstallModule_define_if_set,scp2/ooo,\
+	BUILD_CMIS \
 	DISABLE_ATL \
 	DISABLE_NEON \
 	ENABLE_DIRECTX \
--- libreoffice-core-3.6.4.3-orig/scp2/source/ooo/file_library_ooo.scp	2013-01-13 17:39:34 +0900
+++ libreoffice-core-3.6.4.3/scp2/source/ooo/file_library_ooo.scp	2013-01-13 17:39:53 +0900
@@ -1333,7 +1333,9 @@
 SPECIAL_COMPONENT_LIB_FILE(gid_File_Ucpodma1, ucpodma1)
 #endif
 
+#ifdef BUILD_CMIS
 SPECIAL_COMPONENT_LIB_FILE(gid_File_Ucpcmis, ucpcmis1.uno)
+#endif
 
 File gid_File_Lib_Lnth
     LIB_FILE_BODY;
