diff -urN libreoffice-4.1.0.2-orig/Repository.mk libreoffice-4.1.0.2/Repository.mk
--- libreoffice-4.1.0.2-orig/Repository.mk	2013-07-03 23:52:47 +0900
+++ libreoffice-4.1.0.2/Repository.mk	2013-07-27 03:33:46 +0900
@@ -215,7 +215,7 @@
 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,GRAPHICFILTER, \
     svgfilter \
     flash \
-    wpftdraw \
+    $(if $(filter YES,$(BUILD_OLD_DOC_FILTERS)),wpftdraw) \
     graphicfilter \
 ))
 
@@ -363,7 +363,7 @@
 	swd \
 	swui \
 	t602filter \
-	wpftwriter \
+	$(if $(filter YES,$(BUILD_OLD_DOC_FILTERS)),wpftwriter) \
 	writerfilter \
 ))
 
diff -urN libreoffice-4.1.0.2-orig/RepositoryExternal.mk libreoffice-4.1.0.2/RepositoryExternal.mk
--- libreoffice-4.1.0.2-orig/RepositoryExternal.mk	2013-07-03 23:52:47 +0900
+++ libreoffice-4.1.0.2/RepositoryExternal.mk	2013-07-26 20:52:07 +0900
@@ -1324,6 +1324,8 @@
 endif # DISABLE_OPENSSL
 
 
+ifeq ($(BUILD_OLD_DOC_FILTERS),YES)
+
 ifeq ($(SYSTEM_CDR),YES)
 
 define gb_LinkTarget__use_cdr
@@ -1594,6 +1596,8 @@
 
 endif # SYSTEM_MWAW
 
+endif # BUILD_OLD_DOC_FILTERS
+
 
 ifeq ($(SYSTEM_LCMS2),YES)
 
diff -urN libreoffice-4.1.0.2-orig/config_host.mk.in libreoffice-4.1.0.2/config_host.mk.in
--- libreoffice-4.1.0.2-orig/config_host.mk.in	2013-07-03 23:52:47 +0900
+++ libreoffice-4.1.0.2/config_host.mk.in	2013-07-26 20:41:41 +0900
@@ -40,6 +40,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.1.0.2-orig/configure.ac libreoffice-4.1.0.2/configure.ac
--- libreoffice-4.1.0.2-orig/configure.ac	2013-07-25 01:53:33 +0900
+++ libreoffice-4.1.0.2/configure.ac	2013-07-26 20:52:21 +0900
@@ -1343,6 +1343,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.]),,
@@ -6947,6 +6952,7 @@
     enable_lotuswordpro=no
     enable_neon=no
     enable_extension_integration=no
+    enable_old_doc_filters=no
     with_theme="tango"
     with_ppds=no
 fi
@@ -7188,30 +7194,67 @@
 fi
 AC_SUBST(SYSTEM_EXPAT)
 
+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 libodfgen
 dnl ===================================================================
-libo_CHECK_SYSTEM_MODULE([libodfgen],[ODFGEN],[libodfgen-0.0])
+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])
+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.1])
+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.1])
+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
@@ -7221,7 +7264,13 @@
 dnl ===================================================================
 dnl Check for system libwpd
 dnl ===================================================================
-libo_CHECK_SYSTEM_MODULE([libwpd],[WPD],[libwpd-0.9 libwpd-stream-0.9],["-I${WORKDIR}/UnpackedTarball/libwpd/inc"],["-L${OUTDIR}/lib -lwpdlib"])
+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 libwpd-stream-0.9],["-I${WORKDIR}/UnpackedTarball/libwpd/inc"],["-L${OUTDIR}/lib -lwpdlib"])
+fi
 
 dnl ===================================================================
 dnl Check for system lcms2
@@ -7268,12 +7317,24 @@
 dnl ===================================================================
 dnl Check for system libwps
 dnl ===================================================================
-libo_CHECK_SYSTEM_MODULE([libwps],[WPS],[libwps-0.2],["-I${OUTDIR}/inc/external"],["-L${OUTDIR}/lib -lwpslib"])
+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${OUTDIR}/inc/external"],["-L${OUTDIR}/lib -lwpslib"])
+fi
 
 dnl ===================================================================
 dnl Check for system libwpg
 dnl ===================================================================
-libo_CHECK_SYSTEM_MODULE([libwpg],[WPG],[libwpg-0.2],["-I${OUTDIR}/inc/external"],["-L${OUTDIR}/lib -lwpglib"])
+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${OUTDIR}/inc/external"],["-L${OUTDIR}/lib -lwpglib"])
+fi
 
 # ===================================================================
 # Check for system libxslt
diff -urN libreoffice-4.1.0.2-orig/postprocess/Rdb_services.mk libreoffice-4.1.0.2/postprocess/Rdb_services.mk
--- libreoffice-4.1.0.2-orig/postprocess/Rdb_services.mk	2013-07-03 23:52:47 +0900
+++ libreoffice-4.1.0.2/postprocess/Rdb_services.mk	2013-07-26 20:44:45 +0900
@@ -117,6 +117,8 @@
 	) \
 	$(if $(filter-out IOS,$(OS)), \
 		writerfilter/util/writerfilter \
+	) \
+	$(if $(filter YES,$(BUILD_OLD_DOC_FILTERS)), \
 		writerperfect/util/wpftwriter \
 		writerperfect/util/wpftdraw \
 	) \
diff -urN libreoffice-4.1.0.2-orig/scp2/InstallModule_ooo.mk libreoffice-4.1.0.2/scp2/InstallModule_ooo.mk
--- libreoffice-4.1.0.2-orig/scp2/InstallModule_ooo.mk	2013-07-03 23:52:47 +0900
+++ libreoffice-4.1.0.2/scp2/InstallModule_ooo.mk	2013-07-26 20:42:05 +0900
@@ -18,6 +18,7 @@
 $(eval $(call gb_InstallModule_use_auto_install_libs,scp2/ooo,ooo))
 
 $(eval $(call gb_InstallModule_define_if_set,scp2/ooo,\
+	BUILD_OLD_DOC_FILTERS \
 	DISABLE_ATL \
 	DISABLE_NEON \
 	ENABLE_CAIRO_CANVAS \
diff -urN libreoffice-4.1.0.2-orig/writerperfect/Module_writerperfect.mk libreoffice-4.1.0.2/writerperfect/Module_writerperfect.mk
--- libreoffice-4.1.0.2-orig/writerperfect/Module_writerperfect.mk	2013-07-03 23:52:47 +0900
+++ libreoffice-4.1.0.2/writerperfect/Module_writerperfect.mk	2013-07-26 20:46:01 +0900
@@ -19,40 +19,12 @@
 
 $(eval $(call gb_Module_Module,writerperfect))
 
-ifneq (,$(SYSTEM_WPD))
-ifneq (,$(SYSTEM_WPS))
-ifneq (,$(SYSTEM_ODFGEN))
+ifneq (NO,$(BUILD_OLD_DOC_FILTERS))
 $(eval $(call gb_Module_add_targets,writerperfect,\
 	Library_wpftwriter \
-))
-endif
-endif
-endif
-
-ifneq (,$(SYSTEM_WPD))
-ifneq (,$(SYSTEM_WPG))
-ifneq (,$(SYSTEM_VISIO))
-ifneq (,$(SYSTEM_CDR))
-ifneq (,$(SYSTEM_MSPUB))
-ifneq (,$(SYSTEM_ODFGEN))
-$(eval $(call gb_Module_add_targets,writerperfect,\
 	Library_wpftdraw \
-))
-endif
-endif
-endif
-endif
-endif
-endif
-
-ifneq (,$(SYSTEM_WPD))
-ifneq (,$(SYSTEM_WPG))
-ifneq (,$(SYSTEM_ODFGEN))
-$(eval $(call gb_Module_add_targets,writerperfect,\
 	StaticLibrary_writerperfect \
 ))
 endif
-endif
-endif
 
 # vim: set noet sw=4 ts=4:
