[meta-oe][PATCH 4/4] fbida: make fbpdf build optional


Wolfgang Meyer
 

Signed-off-by: Wolfgang Meyer <Wolfgang.Meyer@...>
---
meta-oe/recipes-graphics/fbida/fbida_git.bb | 6 +-
...eson.build-make-fbpdf-build-optional.patch | 64 +++++++++++++++++++
2 files changed, 68 insertions(+), 2 deletions(-)
create mode 100644 meta-oe/recipes-graphics/fbida/files/0001-meson.build-make-fbpdf-build-optional.patch

diff --git a/meta-oe/recipes-graphics/fbida/fbida_git.bb b/meta-oe/recipes-graphics/fbida/fbida_git.bb
index 9d9e349e2..236c9af9a 100644
--- a/meta-oe/recipes-graphics/fbida/fbida_git.bb
+++ b/meta-oe/recipes-graphics/fbida/fbida_git.bb
@@ -8,7 +8,7 @@ SECTION = "utils"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=e8feb78a32950a909621bbb51f634b39"

-DEPENDS = "virtual/libiconv jpeg fontconfig freetype libexif libdrm pixman udev libinput poppler libepoxy cairo"
+DEPENDS = "virtual/libiconv jpeg fontconfig freetype libexif libdrm pixman udev libinput cairo"

PV = "2.14+git${SRCPV}"
SRC_URI = "\
@@ -19,6 +19,7 @@ SRC_URI = "\
file://0001-meson.build-install-fbgs-shell-script.patch \
file://0002-meson.build-add-features-options-for-png-gif-tiff-we.patch \
file://0003-meson.build-do-not-require-xkbcommon.patch \
+ file://0001-meson.build-make-fbpdf-build-optional.patch \
"
SRCREV = "eb769e3d7f4a073d4c37ed524ebd5017c6a578f5"
S = "${WORKDIR}/git"
@@ -28,12 +29,13 @@ inherit meson pkgconfig features_check
# Depends on libepoxy
REQUIRED_DISTRO_FEATURES = "opengl"

-PACKAGECONFIG ??= "gif png"
+PACKAGECONFIG ??= "gif png pdf"
PACKAGECONFIG[gif] = "-Dgif=enabled,-Dgif=disabled,giflib"
PACKAGECONFIG[png] = "-Dpng=enabled,-Dpng=disabled,libpng"
PACKAGECONFIG[tiff] = "-Dtiff=enabled,-Dtiff=disabled,tiff"
PACKAGECONFIG[motif] = "-Dmotif=enabled,-Dmotif=disabled,libx11 libxext libxpm libxt openmotif"
PACKAGECONFIG[webp] = "-Dwebp=enabled,-Dwebp=disabled,libwebp"
+PACKAGECONFIG[pdf] = "-Dpdf=enabled,-Dpdf=disabled,poppler libepoxy"

CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}"

diff --git a/meta-oe/recipes-graphics/fbida/files/0001-meson.build-make-fbpdf-build-optional.patch b/meta-oe/recipes-graphics/fbida/files/0001-meson.build-make-fbpdf-build-optional.patch
new file mode 100644
index 000000000..6c0d0f1d3
--- /dev/null
+++ b/meta-oe/recipes-graphics/fbida/files/0001-meson.build-make-fbpdf-build-optional.patch
@@ -0,0 +1,64 @@
+From c00a155e90a9b22bd6ab5fa5407bb9923ee16ca0 Mon Sep 17 00:00:00 2001
+From: "Meyer, Wolfgang" <Wolfgang.Meyer@...>
+Date: Fri, 16 Sep 2022 18:45:58 +0200
+Subject: [PATCH] meson.build: make fbpdf build optional
+
+---
+ meson.build | 22 ++++++++++++----------
+ meson_options.txt | 1 +
+ 2 files changed, 13 insertions(+), 10 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 6b3daf3..289d1ec 100644
+--- a/meson.build
++++ b/meson.build
+@@ -15,11 +15,11 @@ x11resdir = x11resrun.stdout().strip()
+
+ # pkg-config deps
+ pixman_dep = dependency('pixman-1')
+-poppler_dep = dependency('poppler-glib')
++poppler_dep = dependency('poppler-glib', required: get_option('pdf'))
+ cairo_dep = dependency('cairo')
+ drm_dep = dependency('libdrm')
+-gbm_dep = dependency('gbm')
+-epoxy_dep = dependency('epoxy')
++gbm_dep = dependency('gbm', required: get_option('pdf'))
++epoxy_dep = dependency('epoxy', required: get_option('pdf'))
+ exif_dep = dependency('libexif')
+ png_dep = dependency('libpng', required: get_option('png'))
+ tiff_dep = dependency('libtiff-4', required: get_option('tiff'))
+@@ -132,13 +132,15 @@ fbpdf_deps = [ drm_dep, gbm_dep, epoxy_dep,
+ pixman_dep, poppler_dep, cairo_dep,
+ udev_dep, input_dep ]
+
+-executable('fbpdf',
+- sources : fbpdf_srcs,
+- dependencies : fbpdf_deps,
+- install : true)
+-install_data('fbgs',
+- install_dir : get_option('bindir'),
+- install_mode : 'rwxr--r--')
++if get_option('pdf').enabled()
++ executable('fbpdf',
++ sources : fbpdf_srcs,
++ dependencies : fbpdf_deps,
++ install : true)
++ install_data('fbgs',
++ install_dir : get_option('bindir'),
++ install_mode : 'rwxr--r--')
++endif
+
+ # build fbcon
+ fbcon_srcs = [ 'fbcon.c', 'drmtools.c', 'fbtools.c', 'gfx.c', 'vt.c', 'kbd.c' ]
+diff --git a/meson_options.txt b/meson_options.txt
+index ce37188..74699ab 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -3,3 +3,4 @@ option('png', type: 'feature', value : 'enabled')
+ option('tiff', type: 'feature', value : 'enabled')
+ option('webp', type: 'feature', value : 'disabled')
+ option('motif', type: 'feature', value : 'disabled')
++option('pdf', type: 'feature', value : 'enabled')
+--
+2.37.3
+
--
2.37.3


Gossen Metrawatt GmbH

Südwestpark 15
90449 Nürnberg
Germany

http://www.gossenmetrawatt.com
Amtsgericht Nürnberg HRB 24 602/USt-IdNr. DE815002769
Geschäftsführer: Marcel Hutka, Matthias Wist

Gossen Metrawatt GmbH is a member of GMC INSTRUMENTS-Group

[https://www.gmc-instruments.de/media/mailfooter/mailfooter.jpg]<http://www.gossenmetrawatt.com>