git: f5e15b6bf5a6 - main - www/vimb: add GSTREAMER option

From: Zsolt Udvari <uzsolt_at_FreeBSD.org>
Date: Sun, 14 Jul 2024 11:07:52 UTC
The branch main has been updated by uzsolt:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f5e15b6bf5a6fba96ceefa73f830f2f2a11959e2

commit f5e15b6bf5a6fba96ceefa73f830f2f2a11959e2
Author:     mew14930xvi <mew14930xvi@inbox.lv>
AuthorDate: 2024-07-14 11:03:13 +0000
Commit:     Zsolt Udvari <uzsolt@FreeBSD.org>
CommitDate: 2024-07-14 11:07:27 +0000

    www/vimb: add GSTREAMER option
    
    Use REINPLACE_CMD instead of patch.
    Submitter takes maintainership.
    
    PR:             279279
---
 www/vimb/Makefile              | 17 ++++++++++-------
 www/vimb/files/patch-config.mk | 23 -----------------------
 2 files changed, 10 insertions(+), 30 deletions(-)

diff --git a/www/vimb/Makefile b/www/vimb/Makefile
index eb323397a856..effc2642eeb9 100644
--- a/www/vimb/Makefile
+++ b/www/vimb/Makefile
@@ -1,9 +1,9 @@
 PORTNAME=	vimb
 DISTVERSION=	3.7.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	www
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	mew14930xvi@inbox.lv
 COMMENT=	Vim like browser
 WWW=		https://fanglingsu.github.io/vimb/
 
@@ -16,21 +16,24 @@ LIB_DEPENDS=	libsoup-2.4.so:devel/libsoup \
 USES=		compiler:c11 desktop-file-utils gmake gnome pkgconfig
 USE_GITHUB=	yes
 GH_ACCOUNT=	fanglingsu
-GH_PROJECT=	vimb
-USE_GNOME=	cairo gdkpixbuf2 gtk30
+USE_GNOME=	cairo glib20 gtk30
 
-MAKE_ARGS=	MANPREFIX=${STAGEDIR}${PREFIX}/share/man \
-		V=1 \
+MAKE_ARGS=	V=1 \
 		version="${DISTVERSION}"
 LDFLAGS+=	-Wl,--as-needed
 
 PLIST_FILES=	bin/vimb \
 		lib/vimb/webext_main.so \
-		share/man/man1/vimb.1.gz \
 		share/applications/vimb.desktop \
+		share/man/man1/vimb.1.gz \
 		share/metainfo/vimb.metainfo.xml
 
+OPTIONS_DEFINE=	GSTREAMER
+GSTREAMER_USES=	gstreamer
+GSTREAMER_USE=	GSTREAMER=good,libav
+
 post-patch:
+	@${REINPLACE_CMD} -e 's|gtk-4.1|gtk-4.0|' ${WRKSRC}/config.mk
 # .git/index needs to exist to generate version.h...
 	${MKDIR} ${WRKSRC}/.git/index
 
diff --git a/www/vimb/files/patch-config.mk b/www/vimb/files/patch-config.mk
deleted file mode 100644
index 902c092eb6c1..000000000000
--- a/www/vimb/files/patch-config.mk
+++ /dev/null
@@ -1,23 +0,0 @@
---- config.mk.orig	2023-06-19 20:39:23.000000000 +0000
-+++ config.mk	2023-08-07 07:27:35.408991000 +0000
-@@ -18,7 +18,7 @@ SRCDIR  = src
- DOCDIR  = doc
- 
- # used libs
--LIBS = gtk+-3.0 webkit2gtk-4.1
-+LIBS = gtk+-3.0 webkit2gtk-4.0 gdk-pixbuf-2.0 cairo harfbuzz pango glib-2.0 harfbuzz atk
- 
- # setup general used CFLAGS
- CFLAGS   += -std=c99 -pipe -Wall -fPIC
-@@ -35,9 +35,9 @@ endif
- 
- # flags used to build webextension
- EXTTARGET   = webext_main.so
--EXTCFLAGS   = ${CFLAGS} $(shell pkg-config --cflags webkit2gtk-web-extension-4.1)
-+EXTCFLAGS   = ${CFLAGS} $(shell pkg-config --cflags webkit2gtk-web-extension-4.0)
- EXTCPPFLAGS = $(CPPFLAGS)
--EXTLDFLAGS  = ${LDFLAGS} $(shell pkg-config --libs webkit2gtk-web-extension-4.1) -shared
-+EXTLDFLAGS  = ${LDFLAGS} $(shell pkg-config --libs webkit2gtk-web-extension-4.0) -shared
- 
- # flags used for the main application
- CFLAGS     += $(shell pkg-config --cflags $(LIBS))