summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-sound/line6usb')
-rw-r--r--media-sound/line6usb/ChangeLog11
-rw-r--r--media-sound/line6usb/files/line6usb-0.8.1-kernel-2.6.31-fix.patch35
-rw-r--r--media-sound/line6usb/line6usb-0.8.1-r1.ebuild (renamed from media-sound/line6usb/line6usb-0.8.1.ebuild)69
3 files changed, 98 insertions, 17 deletions
diff --git a/media-sound/line6usb/ChangeLog b/media-sound/line6usb/ChangeLog
index 328e2327007f..38fbfc6ccfcb 100644
--- a/media-sound/line6usb/ChangeLog
+++ b/media-sound/line6usb/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for media-sound/line6usb
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/line6usb/ChangeLog,v 1.5 2009/09/06 21:15:09 robbat2 Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/line6usb/ChangeLog,v 1.6 2010/01/24 01:31:49 nerdboy Exp $
+
+*line6usb-0.8.1-r1 (24 Jan 2010)
+
+ 24 Jan 2010; Steve Arnold <nerdboy@gentoo.org> -line6usb-0.8.1.ebuild,
+ +line6usb-0.8.1-r1.ebuild, +files/line6usb-0.8.1-kernel-2.6.31-fix.patch:
+ Added patch for newer kernels and updated ebuild to accommodate kernel
+ staging driver (however, the in-kernel driver is version 0.8.0).
06 Sep 2009; Robin H. Johnson <robbat2@gentoo.org> line6usb-0.7.3.ebuild,
line6usb-0.8.1.ebuild:
diff --git a/media-sound/line6usb/files/line6usb-0.8.1-kernel-2.6.31-fix.patch b/media-sound/line6usb/files/line6usb-0.8.1-kernel-2.6.31-fix.patch
new file mode 100644
index 000000000000..e60b1991be7f
--- /dev/null
+++ b/media-sound/line6usb/files/line6usb-0.8.1-kernel-2.6.31-fix.patch
@@ -0,0 +1,35 @@
+*** audio.c 2009-04-04 11:53:29.000000000 -0700
+--- ../line6usb/audio.c 2009-12-31 12:42:49.827996851 -0800
+***************
+*** 12,17 ****
+--- 12,19 ----
+ #include "driver.h"
+ #include "audio.h"
+
++ #include <linux/version.h>
++
+ #include <sound/core.h>
+ #include <sound/initval.h>
+
+***************
+*** 28,37 ****
+--- 30,48 ----
+ static int dev;
+ struct snd_card *card;
+
++ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30)
+ card = snd_card_new(line6_index[dev], line6_id[dev], THIS_MODULE, 0);
+
+ if (card == NULL)
+ return -ENOMEM;
++ #else
++ int err;
++
++ err = snd_card_create(line6_index[dev], line6_id[dev], THIS_MODULE, 0,
++ &card);
++ if (err < 0)
++ return err;
++ #endif
+
+ line6->card = card;
+
diff --git a/media-sound/line6usb/line6usb-0.8.1.ebuild b/media-sound/line6usb/line6usb-0.8.1-r1.ebuild
index 12761111e997..93420ad1e361 100644
--- a/media-sound/line6usb/line6usb-0.8.1.ebuild
+++ b/media-sound/line6usb/line6usb-0.8.1-r1.ebuild
@@ -1,6 +1,8 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/line6usb/line6usb-0.8.1.ebuild,v 1.3 2009/09/06 21:15:09 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/line6usb/line6usb-0.8.1-r1.ebuild,v 1.1 2010/01/24 01:31:49 nerdboy Exp $
+
+EAPI="2"
inherit linux-mod eutils multilib
@@ -23,27 +25,54 @@ ERROR_PODXTPRO="${P} requires the podxtpro driver to be removed first."
RDEPEND="virtual/modutils
dev-lang/perl"
DEPEND="${RDEPEND}
- virtual/alsa
- >=virtual/linux-sources-2.6.25
+ >=media-sound/alsa-headers-1.0.10
+ >=media-libs/alsa-lib-1.0.10
sys-apps/debianutils"
+pod_kern_warn() {
+ eerror "Kernel config not found..."
+ eerror
+ eerror "You should decide if you want to use the package kernel"
+ eerror "driver or the in-kernel staging driver. Please configure"
+ eerror "and build a kernel, either with or without the in-kernel"
+ eerror "Line6 POD driver (under staging drivers). The current"
+ eerror "ebuild driver is one minor version ahead of the in-kernel"
+ eerror "driver."
+ eerror
+}
+
pkg_setup() {
+ if kernel_is lt 2 6 25; then
+ eerror "POD support requres a host kernel of 2.6.25 or higher."
+ eerror "Please upgrade your kernel..."
+ die "kernel version not compatible"
+ elif ! linux_config_exists; then
+ eerror "Unable to check your kernel for POD driver"
+ pod_kern_warn
+ elif linux_chkconfig_present LINE6_USB; then
+ ewarn "You already have the Line6 staging driver installed."
+ ewarn "Ebuild kernel driver will not be installed..."
+ else
+ elog "Staging driver not found; ebuild kernel driver will be installed..."
+ INSTALL_LINE6_MOD="yes"
+ fi
+
ABI="${KERNEL_ABI}"
linux-mod_pkg_setup
BUILD_PARAMS="LINUX_DIR=${KV_DIR} OUTPUT_DIR=${KV_OUT_DIR}"
check_upgrade
}
-src_unpack() {
- unpack ${A}
- cd "${S}"
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-kernel-2.6.31-fix.patch
+
convert_to_m Makefile
sed -i \
- -e "s:/lib/modules/\$(shell uname -r)/build:${KERNEL_DIR}:g" \
- -e "s:\$(shell uname -r):${KV_FULL}:g" \
- -e "s:\$(shell pwd):${S}:g" \
- Makefile || die "sed failed!"
+ -e "s:/lib/modules/\$(shell uname -r)/build:${KERNEL_DIR}:g" \
+ -e "s:\$(shell uname -r):${KV_FULL}:g" \
+ -e "s:\$(shell pwd):${S}:g" \
+ Makefile || die "sed failed!"
}
src_compile() {
@@ -54,8 +83,15 @@ src_compile() {
}
src_install() {
- DESTDIR="${D}" make install-only || die "make install failed"
+ dodir /usr/share/doc/${P} /usr/share/${P}/examples
+
+ if [[ -n ${INSTALL_LINE6_MOD} ]] ; then
+ DESTDIR="${D}" make install-only || die "make install failed"
+ else
+ dobin *.sh *.pl
+ fi
+ mv "${D}"usr/bin/{aplay.sh,arecord.sh} "${D}"usr/share/${P}/examples/
# remove some cruft
rm "${D}"usr/bin/remove_old_podxtpro_driver.sh
@@ -70,8 +106,11 @@ pkg_postinst() {
linux-mod_pkg_postinst
elog
- elog "This is an experimental driver. Not responsible for runaway dogs,"
- elog "hair-loss, or sterility. You have been warned..."
+ elog "This is not such an experimental driver anymore, and should not"
+ elog "cause hair-loss or sterility. There is a slightly older version"
+ elog "now in the kernel source tree under staging drivers. Feel free"
+ elog "to enable it, and this package will only install the utilities"
+ elog "if you do. See the docs and examples for more information."
elog
}
@@ -90,7 +129,7 @@ check_upgrade() {
elif [[ -e \
"/lib/modules/${KV_FULL}/kernel/sound/usb/${new}" ]]; then
ewarn
- ewarn "Collisions are expected here, if you removed the ebuild"
+ ewarn "Depending on the portage version, collisions can be expected"
ewarn "(because kernel modules are protected by default). Use"
ewarn "FEATURES=-collision-protect emerge ... for this package,"
ewarn "or remove the old kernel module (${new}) manually first"