audio/py-pyradio: Update to 0.8.9.32

- Install additional files (.desktop and icon)
- Add a post-patch target to set up default configuration
- Add desktop-file-utils to USES

Changelog:	https://github.com/coderholic/pyradio/releases/tag/0.8.9.32
This commit is contained in:
Nicola Vitale 2022-12-10 14:48:15 +01:00
parent 1f2d001c00
commit 584a88ad25
No known key found for this signature in database
GPG Key ID: A51E190C4C0808D0
3 changed files with 27 additions and 16 deletions

View File

@ -1,5 +1,5 @@
PORTNAME= pyradio
DISTVERSION= 0.8.9.31
DISTVERSION= 0.8.9.32
CATEGORIES= audio python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@ -21,11 +21,13 @@ RUN_DEPENDS= ${PKGNAMEPREFIX}dnspython>=2.2.1:dns/py-dnspython@${PY_FLAVOR} \
${PKGNAMEPREFIX}wheel>=0.38.4:devel/py-wheel@${PY_FLAVOR} \
bash:shells/bash
USES= python:3.7+
USES= desktop-file-utils python:3.7+
USE_GITHUB= yes
GH_ACCOUNT= coderholic
USE_PYTHON= autoplist distutils
PLIST_FILES= share/applications/${PORTNAME}.desktop \
share/pixmaps/${PORTNAME}.png
PORTDOCS= *
OPTIONS_DEFINE= DOCS
@ -43,9 +45,18 @@ MPLAYER_RUN_DEPENDS+= mplayer:multimedia/mplayer
MPV_RUN_DEPENDS+= mpv:multimedia/mpv
VLC_RUN_DEPENDS+= vlc:multimedia/vlc
post-patch:
${SED} -i.bak -e 's/\(distro =\) None/\1 ${OPSYS}/' \
-e 's/\(enable_notifications =\) -1/\1 0/' \
${WRKSRC}/pyradio/config
post-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_MAN} ${WRKSRC}/pyradio*.1 ${STAGEDIR}${MANPREFIX}/man/man1
${INSTALL_DATA} ${WRKSRC}/*.html ${WRKSRC}/*.md ${STAGEDIR}${DOCSDIR}/
${INSTALL_DATA} ${WRKSRC}/devel/${PORTNAME}.desktop \
${STAGEDIR}${DESKTOPDIR}/${PORTNAME}.desktop
${INSTALL_DATA} ${WRKSRC}/devel/${PORTNAME}.png \
${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png
.include <bsd.port.mk>

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1669451407
SHA256 (coderholic-pyradio-0.8.9.31_GH0.tar.gz) = f5787d002f4bb891dc00421934c93ab42f6afa616dd51773cc53f775b16112a2
SIZE (coderholic-pyradio-0.8.9.31_GH0.tar.gz) = 629976
TIMESTAMP = 1670604676
SHA256 (coderholic-pyradio-0.8.9.32_GH0.tar.gz) = d86f13849151aa9ea5d40310cfb827a3bd7138e8809affa9a0442fbc427b5df6
SIZE (coderholic-pyradio-0.8.9.32_GH0.tar.gz) = 635875

View File

@ -1,11 +1,11 @@
--- pyradio/ping.py.orig 2022-11-25 15:21:16 UTC
--- pyradio/ping.py.orig 2022-12-09 15:36:15 UTC
+++ pyradio/ping.py
@@ -35,7 +35,7 @@ def linux_ping(server, count=1, timeout_in_seconds=1):
-1: error
'''
try:
- r=subprocess.Popen(['ping', '-c', str(count), '-w', str(timeout_in_seconds), server ], stdout=subprocess.PIPE).stdout.read()
+ r=subprocess.Popen(['ping', '-c', str(count), '-t', str(timeout_in_seconds), server ], stdout=subprocess.PIPE).stdout.read()
# print(r)
return 0 if '100%' in str(r) else 1
except:
@@ -49,7 +49,7 @@ def linux_ping(server, count=1, timeout_in_seconds=1):
return 0 if '100%' in out[0] else 1
else:
r=subprocess.Popen(
- ['ping', '-c', str(count), '-w',
+ ['ping', '-c', str(count), '-t',
str(timeout_in_seconds), server],
stderr=subprocess.DEVNULL,
stdout=subprocess.PIPE