pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio add audio/shairport-sync



details:   https://anonhg.NetBSD.org/pkgsrc/rev/68cceb7f8d64
branches:  trunk
changeset: 381189:68cceb7f8d64
user:      nia <nia%pkgsrc.org@localhost>
date:      Fri Jul 01 18:36:27 2022 +0000

description:
add audio/shairport-sync

Shairport Sync is an AirPlay audio player - it plays audio streamed from
Apple devices and AirPlay sources such as ForkedDaapd (but apparently not
rtunes).

Audio played by a Shairport Sync-powered device stays synchronised with the
source and hence with similar devices playing the same source. In this way,
synchronised multi-room audio is possible for players that support it.

diffstat:

 audio/Makefile                                  |    3 +-
 audio/shairport-sync/DESCR                      |    7 +
 audio/shairport-sync/MESSAGE.NetBSD             |    9 +
 audio/shairport-sync/Makefile                   |   79 +++++++
 audio/shairport-sync/PLIST                      |    4 +
 audio/shairport-sync/distinfo                   |   11 +
 audio/shairport-sync/files/shairport-sync.sh    |   24 ++
 audio/shairport-sync/options.mk                 |   58 +++++
 audio/shairport-sync/patches/patch-Makefile.am  |   17 +
 audio/shairport-sync/patches/patch-audio.c      |   26 ++
 audio/shairport-sync/patches/patch-audio__sun.c |  265 ++++++++++++++++++++++++
 audio/shairport-sync/patches/patch-common.c     |   16 +
 audio/shairport-sync/patches/patch-configure.ac |   21 +
 audio/shairport-sync/patches/patch-shairport.c  |   29 ++
 14 files changed, 568 insertions(+), 1 deletions(-)

diffs (truncated from 635 to 300 lines):

diff -r c289859ea5d9 -r 68cceb7f8d64 audio/Makefile
--- a/audio/Makefile    Fri Jul 01 18:06:30 2022 +0000
+++ b/audio/Makefile    Fri Jul 01 18:36:27 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.654 2022/04/24 00:20:01 tnn Exp $
+# $NetBSD: Makefile,v 1.655 2022/07/01 18:36:27 nia Exp $
 #
 
 COMMENT=       Audio tools, players, and libraries
@@ -436,6 +436,7 @@
 SUBDIR+=       ruby-taglib
 SUBDIR+=       schismtracker
 SUBDIR+=       sfxr
+SUBDIR+=       shairport-sync
 SUBDIR+=       shine
 SUBDIR+=       shntool
 SUBDIR+=       shorten
