[dia: 41/105] #19: Port pdf and postscript plugins.
- From: Zander <zbrown src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia: 41/105] #19: Port pdf and postscript plugins.
- Date: Mon, 28 Jan 2019 19:22:46 +0000 (UTC)
commit 88b830d9ace0f36262067b42bd4907db4eb45ae8
Author: Eduard Nicodei <eddnicodei gmail com>
Date: Mon Dec 31 22:05:43 2018 +0000
#19: Port pdf and postscript plugins.
- Also use library instead of shared_library as per
meson documentation.
plug-ins/meson.build | 10 +++-------
plug-ins/pdf/meson.build | 27 +++++++++++++++++++++++++++
plug-ins/postscript/meson.build | 27 +++++++++++++++++++++++++++
3 files changed, 57 insertions(+), 7 deletions(-)
---
diff --git a/plug-ins/meson.build b/plug-ins/meson.build
index 70d726b4..de45b6d4 100644
--- a/plug-ins/meson.build
+++ b/plug-ins/meson.build
@@ -18,13 +18,9 @@ subdir('pixbuf')
subdir('layout') # Non-standard: shared_module
subdir('libart')
subdir('metapost')
-
-# FIXME: does not compile
-#subdir('pdf')
-
+subdir('pdf')
subdir('pgf')
-#subdir('postscript')
-
+subdir('postscript')
subdir('pstricks')
#subdir('python')
#subdir('stress')
@@ -41,7 +37,7 @@ subdir('xfig')
foreach p : install_plugins_desc
message(p[0])
- shared_library(
+ library(
p[0],
p[1],
dependencies: [libgtk_dep, libm_dep, libxml_dep] + [p[2]],
diff --git a/plug-ins/pdf/meson.build b/plug-ins/pdf/meson.build
new file mode 100644
index 00000000..5184a4f1
--- /dev/null
+++ b/plug-ins/pdf/meson.build
@@ -0,0 +1,27 @@
+sources = [files('pdf.c')]
+deps = []
+
+libpoppler_dep = dependency('poppler',
+ version: '<= 0.62.0',
+ required: false
+)
+
+# TODO: we should be able to use has_header_symbol.
+# However, that does not seem to pick up on GBool, gTrue etc.
+#has_gTrue = cc.has_header_symbol(
+# 'goo/gtypes.h',
+# 'GBool',
+# dependencies: libpoppler_dep
+#)
+has_gtypes = cc.has_header(
+ 'goo/gtypes.h',
+ dependencies: libpoppler_dep
+)
+
+if libpoppler_dep.found() and has_gtypes
+ conf.set('HAVE_POPPLER', 1)
+ sources += [files('pdf-import.cpp')]
+ deps += [libpoppler_dep]
+endif
+
+install_plugins_desc += [['pdf_filter', sources, deps]]
diff --git a/plug-ins/postscript/meson.build b/plug-ins/postscript/meson.build
new file mode 100644
index 00000000..f27068e4
--- /dev/null
+++ b/plug-ins/postscript/meson.build
@@ -0,0 +1,27 @@
+sources = files(
+ 'postscript.c',
+ 'ps-utf8.c',
+ 'diapsrenderer.c',
+ 'paginate_psprint.c',
+ 'render_eps.c',
+)
+deps = []
+
+# TODO: actual check for freetype lib.
+freetype_dep = dependency('freetype2', version: '>= 11.0.5', required: false)
+if freetype_dep.found()
+ sources += files('diapsft2renderer.c')
+ deps += [freetype_dep]
+endif
+
+# TODO: actual check for w32
+platform_is_win32 = false
+if platform_is_win32
+ sources += files('win32print.c')
+ #TODO: add winspool as per Makefile.am
+ deps += []
+endif
+
+install_plugins_desc += [['postscript_filter', sources, deps]]
+
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]