summaryrefslogtreecommitdiff
path: root/media-libs/nas/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /media-libs/nas/files
reinit the tree, so we can have metadata
Diffstat (limited to 'media-libs/nas/files')
-rw-r--r--media-libs/nas/files/nas-1.9.2-asneeded.patch13
-rw-r--r--media-libs/nas/files/nas-1.9.4-remove-abs-fabs.patch36
-rw-r--r--media-libs/nas/files/nas.conf.d11
-rw-r--r--media-libs/nas/files/nas.init.d19
4 files changed, 79 insertions, 0 deletions
diff --git a/media-libs/nas/files/nas-1.9.2-asneeded.patch b/media-libs/nas/files/nas-1.9.2-asneeded.patch
new file mode 100644
index 000000000000..2ac89487a2c8
--- /dev/null
+++ b/media-libs/nas/files/nas-1.9.2-asneeded.patch
@@ -0,0 +1,13 @@
+http://bugs.gentoo.org/show_bug.cgi?id=247761
+
+--- config/NetAudio.tmpl
++++ config/NetAudio.tmpl
+@@ -162,7 +162,7 @@
+
+ AUDIODEPLIBS = $(DEPAULIB) $(DEPXTOOLLIB) $(DEPXLIB)
+ #ifndef WIN32
+- AUDIOLIBS = $(AULIB) $(XTOOLLIB) $(XLIB) -lm
++ AUDIOLIBS = $(AULIB) $(XTOOLLIB) $(XAUTHLIB) $(XLIB) -lm
+ #else /* WIN32 */
+ AUDIOLIBS = $(AULIB)
+ #endif /* WIN32 */
diff --git a/media-libs/nas/files/nas-1.9.4-remove-abs-fabs.patch b/media-libs/nas/files/nas-1.9.4-remove-abs-fabs.patch
new file mode 100644
index 000000000000..46ef6bb4610e
--- /dev/null
+++ b/media-libs/nas/files/nas-1.9.4-remove-abs-fabs.patch
@@ -0,0 +1,36 @@
+From 212309075d26668f6e25f30754e646952843cf61 Mon Sep 17 00:00:00 2001
+From: "Anthony G. Basile" <blueness@gentoo.org>
+Date: Tue, 28 Apr 2015 18:56:46 -0600
+Subject: [PATCH]
+
+On a uClibc system, the macro definitions of abs() and fabs()
+ cause the build to fail. Since these are specified by POSIX, it is safe to
+ just drop their definition. This has been tested on uClibc, glibc and musl.
+
+See: https://bugs.gentoo.org/show_bug.cgi?id=510766
+
+Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
+---
+ server/include/misc.h | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/server/include/misc.h b/server/include/misc.h
+index 2267ae0..fb904c8 100644
+--- a/server/include/misc.h
++++ b/server/include/misc.h
+@@ -71,12 +71,6 @@ typedef int Bool;
+
+ #define min(a, b) (((a) < (b)) ? (a) : (b))
+ #define max(a, b) (((a) > (b)) ? (a) : (b))
+-#ifndef abs
+-#define abs(a) ((a) > 0 ? (a) : -(a))
+-#endif
+-#ifndef fabs
+-#define fabs(a) ((a) > 0.0 ? (a) : -(a)) /* floating absolute value */
+-#endif
+ #define sign(x) ((x) < 0 ? -1 : ((x) > 0 ? 1 : 0))
+ /* this assumes b > 0 */
+ #define modulus(a, b, d) if (((d) = (a) % (b)) < 0) (d) += (b)
+--
+2.0.5
+
diff --git a/media-libs/nas/files/nas.conf.d b/media-libs/nas/files/nas.conf.d
new file mode 100644
index 000000000000..b8c32dbdba2b
--- /dev/null
+++ b/media-libs/nas/files/nas.conf.d
@@ -0,0 +1,11 @@
+# Config file for /etc/init.d/nas
+
+# For information on options, see "/usr/bin/nasd -h".
+
+NAS_OPTIONS=""
+
+# Allow only clients on local network to connect:
+#NAS_OPTIONS="-local"
+
+# Allow any client to connect:
+#NAS_OPTIONS="-aa"
diff --git a/media-libs/nas/files/nas.init.d b/media-libs/nas/files/nas.init.d
new file mode 100644
index 000000000000..ff6dd819fff6
--- /dev/null
+++ b/media-libs/nas/files/nas.init.d
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+
+depend() {
+ need net
+ after alsasound esd
+}
+
+start() {
+ ebegin "Starting nas"
+ start-stop-daemon --start --quiet --exec /usr/bin/nasd --background \
+ --pidfile /var/run/nasd.pid --make-pidfile -- $NAS_OPTIONS
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping nas"
+ start-stop-daemon --stop --quiet --pidfile /var/run/nasd.pid
+ eend $?
+}