diff -r c289859ea5d9 -r 68cceb7f8d64 audio/shairport-sync/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/shairport-sync/DESCR        Fri Jul 01 18:36:27 2022 +0000
@@ -0,0 +1,7 @@
+Shairport Sync is an AirPlay audio player - it plays audio streamed from
+Apple devices and AirPlay sources such as ForkedDaapd (but apparently not
+rtunes).
+
+Audio played by a Shairport Sync-powered device stays synchronised with the
+source and hence with similar devices playing the same source. In this way,
+synchronised multi-room audio is possible for players that support it.
diff -r c289859ea5d9 -r 68cceb7f8d64 audio/shairport-sync/MESSAGE.NetBSD
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/shairport-sync/MESSAGE.NetBSD       Fri Jul 01 18:36:27 2022 +0000
@@ -0,0 +1,9 @@
+===========================================================================
+$NetBSD: MESSAGE.NetBSD,v 1.1 2022/07/01 18:36:27 nia Exp $
+
+To run shairport-sync as the shairport user, make sure audio(4) is
+configured for multi-user access:
+
+# sysctl -w hw.audio0.multiuser=1
+
+===========================================================================
diff -r c289859ea5d9 -r 68cceb7f8d64 audio/shairport-sync/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/shairport-sync/Makefile     Fri Jul 01 18:36:27 2022 +0000
@@ -0,0 +1,79 @@
+# $NetBSD: Makefile,v 1.1 2022/07/01 18:36:27 nia Exp $
+
+DISTNAME=      shairport-sync-3.3.9
+CATEGORIES=    audio
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=mikebrady/}
+
+MAINTAINER=    nia%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/mikebrady/shairport-sync
+COMMENT=       AirPlay audio player with multi-room audio synchronisation capability
+LICENSE=       mit # possibly others?
+
+USE_TOOLS+=    autoconf autoreconf automake
+USE_TOOLS+=    pkg-config
+USE_LANGUAGES= c c++
+
+GNU_CONFIGURE= yes
+
+BUILD_DEFS+=   VARBASE
+
+SHAIRPORT_GROUP?=      shairport
+SHAIRPORT_USER?=       shairport
+
+.include "../../mk/bsd.prefs.mk"
+
+PKG_GROUPS=            ${SHAIRPORT_GROUP}
+PKG_USERS=             ${SHAIRPORT_USER}:${SHAIRPORT_GROUP}
+
+RCD_SCRIPTS=           ${PKGBASE}
+
+FILES_SUBST+=          SHAIRPORT_USER=${SHAIRPORT_USER}
+FILES_SUBST+=          SHAIRPORT_GROUP=${SHAIRPORT_GROUP}
+FILES_SUBST+=          VARBASE=${VARBASE}
+
+CONFIGURE_ARGS+=       --with-ao
+CONFIGURE_ARGS+=       --with-libdaemon
+CONFIGURE_ARGS+=       --with-metadata
+CONFIGURE_ARGS+=       --with-pipe
+CONFIGURE_ARGS+=       --with-soxr
+CONFIGURE_ARGS+=       --with-stdout
+
+CONFIGURE_ARGS+=       --without-configfiles
+
+.if ${OPSYS} == "NetBSD" || ${OPSYS} == "SunOS" || \
+    exists(/usr/include/sys/audioio.h)
+CONFIGURE_ARGS+=       --with-sun
+.endif
+
+.if ${OPSYS} != "Darwin"
+CPPFLAGS+=     -DCOMPILE_FOR_LINUX_AND_FREEBSD_AND_CYGWIN_AND_OPENBSD=1
+.endif
+
+SUBST_CLASSES+=                etc
+SUBST_STAGE.etc=       pre-configure
+SUBST_FILES.etc+=      shairport.c
+SUBST_VARS.etc+=       PKG_SYSCONFDIR
+SUBST_VARS.etc+=       VARBASE
+
+INSTALLATION_DIRS+=    share/examples/${PKGBASE}
+
+CONF_FILES+=   ${PREFIX}/share/examples/${PKGBASE}/${PKGBASE}.conf \
+               ${PKG_SYSCONFDIR}/${PKGBASE}.conf
+
+OWN_DIRS_PERMS+=       ${VARBASE}/run/shairport-sync \
+                       ${SHAIRPORT_USER} ${SHAIRPORT_GROUP} 0755
+
+pre-configure:
+       cd ${WRKSRC} && autoreconf -fi
+
+post-install:
+       ${INSTALL_DATA} ${WRKSRC}/scripts/shairport-sync.conf \
+           ${DESTDIR}${PREFIX}/share/examples/${PKGBASE}/${PKGBASE}.conf
+
+.include "options.mk"
+.include "../../audio/libao/buildlink3.mk"
+.include "../../audio/libsoxr/buildlink3.mk"
+.include "../../devel/libconfig/buildlink3.mk"
+.include "../../devel/libdaemon/buildlink3.mk"
+.include "../../devel/popt/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r c289859ea5d9 -r 68cceb7f8d64 audio/shairport-sync/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/shairport-sync/PLIST        Fri Jul 01 18:36:27 2022 +0000
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST,v 1.1 2022/07/01 18:36:27 nia Exp $
+bin/shairport-sync
+man/man7/shairport-sync.7
+share/examples/shairport-sync/shairport-sync.conf
diff -r c289859ea5d9 -r 68cceb7f8d64 audio/shairport-sync/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/shairport-sync/distinfo     Fri Jul 01 18:36:27 2022 +0000
@@ -0,0 +1,11 @@
+$NetBSD: distinfo,v 1.1 2022/07/01 18:36:27 nia Exp $
+
+BLAKE2s (shairport-sync-3.3.9.tar.gz) = 1fb7074a2af92bb759c07a408e7078f96fd7363d2e963111664a7ebdb15f18c2
+SHA512 (shairport-sync-3.3.9.tar.gz) = 725bbab9f35a209a1893851d6f470a830d396cf73620361b42444459359c04bb98a090d91b74db080eb17cee597ca9da2dd51285e629bd34d6e5f79682fe6470
+Size (shairport-sync-3.3.9.tar.gz) = 426827 bytes
+SHA1 (patch-Makefile.am) = 7986bbcd9db23bbb46bb6f383bf20268fd0e56cd
+SHA1 (patch-audio.c) = 09efa3814893b878214505c7e95b6f323e317399
+SHA1 (patch-audio__sun.c) = b48b166b557bb61e89b7f91ba812ef9f3f76ff01
+SHA1 (patch-common.c) = 495e6e7cdf243daf18c695e052eef1bf0174c880
+SHA1 (patch-configure.ac) = ea06a77574022542263fab5affef5722a6a31b7c
+SHA1 (patch-shairport.c) = e8905c0b705b048d8934051f43c7054a3c1c5483
diff -r c289859ea5d9 -r 68cceb7f8d64 audio/shairport-sync/files/shairport-sync.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/shairport-sync/files/shairport-sync.sh      Fri Jul 01 18:36:27 2022 +0000
@@ -0,0 +1,24 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: shairport-sync.sh,v 1.1 2022/07/01 18:36:27 nia Exp $
+#
+# PROVIDE: shairport
+# REQUIRE: mdnsd
+# KEYWORD: shutdown
+#
+
+if [ -f /etc/rc.subr ]
+then
+       . /etc/rc.subr
+fi
+
+name="shairport"
+rcvar=${name}
+command="@PREFIX@/bin/shairport-sync"
+command_args="-d"
+shairport_user="@SHAIRPORT_USER@"
+shairport_group="@SHAIRPORT_GROUP@"
+pidfile="@VARBASE@/run/shairport-sync/shairport-sync.pid"
+
+load_rc_config $name
+run_rc_command "$1"
diff -r c289859ea5d9 -r 68cceb7f8d64 audio/shairport-sync/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/shairport-sync/options.mk   Fri Jul 01 18:36:27 2022 +0000
@@ -0,0 +1,58 @@
+# $NetBSD: options.mk,v 1.1 2022/07/01 18:36:27 nia Exp $
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.shairport-sync
+
+PKG_OPTIONS_REQUIRED_GROUPS=   ssl
+PKG_OPTIONS_OPTIONAL_GROUPS=   dnssd
+PKG_OPTIONS_GROUP.ssl=         openssl mbedtls
+PKG_OPTIONS_GROUP.dnssd=       avahi dnssd
+
+.include "../../mk/bsd.fast.prefs.mk"
+
+PKG_SUPPORTED_OPTIONS+=                jack pulseaudio
+
+.if ${OPSYS} == "Linux"
+PKG_SUPPORTED_OPTIONS+=                alsa
+PKG_SUGGESTED_OPTIONS+=                alsa avahi
+.else
+PKG_SUGGESTED_OPTIONS+=                dnssd
+.endif
+
+PKG_SUGGESTED_OPTIONS+=                openssl
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Malsa)
+.  include "../../audio/alsa-lib/buildlink3.mk"
+CONFIGURE_ARGS+=       --with-alsa
+.endif
+
+.if !empty(PKG_OPTIONS:Mavahi)
+.  include "../../net/avahi/buildlink3.mk"
+CONFIGURE_ARGS+=       --with-avahi
+.endif
+
+.if !empty(PKG_OPTIONS:Mdnssd)
+.  include "../../net/mDNSResponder/buildlink3.mk"
+CONFIGURE_ARGS+=       --with-dns_sd
+.endif
+
+.if !empty(PKG_OPTIONS:Mjack)
+.  include "../../audio/jack/buildlink3.mk"
+CONFIGURE_ARGS+=       --with-jack
+.endif
+
+.if !empty(PKG_OPTIONS:Mpulseaudio)
+.  include "../../audio/pulseaudio/buildlink3.mk"
+CONFIGURE_ARGS+=       --with-pa
+.endif
+
+.if !empty(PKG_OPTIONS:Mopenssl)
+.  include "../../security/openssl/buildlink3.mk"
+CONFIGURE_ARGS+=       --with-ssl=openssl
+.endif
+
+.if !empty(PKG_OPTIONS:Mmbedtls)
+.  include "../../security/mbedtls/buildlink3.mk"
+CONFIGURE_ARGS+=       --with-ssl=mbedtls
+.endif
diff -r c289859ea5d9 -r 68cceb7f8d64 audio/shairport-sync/patches/patch-Makefile.am
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/shairport-sync/patches/patch-Makefile.am    Fri Jul 01 18:36:27 2022 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-Makefile.am,v 1.1 2022/07/01 18:36:28 nia Exp $
+
+Add support for Sun/NetBSD audio.
+
+--- Makefile.am.orig   2020-12-01 12:16:11.000000000 +0000
++++ Makefile.am
+@@ -56,6 +56,10 @@ if USE_SNDIO
+ shairport_sync_SOURCES += audio_sndio.c
+ endif
+ 
++if USE_SUN
++shairport_sync_SOURCES += audio_sun.c
++endif
++
+ if USE_STDOUT
+ shairport_sync_SOURCES += audio_stdout.c
+ endif
diff -r c289859ea5d9 -r 68cceb7f8d64 audio/shairport-sync/patches/patch-audio.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/shairport-sync/patches/patch-audio.c        Fri Jul 01 18:36:27 2022 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-audio.c,v 1.1 2022/07/01 18:36:28 nia Exp $
+
+Add support for Sun/NetBSD audio.
+
+--- audio.c.orig       2020-12-01 12:16:11.000000000 +0000
++++ audio.c
+@@ -37,6 +37,9 @@ extern audio_output audio_jack;
+ #ifdef CONFIG_SNDIO
+ extern audio_output audio_sndio;
+ #endif
++#ifdef CONFIG_SUN
++extern audio_output audio_sun;
++#endif
+ #ifdef CONFIG_AO
+ extern audio_output audio_ao;
+ #endif
+@@ -66,6 +69,9 @@ static audio_output *outputs[] = {
+ #ifdef CONFIG_SNDIO
+     &audio_sndio,
+ #endif
++#ifdef CONFIG_SUN
++    &audio_sun,
++#endif
+ #ifdef CONFIG_PA
+     &audio_pa,
+ #endif
diff -r c289859ea5d9 -r 68cceb7f8d64 audio/shairport-sync/patches/patch-audio__sun.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/shairport-sync/patches/patch-audio__sun.c   Fri Jul 01 18:36:27 2022 +0000
@@ -0,0 +1,265 @@
+$NetBSD: patch-audio__sun.c,v 1.1 2022/07/01 18:36:28 nia Exp $
+
+Add support for Sun/NetBSD audio.
+
+--- audio_sun.c.orig   2021-04-04 06:45:52.830430162 +0000
++++ audio_sun.c
+@@ -0,0 +1,258 @@
++/*



Home | Main Index | Thread Index | Old Index