Github messages for voidlinux
 help / color / mirror / Atom feed
From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [WIP] New package: snapcast-0.16.0
Date: Thu, 31 Oct 2019 09:34:08 +0100	[thread overview]
Message-ID: <20191031083408.JGg3Hwc-xSFe8dad0sUT6uf-wmOWI8aOqirsQ1gE6ZU@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-15614@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 418 bytes --]

There is an updated pull request by amak79 against master on the void-packages repository

https://github.com/amak79/void-packages snapcast
https://github.com/void-linux/void-packages/pull/15614

[WIP] New package: snapcast-0.16.0
This pull request is currently set to WIP because snapserver fails to build without boost 1.70.

A patch file from https://github.com/void-linux/void-packages/pull/15614.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-snapcast-15614.patch --]
[-- Type: text/x-diff, Size: 6295 bytes --]

From 463f2cf97f8c8ddad72a9936b16119ad9ae1d0ff Mon Sep 17 00:00:00 2001
From: amak <amak.git@outlook.com>
Date: Sat, 19 Oct 2019 22:09:30 +1100
Subject: [PATCH] New package: snapcast-0.16.0

---
 common/options.description               |  1 +
 srcpkgs/snapcast/files/snapclient/run    |  3 ++
 srcpkgs/snapcast/files/snapserver/run    |  3 ++
 srcpkgs/snapcast/patches/libatomic.patch | 51 ++++++++++++++++++++
 srcpkgs/snapcast/template                | 61 ++++++++++++++++++++++++
 srcpkgs/snapclient                       |  1 +
 srcpkgs/snapserver                       |  1 +
 7 files changed, 121 insertions(+)
 create mode 100644 srcpkgs/snapcast/files/snapclient/run
 create mode 100644 srcpkgs/snapcast/files/snapserver/run
 create mode 100644 srcpkgs/snapcast/patches/libatomic.patch
 create mode 100644 srcpkgs/snapcast/template
 create mode 120000 srcpkgs/snapclient
 create mode 120000 srcpkgs/snapserver

diff --git a/common/options.description b/common/options.description
index 5d34d2f4068..48f36a4e315 100644
--- a/common/options.description
+++ b/common/options.description
@@ -2,6 +2,7 @@ desc_option_aalib="Enable support for aalib video output"
 desc_option_acl="Enable support for ACLs and Extended Attributes"
 desc_option_alsa="Enable support for ALSA"
 desc_option_aom="Enable support for the AV1 codec"
+desc_option_avahi="Enable support for Avahi"
 desc_option_backtrace="Enable support for backtraces via libunwind"
 desc_option_bluetooth="Enable support for bluetooth"
 desc_option_cdparanoia="Enable support for CD audio (cdparanoia)"
