Kaydet (Commit) 79e5ee5f authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Isolate PDF Import so it can be made optionally installable

...which can be attractive for installation sets that use --with-system-poppler
but do not want the LO core package to depend on a poppler package.  See the
comment at the top of scp2/source/ooo/module_pdfimport.scp for details.

The build-time --disable-pdfimport configure switch is gone, PDF Import is built
unconditionally for all platforms but Android and iOS now.  (The
ENABLE_PDFIMPORT variable now uses TRUE/FALSE rather than YES/NO, to increase
consistency across those variables.)

Change-Id: I6509d0b2e770b276cd54540408fb1ec5a7dda058
üst 05310858
......@@ -565,11 +565,6 @@ AC_ARG_ENABLE(extensions,
[Disable all add-on extension functionality. Work in progress, use only if you are hacking on it.])
)
AC_ARG_ENABLE(pdfimport,
AS_HELP_STRING([--disable-pdfimport],
[Disable PDF import.])
)
AC_ARG_ENABLE(scripting,
AS_HELP_STRING([--disable-scripting],
[Disable BASIC, Java and Python. Work in progress, use only if you are hacking on it.])
......@@ -4157,11 +4152,11 @@ if test "$cross_compiling" = "yes"; then
./configure \
--disable-graphite \
--disable-build-mozilla \
--disable-pdfimport \
--disable-postgresql-sdbc \
--disable-zenity \
--with-parallelism="$with_parallelism" \
--without-doxygen \
ENABLE_PDFIMPORT=FALSE \
$sub_conf_opts \
2>&1 | sed -e 's/^/ /'
test -f ./config_host.mk 2>/dev/null || exit
......@@ -9795,9 +9790,9 @@ AC_SUBST(ENABLE_MINIMIZER)
# pdf import?
AC_MSG_CHECKING([whether to build the PDF import])
if test "x$enable_pdfimport" != "xno"; then
if test "$_os" != Android -a "$_os" != iOS -a "$ENABLE_PDFIMPORT" != FALSE; then
AC_MSG_RESULT([yes])
ENABLE_PDFIMPORT=YES
ENABLE_PDFIMPORT=TRUE
dnl ===================================================================
dnl Check for system poppler
......@@ -9825,8 +9820,7 @@ if test "x$enable_pdfimport" != "xno"; then
fi
else
AC_MSG_RESULT([no])
ENABLE_PDFIMPORT=NO
SCPDEFS="$SCPDEFS -DWITHOUT_PDFIMPORT"
ENABLE_PDFIMPORT=FALSE
fi
AC_SUBST(ENABLE_PDFIMPORT)
AC_SUBST(SYSTEM_POPPLER)
......
......@@ -12,7 +12,6 @@
--disable-mozilla
--disable-odk
--disable-opengl
--disable-pdfimport
--disable-postgresql-sdbc
--disable-python
--disable-randr
......
......@@ -12,7 +12,6 @@
--disable-mozilla
--disable-odk
--disable-opengl
--disable-pdfimport
--disable-postgresql-sdbc
--disable-python
--disable-randr
......
......@@ -35,7 +35,6 @@
--enable-ext-presenter-minimizer
--enable-ext-nlpsolver
--enable-epm
--enable-pdfimport
--enable-python=internal
--enable-online-update
--disable-unix-qstart-libpng
......
......@@ -9,6 +9,5 @@
--enable-ext-nlpsolver
--enable-extension-integration
--enable-online-update
--enable-pdfimport
--without-system-postgresql
--disable-gtk
......@@ -15,7 +15,6 @@
--enable-ext-presenter-minimizer
--enable-ext-report-builder
--enable-ext-wiki-publisher
--enable-pdfimport
--enable-python=system
--with-alloc=system
--with-ant-home=/usr/local/ant
......
......@@ -14,4 +14,3 @@
--enable-ext-presenter-minimizer
--enable-ext-nlpsolver
--enable-online-update
--enable-pdfimport
......@@ -13,7 +13,6 @@
--disable-mozilla
--disable-odk
--disable-opengl
--disable-pdfimport
--disable-postgresql-sdbc
--disable-python
--disable-randr
......
......@@ -51,7 +51,6 @@
--enable-ext-barcode
--disable-ext-oooblogger
--enable-ext-mysql-connector
--enable-pdfimport
--enable-postgresql-sdbc
--with-sun-templates
--enable-neon
......
......@@ -37,5 +37,4 @@
--enable-graphite
--enable-dependency-tracking
--enable-mozilla
--enable-pdfimport
--with-system-mozilla=mozilla
......@@ -329,6 +329,7 @@ $(call filter_Configuration_add_types,fcfg_langpack,fcfg_writer_types.xcu,filter
generic_Text \
writer_MIZI_Hwp_97 \
writer_StarOffice_XML_Writer_Template \
pdf_Portable_Document_Format \
writer8_template \
writer8 \
writer_MS_Word_2003_XML \
......@@ -338,15 +339,6 @@ $(call filter_Configuration_add_types,fcfg_langpack,fcfg_writer_types.xcu,filter
writer_OOXML_Template \
writer_layout_dump_xml \
)
ifeq ($(ENABLE_PDFIMPORT),YES)
$(call filter_Configuration_add_types,fcfg_langpack,fcfg_writer_types.xcu,filter/source/config/fragments/types,\
pdf_Portable_Document_Format_import \
)
else
$(call filter_Configuration_add_types,fcfg_langpack,fcfg_writer_types.xcu,filter/source/config/fragments/types,\
pdf_Portable_Document_Format \
)
endif
$(call filter_Configuration_add_filters,fcfg_langpack,fcfg_writer_filters.xcu,filter/source/config/fragments/filters,\
HTML__StarWriter_ \
......@@ -401,17 +393,9 @@ $(call filter_Configuration_add_types,fcfg_langpack,fcfg_web_types.xcu,filter/so
writer_web_HTML_help \
writer_StarOffice_XML_Writer \
writer_web_StarOffice_XML_Writer_Web_Template \
writerweb8_writer_template \
)
ifeq ($(ENABLE_PDFIMPORT),YES)
$(call filter_Configuration_add_types,fcfg_langpack,fcfg_web_types.xcu,filter/source/config/fragments/types,\
pdf_Portable_Document_Format_import \
)
else
$(call filter_Configuration_add_types,fcfg_langpack,fcfg_web_types.xcu,filter/source/config/fragments/types,\
pdf_Portable_Document_Format \
writerweb8_writer_template \
)
endif
$(call filter_Configuration_add_filters,fcfg_langpack,fcfg_web_filters.xcu,filter/source/config/fragments/filters,\
HTML \
......@@ -440,17 +424,9 @@ $(call filter_Configuration_add_types,fcfg_langpack,fcfg_global_types.xcu,filter
generic_Text \
writer_StarOffice_XML_Writer \
writer_globaldocument_StarOffice_XML_Writer_GlobalDocument \
writerglobal8 \
)
ifeq ($(ENABLE_PDFIMPORT),YES)
$(call filter_Configuration_add_types,fcfg_langpack,fcfg_global_types.xcu,filter/source/config/fragments/types,\
pdf_Portable_Document_Format_import \
)
else
$(call filter_Configuration_add_types,fcfg_langpack,fcfg_global_types.xcu,filter/source/config/fragments/types,\
pdf_Portable_Document_Format \
writerglobal8 \
)
endif
$(call filter_Configuration_add_filters,fcfg_langpack,fcfg_global_filters.xcu,filter/source/config/fragments/filters,\
Text__encoded___StarWriter_GlobalDocument_ \
......@@ -489,6 +465,7 @@ $(call filter_Configuration_add_types,fcfg_langpack,fcfg_calc_types.xcu,filter/s
calc_SYLK \
calc_StarOffice_XML_Calc \
calc_StarOffice_XML_Calc_Template \
pdf_Portable_Document_Format \
calc_dBase\
calc8 \
calc8_template \
......@@ -499,15 +476,6 @@ $(call filter_Configuration_add_types,fcfg_langpack,fcfg_calc_types.xcu,filter/s
calc_OOXML \
calc_OOXML_Template \
)
ifeq ($(ENABLE_PDFIMPORT),YES)
$(call filter_Configuration_add_types,fcfg_langpack,fcfg_calc_types.xcu,filter/source/config/fragments/types,\
pdf_Portable_Document_Format_import \
)
else
$(call filter_Configuration_add_types,fcfg_langpack,fcfg_calc_types.xcu,filter/source/config/fragments/types,\
pdf_Portable_Document_Format \
)
endif
$(call filter_Configuration_add_filters,fcfg_langpack,fcfg_calc_filters.xcu,filter/source/config/fragments/filters,\
DIF \
......@@ -564,6 +532,7 @@ $(call filter_Configuration_add_ui_filters,fcfg_langpack,filter/source/config/fr
$(call filter_Configuration_add_types,fcfg_langpack,fcfg_draw_types.xcu,filter/source/config/fragments/types,\
draw_StarOffice_XML_Draw \
draw_StarOffice_XML_Draw_Template \
pdf_Portable_Document_Format \
draw8 \
draw8_template \
draw_WordPerfect_Graphics \
......@@ -572,15 +541,6 @@ $(call filter_Configuration_add_types,fcfg_langpack,fcfg_draw_types.xcu,filter/s
draw_CorelDraw_Document \
draw_Corel_Presentation_Exchange \
)
ifeq ($(ENABLE_PDFIMPORT),YES)
$(call filter_Configuration_add_types,fcfg_langpack,fcfg_draw_types.xcu,filter/source/config/fragments/types,\
pdf_Portable_Document_Format_import \
)
else
$(call filter_Configuration_add_types,fcfg_langpack,fcfg_draw_types.xcu,filter/source/config/fragments/types,\
pdf_Portable_Document_Format \
)
endif
$(call filter_Configuration_add_filters,fcfg_langpack,fcfg_draw_filters.xcu,filter/source/config/fragments/filters,\
StarOffice_XML__Draw_ \
......@@ -610,6 +570,7 @@ $(call filter_Configuration_add_types,fcfg_langpack,fcfg_impress_types.xcu,filte
impress_MS_PowerPoint_97_Vorlage \
impress_StarOffice_XML_Impress \
impress_StarOffice_XML_Impress_Template \
pdf_Portable_Document_Format \
pwp_PlaceWare \
impress8 \
impress8_template \
......@@ -621,15 +582,6 @@ $(call filter_Configuration_add_types,fcfg_langpack,fcfg_impress_types.xcu,filte
impress_OOXML_Presentation_Template \
impress_OOXML_Presentation_AutoPlay \
)
ifeq ($(ENABLE_PDFIMPORT),YES)
$(call filter_Configuration_add_types,fcfg_langpack,fcfg_impress_types.xcu,filter/source/config/fragments/types,\
pdf_Portable_Document_Format_import \
)
else
$(call filter_Configuration_add_types,fcfg_langpack,fcfg_impress_types.xcu,filter/source/config/fragments/types,\
pdf_Portable_Document_Format \
)
endif
$(call filter_Configuration_add_filters,fcfg_langpack,fcfg_impress_filters.xcu,filter/source/config/fragments/filters,\
MS_PowerPoint_97 \
......@@ -690,17 +642,9 @@ $(call filter_Configuration_add_types,fcfg_langpack,fcfg_math_types.xcu,filter/s
math_MathML_XML_Math \
math_MathType_3x \
math_StarOffice_XML_Math \
math8 \
)
ifeq ($(ENABLE_PDFIMPORT),YES)
$(call filter_Configuration_add_types,fcfg_langpack,fcfg_math_types.xcu,filter/source/config/fragments/types,\
pdf_Portable_Document_Format_import \
)
else
$(call filter_Configuration_add_types,fcfg_langpack,fcfg_math_types.xcu,filter/source/config/fragments/types,\
pdf_Portable_Document_Format \
math8 \
)
endif
$(call filter_Configuration_add_filters,fcfg_langpack,fcfg_math_filters.xcu,filter/source/config/fragments/filters,\
MathML_XML__Math_ \
......
......@@ -795,6 +795,9 @@
<value>
<it>com.sun.PresenterScreen-*</it>
<it>com.sun.star.PDFImport-*</it>
<!-- arguably, dropping PDFImport extensions should be
conditional on having in-core PDF import actually built
and installed -->
</value>
</prop>
</node>
......
......@@ -302,7 +302,7 @@ my_components += \
my_components += component/extensions/source/plugin/pl
.END
.IF "$(ENABLE_PDFIMPORT)" == "YES"
.IF "$(ENABLE_PDFIMPORT)" == "TRUE"
my_components += component/sdext/source/pdfimport/pdfimport
.END
......
......@@ -342,9 +342,6 @@ MY_FILES_main += \
$(MY_MOD)/org/openoffice/Office/DataAccess/Drivers-jdbc.xcu
MY_DRIVERS += hsqldb jdbc
.END
.IF "$(ENABLE_PDFIMPORT)" == "YES"
MY_FILES_main += pdfimport/pdf_import_filter.xcu
.END
.IF "$(ENABLE_TDEAB)" == "TRUE"
MY_FILES_main += $(MY_MOD)/org/openoffice/Office/DataAccess/Drivers-tdeab.xcu
.END
......@@ -470,6 +467,16 @@ MY_FILES_ogltrans = \
$(MY_MOD)/org/openoffice/Office/Impress-ogltrans.xcu
.END
.IF "$(ENABLE_PDFIMPORT)" == "TRUE"
MY_XCDS += $(MISC)/pdfimport.xcd
MY_OPTDEPS_pdfimport = calc draw impress math writer
# HACK: for all fcfg_X_types.xcu in filter/Configuration_filter.mk that
# include pdf_Portable_Document_Format (i.e., X in calc, draw, global,
# impress, math, web, writer), add optional dependencies on those XCDS that
# include those fcfg_X_types.xcu
MY_FILES_pdfimport = pdfimport/pdf_import_filter.xcu pdfimport/pdf_types.xcu
.END
.IF "$(GUIBASE)" == "WIN"
MY_XCDS += $(MISC)/forcedefault.xcd
MY_DEPS_forcedefault = main
......@@ -497,6 +504,8 @@ $(MISC)/%.xcd .ERRREMOVE : $(MISC)/%.list
$(MISC)/%.list : makefile.mk
- $(RM) $@
echo '<list>' $(foreach,i,$(MY_DEPS_$(@:b)) '<dependency file="$i"/>') \
$(foreach,i,$(MY_OPTDEPS_$(@:b)) \
'<dependency file="$i" optional="true"/>') \
$(foreach,i,$(MY_FILES_$(@:b)) '<filename>$i</filename>') '</list>' > $@
$(MISC)/lang/Langpack-{$(alllangiso)}.xcd : $(SOLARXMLDIR)/$(MY_MOD)/$$(@:b).xcu
......
......@@ -230,4 +230,10 @@ $(eval $(call gb_InstallModule_add_localized_scpfiles,scp2/ooo,\
scp2/source/ooo/module_systemint \
))
ifeq ($(ENABLE_PDFIMPORT),TRUE)
$(eval $(call gb_InstallModule_add_scpfiles,scp2/ooo,\
scp2/source/ooo/module_pdfimport \
))
endif
# vim: set shiftwidth=4 tabstop=4 noexpandtab:
......@@ -903,19 +903,6 @@ STD_LIB_FILE( gid_File_Lib_Log, log)
STD_LIB_FILE( gid_File_Lib_Pdffilter, pdffilter)
#if !defined WITHOUT_PDFIMPORT
File gid_File_PDFImport
TXT_FILE_BODY;
Dir = SCP2_OOO_BIN_DIR;
#if defined UNX
Name = STRING(CONCAT2(pdfimport.uno,UNXSUFFIX));
#else
Name = "pdfimport.uno.dll";
#endif
Styles = (PACKED);
End
#endif
SPECIAL_LIB_FILE(gid_File_Lib_Deployment,deployment)
SPECIAL_LIB_FILE(gid_File_Lib_DeploymentGui,deploymentgui)
......
......@@ -115,29 +115,6 @@ File gid_File_Exe_Nsplugin
End
#endif
#if !defined WITHOUT_PDFIMPORT
Directory gid_Dir_Share_Xpdfimport
ParentID = gid_Brand_Dir_Share;
DosName = "xpdfimport";
End
File gid_File_Dat_XpdfimportErrPdf
TXT_FILE_BODY;
Dir = gid_Dir_Share_Xpdfimport;
Name = "xpdfimport_err.pdf";
Styles = (PACKED);
End
File gid_File_Exe_Xpdfimport
BIN_FILE_BODY;
Dir = gid_Brand_Dir_Program;
Name = EXENAME(xpdfimport);
Styles = (PACKED);
End
#endif
File gid_File_Bin_Gengal
BIN_FILE_BODY;
Dir = gid_Brand_Dir_Program;
......
......@@ -180,8 +180,6 @@ Module gid_Module_Root_Files_4
Default = YES;
Styles = (HIDDEN_ROOT);
Files = (gid_File_Dat_Root4,
gid_File_Dat_XpdfimportErrPdf,
gid_File_Exe_Xpdfimport,
gid_File_Filter_Eme,
gid_File_Filter_Sdfilt,
gid_File_Filter_Svgio,
......@@ -237,7 +235,6 @@ Module gid_Module_Root_Files_4
gid_File_Lib_Oox,
gid_File_Lib_Pcr,
gid_File_Lib_Pdffilter,
gid_File_Lib_PdfImport,
gid_File_Lib_Pk,
gid_File_Lib_Pl,
gid_File_Lib_Sf_Prothdlr,
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
// This module is normally included unconditionally in the core installation, it
// provides various import filters for both plain PDF and hybrid PDF/ODF. For
// --with-system-poppler builds it can be advantageous though to package this
// module as an individual, optional part, so that the core installation does
// not feature a dependency on a poppler package.
//
// The
// /org.openoffice.TypeDetection.Types/Types/pdf_Portable_Document_Format
// configuration node contained in pdfimport.xcd needs to override a
// node with the same name but which lacks import functionality and
// which is duplicated across calc, draw, impress, math, writer .xcd
// files. For this to work, there is a hack in
// postprocess/packregistry/makefile.mk to make pdfimport.xcd depend
// on all those other .xcd files (optinally, as not all of the other
// .xcd files need to be present in a given installation).
#include "macros.inc"
Module gid_Module_Pdfimport
ParentID = gid_Module_Root_Brand;
Styles = (HIDDEN_ROOT);
Dirs = (gid_Dir_Share_Xpdfimport);
Files = (
gid_File_Dat_XpdfimportErrPdf,
gid_File_Exe_Xpdfimport,
gid_File_Lib_PdfimportUno,
gid_File_Xcd_Pdfimport);
End
Directory gid_Dir_Share_Xpdfimport
ParentID = gid_Brand_Dir_Share;
DosName = "xpdfimport";
End
File gid_File_Dat_XpdfimportErrPdf
TXT_FILE_BODY;
Dir = gid_Dir_Share_Xpdfimport;
Name = "xpdfimport_err.pdf";
Styles = (PACKED);
End
File gid_File_Exe_Xpdfimport
BIN_FILE_BODY;
Dir = gid_Brand_Dir_Program;
Name = EXENAME(xpdfimport);
Styles = (PACKED);
End
File gid_File_Lib_PdfimportUno
TXT_FILE_BODY;
Dir = gid_Brand_Dir_Program;
Name = SCP2_URE_DL_BARE("pdfimport.uno");
Styles = (PACKED);
End
File gid_File_Xcd_Pdfimport
TXT_FILE_BODY;
Dir = gid_Brand_Dir_Share_Registry;
Name = "pdfimport.xcd";
Styles = (PACKED);
End
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -40,7 +40,7 @@ $(eval $(call gb_Module_add_targets,sdext,\
))
endif
ifeq ($(ENABLE_PDFIMPORT),YES)
ifeq ($(ENABLE_PDFIMPORT),TRUE)
$(eval $(call gb_Module_add_targets,sdext,\
Executable_xpdfimport \
Library_pdfimport \
......
......@@ -10,5 +10,6 @@
$(eval $(call gb_Package_Package,pdfimport_xcu,$(SRCDIR)/sdext))
$(eval $(call gb_Package_add_file,pdfimport_xcu,xml/pdfimport/pdf_import_filter.xcu,source/pdfimport/config/pdf_import_filter.xcu))
$(eval $(call gb_Package_add_file,pdfimport_xcu,xml/pdfimport/pdf_types.xcu,source/pdfimport/config/pdf_types.xcu))
# vim: set noet sw=4 ts=4:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE oor:component-data SYSTEM "../../../../component-update.dtd">
<!--
* This file is part of the LibreOffice project.
*
......@@ -15,6 +17,8 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:package="org.openoffice.TypeDetection" oor:name="Types">
<node oor:name="Types">
<node oor:name="pdf_Portable_Document_Format" oor:op="replace" >
<prop oor:name="DetectService"><value>org.libreoffice.comp.documents.PDFDetector</value></prop>
<prop oor:name="URLPattern"/>
......@@ -27,3 +31,5 @@
</prop>
<prop oor:name="ClipboardFormat"/>
</node>
</node>
</oor:component-data>
......@@ -33,7 +33,7 @@ TESTFILES=\
verticaltext.pdf
# --- Fake uno bootstrap ------------------------
.IF "$(ENABLE_PDFIMPORT)" != "NO"
.IF "$(ENABLE_PDFIMPORT)" == "TRUE"
$(BIN)$/pdfi_unittest_test.ini : makefile.mk
rm -f $@
......
......@@ -26,7 +26,7 @@ ENABLE_EXCEPTIONS=TRUE
.INCLUDE: settings.mk
.IF "$(ENABLE_PDFIMPORT)" == "NO"
.IF "$(ENABLE_PDFIMPORT)" == "FALSE"
@all:
@echo "PDF Import extension disabled."
.ENDIF
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment