fswebcam: backport fix for a change in libgd, update HOMEPAGE/MASTER_SITES

This commit is contained in:
sthen 2020-10-19 16:50:16 +00:00
parent ac7c294ba5
commit 92f93a5098
2 changed files with 35 additions and 7 deletions

View File

@ -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"

View File

@ -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 <ash@suugaku.co.uk>
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