git: adc8361b8797 - main - multimedia/droidcam: fix system tray icon not showing up

From: Robert Clausecker <fuz_at_FreeBSD.org>
Date: Wed, 25 Sep 2024 06:30:12 UTC
The branch main has been updated by fuz:

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

commit adc8361b87972451ffbfe619aa714bc2fd2fa024
Author:     Yusuf Yaman <nxjoseph@protonmail.com>
AuthorDate: 2024-09-19 10:31:49 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2024-09-25 06:28:05 +0000

    multimedia/droidcam: fix system tray icon not showing up
    
     * Fix system tray icon not showing up
     * Change GitHub project name
     * add pkg-message
    
    PR:             281586
    Event:          EuroBSDcon 2024
---
 multimedia/droidcam/Makefile                     | 10 ++++++++--
 multimedia/droidcam/distinfo                     |  6 +++---
 multimedia/droidcam/files/patch-droidcam.desktop | 11 -----------
 multimedia/droidcam/pkg-message                  | 14 ++++++++++++++
 4 files changed, 25 insertions(+), 16 deletions(-)

diff --git a/multimedia/droidcam/Makefile b/multimedia/droidcam/Makefile
index ab11cfc05399..5bcd3594181f 100644
--- a/multimedia/droidcam/Makefile
+++ b/multimedia/droidcam/Makefile
@@ -1,12 +1,12 @@
 PORTNAME=	droidcam
 DISTVERSIONPREFIX=	v
 DISTVERSION=	2.1.3
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	multimedia
 
 MAINTAINER=	nxjoseph@protonmail.com
 COMMENT=	GNU/Linux/nix client for DroidCam
-WWW=		https://github.com/dev47apps/droidcam
+WWW=		https://github.com/dev47apps/droidcam-linux-client
 
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/LICENSE
@@ -30,6 +30,7 @@ LIB_DEPENDS=	libappindicator3.so:devel/libappindicator \
 		libspeex.so:audio/speex \
 		libturbojpeg.so:graphics/libjpeg-turbo \
 		libusbmuxd-2.0.so:comms/libusbmuxd \
+		libwayland-client.so:graphics/wayland \
 		libX11.so:x11/libX11 \
 		libswscale.so:multimedia/ffmpeg
 RUN_DEPENDS=	adb:devel/android-tools \
@@ -40,6 +41,7 @@ RUN_DEPENDS=	adb:devel/android-tools \
 USES=		desktop-file-utils gettext-runtime gmake gnome pkgconfig xorg
 USE_GITHUB=	yes
 GH_ACCOUNT=	dev47apps
+GH_PROJECT=	droidcam-linux-client
 USE_GNOME=	cairo gdkpixbuf2 glib20 gtk30 pango
 USE_XORG=	x11
 
@@ -54,6 +56,10 @@ OPTIONS_SUB=	yes
 NLS_USES=		gettext
 NLS_CONFIGURE_ENABLE=	nls
 
+pre-configure:
+	${REINPLACE_CMD} -e 's,/opt/droidcam-icon.png,${PREFIX}/pixmaps/droidcam-icon.png,' \
+		${WRKSRC}/src/droidcam.c ${WRKSRC}/droidcam.desktop
+
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/droidcam \
 		${STAGEDIR}${PREFIX}/bin
diff --git a/multimedia/droidcam/distinfo b/multimedia/droidcam/distinfo
index eb95ec6ae519..63fcc18059f2 100644
--- a/multimedia/droidcam/distinfo
+++ b/multimedia/droidcam/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1713444177
-SHA256 (dev47apps-droidcam-v2.1.3_GH0.tar.gz) = 0eb46c1ef19bce817b78740600d5451d14f7b279ebfd4605993d81f96aad08db
-SIZE (dev47apps-droidcam-v2.1.3_GH0.tar.gz) = 86091
+TIMESTAMP = 1726741616
+SHA256 (dev47apps-droidcam-linux-client-v2.1.3_GH0.tar.gz) = 86d18029364d8ecd8b1a8fcae4cc37122f43683326fe49922b2ce2c8cf01e49d
+SIZE (dev47apps-droidcam-linux-client-v2.1.3_GH0.tar.gz) = 86110
diff --git a/multimedia/droidcam/files/patch-droidcam.desktop b/multimedia/droidcam/files/patch-droidcam.desktop
deleted file mode 100644
index 9459587b56a6..000000000000
--- a/multimedia/droidcam/files/patch-droidcam.desktop
+++ /dev/null
@@ -1,11 +0,0 @@
---- droidcam.desktop.orig	2024-04-18 16:03:55 UTC
-+++ droidcam.desktop
-@@ -4,7 +4,7 @@ Exec=/usr/local/bin/droidcam
- Comment=Use your phone as a webcam
- TryExec=/usr/local/bin/droidcam
- Exec=/usr/local/bin/droidcam
--Icon=/opt/droidcam-icon.png
-+Icon=/usr/local/share/pixmaps/droidcam-icon.png
- Terminal=false
- Type=Application
- Categories=Video;AudioVideo;
diff --git a/multimedia/droidcam/pkg-message b/multimedia/droidcam/pkg-message
new file mode 100644
index 000000000000..e8ecaf3f601d
--- /dev/null
+++ b/multimedia/droidcam/pkg-message
@@ -0,0 +1,14 @@
+[
+{ type: install
+  message: <<EOM
+Connect your phone with USB then follow these steps but
+"-d", "-N" and "-S" parameters may be different for you.
+To learn them, just run webcamd as root and without parameters.
+Don't forget to Change $USER and $GROUP according to your normal user.
+	# kldload cuse
+	# webcamd -d ugen0.2 -N Xiaomi-Redmi-Note-12 -S 1234567 \
+	  -M 0 -v 0 -B -U $USER -G $GROUP -c v4l2loopback
+Now, you can run the program and use it.
+EOM
+}
+]