Skip to content

Commit

Permalink
fbida: make fbpdf build optional
Browse files Browse the repository at this point in the history
Signed-off-by: Wolfgang Meyer <Wolfgang.Meyer@gossenmetrawatt.com>
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
  • Loading branch information
Wolfgang Meyer authored and kraj committed Jul 3, 2023
1 parent 4168e2f commit 669bed4
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 2 deletions.
6 changes: 4 additions & 2 deletions meta-oe/recipes-graphics/fbida/fbida_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "git://github.com/kraxel/fbida;protocol=https;branch=master \
Expand All @@ -18,6 +18,7 @@ SRC_URI = "git://github.com/kraxel/fbida;protocol=https;branch=master \
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"
Expand All @@ -27,12 +28,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)}"

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
From c00a155e90a9b22bd6ab5fa5407bb9923ee16ca0 Mon Sep 17 00:00:00 2001
From: "Meyer, Wolfgang" <Wolfgang.Meyer@gossenmetrawatt.com>
Date: Fri, 16 Sep 2022 18:45:58 +0200
Subject: [PATCH] meson.build: make fbpdf build optional

Upstream-Status: Pending
Signed-off-by: "Meyer, Wolfgang" <Wolfgang.Meyer@gossenmetrawatt.com>
---
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

0 comments on commit 669bed4

Please sign in to comment.