Skip to contentSkip to conversation

package/fbv: update package

PATCH In review Waldemar Brodkorb 2 participants 2 messages Aug 23, 2024

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/fbv: update package

After the official fbv download page is no longer available switch to an hopefully active github fork.

Changes made to the Buildroot package:
- new active upstream fork (6 month old commits)
- use autoreconf to create configure
- remove all patches because they are no longer required
- upstream removed GIF support, so remove it here too
- license is unchanged, but full COPYING file is now included

Tested on a RPI5 with a PNG, BMP and JPEG picture.

---
v1->v2:
- add me to DEVELOPERS file, suggested by Thomas P.
- check COPYING file, suggested by Thomas P.
- add Config.in.legacy entry for GIF support, suggested by Thomas P.
- fix FBV_SITE to use github function, suggested by Thomas P.

---
 Config.in.legacy                              |  6 ++
 DEVELOPERS                                    |  1 +
 package/fbv/0001-cross.patch                  | 44 ----------
 ...nstead-of-a-macro-for-jpeg-detection.patch | 29 +++++++
 ...0002-fix-24bpp-support-on-big-endian.patch | 32 -------
 package/fbv/0003-fix-bgr555.patch             | 64 --------------
 package/fbv/0004-giflib.patch                 | 84 -------------------
 package/fbv/0005-include.patch                | 20 -----
 package/fbv/0006-libpng15.patch               | 24 ------
 .../0007-gif.c-fic-build-with-gcc-10.patch    | 36 --------
 package/fbv/Config.in                         | 13 +--
 package/fbv/fbv.hash                          |  4 +-
 package/fbv/fbv.mk                            | 30 +------
 13 files changed, 44 insertions(+), 343 deletions(-)
 delete mode 100644 package/fbv/0001-cross.patch
 create mode 100644 package/fbv/0001-use-a-function-instead-of-a-macro-for-jpeg-detection.patch
 delete mode 100644 package/fbv/0002-fix-24bpp-support-on-big-endian.patch
 delete mode 100644 package/fbv/0003-fix-bgr555.patch
 delete mode 100644 package/fbv/0004-giflib.patch
 delete mode 100644 package/fbv/0005-include.patch
 delete mode 100644 package/fbv/0006-libpng15.patch
 delete mode 100644 package/fbv/0007-gif.c-fic-build-with-gcc-10.patch
Config.in.legacy +6 -0
index 03f4e4f95c..bbfc6b359e 100644
@@ -146,6 +146,12 @@ endif
 
 comment "Legacy options removed in 2024.11"
 
+config BR2_PACKAGE_FBV_GIF
+	bool "fbv GIF support has been removed"
+	select BR2_LEGACY
+	help
+	  Fbv GIF support has been removed, use PNG, BMP or JPEG.
+
 config BR2_BINUTILS_VERSION_2_40_X
 	bool "binutils 2.40 has been removed"
 	select BR2_LEGACY
DEVELOPERS +1 -0
index 9c119f2d6e..d2b64ee5c6 100644
@@ -3298,6 +3298,7 @@ N:	Waldemar Brodkorb <[email protected]>
 F:	board/qemu/riscv32-virt/
 F:	configs/qemu_riscv32_nommu_virt_defconfig
 F:	package/asterisk/
+F:	package/fbv/
 F:	package/libjwt/
 F:	package/mksh/
 F:	package/ruby/
package/fbv/0001-cross.patch deleted +0 -44

44 lines not on this page · raw message

package/fbv/0001-use-a-function-instead-of-a-macro-for-jpeg-detection.patch new file +29 -0
new file mode 100644
index 0000000000..131dafc5c1
@@ -0,0 +1,29 @@
+From 3547055ba135dc1d8aacea68f16456aabb8c0a91 Mon Sep 17 00:00:00 2001
+From: Waldemar Brodkorb <[email protected]>
+Date: Fri, 23 Aug 2024 06:11:43 +0200
+Subject: [PATCH] use a function instead of a macro for jpeg detection
+
+Signed-off-by: Waldemar Brodkorb <[email protected]>
+Upstream: https://github.com/amadvance/fbv/pull/1
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 3fa4666..fc65903 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -28,8 +28,8 @@ AC_SEARCH_LIBS([png_create_read_struct], [png], [
+ 	]
+ )
+ 
+-AC_SEARCH_LIBS([jpeg_create_decompress], [jpeg], [
+-	LIBS="-ljpeg"
++AC_SEARCH_LIBS([jpeg_start_decompress], [jpeg], [
++	LIBS="$LIBS -ljpeg"
+ 	CFLAGS="$CFLAGS -DFBV_SUPPORT_JPEG"
+ 	], [
+ 	]
+-- 
+2.39.2
+
package/fbv/0002-fix-24bpp-support-on-big-endian.patch deleted +0 -32
deleted file mode 100644
index 23185ac46b..0000000000
@@ -1,32 +0,0 @@
-diff -upr a/fb_display.c b/fb_display.c
---- a/fb_display.c	2007-06-01 16:52:45.000000000 +0200
-+++ b/fb_display.c	2007-06-01 16:51:43.000000000 +0200
-@@ -307,7 +307,7 @@ void* convertRGB2FB(int fh, unsigned cha
- {
-     unsigned long i;
-     void *fbbuff = NULL;
--	u_int8_t  *c_fbbuff;
-+    u_int8_t  *c_fbbuff;
-     u_int16_t *s_fbbuff;
-     u_int32_t *i_fbbuff;
- 
-@@ -335,6 +335,16 @@ void* convertRGB2FB(int fh, unsigned cha
- 	    fbbuff = (void *) s_fbbuff;
- 	    break;
- 	case 24:
-+	    *cpp = 3;
-+	    c_fbbuff = (unsigned char *) malloc(count * 3 * sizeof(unsigned char));
-+	    for(i = 0; i < (3 * count); i += 3) {
-+		/* Big endian framebuffer. */
-+		c_fbbuff[i] = rgbbuff[i+2];
-+		c_fbbuff[i+1] = rgbbuff[i+1];
-+		c_fbbuff[i+2] = rgbbuff[i];
-+	    }
-+	    fbbuff = (void *) c_fbbuff;
-+	    break;
- 	case 32:
- 	    *cpp = 4;
- 	    i_fbbuff = (unsigned int *) malloc(count * sizeof(unsigned int));
-Only in build_avr32/fbv-1.0b-modified: .fb_display.c.swp
-Binary files build_avr32/fbv-1.0b/fb_display.o and build_avr32/fbv-1.0b-modified/fb_display.o differ
-Binary files build_avr32/fbv-1.0b/fbv and build_avr32/fbv-1.0b-modified/fbv differ
package/fbv/0003-fix-bgr555.patch deleted +0 -64

64 lines not on this page · raw message

package/fbv/0004-giflib.patch deleted +0 -84

84 lines not on this page · raw message

package/fbv/0005-include.patch deleted +0 -20
deleted file mode 100644
index 3d1cc17f74..0000000000
@@ -1,20 +0,0 @@
-diff -urpN fbv-1.0b.orig/fb_display.c fbv-1.0b/fb_display.c
---- fbv-1.0b.orig/fb_display.c	2004-09-07 14:09:43.000000000 +0200
-+++ fbv-1.0b/fb_display.c	2008-04-24 10:48:29.000000000 +0200
-@@ -18,8 +18,6 @@
-     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
- 
--#include <linux/fb.h>
--
- #include <stdio.h>
- #include <stdlib.h>
- #include <sys/types.h>
-@@ -31,6 +29,7 @@
- #include <asm/types.h>
- #include <string.h>
- #include <errno.h>
-+#include <linux/fb.h>
- #include "config.h"
- /* Public Use Functions:
-  *
package/fbv/0006-libpng15.patch deleted +0 -24
deleted file mode 100644
index 7872a73cf6..0000000000
@@ -1,24 +0,0 @@
-Support for libpng 1.5+ shamelessly taken from Gentoo.
-
-Signed-off-by: Gustavo Zacarias <[email protected]>
-
---- a/png.c
-+++ b/png.c
-@@ -69,7 +69,7 @@
-         fclose(fh); return(FH_ERROR_FORMAT);
-     }
-     rp=0;
--    if (setjmp(png_ptr->jmpbuf))
-+    if (setjmp(png_jmpbuf(png_ptr)))
-     {
- 	png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
-         if(rp) free(rp);
-@@ -161,7 +161,7 @@
-         fclose(fh); return(FH_ERROR_FORMAT);
-     }
-     rp=0;
--    if (setjmp(png_ptr->jmpbuf))
-+    if (setjmp(png_jmpbuf(png_ptr)))
-     {
- 	png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
-         if(rp) free(rp);
package/fbv/0007-gif.c-fic-build-with-gcc-10.patch deleted +0 -36
deleted file mode 100644
index 57d5777b61..0000000000
@@ -1,36 +0,0 @@
-From 8877207b290da1c3bc100f2705c30e6bdafcd985 Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <[email protected]>
-Date: Thu, 26 May 2022 23:59:46 +0200
-Subject: [PATCH] gif.c: fic build with gcc >= 10
-
-Fix the following build failure with gcc >= 10::
-
-/nvmedata/autobuild/instance-30/output-1/per-package/fbv/host/bin/../lib/gcc/powerpc-buildroot-linux-uclibc/11.3.0/../../../../powerpc-buildroot-linux-uclibc/bin/ld: gif.o: in function `fh_gif_load':
-gif.c:(.text+0x338): undefined reference to `m_rend_gif_decodecolormap'
-
-Fixes:
- - http://autobuild.buildroot.org/results/dca603a61b1fd0558992b4a40152d23b5b9c0049
-
-Signed-off-by: Fabrice Fontaine <[email protected]>
-[Upstream status: not upstreamable (most active fork dropped gif
-support: https://github.com/godspeed1989/fbv/pull/17)]
----
- gif.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gif.c b/gif.c
-index 689e549..5560f25 100644
---- a/gif.c
-+++ b/gif.c
-@@ -48,7 +48,7 @@ int fh_gif_id(char *name)
-     return(0);
- }
- 
--inline void m_rend_gif_decodecolormap(unsigned char *cmb,unsigned char *rgbb,ColorMapObject *cm,int s,int l, int transparency)
-+static inline void m_rend_gif_decodecolormap(unsigned char *cmb,unsigned char *rgbb,ColorMapObject *cm,int s,int l, int transparency)
- {
-     GifColorType *cmentry;
-     int i;
--- 
-2.35.1
-
package/fbv/Config.in +3 -10
index 2206276334..1d11bfb3ef 100644
@@ -2,10 +2,10 @@ config BR2_PACKAGE_FBV
 	bool "fbv"
 	help
 	  fbv is a very simple graphic file viewer for the framebuffer
-	  console, capable of displaying GIF, JPEG, PNG and BMP files
-	  using libungif, libjpeg and libpng.
+	  console, capable of displaying JPEG, PNG and BMP files
+	  using libjpeg and libpng.
 
-	  http://freshmeat.net/projects/fbv/
+	  https://github.com/amadvance/fbv
 
 if BR2_PACKAGE_FBV
 
@@ -23,11 +23,4 @@ config BR2_PACKAGE_FBV_JPEG
 	help
 	  Enable support for JPEG using IJG's libjpeg.
 
-config BR2_PACKAGE_FBV_GIF
-	bool "GIF support"
-	default y
-	select BR2_PACKAGE_GIFLIB
-	help
-	  Enable support for GIF using giflib.
-
 endif # BR2_PACKAGE_FBV
package/fbv/fbv.hash +2 -2
index 3f25465ba1..94a8165051 100644
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  9b55b9dafd5eb01562060d860e267e309a1876e8ba5ce4d3303484b94129ab3c  fbv-1.0b.tar.gz
-sha256  bf21d97bafcaacb5d6bc3d5502030c340f0e0593614078ab017af91e950083af  COPYING
+sha256  d18505f95546adb8175652e971d9ab3f2bece6ed21d72ff8e62881caa286a22b  fbv-7c2000804226ca860ca80f3baa993582e29aa1a2.tar.gz
+sha256  32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670  COPYING
package/fbv/fbv.mk +3 -27
index a69e4ad518..f7a061dfd7 100644
@@ -4,11 +4,11 @@
 #
 ################################################################################
 
-FBV_VERSION = 1.0b
-FBV_SITE = http://s-tech.elsat.net.pl/fbv
-
+FBV_VERSION = 7c2000804226ca860ca80f3baa993582e29aa1a2
+FBV_SITE = $(call github,amadvance,fbv,$(FBV_VERSION))
 FBV_LICENSE = GPL-2.0
 FBV_LICENSE_FILES = COPYING
+FBV_AUTORECONF = YES
 
 ### image format dependencies and configure options
 FBV_DEPENDENCIES = # empty
@@ -29,29 +29,5 @@ FBV_DEPENDENCIES += jpeg
 else
 FBV_CONFIGURE_OPTS += --without-libjpeg
 endif
-ifeq ($(BR2_PACKAGE_FBV_GIF),y)
-FBV_DEPENDENCIES += giflib
-else
-FBV_CONFIGURE_OPTS += --without-libungif
-endif
-
-#fbv doesn't support cross-compilation
-define FBV_CONFIGURE_CMDS
-	(cd $(FBV_DIR); rm -f config.cache; \
-		$(TARGET_CONFIGURE_OPTS) \
-		$(TARGET_CONFIGURE_ARGS) \
-		./configure \
-		--prefix=/usr \
-		$(FBV_CONFIGURE_OPTS) \
-	)
-endef
-
-define FBV_BUILD_CMDS
-	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
-endef
-
-define FBV_INSTALL_TARGET_CMDS
-	$(INSTALL) -D $(@D)/fbv $(TARGET_DIR)/usr/bin/fbv
-endef
 
 $(eval $(autotools-package))
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 10 lines · On Fri, 23 Aug 2024 14:54:40 +0200 Waldemar Brodkorb <[email protected]> wrote:

After the official fbv download page is no longer available switch to an hopefully active github fork.

Changes made to the Buildroot package:
- new active upstream fork (6 month old commits)
- use autoreconf to create configure
- remove all patches because they are no longer required
- upstream removed GIF support, so remove it here too
- license is unchanged, but full COPYING file is now included

Quoted 3 lines

Tested on a RPI5 with a PNG, BMP and JPEG picture.

Applied to next, thanks. You had forgotten to drop the entries in .checkpackageignore. Make sure to run "make check-package" prior to sending patches, or add https://paste.ack.tf/f4de07 as a post-commit hook in your Buildroot git repository to have automatic checking :-)

Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot