diff options
4 files changed, 157 insertions, 73 deletions
diff --git a/meta-oe/recipes-graphics/fbida/fbida_git.bb b/meta-oe/recipes-graphics/fbida/fbida_git.bb index b2e2a4bdcf..f686779f9f 100644 --- a/meta-oe/recipes-graphics/fbida/fbida_git.bb +++ b/meta-oe/recipes-graphics/fbida/fbida_git.bb | |||
@@ -12,58 +12,27 @@ DEPENDS = "virtual/libiconv jpeg fontconfig freetype libexif libdrm pixman udev | |||
12 | 12 | ||
13 | PV = "2.14+git${SRCPV}" | 13 | PV = "2.14+git${SRCPV}" |
14 | SRC_URI = "git://github.com/kraxel/fbida;protocol=https;branch=master \ | 14 | SRC_URI = "git://github.com/kraxel/fbida;protocol=https;branch=master \ |
15 | file://0001-Avoid-using-host-path.patch \ | ||
16 | file://fix-preprocessor.patch \ | 15 | file://fix-preprocessor.patch \ |
17 | file://support-jpeg-turbo.patch \ | 16 | file://support-jpeg-turbo.patch \ |
18 | file://fbida-gcc10.patch \ | 17 | file://fbida-gcc10.patch \ |
18 | file://0001-meson.build-install-fbgs-shell-script.patch \ | ||
19 | file://0002-meson.build-add-features-options-for-png-gif-tiff-we.patch \ | ||
19 | " | 20 | " |
20 | SRCREV = "ac9005bf0bbf50f14dc1b368be5084c8e0510a5d" | 21 | SRCREV = "ac9005bf0bbf50f14dc1b368be5084c8e0510a5d" |
21 | S = "${WORKDIR}/git" | 22 | S = "${WORKDIR}/git" |
22 | 23 | ||
23 | inherit pkgconfig features_check | 24 | inherit meson pkgconfig features_check |
24 | 25 | ||
25 | # Depends on libepoxy | 26 | # Depends on libepoxy |
26 | REQUIRED_DISTRO_FEATURES = "opengl" | 27 | REQUIRED_DISTRO_FEATURES = "opengl" |
27 | 28 | ||
28 | EXTRA_OEMAKE = "STRIP= 'srcdir=${S}' -f ${S}/GNUmakefile" | ||
29 | |||
30 | PACKAGECONFIG ??= "gif png" | 29 | PACKAGECONFIG ??= "gif png" |
31 | PACKAGECONFIG[gif] = ",,giflib" | 30 | PACKAGECONFIG[gif] = "-Dgif=enabled,-Dgif=disabled,giflib" |
32 | PACKAGECONFIG[png] = ",,libpng" | 31 | PACKAGECONFIG[png] = "-Dpng=enabled,-Dpng=disabled,libpng" |
33 | PACKAGECONFIG[tiff] = ",,tiff" | 32 | PACKAGECONFIG[tiff] = "-Dtiff=enabled,-Dtiff=disabled,tiff" |
34 | PACKAGECONFIG[motif] = ",,libx11 libxext libxpm libxt openmotif" | 33 | PACKAGECONFIG[motif] = "-Dmotif=enabled,-Dmotif=disabled,libx11 libxext libxpm libxt openmotif" |
35 | PACKAGECONFIG[webp] = ",,libwebp" | 34 | PACKAGECONFIG[webp] = "-Dwebp=enabled,-Dwebp=disabled,libwebp" |
36 | 35 | ||
37 | CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}" | 36 | CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}" |
38 | 37 | ||
39 | do_compile() { | ||
40 | sed -i -e 's# fbgs# \$(srcdir)/fbgs#; s#-Ijpeg#-I\$(srcdir)/jpeg#; s# jpeg/# \$(srcdir)/jpeg/#' ${S}/GNUmakefile | ||
41 | sed -i -e 's:/sbin/ldconfig:echo x:' ${S}/mk/Autoconf.mk | ||
42 | sed -i -e 's: cpp: ${CPP}:' ${S}/GNUmakefile | ||
43 | |||
44 | # Be sure to respect preferences (force to "no") | ||
45 | # Also avoid issues when ${BUILD_ARCH} == ${HOST_ARCH} | ||
46 | if [ -z "${@bb.utils.filter('PACKAGECONFIG', 'gif', d)}" ]; then | ||
47 | sed -i -e '/^HAVE_LIBGIF/s/:=.*$/:= no/' ${S}/GNUmakefile | ||
48 | fi | ||
49 | if [ -z "${@bb.utils.filter('PACKAGECONFIG', 'png', d)}" ]; then | ||
50 | sed -i -e '/^HAVE_LIBPNG/s/:=.*$/:= no/' ${S}/GNUmakefile | ||
51 | fi | ||
52 | if [ -z "${@bb.utils.filter('PACKAGECONFIG', 'tiff', d)}" ]; then | ||
53 | sed -i -e '/^HAVE_LIBTIFF/s/:=.*$/:= no/' ${S}/GNUmakefile | ||
54 | fi | ||
55 | if [ -z "${@bb.utils.filter('PACKAGECONFIG', 'motif', d)}" ]; then | ||
56 | sed -i -e '/^HAVE_MOTIF/s/:=.*$/:= no/' ${S}/GNUmakefile | ||
57 | fi | ||
58 | if [ -z "${@bb.utils.filter('PACKAGECONFIG', 'webp', d)}" ]; then | ||
59 | sed -i -e '/^HAVE_LIBWEBP/s/:=.*$/:= no/' ${S}/GNUmakefile | ||
60 | fi | ||
61 | |||
62 | oe_runmake | ||
63 | } | ||
64 | |||
65 | do_install() { | ||
66 | oe_runmake 'DESTDIR=${D}' install | ||
67 | } | ||
68 | |||
69 | RDEPENDS:${PN} = "ttf-dejavu-sans-mono" | 38 | RDEPENDS:${PN} = "ttf-dejavu-sans-mono" |
diff --git a/meta-oe/recipes-graphics/fbida/files/0001-Avoid-using-host-path.patch b/meta-oe/recipes-graphics/fbida/files/0001-Avoid-using-host-path.patch deleted file mode 100644 index cdf2c25d37..0000000000 --- a/meta-oe/recipes-graphics/fbida/files/0001-Avoid-using-host-path.patch +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | From 8d8fa9f22d9f6a95523bac63ac3af724faf5ff92 Mon Sep 17 00:00:00 2001 | ||
2 | From: Marek Vasut <marex@denx.de> | ||
3 | Date: Fri, 7 Apr 2017 23:26:09 +0200 | ||
4 | Subject: [PATCH] Avoid using host-path | ||
5 | |||
6 | Remove the explicit reference to /usr/local/* , this is completely | ||
7 | bogus and causes trouble during cross-compilation. | ||
8 | |||
9 | Signed-off-by: Marek Vasut <marex@denx.de> | ||
10 | Upstream-Status: Inappropriate [upstream requires this] | ||
11 | --- | ||
12 | mk/Variables.mk | 6 ------ | ||
13 | 1 file changed, 6 deletions(-) | ||
14 | |||
15 | diff --git a/mk/Variables.mk b/mk/Variables.mk | ||
16 | index 99f787c..3ffd87a 100644 | ||
17 | --- a/mk/Variables.mk | ||
18 | +++ b/mk/Variables.mk | ||
19 | @@ -42,12 +42,6 @@ CFLAGS += -Wall -Wmissing-prototypes -Wstrict-prototypes \ | ||
20 | -Wpointer-arith -Wunused | ||
21 | CXXFLAGS += -Wall -Wpointer-arith -Wunused | ||
22 | |||
23 | -# add /usr/local to the search path if something is in there ... | ||
24 | -ifneq ($(wildcard /usr/local/include/*.h),) | ||
25 | - CFLAGS += -I/usr/local/include | ||
26 | - LDFLAGS += -L/usr/local/$(LIB) | ||
27 | -endif | ||
28 | - | ||
29 | # fixup include path for $(srcdir) != "." | ||
30 | ifneq ($(srcdir),.) | ||
31 | CFLAGS += -I. -I$(srcdir) | ||
32 | -- | ||
33 | 2.11.0 | ||
34 | |||
diff --git a/meta-oe/recipes-graphics/fbida/files/0001-meson.build-install-fbgs-shell-script.patch b/meta-oe/recipes-graphics/fbida/files/0001-meson.build-install-fbgs-shell-script.patch new file mode 100644 index 0000000000..06ec5dfd81 --- /dev/null +++ b/meta-oe/recipes-graphics/fbida/files/0001-meson.build-install-fbgs-shell-script.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | From f9c455e81ad4d870c8ae20b9af8598139231ad26 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Meyer, Wolfgang" <Wolfgang.Meyer@gossenmetrawatt.com> | ||
3 | Date: Fri, 9 Sep 2022 09:32:22 +0200 | ||
4 | Subject: [PATCH] meson.build: install fbgs shell script | ||
5 | |||
6 | --- | ||
7 | meson.build | 3 +++ | ||
8 | 1 file changed, 3 insertions(+) | ||
9 | |||
10 | diff --git a/meson.build b/meson.build | ||
11 | index cbed982..2129896 100644 | ||
12 | --- a/meson.build | ||
13 | +++ b/meson.build | ||
14 | @@ -124,6 +124,9 @@ executable('fbpdf', | ||
15 | sources : fbpdf_srcs, | ||
16 | dependencies : fbpdf_deps, | ||
17 | install : true) | ||
18 | +install_data('fbgs', | ||
19 | + install_dir : get_option('bindir'), | ||
20 | + install_mode : 'rwxr--r--') | ||
21 | |||
22 | # build kbdtest | ||
23 | executable('kbdtest', | ||
24 | -- | ||
25 | 2.37.3 | ||
26 | |||
diff --git a/meta-oe/recipes-graphics/fbida/files/0002-meson.build-add-features-options-for-png-gif-tiff-we.patch b/meta-oe/recipes-graphics/fbida/files/0002-meson.build-add-features-options-for-png-gif-tiff-we.patch new file mode 100644 index 0000000000..92f034c520 --- /dev/null +++ b/meta-oe/recipes-graphics/fbida/files/0002-meson.build-add-features-options-for-png-gif-tiff-we.patch | |||
@@ -0,0 +1,123 @@ | |||
1 | From fa60c06cadd6acd8abede91e75254e7250a087a3 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Meyer, Wolfgang" <Wolfgang.Meyer@gossenmetrawatt.com> | ||
3 | Date: Fri, 16 Sep 2022 13:40:25 +0200 | ||
4 | Subject: [PATCH] meson.build: add features options for png, gif, tiff, webp, | ||
5 | and motif | ||
6 | |||
7 | --- | ||
8 | meson.build | 41 +++++++++++++++++++++++++++-------------- | ||
9 | meson_options.txt | 5 +++++ | ||
10 | selections.c | 4 ++++ | ||
11 | 3 files changed, 36 insertions(+), 14 deletions(-) | ||
12 | create mode 100644 meson_options.txt | ||
13 | |||
14 | diff --git a/meson.build b/meson.build | ||
15 | index cbed982..e66ee48 100644 | ||
16 | --- a/meson.build | ||
17 | +++ b/meson.build | ||
18 | @@ -21,9 +21,9 @@ drm_dep = dependency('libdrm') | ||
19 | gbm_dep = dependency('gbm') | ||
20 | epoxy_dep = dependency('epoxy') | ||
21 | exif_dep = dependency('libexif') | ||
22 | -png_dep = dependency('libpng') | ||
23 | -tiff_dep = dependency('libtiff-4') | ||
24 | -webp_dep = dependency('libwebp', required : false) | ||
25 | +png_dep = dependency('libpng', required: get_option('png')) | ||
26 | +tiff_dep = dependency('libtiff-4', required: get_option('tiff')) | ||
27 | +webp_dep = dependency('libwebp', required : get_option('webp')) | ||
28 | udev_dep = dependency('libudev') | ||
29 | input_dep = dependency('libinput') | ||
30 | |||
31 | @@ -32,20 +32,20 @@ cc = meson.get_compiler('c') | ||
32 | jpeg_dep = cc.find_library('jpeg') | ||
33 | math_dep = cc.find_library('m', required : false) | ||
34 | pcd_dep = cc.find_library('pcd', required : false) | ||
35 | -gif_dep = cc.find_library('gif', required : false) | ||
36 | +gif_dep = cc.find_library('gif', required: get_option('gif')) | ||
37 | |||
38 | # motif + x11 libs | ||
39 | -motif_dep = cc.find_library('Xm', required : false) | ||
40 | -xpm_dep = cc.find_library('Xpm', required : false) | ||
41 | -xt_dep = cc.find_library('Xt', required : false) | ||
42 | -xext_dep = cc.find_library('Xext', required : false) | ||
43 | -x11_dep = cc.find_library('X11', required : false) | ||
44 | +motif_dep = cc.find_library('Xm', required : get_option('motif')) | ||
45 | +xpm_dep = cc.find_library('Xpm', required : get_option('motif')) | ||
46 | +xt_dep = cc.find_library('Xt', required : get_option('motif')) | ||
47 | +xext_dep = cc.find_library('Xext', required : get_option('motif')) | ||
48 | +x11_dep = cc.find_library('X11', required : get_option('motif')) | ||
49 | |||
50 | # image formats | ||
51 | read_srcs = [ 'readers.c', 'rd/read-ppm.c', 'rd/read-bmp.c', | ||
52 | - 'rd/read-jpeg.c', 'rd/read-png.c', 'rd/read-tiff.c' ] | ||
53 | + 'rd/read-jpeg.c' ] | ||
54 | write_srcs = [ 'writers.c', 'wr/write-ppm.c', 'wr/write-ps.c', | ||
55 | - 'wr/write-jpeg.c', 'wr/write-png.c', 'wr/write-tiff.c' ] | ||
56 | + 'wr/write-jpeg.c' ] | ||
57 | image_deps = [ jpeg_dep, png_dep, tiff_dep, | ||
58 | pcd_dep, gif_dep, webp_dep ] | ||
59 | |||
60 | @@ -53,11 +53,21 @@ if pcd_dep.found() | ||
61 | read_srcs += 'rd/read-pcd.c' | ||
62 | config.set('HAVE_LIBPCD', true) | ||
63 | endif | ||
64 | -if gif_dep.found() | ||
65 | +if get_option('png').enabled() | ||
66 | + read_srcs += 'rd/read-png.c' | ||
67 | + write_srcs += 'wr/write-png.c' | ||
68 | + config.set('HAVE_LIBPNG', true) | ||
69 | +endif | ||
70 | +if get_option('tiff').enabled() | ||
71 | + read_srcs += 'rd/read-tiff.c' | ||
72 | + write_srcs += 'wr/write-tiff.c' | ||
73 | + config.set('HAVE_LIBTIFF', true) | ||
74 | +endif | ||
75 | +if get_option('gif').enabled() | ||
76 | read_srcs += 'rd/read-gif.c' | ||
77 | config.set('HAVE_LIBGIF', true) | ||
78 | endif | ||
79 | -if webp_dep.found() | ||
80 | +if get_option('webp').enabled() | ||
81 | read_srcs += 'rd/read-webp.c' | ||
82 | config.set('HAVE_LIBWEBP', true) | ||
83 | endif | ||
84 | @@ -153,7 +166,7 @@ ida_srcs = [ 'ida.c', 'man.c', 'hex.c', 'x11.c', 'viewer.c', | ||
85 | ida_deps = [ pixman_dep, exif_dep, image_deps, math_dep, | ||
86 | motif_dep, xpm_dep, xt_dep, xext_dep, x11_dep ] | ||
87 | |||
88 | -if motif_dep.found() | ||
89 | +if get_option('motif').enabled() | ||
90 | executable('ida', | ||
91 | sources : ida_srcs, | ||
92 | dependencies : ida_deps, | ||
93 | diff --git a/meson_options.txt b/meson_options.txt | ||
94 | new file mode 100644 | ||
95 | index 0000000..ce37188 | ||
96 | --- /dev/null | ||
97 | +++ b/meson_options.txt | ||
98 | @@ -0,0 +1,5 @@ | ||
99 | +option('gif', type: 'feature', value : 'enabled') | ||
100 | +option('png', type: 'feature', value : 'enabled') | ||
101 | +option('tiff', type: 'feature', value : 'enabled') | ||
102 | +option('webp', type: 'feature', value : 'disabled') | ||
103 | +option('motif', type: 'feature', value : 'disabled') | ||
104 | diff --git a/selections.c b/selections.c | ||
105 | index 7b16264..ccdc686 100644 | ||
106 | --- a/selections.c | ||
107 | +++ b/selections.c | ||
108 | @@ -609,8 +609,12 @@ void ipc_init() | ||
109 | #ifdef HAVE_LIBGIF | ||
110 | targets[ntargets++] = MIME_IMAGE_GIF; | ||
111 | #endif | ||
112 | +#ifdef HAVE_LIBPNG | ||
113 | targets[ntargets++] = MIME_IMAGE_PNG; | ||
114 | +#endif | ||
115 | +#ifdef HAVE_LIBTIFF | ||
116 | targets[ntargets++] = MIME_IMAGE_TIFF; | ||
117 | +#endif | ||
118 | targets[ntargets++] = XA_PIXMAP; | ||
119 | targets[ntargets++] = XA_STRING; | ||
120 | |||
121 | -- | ||
122 | 2.37.3 | ||
123 | |||