diff -urN libreoffice-4.2.1.1-orig/Repository.mk libreoffice-4.2.1.1/Repository.mk
--- libreoffice-4.2.1.1-orig/Repository.mk	2014-02-13 09:31:05 +0900
+++ libreoffice-4.2.1.1/Repository.mk	2014-03-19 00:39:40 +0900
@@ -166,7 +166,7 @@
 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,graphicfilter, \
 	svgfilter \
 	flash \
-	wpftdraw \
+	$(if $(filter YES,$(BUILD_OLD_DOC_FILTERS)),wpftdraw) \
 	graphicfilter \
 ))
 
@@ -179,7 +179,7 @@
 	placeware \
 	PresenterScreen \
 	PresentationMinimizer \
-	wpftimpress \
+	$(if $(filter YES,$(BUILD_OLD_DOC_FILTERS)),wpftimpress) \
 ))
 
 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,onlineupdate, \
@@ -392,7 +392,7 @@
 	swui \
 	t602filter \
 	$(if $(DISABLE_SCRIPTING),,vbaswobj) \
-	wpftwriter \
+	$(if $(filter YES,$(BUILD_OLD_DOC_FILTERS)),wpftwriter) \
 	writerfilter \
 ))
 
diff -urN libreoffice-4.2.1.1-orig/RepositoryExternal.mk libreoffice-4.2.1.1/RepositoryExternal.mk
--- libreoffice-4.2.1.1-orig/RepositoryExternal.mk	2014-02-13 09:31:05 +0900
+++ libreoffice-4.2.1.1/RepositoryExternal.mk	2014-03-19 00:31:36 +0900
@@ -1375,6 +1375,8 @@
 endif # DISABLE_OPENSSL
 
 
+ifeq ($(BUILD_OLD_DOC_FILTERS),YES)
+
 ifeq ($(SYSTEM_CDR),YES)
 
 define gb_LinkTarget__use_cdr
@@ -1750,6 +1752,8 @@
 
 endif # SYSTEM_MWAW
 
+endif # BUILD_OLD_DOC_FILTERS
+
 
 ifeq ($(SYSTEM_LCMS2),YES)
 
diff -urN libreoffice-4.2.1.1-orig/config_host.mk.in libreoffice-4.2.1.1/config_host.mk.in
--- libreoffice-4.2.1.1-orig/config_host.mk.in	2014-02-13 09:31:05 +0900
+++ libreoffice-4.2.1.1/config_host.mk.in	2014-03-19 00:31:36 +0900
@@ -45,6 +45,7 @@
 export BUILD_TYPE=@BUILD_TYPE@
 export BUILD_UNOWINREG=@BUILD_UNOWINREG@
 export BUILD_VER_STRING=@BUILD_VER_STRING@
+export BUILD_OLD_DOC_FILTERS=@BUILD_OLD_DOC_FILTERS@
 export BUILD_X64=@BUILD_X64@
 export CAIRO_CFLAGS=$(gb_SPACE)@CAIRO_CFLAGS@
 export CAIRO_LIBS=$(gb_SPACE)@CAIRO_LIBS@
diff -urN libreoffice-4.2.1.1-orig/configure.ac libreoffice-4.2.1.1/configure.ac
--- libreoffice-4.2.1.1-orig/configure.ac	2014-02-13 09:31:05 +0900
+++ libreoffice-4.2.1.1/configure.ac	2014-03-19 00:38:50 +0900
@@ -640,6 +640,7 @@
     enable_opengl=no
     enable_lpsolve=no
     enable_report_builder=no
+    enable_old_doc_filters=no
     with_theme="tango"
     test_cups=no
     test_dbus=no
@@ -1477,6 +1478,11 @@
         [Specify external thesaurus dir.]),
 ,)
 
