pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
xwax: Add more patches and usage instructions.
Module Name: pkgsrc-wip
Committed By: nia <nia%NetBSD.org@localhost>
Pushed By: nee
Date: Wed Oct 16 18:40:55 2019 +0100
Changeset: f4e788b5677263edcb44553d1602e00cbe56521a
Added Files:
xwax/MESSAGE
xwax/patches/patch-import
xwax/patches/patch-realtime.c
xwax/patches/patch-scan
xwax/patches/patch-xwax.c
Log Message:
xwax: Add more patches and usage instructions.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f4e788b5677263edcb44553d1602e00cbe56521a
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
xwax/MESSAGE | 11 +++++++++++
xwax/patches/patch-import | 15 +++++++++++++++
xwax/patches/patch-realtime.c | 23 +++++++++++++++++++++++
xwax/patches/patch-scan | 39 +++++++++++++++++++++++++++++++++++++++
xwax/patches/patch-xwax.c | 19 +++++++++++++++++++
5 files changed, 107 insertions(+)
diffs:
diff --git a/xwax/MESSAGE b/xwax/MESSAGE
new file mode 100644
index 0000000000..e7007e04dc
--- /dev/null
+++ b/xwax/MESSAGE
@@ -0,0 +1,11 @@
+===========================================================================
+$NetBSD: MESSAGE.NetBSD,v 1.1 2019/06/10 12:41:23 nia Exp $
+
+Install mpg123 for MP3 support.
+
+For other formats, install ffmpeg.
+
+On NetBSD, to connect to the default audio device, run
+xwax -d /dev/audio -l /path/to/library
+
+===========================================================================
diff --git a/xwax/patches/patch-import b/xwax/patches/patch-import
new file mode 100644
index 0000000000..c1c389209b
--- /dev/null
+++ b/xwax/patches/patch-import
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Support pkgsrc's weird names for ffmpeg.
+
+--- import.orig 2018-01-19 20:40:49.000000000 +0000
++++ import
+@@ -28,7 +28,7 @@ case "$FILE" in
+ *)
+ echo "Calling fallback decoder..." >&2
+
+- FFMPEG=$(which ffmpeg 2> /dev/null || which avconv 2> /dev/null)
++ FFMPEG=$(ls -1 @PREFIX@/bin | grep '^ffmpeg[0-9]*$' | tail -1)
+
+ if [ -z "$FFMPEG" ]; then
+ echo "$0: no ffmpeg or avconv available to decode file" >&2
diff --git a/xwax/patches/patch-realtime.c b/xwax/patches/patch-realtime.c
new file mode 100644
index 0000000000..d445ca7c8d
--- /dev/null
+++ b/xwax/patches/patch-realtime.c
@@ -0,0 +1,23 @@
+$NetBSD$
+
+"sched_setscheduler: Operation not permitted"
+
+--- realtime.c.orig 2018-01-19 20:40:49.000000000 +0000
++++ realtime.c
+@@ -38,6 +38,7 @@
+
+ static int raise_priority(int priority)
+ {
++#ifndef __NetBSD__
+ int max_pri;
+ struct sched_param sp;
+
+@@ -60,7 +61,7 @@ static int raise_priority(int priority)
+ fprintf(stderr, "Failed to get realtime priorities\n");
+ return -1;
+ }
+-
++#endif
+ return 0;
+ }
+
diff --git a/xwax/patches/patch-scan b/xwax/patches/patch-scan
new file mode 100644
index 0000000000..2365534816
--- /dev/null
+++ b/xwax/patches/patch-scan
@@ -0,0 +1,39 @@
+$NetBSD$
+
+Make usage of find portable.
+
+--- scan.orig 2018-01-19 20:40:49.000000000 +0000
++++ scan
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/usr/pkg/bin/bash
+ #
+ # Take a pathname as an argument and output a playlist to standard
+ # output and errors to standard error.
+@@ -15,15 +15,14 @@ set -eu -o pipefail # pipefail requires
+ PATHNAME="$1"
+
+ if [ -d "$PATHNAME" ]; then
+- find -L "$PATHNAME" -type f -regextype posix-egrep \
+- -iregex '.*\.(ogg|oga|aac|cdaudio|mp3|flac|wav|aif|aiff|m4a|wma)'
++ find -L "$PATHNAME" -type f | grep -Ei '.*\.(ogg|oga|aac|cdaudio|mp3|flac|wav|aif|aiff|m4a|wma)'
+ else
+ cat "$PATHNAME"
+ fi |
+
+ # Parse artist and title information from matching filenames
+
+-sed -n '
++gsed -n '
+ {
+ # /[<ABnum>[.]] <artist> - <title>.ext
+ s:/\([A-H]\?[A0-9]\?[0-9].\? \+\)\?\([^/]*\) \+- \+\([^/]*\)\.[A-Z0-9]*$:\0\t\2\t\3:pi
+@@ -39,7 +38,7 @@ s:/\([A-H]\?[A0-9]\?[0-9].\? \+\)\?\([^/
+
+ # Extract BPM metadata from title (eg. "Ghostbusters (115.6 BPM)")
+
+-sed '
++gsed '
+ {
+ # BPM
+ s:\(.*\) *(\([0-9]\+\.\?[0-9]\+\) *BPM)$:\1\t\2:
diff --git a/xwax/patches/patch-xwax.c b/xwax/patches/patch-xwax.c
new file mode 100644
index 0000000000..9ff0ef6c13
--- /dev/null
+++ b/xwax/patches/patch-xwax.c
@@ -0,0 +1,19 @@
+$NetBSD$
+
+"Invalid scheduling priority (maximum 63)."
+
+--- xwax.c.orig 2018-01-19 20:40:49.000000000 +0000
++++ xwax.c
+@@ -49,7 +49,12 @@
+ #define DEFAULT_ALSA_BUFFER 8 /* milliseconds */
+
+ #define DEFAULT_RATE 44100
++
++#ifdef __NetBSD__
++#define DEFAULT_PRIORITY 63
++#else
+ #define DEFAULT_PRIORITY 80
++#endif
+
+ #define DEFAULT_IMPORTER EXECDIR "/xwax-import"
+ #define DEFAULT_SCANNER EXECDIR "/xwax-scan"
Home |
Main Index |
Thread Index |
Old Index