aboutsummaryrefslogtreecommitdiffstats
path: root/main/aumix
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-07-24 08:01:31 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-07-24 08:01:31 +0000
commitb70981b68efcce5256eb11c6cd26ae123b10b6ea (patch)
treea38be6efae5e2ba15c2e839504632f9b7bfd5f91 /main/aumix
parent2b4df81538b8398442d5296650905c70341dd8d3 (diff)
downloadaports-b70981b68efcce5256eb11c6cd26ae123b10b6ea.tar.bz2
aports-b70981b68efcce5256eb11c6cd26ae123b10b6ea.tar.xz
moved extra/* to main/
and fixed misc build issues
Diffstat (limited to 'main/aumix')
-rw-r--r--main/aumix/APKBUILD38
-rw-r--r--main/aumix/aumix-2.8-mute.patch16
-rw-r--r--main/aumix/aumix-2.8-nohome.patch12
-rw-r--r--main/aumix/aumix-2.8-save_load.patch45
-rw-r--r--main/aumix/aumix.initd42
5 files changed, 153 insertions, 0 deletions
diff --git a/main/aumix/APKBUILD b/main/aumix/APKBUILD
new file mode 100644
index 0000000000..034613b725
--- /dev/null
+++ b/main/aumix/APKBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=aumix
+pkgver=2.8
+pkgrel=0
+pkgdesc="A color text mode sound mixer"
+url="http://www.jpj.net/~trevor/aumix.html"
+license="GPL"
+depends="uclibc ncurses ncurses-terminfo"
+makedepends="ncurses-dev"
+source="http://jpj.net/~trevor/aumix/aumix-$pkgver.tar.bz2
+ aumix-2.8-mute.patch
+ aumix-2.8-nohome.patch
+ aumix-2.8-save_load.patch
+ aumix.initd
+ "
+
+build() {
+ cd "$srcdir"/aumix-$pkgver
+ for i in ../*.patch; do
+ msg "Applying $i..."
+ patch -p1 < $i || return 1
+ done
+
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ --without-gtk1 \
+ --without-gtk \
+ --disable-nls
+
+ make || return 1
+ make DESTDIR="$pkgdir" install || return 1
+ install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/aumix
+}
+md5sums="dc3fc7209752207c23e7c94ab886b340 aumix-2.8.tar.bz2
+3611c0372870a0ad67630231fe576e32 aumix-2.8-mute.patch
+6c8d691beb495257d8309e58c127acd2 aumix-2.8-nohome.patch
+113377f0f69925467a5a5b633a78160c aumix-2.8-save_load.patch
+affaa735ad9b65a540842994caba18fd aumix.initd"
diff --git a/main/aumix/aumix-2.8-mute.patch b/main/aumix/aumix-2.8-mute.patch
new file mode 100644
index 0000000000..8a32fd5b9b
--- /dev/null
+++ b/main/aumix/aumix-2.8-mute.patch
@@ -0,0 +1,16 @@
+Fix mute script: save volume and then set it to 0 instead of saving it directly
+to 0. Bug #122087.
+Index: aumix-2.8/src/mute
+===================================================================
+--- aumix-2.8.orig/src/mute
++++ aumix-2.8/src/mute
+@@ -8,7 +8,8 @@
+ volumes=$(aumix -vq |tr -d ,)
+ if [ $(echo $volumes | awk '{print $2}') -ne 0 -o \
+ $(echo $volumes | awk '{print $3}') -ne 0 ]; then
+- aumix -S -v 0
++ aumix -S
++ aumix -v 0
+ else
+ aumix -L > /dev/null
+ fi
diff --git a/main/aumix/aumix-2.8-nohome.patch b/main/aumix/aumix-2.8-nohome.patch
new file mode 100644
index 0000000000..bf20f0372c
--- /dev/null
+++ b/main/aumix/aumix-2.8-nohome.patch
@@ -0,0 +1,12 @@
+diff -Naur aumix-2.8.orig/src/common.c aumix-2.8/src/common.c
+--- aumix-2.8.orig/src/common.c 2002-10-29 13:27:51.000000000 -0800
++++ aumix-2.8/src/common.c 2004-07-22 01:28:07.684999900 -0700
+@@ -591,7 +591,7 @@
+ char filename[PATH_MAX];
+ if (save_filename == NULL) {
+ home = getenv("HOME");
+- if ((strlen(home) + strlen(AUMIXRC) + 2) < PATH_MAX) {
++ if (home && (strlen(home) + strlen(AUMIXRC) + 2) < PATH_MAX) {
+ sprintf(filename, "%s/.%s", home, AUMIXRC);
+ setfile = CheckAndOpen(filename, mode);
+ }
diff --git a/main/aumix/aumix-2.8-save_load.patch b/main/aumix/aumix-2.8-save_load.patch
new file mode 100644
index 0000000000..498716b517
--- /dev/null
+++ b/main/aumix/aumix-2.8-save_load.patch
@@ -0,0 +1,45 @@
+--- a/src/common.c 2002-11-28 14:22:00.000000000 +0100
++++ b/src/common.c 2002-11-28 14:23:11.000000000 +0100
+@@ -116,6 +116,7 @@
+ int main(int argc, char *argv[])
+ {
+ int optn, ii;
++ int save = 0, load = 0;
+ #ifdef HAVE_CURSES
+ int setcolors = FALSE;
+ #endif /* HAVE_CURSES */
+@@ -171,14 +172,10 @@
+ break;
+ #endif /* HAVE_CURSES */
+ case 'S': /* Save to file. */
+- if (mixer_fd == -1)
+- ErrorExitWarn(InitializeMixer(device_filename), 'e');
+- ErrorExitWarn(SaveSettings(), 'e');
++ save = 1;
+ break;
+ case 'L': /* Load from file. */
+- if (mixer_fd == -1)
+- ErrorExitWarn(InitializeMixer(device_filename), 'e');
+- ErrorExitWarn(LoadSettings(), 'e');
++ load = 1;
+ break;
+ #if defined (HAVE_CURSES) || defined (HAVE_GTK) || defined (HAVE_GTK1)
+ case 'I': /* User asked for interactive mode. */
+@@ -194,6 +191,17 @@
+ }
+ }
+ }
++ if (save | load) {
++ if (mixer_fd == -1)
++ ErrorExitWarn(InitializeMixer(device_filename), 'e');
++ if (save)
++ ErrorExitWarn(SaveSettings(), 'e');
++ else
++ ErrorExitWarn(LoadSettings(), 'e');
++ close(mixer_fd);
++ exit(EXIT_SUCCESS);
++ }
++
+ #if defined (HAVE_CURSES) || defined (HAVE_GTK) || defined (HAVE_GTK1)
+ /* Be interactive if no options were given. */
+ if (!interactive && argc <= 1)
diff --git a/main/aumix/aumix.initd b/main/aumix/aumix.initd
new file mode 100644
index 0000000000..2c1741b3b9
--- /dev/null
+++ b/main/aumix/aumix.initd
@@ -0,0 +1,42 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/aumix/files/aumix.rc6,v 1.12 2007/03/25 13:05:51 drac Exp $
+
+depend() {
+ use modules hotplug coldplug alsasound
+}
+
+checkconfig() {
+ if ! grep -q -E 'sound|OSS|sparcaudio' /proc/devices && [ ! -d /proc/asound ] ; then
+ eerror "Sound support has not been compiled into the kernel,"
+ eerror "or is disabled. Please check that the correct modules"
+ eerror "is loaded."
+ return 1
+ fi
+ # /dev/mixer can be a symlink
+ if [ ! -e /dev/mixer ] ; then
+ eerror "/dev/mixer does not exist, please create it, or load the"
+ eerror "correct modules to enable your card's mixer"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ if [ -f /etc/aumixrc ] ; then
+ ebegin "Loading Mixer settings"
+ /usr/bin/aumix -f /etc/aumixrc -L >/dev/null 2>&1
+ else
+ ebegin "Setting Mixer settings"
+ /usr/bin/aumix -v75 -c75 -w75 >/dev/null 2>&1
+ fi
+ eend $?
+}
+
+stop() {
+ checkconfig || return 1
+ ebegin "Saving Mixer settings"
+ /usr/bin/aumix -f /etc/aumixrc -S >/dev/null 2>&1
+ eend $?
+}