+AC_ARG_ENABLE(old-doc-filters,
+    AS_HELP_STRING([--disable-old-doc-filters],
+        [Don't include import/export filters for old document formats.]),,
+    [enable_old_doc_filters=yes])
+
 AC_ARG_WITH(system-zlib,
     AS_HELP_STRING([--with-system-zlib],
         [Use zlib already on system.]),,
@@ -7724,35 +7730,78 @@
 dnl ===================================================================
 libo_CHECK_SYSTEM_MODULE([libetonyek],[ETONYEK],[libetonyek-0.0],["-I${WORKDIR}/UnpackedTarball/libetonyek/inc"],["-L${WORKDIR}/UnpackedTarball/libetonyek/src/lib/.libs -letonyek-0.0"])
 
+if test "$enable_old_doc_filters" = "no"; then
+    BUILD_OLD_DOC_FILTERS=NO
+else
+    BUILD_OLD_DOC_FILTERS=YES
+fi
+AC_SUBST(BUILD_OLD_DOC_FILTERS)
+
 dnl ===================================================================
 dnl Check for system libfreehand
 dnl ===================================================================
-libo_CHECK_SYSTEM_MODULE([libfreehand],[FREEHAND],[libfreehand-0.0],["-I${WORKDIR}/UnpackedTarball/libfreehand/inc"],["-L${WORKDIR}/UnpackedTarball/libfreehand/src/lib/.libs -lfreehand-0.0"])
+if test "$BUILD_OLD_DOC_FILTERS" = "NO"; then
+    AC_MSG_CHECKING([which libfreehand to use])
+    AC_MSG_RESULT([none])
+    SYSTEM_FREEHAND=NO
+else
+    libo_CHECK_SYSTEM_MODULE([libfreehand],[FREEHAND],[libfreehand-0.0],["-I${WORKDIR}/UnpackedTarball/libfreehand/inc"],["-L${WORKDIR}/UnpackedTarball/libfreehand/src/lib/.libs -lfreehand-0.0"])
+fi
 
 dnl ===================================================================
 dnl Check for system libodfgen
 dnl ===================================================================
-libo_CHECK_SYSTEM_MODULE([libodfgen],[ODFGEN],[libodfgen-0.0 >= 0.0.3])
+if test "$BUILD_OLD_DOC_FILTERS" = "NO"; then
+    AC_MSG_CHECKING([which libodfgen to use])
+    AC_MSG_RESULT([none])
+    SYSTEM_ODFGEN=NO
+else
+    libo_CHECK_SYSTEM_MODULE([libodfgen],[ODFGEN],[libodfgen-0.0 >= 0.0.3])
+fi
 
 dnl ===================================================================
 dnl Check for system libcdr
 dnl ===================================================================
-libo_CHECK_SYSTEM_MODULE([libcdr],[CDR],[libcdr-0.0 >= 0.0.5])
+if test "$BUILD_OLD_DOC_FILTERS" = "NO"; then
+    AC_MSG_CHECKING([which libcdr to use])
+    AC_MSG_RESULT([none])
+    SYSTEM_CDR=NO
+else
+    libo_CHECK_SYSTEM_MODULE([libcdr],[CDR],[libcdr-0.0 >= 0.0.5])
+fi
 
 dnl ===================================================================
 dnl Check for system libmspub
 dnl ===================================================================
-libo_CHECK_SYSTEM_MODULE([libmspub],[MSPUB],[libmspub-0.0])
+if test "$BUILD_OLD_DOC_FILTERS" = "NO"; then
+    AC_MSG_CHECKING([which libmspub to use])
+    AC_MSG_RESULT([none])
+    SYSTEM_MSPUB=NO
+else
+    libo_CHECK_SYSTEM_MODULE([libmspub],[MSPUB],[libmspub-0.0])
+fi
 
 dnl ===================================================================
 dnl Check for system libmwaw
 dnl ===================================================================
-libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.2])
+if test "$BUILD_OLD_DOC_FILTERS" = "NO"; then
+    AC_MSG_CHECKING([which libmwaw to use])
+    AC_MSG_RESULT([none])
+    SYSTEM_MWAW=NO
+else
+    libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.2])
+fi
 
 dnl ===================================================================
 dnl Check for system libvisio
 dnl ===================================================================
-libo_CHECK_SYSTEM_MODULE([libvisio],[VISIO],[libvisio-0.0])
+if test "$BUILD_OLD_DOC_FILTERS" = "NO"; then
+    AC_MSG_CHECKING([which libvisio to use])
+    AC_MSG_RESULT([none])
+    SYSTEM_VISIO=NO
+else
+    libo_CHECK_SYSTEM_MODULE([libvisio],[VISIO],[libvisio-0.0])
+fi
 
 dnl ===================================================================
 dnl Check for system libcmis
@@ -7762,7 +7811,13 @@
 dnl ===================================================================
 dnl Check for system libwpd
 dnl ===================================================================
-libo_CHECK_SYSTEM_MODULE([libwpd],[WPD],[libwpd-0.9 >= 0.9.5 libwpd-stream-0.9 >= 0.9.5],["-I${WORKDIR}/UnpackedTarball/libwpd/inc"],["-L${WORKDIR}/UnpackedTarball/libwpd/src/lib/.libs -lwpd-0.9"])
+if test "$BUILD_OLD_DOC_FILTERS" = "NO"; then
+    AC_MSG_CHECKING([which libwpd to use])
+    AC_MSG_RESULT([none])
+    SYSTEM_WPD=NO
+else
+    libo_CHECK_SYSTEM_MODULE([libwpd],[WPD],[libwpd-0.9 >= 0.9.5 libwpd-stream-0.9 >= 0.9.5],["-I${WORKDIR}/UnpackedTarball/libwpd/inc"],["-L${WORKDIR}/UnpackedTarball/libwpd/src/lib/.libs -lwpd-0.9"])
+fi
 
 dnl ===================================================================
 dnl Check for system lcms2
