summaryrefslogtreecommitdiff
path: root/scp2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-11-29 11:27:45 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-11-29 11:36:58 +0100
commit79e5ee5f6949f4b8645ef32dba61705d02473c60 (patch)
tree2042e4b002d19e7d828b838537278ca9f10da629 /scp2
parent053108588dd634838457ba81e7dc70e82aa50e02 (diff)
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
Diffstat (limited to 'scp2')
-rw-r--r--scp2/InstallModule_ooo.mk6
-rw-r--r--scp2/source/ooo/file_library_ooo.scp13
-rw-r--r--scp2/source/ooo/file_ooo.scp23
-rw-r--r--scp2/source/ooo/module_hidden_ooo.scp3
-rw-r--r--scp2/source/ooo/module_pdfimport.scp72
5 files changed, 78 insertions, 39 deletions
diff --git a/scp2/InstallModule_ooo.mk b/scp2/InstallModule_ooo.mk
index 57676b3ba577..23fbb67dbcaf 100644
--- a/scp2/InstallModule_ooo.mk
+++ b/scp2/InstallModule_ooo.mk
@@ -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:
diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp
index 090abbc5b18e..6141f0edf734 100644
--- a/scp2/source/ooo/file_library_ooo.scp
+++ b/scp2/source/ooo/file_library_ooo.scp
@@ -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)
diff --git a/scp2/source/ooo/file_ooo.scp b/scp2/source/ooo/file_ooo.scp
index 9079a4f6247d..6b30e7212cff 100644
--- a/scp2/source/ooo/file_ooo.scp
+++ b/scp2/source/ooo/file_ooo.scp
@@ -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;
diff --git a/scp2/source/ooo/module_hidden_ooo.scp b/scp2/source/ooo/module_hidden_ooo.scp
index 0949760eed0e..13bb7b7593a3 100644
--- a/scp2/source/ooo/module_hidden_ooo.scp
+++ b/scp2/source/ooo/module_hidden_ooo.scp
@@ -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,
diff --git a/scp2/source/ooo/module_pdfimport.scp b/scp2/source/ooo/module_pdfimport.scp
new file mode 100644
index 000000000000..897bd6cc193e
--- /dev/null
+++ b/scp2/source/ooo/module_pdfimport.scp
@@ -0,0 +1,72 @@
+/* -*- 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: */