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
This commit is contained in:
Nicola Vitale 2023-01-30 15:34:51 +01:00
parent 23b864937c
commit d7dd628265
No known key found for this signature in database
GPG Key ID: A51E190C4C0808D0
1 changed files with 4 additions and 1 deletions

View File

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