multimedia/droidcam: Fix previous patch and minor changes

This patch fixes 281586 by adding forgotten directory pointing to the program's icon path.
Also, now it uses ${PORTNAME} wherever it's possible and replaces program's
installation path with ${PREFIX} in program's .desktop file.

PR:		281720
Fixes:		adc8361b87
This commit is contained in:
Yusuf Yaman 2024-09-30 00:09:12 +03:00 committed by Robert Clausecker
parent 14aba2fc6b
commit 3377cfa4c2

View file

@ -1,7 +1,7 @@
PORTNAME= droidcam PORTNAME= droidcam
DISTVERSIONPREFIX= v DISTVERSIONPREFIX= v
DISTVERSION= 2.1.3 DISTVERSION= 2.1.3
PORTREVISION= 2 PORTREVISION= 3
CATEGORIES= multimedia CATEGORIES= multimedia
MAINTAINER= nxjoseph@protonmail.com MAINTAINER= nxjoseph@protonmail.com
@ -28,11 +28,11 @@ LIB_DEPENDS= libappindicator3.so:devel/libappindicator \
libpango-1.0.so:x11-toolkits/pango \ libpango-1.0.so:x11-toolkits/pango \
libpangocairo-1.0.so:x11-toolkits/pango \ libpangocairo-1.0.so:x11-toolkits/pango \
libspeex.so:audio/speex \ libspeex.so:audio/speex \
libswscale.so:multimedia/ffmpeg \
libturbojpeg.so:graphics/libjpeg-turbo \ libturbojpeg.so:graphics/libjpeg-turbo \
libusbmuxd-2.0.so:comms/libusbmuxd \ libusbmuxd-2.0.so:comms/libusbmuxd \
libwayland-client.so:graphics/wayland \ libwayland-client.so:graphics/wayland \
libX11.so:x11/libX11 \ libX11.so:x11/libX11
libswscale.so:multimedia/ffmpeg
RUN_DEPENDS= adb:devel/android-tools \ RUN_DEPENDS= adb:devel/android-tools \
ffmpeg:multimedia/ffmpeg \ ffmpeg:multimedia/ffmpeg \
usbmuxd:comms/usbmuxd \ usbmuxd:comms/usbmuxd \
@ -45,10 +45,10 @@ GH_PROJECT= droidcam-linux-client
USE_GNOME= cairo gdkpixbuf2 glib20 gtk30 pango USE_GNOME= cairo gdkpixbuf2 glib20 gtk30 pango
USE_XORG= x11 USE_XORG= x11
PLIST_FILES= bin/droidcam \ PLIST_FILES= bin/${PORTNAME} \
bin/droidcam-cli \ bin/${PORTNAME}-cli \
share/applications/droidcam.desktop \ share/applications/${PORTNAME}.desktop \
share/pixmaps/droidcam-icon.png share/pixmaps/${PORTNAME}-icon.png
OPTIONS_DEFINE= NLS OPTIONS_DEFINE= NLS
OPTIONS_SUB= yes OPTIONS_SUB= yes
@ -57,17 +57,21 @@ NLS_USES= gettext
NLS_CONFIGURE_ENABLE= nls NLS_CONFIGURE_ENABLE= nls
pre-configure: pre-configure:
${REINPLACE_CMD} -e 's,/opt/droidcam-icon.png,${PREFIX}/pixmaps/droidcam-icon.png,' \ ${REINPLACE_CMD} -e 's,/opt/${PORTNAME}-icon.png,${PREFIX}/share/pixmaps/${PORTNAME}-icon.png,' \
${WRKSRC}/src/droidcam.c ${WRKSRC}/droidcam.desktop ${WRKSRC}/src/${PORTNAME}.c \
${WRKSRC}/${PORTNAME}.desktop
${REINPLACE_CMD} -e 's,Exec=/usr/local/bin/${PORTNAME},${PREFIX}/bin/${PORTNAME},' \
-e 's,TryExec=/usr/local/bin/${PORTNAME},${PREFIX}/bin/${PORTNAME},' \
${WRKSRC}/${PORTNAME}.desktop
do-install: do-install:
${INSTALL_PROGRAM} ${WRKSRC}/droidcam \ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} \
${STAGEDIR}${PREFIX}/bin ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/droidcam-cli \ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME}-cli \
${STAGEDIR}${PREFIX}/bin ${STAGEDIR}${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/icon2.png \ ${INSTALL_DATA} ${WRKSRC}/icon2.png \
${STAGEDIR}${PREFIX}/share/pixmaps/droidcam-icon.png ${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}-icon.png
${INSTALL_DATA} ${WRKSRC}/droidcam.desktop \ ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.desktop \
${STAGEDIR}${PREFIX}/share/applications ${STAGEDIR}${PREFIX}/share/applications
.include <bsd.port.mk> .include <bsd.port.mk>