@@ -7822,12 +7877,24 @@
 dnl ===================================================================
 dnl Check for system libwps
 dnl ===================================================================
-libo_CHECK_SYSTEM_MODULE([libwps],[WPS],[libwps-0.2],["-I${WORKDIR}/UnpackedTarball/libwps/inc"],["-L${WORKDIR}/UnpackedTarball/libwps/src/lib/.libs -lwps-0.2"])
+if test "$BUILD_OLD_DOC_FILTERS" = "NO"; then
+    AC_MSG_CHECKING([which libwps to use])
+    AC_MSG_RESULT([none])
+    SYSTEM_WPS=NO
+else
+    libo_CHECK_SYSTEM_MODULE([libwps],[WPS],[libwps-0.2],["-I${WORKDIR}/UnpackedTarball/libwps/inc"],["-L${WORKDIR}/UnpackedTarball/libwps/src/lib/.libs -lwps-0.2"])
+fi
 
 dnl ===================================================================
 dnl Check for system libwpg
 dnl ===================================================================
-libo_CHECK_SYSTEM_MODULE([libwpg],[WPG],[libwpg-0.2],["-I${WORKDIR}/UnpackedTarball/libwpg/inc"],["-L${WORKDIR}/UnpackedTarball/libwpg/src/lib/.libs -lwpg-0.2"])
+if test "$BUILD_OLD_DOC_FILTERS" = "NO"; then
+    AC_MSG_CHECKING([which libwpg to use])
+    AC_MSG_RESULT([none])
+    SYSTEM_WPG=NO
+else
+    libo_CHECK_SYSTEM_MODULE([libwpg],[WPG],[libwpg-0.2],["-I${WORKDIR}/UnpackedTarball/libwpg/inc"],["-L${WORKDIR}/UnpackedTarball/libwpg/src/lib/.libs -lwpg-0.2"])
+fi
 
 # ===================================================================
 # Check for system libxslt
diff -urN libreoffice-4.2.1.1-orig/postprocess/Rdb_services.mk libreoffice-4.2.1.1/postprocess/Rdb_services.mk
--- libreoffice-4.2.1.1-orig/postprocess/Rdb_services.mk	2014-02-13 09:31:05 +0900
+++ libreoffice-4.2.1.1/postprocess/Rdb_services.mk	2014-03-19 00:35:39 +0900
@@ -115,9 +115,11 @@
 		sccomp/source/solver/solver \
 	) \
 	writerfilter/util/writerfilter \
-	writerperfect/util/wpftwriter \
-	writerperfect/util/wpftdraw \
-	writerperfect/source/impress/wpftimpress \
+	$(if $(filter YES,$(BUILD_OLD_DOC_FILTERS)), \
+		writerperfect/util/wpftwriter \
+		writerperfect/util/wpftdraw \
+		writerperfect/source/impress/wpftimpress \
+	) \
 	$(if $(filter MACOSX,$(OS)), \
 		$(if $(filter-out X86_64,$(CPUNAME)), \
 			avmedia/source/quicktime/avmediaQuickTime \
diff -urN libreoffice-4.2.1.1-orig/scp2/InstallModule_ooo.mk libreoffice-4.2.1.1/scp2/InstallModule_ooo.mk
--- libreoffice-4.2.1.1-orig/scp2/InstallModule_ooo.mk	2014-02-13 09:31:05 +0900
+++ libreoffice-4.2.1.1/scp2/InstallModule_ooo.mk	2014-03-19 00:31:36 +0900
@@ -21,6 +21,7 @@
 ))
 
 $(eval $(call gb_InstallModule_define_if_set,scp2/ooo,\
+	BUILD_OLD_DOC_FILTERS \
 	DISABLE_ATL \
 	DISABLE_NEON \
 	ENABLE_CAIRO_CANVAS \
diff -urN libreoffice-4.2.1.1-orig/writerperfect/Module_writerperfect.mk libreoffice-4.2.1.1/writerperfect/Module_writerperfect.mk
--- libreoffice-4.2.1.1-orig/writerperfect/Module_writerperfect.mk	2014-02-13 09:31:05 +0900
+++ libreoffice-4.2.1.1/writerperfect/Module_writerperfect.mk	2014-03-19 00:35:27 +0900
@@ -19,6 +19,8 @@
 
 $(eval $(call gb_Module_Module,writerperfect))
 
+ifneq (NO,$(BUILD_OLD_DOC_FILTERS))
+
 $(eval $(call gb_Module_add_targets,writerperfect,\
 	Library_wpftwriter \
 ))
@@ -39,4 +41,6 @@
 	CppunitTest_writerperfect_stream \
 ))
 
+endif
+
 # vim: set noet sw=4 ts=4:
