--- 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:52:47 +0900
@@ -1176,6 +1176,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.]),,
@@ -6250,17 +6255,28 @@
 AC_SUBST(SYSTEM_EXPAT)
 AC_SUBST([MINGW_EXPAT_DLL])
 
+if test "$enable_old_doc_filters" = "no"; then
+    BUILD_OLD_DOC_FILTERS=NO
+elif test $_os = iOS; then
+    # libwpd and libwpg are LGPL
+    BUILD_OLD_DOC_FILTERS=NO
+else
+    BUILD_OLD_DOC_FILTERS=YES
+fi
+AC_SUBST(BUILD_OLD_DOC_FILTERS)
+
 dnl ===================================================================
 dnl Check for system libcdr
 dnl ===================================================================
 AC_MSG_CHECKING([which libcdr to use])
-if test "$with_system_libcdr" = "yes"; then
+
+if test "$BUILD_OLD_DOC_FILTERS" = "NO"; then
+    AC_MSG_RESULT([none])
+    SYSTEM_LIBCDR=NO
+elif test "$with_system_libcdr" = "yes"; then
     AC_MSG_RESULT([external])
     SYSTEM_LIBCDR=YES
     PKG_CHECK_MODULES( CDR, libcdr-0.0 >= 0.0.5 )
-elif test $_os = iOS; then
-    # libcdr depends on libwpd and libwpg and those are LGPL
-    AC_MSG_RESULT([none])
 else
     AC_MSG_RESULT([internal])
     SYSTEM_LIBCDR=NO
@@ -6274,13 +6290,13 @@
 dnl Check for system libvisio
 dnl ===================================================================
 AC_MSG_CHECKING([which libvisio to use])
-if test "$with_system_libvisio" = "yes"; then
+if test "$BUILD_OLD_DOC_FILTERS" = "NO"; then
+    AC_MSG_RESULT([none])
+    SYSTEM_LIBVISIO=NO
+elif test "$with_system_libvisio" = "yes"; then
     AC_MSG_RESULT([external])
     SYSTEM_LIBVISIO=YES
     PKG_CHECK_MODULES( VISIO, libvisio-0.0 )
-elif test $_os = iOS; then
-    # libvisio depends on libwpd and libwpg and those are LGPL
-    AC_MSG_RESULT([none])
 else
     AC_MSG_RESULT([internal])
     SYSTEM_LIBVISIO=NO
@@ -6312,12 +6328,13 @@
 dnl Check for system libwpd
 dnl ===================================================================
 AC_MSG_CHECKING([which libwpd to use])
-if test "$with_system_libwpd" = "yes"; then
+if test "$BUILD_OLD_DOC_FILTERS" = "NO"; then
+    AC_MSG_RESULT([none])
+    SYSTEM_LIBWPD=NO
+elif test "$with_system_libwpd" = "yes"; then
     AC_MSG_RESULT([external])
     SYSTEM_LIBWPD=YES
     PKG_CHECK_MODULES( WPD, libwpd-0.9 libwpd-stream-0.9 )
-elif test $_os = iOS; then
-    AC_MSG_RESULT([none])
 else
     AC_MSG_RESULT([internal])
     SYSTEM_LIBWPD=NO
@@ -6384,12 +6401,13 @@
 dnl Check for system libwps
 dnl ===================================================================
 AC_MSG_CHECKING([which libwps to use])
-if test "$with_system_libwps" = "yes"; then
+if test "$BUILD_OLD_DOC_FILTERS" = "NO"; then
+    AC_MSG_RESULT([none])
+    SYSTEM_LIBWPS=NO
+elif test "$with_system_libwps" = "yes"; then
     AC_MSG_RESULT([external])
     SYSTEM_LIBWPS=YES
     PKG_CHECK_MODULES( WPS, libwps-0.2 )
-elif test $_os = iOS; then
-    AC_MSG_RESULT([none])
 else
     AC_MSG_RESULT([internal])
     SYSTEM_LIBWPS=NO
@@ -6403,12 +6421,13 @@
 dnl Check for system libwpg
 dnl ===================================================================
 AC_MSG_CHECKING([which libwpg to use])
-if test "$with_system_libwpg" = "yes"; then
+if test "$BUILD_OLD_DOC_FILTERS" = "NO"; then
+    AC_MSG_RESULT([none])
+    SYSTEM_LIBWPG=NO
+elif test "$with_system_libwpg" = "yes"; then
     AC_MSG_RESULT([external])
     SYSTEM_LIBWPG=YES
     PKG_CHECK_MODULES( WPG, libwpg-0.2 )
-elif test $_os = iOS; then
-    AC_MSG_RESULT([none])
 else
     AC_MSG_RESULT([internal])
     SYSTEM_LIBWPG=NO
--- 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:47:49 +0900
@@ -207,7 +207,7 @@
 
 .ENDIF
 
-.IF "$(OS)" != "IOS"
+.IF "$(BUILD_OLD_DOC_FILTERS)" != "NO"
 
 my_components += \
     component/writerfilter/util/writerfilter \
--- 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:28:54 +0900
@@ -36,6 +36,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=@CAIRO_CFLAGS@
 export CAIRO_LIBS=@CAIRO_LIBS@
--- libreoffice-core-3.6.4.3-orig/scp2/InstallModule_ooo.mk	2013-01-13 17:39:29 +0900
+++ libreoffice-core-3.6.4.3/scp2/InstallModule_ooo.mk	2013-01-13 17:44:39 +0900
@@ -34,6 +34,7 @@
 
 $(eval $(call gb_InstallModule_define_if_set,scp2/ooo,\
 	BUILD_CMIS \
+	BUILD_OLD_DOC_FILTERS \
 	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:53 +0900
+++ libreoffice-core-3.6.4.3/scp2/source/ooo/file_library_ooo.scp	2013-01-13 17:45:07 +0900
@@ -891,7 +891,9 @@
 
 #endif
 
+#ifdef BUILD_OLD_DOC_FILTERS
 STD_LIB_FILE(gid_File_Lib_WpftWriter,wpftwriter)
+#endif
 
 STD_LIB_FILE(gid_File_Lib_T602Filter,t602filter)
 
--- libreoffice-core-3.6.4.3-orig/scp2/source/graphicfilter/file_graphicfilter.scp	2012-11-28 17:29:53 +0900
+++ libreoffice-core-3.6.4.3/scp2/source/graphicfilter/file_graphicfilter.scp	2013-01-13 17:45:55 +0900
@@ -38,4 +38,6 @@
 
 STD_LIB_FILE( gid_File_Lib_Svg, svgfilter )
 
+#ifdef BUILD_OLD_DOC_FILTERS
 STD_FILTER_FILE( gid_File_Lib_WpftDraw, wpftdraw )
+#endif
