From 92f93a5098e3e47448c1069ad88be919ef6a194b Mon Sep 17 00:00:00 2001 From: sthen Date: Mon, 19 Oct 2020 16:50:16 +0000 Subject: [PATCH] fswebcam: backport fix for a change in libgd, update HOMEPAGE/MASTER_SITES --- graphics/fswebcam/Makefile | 17 +++++++++------ graphics/fswebcam/patches/patch-fswebcam_c | 25 ++++++++++++++++++++++ 2 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 graphics/fswebcam/patches/patch-fswebcam_c diff --git a/graphics/fswebcam/Makefile b/graphics/fswebcam/Makefile index 0d6260ce68b..e4dffa3a819 100644 --- a/graphics/fswebcam/Makefile +++ b/graphics/fswebcam/Makefile @@ -1,22 +1,25 @@ -# $OpenBSD: Makefile,v 1.14 2019/07/12 20:46:58 sthen Exp $ +# $OpenBSD: Makefile,v 1.15 2020/10/19 16:50:16 sthen Exp $ COMMENT= fswebcam is a small and simple webcam app DISTNAME= fswebcam-20140113 -CATEGORIES= graphics -MASTER_SITES= http://www.firestorm.cx/fswebcam/files/ -REVISION= 0 +REVISION= 1 -HOMEPAGE= http://www.firestorm.cx/fswebcam/ +CATEGORIES= graphics + +HOMEPAGE= https://www.sanslogic.co.uk/fswebcam/ + +MASTER_SITES= https://www.sanslogic.co.uk/fswebcam/files/ # GPLv2 only PERMIT_PACKAGE= Yes -WANTLIB= c gd pthread +WANTLIB= c gd LIB_DEPENDS= graphics/gd -CONFIGURE_STYLE= simple +CONFIGURE_STYLE= gnu +#CONFIGURE_STYLE= simple CONFIGURE_ARGS+= --disable-v4l1 CONFIGURE_ENV= CFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib" diff --git a/graphics/fswebcam/patches/patch-fswebcam_c b/graphics/fswebcam/patches/patch-fswebcam_c new file mode 100644 index 00000000000..44b33e3df12 --- /dev/null +++ b/graphics/fswebcam/patches/patch-fswebcam_c @@ -0,0 +1,25 @@ +$OpenBSD: patch-fswebcam_c,v 1.1 2020/10/19 16:50:16 sthen Exp $ + +From d5c708782bb947c9a610e413b4c7383dc10c388c Mon Sep 17 00:00:00 2001 +From: Ashley Dixon +Date: Tue, 21 Jul 2020 02:33:50 +0100 +Subject: [PATCH] Fixed usage of gdImageStringFT. + +Since libgd 2.3.0, gdImageStringFT does not return NULL for an empty +string, thus convincing fswebcam that the font cannot be found and the +banner must be disabled. + +https://github.com/libgd/libgd/issues/615 + +Index: fswebcam.c +--- fswebcam.c.orig ++++ fswebcam.c +@@ -467,7 +467,7 @@ int fswc_output(fswebcam_config_t *config, char *name, + char *err; + + /* Check if drawing text works */ +- err = gdImageStringFT(NULL, NULL, 0, config->font, config->fontsize, 0.0, 0, 0, ""); ++ err = gdImageStringFT(NULL, NULL, 0, config->font, config->fontsize, 0.0, 0, 0, "A"); + + if(!err) fswc_draw_banner(config, im); + else