git: d7dd62826530 - main - audio/py-pyradio: Fix a runtime error (missing icon)

From: Nicola Vitale <nivit_at_FreeBSD.org>
Date: Mon, 30 Jan 2023 14:38:33 UTC
The branch main has been updated by nivit:

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

commit d7dd628265301b380c663659c30feec57062efbf
Author:     Nicola Vitale <nivit@FreeBSD.org>
AuthorDate: 2023-01-30 14:34:51 +0000
Commit:     Nicola Vitale <nivit@FreeBSD.org>
CommitDate: 2023-01-30 14:38:18 +0000

    audio/py-pyradio: Fix a runtime error (missing icon)
    
    - When notifications are enabled and the user doesn't have a custom icon
      the program raises a Python Exception, because it doesn't find the default one.
      The patch was provided by Spiros Georgaras (upstream) via email.
    
    - Bump PORTREVISION
---
 audio/py-pyradio/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/audio/py-pyradio/Makefile b/audio/py-pyradio/Makefile
index 09655b1f521c..480691e7d054 100644
--- a/audio/py-pyradio/Makefile
+++ b/audio/py-pyradio/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	pyradio
 DISTVERSION=	0.9.0
+PORTREVISION=	1
 CATEGORIES=	audio python
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
@@ -47,9 +48,11 @@ MPV_RUN_DEPENDS+=	mpv:multimedia/mpv
 VLC_RUN_DEPENDS+=	vlc:multimedia/vlc
 
 post-patch:
-	${SED} -i.bak -e 's/\(distro =\) None/\1 ${OPSYS}/' \
+	@${SED} -i.bak -e 's/\(distro =\) None/\1 ${OPSYS}/' \
 	 -e 's/\(enable_notifications =\) -1/\1 0/' \
 	 	${WRKSRC}/pyradio/config
+	@${SED} -i.bak -e "s,/usr/local/share/icons\(/pyradio.png\),${PREFIX}/share/pixmaps\1,1" \
+		${WRKSRC}/pyradio/log.py
 
 post-install:
 	${INSTALL_DATA} ${WRKSRC}/devel/${PORTNAME}.desktop \