pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/audio add audio/snapcast
details: https://anonhg.NetBSD.org/pkgsrc/rev/8c79478cc438
branches: trunk
changeset: 381287:8c79478cc438
user: nia <nia%pkgsrc.org@localhost>
date: Sun Jul 03 16:09:15 2022 +0000
description:
add audio/snapcast
Snapcast is a multiroom client-server audio player, where all clients are
time synchronized with the server to play perfectly synced audio. It's not
a standalone player, but an extension that turns your existing audio player
into a Sonos-like multiroom solution.
diffstat:
audio/Makefile | 3 +-
audio/snapcast/DESCR | 4 +
audio/snapcast/Makefile | 79 ++
audio/snapcast/PLIST | 24 +
audio/snapcast/distinfo | 18 +
audio/snapcast/files/snapclient.sh | 23 +
audio/snapcast/files/snapserver.sh | 21 +
audio/snapcast/options.mk | 28 +
audio/snapcast/patches/patch-CMakeLists.txt | 32 +
audio/snapcast/patches/patch-client_CMakeLists.txt | 17 +
audio/snapcast/patches/patch-client_controller.cpp | 37 +
audio/snapcast/patches/patch-client_player_sun__player.cpp | 312 ++++++++++
audio/snapcast/patches/patch-client_player_sun__player.hpp | 74 ++
audio/snapcast/patches/patch-client_snapclient.cpp | 59 +
audio/snapcast/patches/patch-common_utils.hpp | 67 ++
audio/snapcast/patches/patch-server_CMakeLists.txt | 15 +
audio/snapcast/patches/patch-server_etc_snapserver.conf | 24 +
audio/snapcast/patches/patch-server_server__settings.hpp | 15 +
audio/snapcast/patches/patch-server_snapserver.1 | 30 +
audio/snapcast/patches/patch-server_snapserver.cpp | 24 +
audio/snapcast/patches/patch-server_streamreader_pipe__stream.cpp | 15 +
21 files changed, 920 insertions(+), 1 deletions(-)
diffs (truncated from 1015 to 300 lines):
diff -r 95493ee42671 -r 8c79478cc438 audio/Makefile
--- a/audio/Makefile Sun Jul 03 16:01:09 2022 +0000
+++ b/audio/Makefile Sun Jul 03 16:09:15 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.655 2022/07/01 18:36:27 nia Exp $
+# $NetBSD: Makefile,v 1.656 2022/07/03 16:09:15 nia Exp $
#
COMMENT= Audio tools, players, and libraries
@@ -442,6 +442,7 @@
SUBDIR+= shorten
SUBDIR+= sidplay
SUBDIR+= sidplay2
+SUBDIR+= snapcast
SUBDIR+= snd
SUBDIR+= sndfile-tools
SUBDIR+= solfege
diff -r 95493ee42671 -r 8c79478cc438 audio/snapcast/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/snapcast/DESCR Sun Jul 03 16:09:15 2022 +0000
@@ -0,0 +1,4 @@
+Snapcast is a multiroom client-server audio player, where all clients are
+time synchronized with the server to play perfectly synced audio. It's not
+a standalone player, but an extension that turns your existing audio player
+into a Sonos-like multiroom solution.
diff -r 95493ee42671 -r 8c79478cc438 audio/snapcast/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/snapcast/Makefile Sun Jul 03 16:09:15 2022 +0000
@@ -0,0 +1,79 @@
+# $NetBSD: Makefile,v 1.1 2022/07/03 16:09:15 nia Exp $
+
+DISTNAME= snapcast-0.26.0
+CATEGORIES= audio
+MASTER_SITES= ${MASTER_SITE_GITHUB:=badaix/}
+GITHUB_TAG= v${PKGVERSION_NOREV}
+
+MAINTAINER= nia%NetBSD.org@localhost
+HOMEPAGE= https://github.com/badaix/snapcast
+COMMENT= Multiroom client-server audio player,
+LICENSE= gnu-gpl-v3
+
+USE_CMAKE= yes
+USE_TOOLS+= pkg-config
+USE_LANGUAGES= c c++
+
+REPLACE_PYTHON+= server/etc/plug-ins/meta_mpd.py
+
+PYTHON_VERSIONS_INCOMPATIBLE= 27
+
+CONF_FILES+= ${PREFIX}/share/examples/snapcast/snapserver.conf \
+ ${PKG_SYSCONFDIR}/snapserver.conf
+
+SUBST_CLASSES+= etc
+SUBST_STAGE.etc= pre-configure
+SUBST_FILES.etc+= server/etc/snapserver.conf
+SUBST_FILES.etc+= server/server_settings.hpp
+SUBST_FILES.etc+= server/snapserver.cpp
+SUBST_FILES.etc+= server/snapserver.1
+SUBST_VARS.etc+= PKG_SYSCONFDIR
+SUBST_VARS.etc+= VARBASE
+
+RCD_SCRIPTS+= snapclient
+RCD_SCRIPTS+= snapserver
+
+SNAPCLIENT_USER?= snapclient
+SNAPCLIENT_GROUP?= snapclient
+
+SNAPSERVER_USER?= snapserver
+SNAPSERVER_GROUP?= snapserver
+
+BUILD_DEFS+= VARBASE
+
+.include "../../mk/bsd.prefs.mk"
+
+FILES_SUBST+= SNAPCLIENT_USER=${SNAPCLIENT_USER}
+FILES_SUBST+= SNAPCLIENT_GROUP=${SNAPCLIENT_GROUP}
+FILES_SUBST+= VARBASE=${VARBASE}
+
+PKG_GROUPS+= ${SNAPCLIENT_GROUP}
+PKG_GROUPS+= ${SNAPSERVER_GROUP}
+
+PKG_USERS+= ${SNAPCLIENT_USER}:${SNAPCLIENT_GROUP}
+PKG_USERS+= ${SNAPSERVER_USER}:${SNAPSERVER_GROUP}
+
+OWN_DIRS_PERMS+= ${VARBASE}/run/snapclient \
+ ${SNAPCLIENT_USER} ${SNAPCLIENT_GROUP} 0755
+
+OWN_DIRS_PERMS+= ${VARBASE}/run/snapserver \
+ ${SNAPCLIENT_USER} ${SNAPCLIENT_GROUP} 0755
+
+OWN_DIRS_PERMS+= ${VARBASE}/lib/snapclient \
+ ${SNAPSERVER_USER} ${SNAPSERVER_GROUP} 0755
+
+OWN_DIRS_PERMS+= ${VARBASE}/lib/snapserver \
+ ${SNAPSERVER_USER} ${SNAPSERVER_GROUP} 0755
+
+post-install:
+ cd ${WRKSRC} && ${CHMOD} +r ${DESTDIR}${PREFIX}/share/snapserver/plug-ins/meta_mpd.py
+
+.include "options.mk"
+.include "../../audio/flac/buildlink3.mk"
+.include "../../audio/libopus/buildlink3.mk"
+.include "../../audio/libsoxr/buildlink3.mk"
+.include "../../audio/libvorbis/buildlink3.mk"
+.include "../../devel/boost-headers/buildlink3.mk"
+.include "../../lang/python/application.mk"
+.include "../../textproc/expat/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 95493ee42671 -r 8c79478cc438 audio/snapcast/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/snapcast/PLIST Sun Jul 03 16:09:15 2022 +0000
@@ -0,0 +1,24 @@
+@comment $NetBSD: PLIST,v 1.1 2022/07/03 16:09:15 nia Exp $
+bin/snapclient
+bin/snapserver
+man/man1/snapclient.1
+man/man1/snapserver.1
+share/examples/snapcast/snapserver.conf
+share/pixmaps/snapcast.svg
+share/snapserver/index.html
+share/snapserver/plug-ins/meta_mpd.py
+share/snapserver/snapweb/10-seconds-of-silence.mp3
+share/snapserver/snapweb/3rd-party/libflac.js
+share/snapserver/snapweb/config.js
+share/snapserver/snapweb/favicon.ico
+share/snapserver/snapweb/index.html
+share/snapserver/snapweb/launcher-icon.png
+share/snapserver/snapweb/manifest.json
+share/snapserver/snapweb/mute_icon.png
+share/snapserver/snapweb/play.png
+share/snapserver/snapweb/snapcast-512.png
+share/snapserver/snapweb/snapcontrol.js
+share/snapserver/snapweb/snapstream.js
+share/snapserver/snapweb/speaker_icon.png
+share/snapserver/snapweb/stop.png
+share/snapserver/snapweb/styles.css
diff -r 95493ee42671 -r 8c79478cc438 audio/snapcast/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/snapcast/distinfo Sun Jul 03 16:09:15 2022 +0000
@@ -0,0 +1,18 @@
+$NetBSD: distinfo,v 1.1 2022/07/03 16:09:15 nia Exp $
+
+BLAKE2s (snapcast-0.26.0.tar.gz) = e0ef56ee25d30c8536158949c5e5f85b32a8c410303da939ef844bb3dc300012
+SHA512 (snapcast-0.26.0.tar.gz) = fc7885e42a11794e33314544083251ffbb91a0cf160c6d4b854c56f57ffe9f38f75c7594478c9edabfe9076959938cd8de891dd456e66202692de664a75cde71
+Size (snapcast-0.26.0.tar.gz) = 1537036 bytes
+SHA1 (patch-CMakeLists.txt) = c3f02503c918e6843ab18d987b3e886e22e13865
+SHA1 (patch-client_CMakeLists.txt) = 48559046bd578e2d75f97b4ec422d4a56b567733
+SHA1 (patch-client_controller.cpp) = a87b5515a519ab579c36786b9727b58934128148
+SHA1 (patch-client_player_sun__player.cpp) = 6e98d22c9deaccc3bf2ac14b7e275dc1c8bc771a
+SHA1 (patch-client_player_sun__player.hpp) = d8eeba9f4c16e85833baba95c07f9a0600763752
+SHA1 (patch-client_snapclient.cpp) = d682d4c1de438251d1510d40387e9a0b2bcf926f
+SHA1 (patch-common_utils.hpp) = 8184a65459accd76b55e8e9e95d1911439fb4d8a
+SHA1 (patch-server_CMakeLists.txt) = 49144e902844bd3308871a625f5da56575904855
+SHA1 (patch-server_etc_snapserver.conf) = a740795aa764ffb5870a4d798518a0464ca3517b
+SHA1 (patch-server_server__settings.hpp) = 50950a4855ecc336dbec146b86935fa18942dc1d
+SHA1 (patch-server_snapserver.1) = 3459c6109635d1ad72c1aee92e302088a2317007
+SHA1 (patch-server_snapserver.cpp) = 62d5dcbfe369f9095e9b6c695680650f7eb458b6
+SHA1 (patch-server_streamreader_pipe__stream.cpp) = aec6fd900e0aca776510c3b413e457b9082b01b5
diff -r 95493ee42671 -r 8c79478cc438 audio/snapcast/files/snapclient.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/snapcast/files/snapclient.sh Sun Jul 03 16:09:15 2022 +0000
@@ -0,0 +1,23 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: snapclient.sh,v 1.1 2022/07/03 16:09:15 nia Exp $
+#
+# PROVIDE: snapclient
+# KEYWORD: shutdown
+#
+
+if [ -f /etc/rc.subr ]
+then
+ . /etc/rc.subr
+fi
+
+name="snapclient"
+rcvar=${name}
+command="@PREFIX@/bin/snapclient"
+command_args="-d"
+pidfile="@VARBASE@/run/snapclient/pid"
+snapclient_user=@SNAPCLIENT_USER@
+snapclient_group=@SNAPCLIENT_GROUP@
+
+load_rc_config $name
+run_rc_command "$1"
diff -r 95493ee42671 -r 8c79478cc438 audio/snapcast/files/snapserver.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/snapcast/files/snapserver.sh Sun Jul 03 16:09:15 2022 +0000
@@ -0,0 +1,21 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: snapserver.sh,v 1.1 2022/07/03 16:09:15 nia Exp $
+#
+# PROVIDE: snapserver
+# KEYWORD: shutdown
+#
+
+if [ -f /etc/rc.subr ]
+then
+ . /etc/rc.subr
+fi
+
+name="snapserver"
+rcvar=${name}
+command="@PREFIX@/bin/snapserver"
+command_args="-d"
+pidfile="@VARBASE@/run/snapserver/pid"
+
+load_rc_config $name
+run_rc_command "$1"
diff -r 95493ee42671 -r 8c79478cc438 audio/snapcast/options.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/snapcast/options.mk Sun Jul 03 16:09:15 2022 +0000
@@ -0,0 +1,28 @@
+# $NetBSD: options.mk,v 1.1 2022/07/03 16:09:15 nia Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.snapcast
+PKG_SUPPORTED_OPTIONS= alsa avahi pulseaudio
+PKG_SUGGESTED_OPTIONS.Linux+= alsa
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Malsa)
+CMAKE_ARGS+= -DBUILD_WITH_ALSA=ON
+. include "../../audio/alsa-lib/buildlink3.mk"
+.else
+CMAKE_ARGS+= -DBUILD_WITH_ALSA=OFF
+.endif
+
+.if !empty(PKG_OPTIONS:Mavahi)
+CMAKE_ARGS+= -DBUILD_WITH_AVAHI=ON
+. include "../../net/avahi/buildlink3.mk"
+.else
+CMAKE_ARGS+= -DBUILD_WITH_AVAHI=OFF
+.endif
+
+.if !empty(PKG_OPTIONS:Mpulseaudio)
+CMAKE_ARGS+= -DBUILD_WITH_PULSE=ON
+. include "../../audio/pulseaudio/buildlink3.mk"
+.else
+CMAKE_ARGS+= -DBUILD_WITH_PULSE=OFF
+.endif
diff -r 95493ee42671 -r 8c79478cc438 audio/snapcast/patches/patch-CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/snapcast/patches/patch-CMakeLists.txt Sun Jul 03 16:09:15 2022 +0000
@@ -0,0 +1,32 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2022/07/03 16:09:15 nia Exp $
+
+Make ALSA optional. Add Sun Audio support for NetBSD.
+
+--- CMakeLists.txt.orig 2021-12-22 17:40:36.000000000 +0000
++++ CMakeLists.txt
+@@ -178,10 +178,12 @@ if(NOT WIN32 AND NOT ANDROID)
+ list(APPEND INCLUDE_DIRS "/usr/local/include")
+ else()
+
+- pkg_search_module(ALSA REQUIRED alsa)
++ if(BUILD_WITH_ALSA)
++ pkg_search_module(ALSA alsa)
+ if (ALSA_FOUND)
+ add_definitions(-DHAS_ALSA)
+ endif (ALSA_FOUND)
++ endif(BUILD_WITH_ALSA)
+
+ if(BUILD_WITH_PULSE)
+ pkg_search_module(PULSE libpulse)
+@@ -206,6 +208,11 @@ if(NOT WIN32 AND NOT ANDROID)
+ link_directories("/usr/local/lib")
+ list(APPEND INCLUDE_DIRS "/usr/local/include")
+ endif()
++
++ check_include_file("sys/audioio.h" SUN_FOUND)
++ if (SUN_FOUND)
++ add_definitions(-DHAS_SUN)
++ endif (SUN_FOUND)
+ endif()
+
+ pkg_search_module(SOXR soxr)
diff -r 95493ee42671 -r 8c79478cc438 audio/snapcast/patches/patch-client_CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/snapcast/patches/patch-client_CMakeLists.txt Sun Jul 03 16:09:15 2022 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-client_CMakeLists.txt,v 1.1 2022/07/03 16:09:15 nia Exp $
+
+Add Sun Audio support for NetBSD.
+
+--- client/CMakeLists.txt.orig 2021-12-22 17:40:36.000000000 +0000
++++ client/CMakeLists.txt
+@@ -53,6 +53,10 @@ elseif(NOT ANDROID)
+ list(APPEND CLIENT_LIBRARIES ${PULSE_LIBRARIES})
+ list(APPEND CLIENT_INCLUDE ${PULSE_INCLUDE_DIRS})
+ endif (PULSE_FOUND)
++
++ if (SUN_FOUND)
++ list(APPEND CLIENT_SOURCES player/sun_player.cpp)
++ endif (SUN_FOUND)
+ endif (MACOSX)
+
+ if (ANDROID)
diff -r 95493ee42671 -r 8c79478cc438 audio/snapcast/patches/patch-client_controller.cpp
Home |
Main Index |
Thread Index |
Old Index