diff --git a/srcpkgs/snapcast/files/snapclient/run b/srcpkgs/snapcast/files/snapclient/run
new file mode 100644
index 00000000000..adee7091dca
--- /dev/null
+++ b/srcpkgs/snapcast/files/snapclient/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+[ -r conf ] && . ./conf
+exec chpst -u _snapclient:audio snapclient ${OPTS}
diff --git a/srcpkgs/snapcast/files/snapserver/run b/srcpkgs/snapcast/files/snapserver/run
new file mode 100644
index 00000000000..5aacae0b70d
--- /dev/null
+++ b/srcpkgs/snapcast/files/snapserver/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+[ -r conf ] && . ./conf
+exec chpst -u _snapserver snapserver ${OPTS}
diff --git a/srcpkgs/snapcast/patches/libatomic.patch b/srcpkgs/snapcast/patches/libatomic.patch
new file mode 100644
index 00000000000..04612981835
--- /dev/null
+++ b/srcpkgs/snapcast/patches/libatomic.patch
@@ -0,0 +1,51 @@
+--- cmake/CheckAtomic.cmake	1970-01-01 10:00:00.000000000 +1000
++++ cmake/CheckAtomic.cmake	2019-10-31 19:21:53.841264137 +1100
+@@ -0,0 +1,32 @@
++set(ATOMIC_TEST_CXX_SOURCE "
++#include <cstdint>
++#include <atomic>
++std::atomic<uintptr_t> x;
++std::atomic<uintmax_t> y;
++int main() {
++    return x + y;
++}")
++
++set(LIBATOMIC_TEST_CXX_SOURCE "
++int main() {
++    __atomic_load_8(nullptr, 0);
++    return 0;
++}")
++
++include(CMakePushCheckState)
++include(CheckCXXSourceCompiles)
++cmake_push_check_state()
++check_cxx_source_compiles("${ATOMIC_TEST_CXX_SOURCE}" HAVE_ATOMICS_WITHOUT_LIBATOMIC)
++if(NOT HAVE_ATOMICS_WITHOUT_LIBATOMIC)
++    set(CMAKE_REQUIRED_LIBRARIES atomic)
++    check_cxx_source_compiles("${LIBATOMIC_TEST_CXX_SOURCE}" LIBATOMIC_EXISTS)
++    if(LIBATOMIC_EXISTS)
++        check_cxx_source_compiles("${ATOMIC_TEST_CXX_SOURCE}" HAVE_ATOMICS_WITH_LIBATOMIC)
++    endif()
++    if(HAVE_ATOMICS_WITH_LIBATOMIC)
++        set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -latomic")
++    else()
++        message(FATAL_ERROR "Could not determine support for atomic operations.")
++    endif()
++endif()
++cmake_pop_check_state()
+
+--- CMakeLists.txt	2019-10-24 21:53:43.000000000 +1100
++++ CMakeLists.txt	2019-10-29 10:46:59.620476702 +1100
+@@ -77,11 +77,7 @@ target_architecture(ARCH)
+ #message(STATUS "Architecture: ${ARCH}")
+ #message(STATUS "System processor: ${CMAKE_SYSTEM_PROCESSOR}")
+ 
+-INCLUDE(CheckLibraryExists)
+-check_library_exists(atomic __atomic_fetch_add_4 "" HAS_LIBATOMIC)
+-if(HAS_LIBATOMIC)
+-    set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -latomic")
+-endif()
++include(CheckAtomic)
+ 
+ INCLUDE(TestBigEndian)
+ TEST_BIG_ENDIAN(BIGENDIAN)
diff --git a/srcpkgs/snapcast/template b/srcpkgs/snapcast/template
new file mode 100644
index 00000000000..3beb79130e2
--- /dev/null
+++ b/srcpkgs/snapcast/template
@@ -0,0 +1,61 @@
+# Template file for 'snapcast'
+pkgname=snapcast
+version=0.16.0
+revision=1
+build_style=cmake
+configure_args="-DBUILD_WITH_TREMOR=OFF -DBUILD_SERVER=OFF
+ -DBUILD_WITH_AVAHI=$(vopt_if avahi ON OFF)"
+hostmakedepends="pkg-config"
+makedepends="alsa-lib-devel boost-devel libflac-devel libvorbis-devel
+ $(vopt_if avahi avahi-libs-devel)"
+short_desc="Synchronous multi-room audio player"
+maintainer="amak <amak.git@outlook.com>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/badaix/snapcast"
+distfiles="https://github.com/badaix/snapcast/archive/v${version}.tar.gz"
+checksum=a910dd3edd401ef085827a8880454ee48c5b9cd0d1412363fd22a128b4e06f6d
+
+build_options="avahi"
+
+case "$XBPS_TARGET_MACHINE" in
+	armv6*)
+		makedepends+=" libatomic-devel"
+		;;
+esac
+
+post_install() {
+	vdoc README.md
+	vdoc doc/player_setup.md
+}
+
+snapclient_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - client files"
+
+	system_accounts="_snapclient"
+	_snapclient_homedir="/var/lib/snapclient"
+	make_dirs="/var/lib/snapclient 0750 _snapclient _snapclient"
+
+	pkg_install() {
+		vmove /usr/bin/snapclient
+		vman client/snapclient.1
+		vsv snapclient
+	}
+}
+
+snapserver_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - server files"
+	conf_files="/etc/snapserver.conf"
+
+	system_accounts="_snapserver"
+	_snapserver_homedir="/var/lib/snapserver"
+	make_dirs="/var/lib/snapserver 0750 _snapserver _snapserver"
+
+	pkg_install() {
+#		vmove /usr/bin/snapserver
+		vman server/snapserver.1
+		vconf server/etc/snapserver.conf
+		vsv snapserver
+	}
+}
diff --git a/srcpkgs/snapclient b/srcpkgs/snapclient
new file mode 120000
index 00000000000..f94c7e9814f
--- /dev/null
+++ b/srcpkgs/snapclient
@@ -0,0 +1 @@
+snapcast
\ No newline at end of file
diff --git a/srcpkgs/snapserver b/srcpkgs/snapserver
new file mode 120000
index 00000000000..f94c7e9814f
--- /dev/null
+++ b/srcpkgs/snapserver
@@ -0,0 +1 @@
+snapcast
\ No newline at end of file

  parent reply	other threads:[~2019-10-31  8:34 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-19 11:23 [PR PATCH] " voidlinux-github
2019-10-19 11:38 ` [PR PATCH] [Updated] " voidlinux-github
2019-10-19 11:38 ` voidlinux-github
2019-10-20  6:16 ` voidlinux-github
2019-10-20  6:16 ` voidlinux-github
2019-10-20 11:09 ` voidlinux-github
2019-10-20 11:09 ` voidlinux-github
2019-10-24  2:47 ` voidlinux-github
2019-10-24  2:47 ` voidlinux-github
2019-10-24 12:59 ` voidlinux-github
2019-10-24 12:59 ` voidlinux-github
2019-10-26  2:37 ` voidlinux-github
2019-10-26  2:37 ` voidlinux-github
2019-10-28 10:04 ` voidlinux-github
2019-10-28 10:04 ` voidlinux-github
2019-10-31  8:34 ` voidlinux-github
2019-10-31  8:34 ` voidlinux-github [this message]
2019-11-05  0:57 ` voidlinux-github
2019-12-27  1:33 ` [PR PATCH] [Updated] [WIP] New package: snapcast-0.17.1 voidlinux-github
2020-01-22 23:27 ` voidlinux-github
2020-01-22 23:36 ` voidlinux-github
2020-01-26  5:17 ` [PR PATCH] [Updated] [WIP] New package: snapcast-0.18.0 voidlinux-github
2020-01-28 23:28 ` [PR PATCH] [Updated] " voidlinux-github
2020-01-29 11:00 ` [PR PATCH] [Updated] New package: snapcast-0.18.1 voidlinux-github
2020-01-29 22:33 ` [PR PATCH] [Merged]: " voidlinux-github

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191031083408.JGg3Hwc-xSFe8dad0sUT6uf-wmOWI8aOqirsQ1gE6ZU@z \
    --to=voidlinux-github@inbox.vuxu.org \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).