summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-sound/chuck
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-sound/chuck')
-rw-r--r--media-sound/chuck/Manifest2
-rw-r--r--media-sound/chuck/chuck-1.2.1.2.ebuild95
-rw-r--r--media-sound/chuck/chuck-1.3.5.1.ebuild73
-rw-r--r--media-sound/chuck/files/chuck-1.2.1.1-hid-smc.patch149
-rw-r--r--media-sound/chuck/files/chuck-1.2.1.2-gcc44.patch12
-rw-r--r--media-sound/chuck/files/chuck-1.3.1.3-makefile.patch39
-rw-r--r--media-sound/chuck/files/chuck-1.3.5.1-makefile.patch27
-rw-r--r--media-sound/chuck/files/chuck.eselect-0.1152
-rw-r--r--media-sound/chuck/metadata.xml19
9 files changed, 568 insertions, 0 deletions
diff --git a/media-sound/chuck/Manifest b/media-sound/chuck/Manifest
new file mode 100644
index 000000000000..9fd5be3c9a9b
--- /dev/null
+++ b/media-sound/chuck/Manifest
@@ -0,0 +1,2 @@
+DIST chuck-1.2.1.2.tgz 1546875 SHA256 9cb9c246a2fb7ac886c0a3d5f23a5d60eb18aa7717f6ee57f031e42140cf0d2a
+DIST chuck-1.3.5.1.tgz 14686970 SHA256 d141ca61547131edd2b29bdb88183835e4133ef09807674bfa33a4e6e09d1f53 SHA512 450237207150b285954dc2661d6f7829424d4353cdc457a7dce637b6877247b106ad0ed58bdbded17c1f7558e0f01daa7a06642f2727136f6edca5a64d202f73 WHIRLPOOL 5b70e6badffa39e38ea795ea688b4a452cd290dd849d6779e799c7a79e00513fa4b8c07ed64b7243bd0075936ce3ab4bdc99482268d564391ef3a1a96b9f9e8f
diff --git a/media-sound/chuck/chuck-1.2.1.2.ebuild b/media-sound/chuck/chuck-1.2.1.2.ebuild
new file mode 100644
index 000000000000..3b43aab18997
--- /dev/null
+++ b/media-sound/chuck/chuck-1.2.1.2.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs flag-o-matic eutils
+
+DESCRIPTION="Strongly-timed, Concurrent, and On-the-fly
+Audio Programming Language"
+HOMEPAGE="http://chuck.cs.princeton.edu/release/"
+SRC_URI="http://chuck.cs.princeton.edu/release/files/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+IUSE="oss jack alsa examples"
+
+RDEPEND="jack? ( media-sound/jack-audio-connection-kit )
+ alsa? ( media-libs/alsa-lib )
+ media-libs/libsndfile
+ app-admin/eselect"
+DEPEND="${RDEPEND}
+ sys-devel/bison
+ sys-devel/flex"
+
+pkg_setup() {
+ local cnt=0
+ use jack && cnt="$((${cnt} + 1))"
+ use alsa && cnt="$((${cnt} + 1))"
+ use oss && cnt="$((${cnt} + 1))"
+ if [[ "${cnt}" -eq 0 ]] ; then
+ eerror "One of the following USE flags is needed: jack, alsa or oss"
+ die "Please set one audio engine type"
+ elif [[ "${cnt}" -ne 1 ]] ; then
+ ewarn "You have set ${P} to use multiple audio engine."
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-1.2.1.1-hid-smc.patch \
+ "${FILESDIR}"/${P}-gcc44.patch
+}
+
+src_compile() {
+ # when compile with athlon or athlon-xp flags
+ # chuck crashes on removing a shred with a double free or corruption
+ # it happens in Chuck_VM_Stack::shutdown() on the line
+ # SAFE_DELETE_ARRAY( stack );
+ replace-cpu-flags athlon athlon-xp i686
+
+ use jack && compile_backend jack
+ use alsa && compile_backend alsa
+ use oss && compile_backend oss
+}
+
+compile_backend() {
+ backend=$1
+ einfo "Compiling against ${backend}"
+ cd "${S}/src"
+ emake -f "makefile.${backend}" CC=$(tc-getCC) CXX=$(tc-getCXX) || die "emake failed"
+ mv chuck{,.${backend}}
+ emake -f "makefile.${backend}" clean
+}
+
+src_install() {
+ use jack && dobin src/chuck.jack
+ use alsa && dobin src/chuck.alsa
+ use oss && dobin src/chuck.oss
+
+ dodoc AUTHORS DEVELOPER PROGRAMMER QUICKSTART README THANKS TODO VERSIONS
+ docinto doc
+ dodoc doc/*
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins $(find examples -type f)
+ for dir in $(find examples/* -type d); do
+ insinto /usr/share/doc/${PF}/"${dir}"
+ doins "${dir}"/*
+ done
+ fi
+
+ dodir /usr/share/eselect/modules
+ insinto /usr/share/eselect/modules
+ newins "${FILESDIR}"/chuck.eselect-0.1 chuck.eselect
+}
+
+pkg_postinst() {
+ elog "Chuck now can use many audio engines, so you can specify audio engine"
+ elog "with chuck.{jack,alsa,oss}"
+ elog "Or you can use 'eselect chuck' to set the audio engine"
+
+ einfo "Calling eselect chuck update..."
+ eselect chuck update --if-unset
+}
diff --git a/media-sound/chuck/chuck-1.3.5.1.ebuild b/media-sound/chuck/chuck-1.3.5.1.ebuild
new file mode 100644
index 000000000000..f5281e5788e7
--- /dev/null
+++ b/media-sound/chuck/chuck-1.3.5.1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs flag-o-matic eutils
+
+DESCRIPTION="Strongly-timed, concurrent, and on-the-fly audio programming language"
+HOMEPAGE="http://chuck.cs.princeton.edu/"
+SRC_URI="http://chuck.cs.princeton.edu/release/files/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+alsa jack examples"
+REQUIRED_USE="|| ( alsa jack )"
+
+RDEPEND="app-eselect/eselect-chuck
+ media-libs/libsndfile
+ alsa? ( media-libs/alsa-lib )
+ jack? ( media-sound/jack-audio-connection-kit )"
+DEPEND="${RDEPEND}
+ sys-devel/bison
+ sys-devel/flex"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.2.1.1-hid-smc.patch \
+ "${FILESDIR}"/${PN}-1.3.5.1-makefile.patch
+}
+
+compile_backend() {
+ backend=$1
+ pushd "${S}/src" &>/dev/null || die
+ einfo "Compiling against ${backend}"
+ emake CC=$(tc-getCC) CXX=$(tc-getCXX) linux-${backend}
+ mv chuck{,-${backend}}
+ emake clean
+ popd &>/dev/null || die
+}
+
+src_compile() {
+ # when compile with athlon or athlon-xp flags
+ # chuck crashes on removing a shred with a double free or corruption
+ # it happens in Chuck_VM_Stack::shutdown() on the line
+ # SAFE_DELETE_ARRAY( stack );
+ replace-cpu-flags athlon athlon-xp i686
+
+ use jack && compile_backend jack
+ use alsa && compile_backend alsa
+}
+
+src_install() {
+ use jack && dobin src/chuck-jack
+ use alsa && dobin src/chuck-alsa
+
+ dodoc AUTHORS DEVELOPER PROGRAMMER QUICKSTART README THANKS TODO VERSIONS
+ docinto doc
+ dodoc doc/*
+ if use examples; then
+ insinto /usr/share/doc/${PF}/
+ doins -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
+
+pkg_postinst() {
+ elog "Chuck now can use multiple audio engines, so you can specify"
+ elog "the preferred audio engine with chuck-{jack,alsa}"
+ elog "Or you can use 'eselect chuck' to set the audio engine"
+
+ einfo "Calling eselect chuck update..."
+ eselect chuck update --if-unset
+}
diff --git a/media-sound/chuck/files/chuck-1.2.1.1-hid-smc.patch b/media-sound/chuck/files/chuck-1.2.1.1-hid-smc.patch
new file mode 100644
index 000000000000..e5dcef9da811
--- /dev/null
+++ b/media-sound/chuck/files/chuck-1.2.1.1-hid-smc.patch
@@ -0,0 +1,149 @@
+diff -ru chuck-1.2.1.1~/src/util_hid.cpp chuck-1.2.1.1/src/util_hid.cpp
+--- chuck-1.2.1.1~/src/util_hid.cpp 2008-03-29 23:24:21.000000000 +0100
++++ chuck-1.2.1.1/src/util_hid.cpp 2008-03-29 23:24:54.000000000 +0100
+@@ -7175,14 +7175,139 @@
+ int WiiRemote_send( const HidMsg * msg ){ return -1; }
+ const char * WiiRemote_name( int wr ){ return NULL; }
+
++#define SYSFS_TILTSENSOR_FILE "/sys/devices/platform/applesmc/position"
++#define TILTSENSOR_BUF_LEN 32
++
++static struct t_TiltSensor_data
++{
++ union
++ {
++ struct t_macbook
++ {
++ int x;
++ int y;
++ int z;
++ } macbook;
++ } data;
++ int dataType;
++ int detected;
++ int refcount;
++
++ t_TiltSensor_data()
++ {
++ refcount = 0;
++ dataType = -1;
++ detected = 0;
++ }
++
++} TiltSensor_data;
++enum
++{
++ linuxAppleSMCMacBookDataType
++};
++static int TiltSensor_detect()
++{
++ int fd;
++
++ fd = open(SYSFS_TILTSENSOR_FILE, O_RDONLY);
++
++ if (fd > 0)
++ {
++ TiltSensor_data.dataType = linuxAppleSMCMacBookDataType;
++ TiltSensor_data.detected = 1;
++ close(fd);
++ return 1;
++ }
++
++ TiltSensor_data.detected = -1;
++
++ return 0;
++}
++
++static int TiltSensor_do_read()
++{
++
++ switch(TiltSensor_data.dataType)
++ {
++ case linuxAppleSMCMacBookDataType:
++ char buf[TILTSENSOR_BUF_LEN];
++ int ret, fd;
++ fd = open(SYSFS_TILTSENSOR_FILE, O_RDONLY);
++
++ if (fd < 0) {
++ return -1;
++ }
++ ret = read(fd, buf, TILTSENSOR_BUF_LEN);
++ if (ret < 0) {
++ close(fd);
++ return -1;
++ }
++ if (sscanf(buf, "(%d,%d,%d)\n", &TiltSensor_data.data.macbook.x, &TiltSensor_data.data.macbook.y, &TiltSensor_data.data.macbook.z) != 3) {
++ close(fd);
++ return -1;
++ }
++ close(fd);
++ break;
++ default:
++ return 0;
++ }
++ return 1;
++}
+ void TiltSensor_init(){}
+ void TiltSensor_quit(){}
+ void TiltSensor_probe(){}
+-int TiltSensor_count(){ return 0; }
+-int TiltSensor_open( int ts ){ return -1; }
+-int TiltSensor_close( int ts ){ return -1; }
+-int TiltSensor_read( int ts, int type, int num, HidMsg * msg ){ return -1; }
+-const char * TiltSensor_name( int ts ){ return NULL; }
++int TiltSensor_count()
++{
++ if(TiltSensor_data.detected == 0)
++ TiltSensor_detect();
++
++ if(TiltSensor_data.detected == -1)
++ return 0;
++ else if(TiltSensor_data.detected == 1)
++ return 1;
++
++ return 0;
++}
++int TiltSensor_open( int ts )
++{
++ if(TiltSensor_data.detected == 0)
++ TiltSensor_detect();
++
++ if(TiltSensor_data.detected == -1)
++ return -1;
++
++ TiltSensor_data.refcount++;
++
++ return 0;
++}
++int TiltSensor_close( int ts )
++{
++ TiltSensor_data.refcount--;
++
++ return 0;
++}
++int TiltSensor_read( int ts, int type, int num, HidMsg * msg )
++{
++
++ if(TiltSensor_data.detected == -1)
++ return -1;
++
++ if(!TiltSensor_do_read())
++ return -1;
++
++ if(TiltSensor_data.dataType == linuxAppleSMCMacBookDataType)
++ {
++ msg->idata[0] = TiltSensor_data.data.macbook.x;
++ msg->idata[1] = TiltSensor_data.data.macbook.y;
++ msg->idata[2] = TiltSensor_data.data.macbook.z;
++ }
++
++ return 0;
++}
++const char * TiltSensor_name( int ts )
++{
++ return "Apple Sudden Motion Sensor";
++}
+
+
+ #endif
+Only in chuck-1.2.1.1/src: util_hid.cpp.orig
diff --git a/media-sound/chuck/files/chuck-1.2.1.2-gcc44.patch b/media-sound/chuck/files/chuck-1.2.1.2-gcc44.patch
new file mode 100644
index 000000000000..8059c97592f7
--- /dev/null
+++ b/media-sound/chuck/files/chuck-1.2.1.2-gcc44.patch
@@ -0,0 +1,12 @@
+diff -ur chuck-1.2.1.2.orig/src/util_string.h chuck-1.2.1.2/src/util_string.h
+--- chuck-1.2.1.2.orig/src/util_string.h 2008-07-16 12:55:17.000000000 +0300
++++ chuck-1.2.1.2/src/util_string.h 2009-06-01 21:33:59.000000000 +0300
+@@ -33,6 +33,8 @@
+ #ifndef __UTIL_STRING_H__
+ #define __UTIL_STRING_H__
+
++#include <cstdio>
++
+ #include "chuck_def.h"
+ #include <string>
+ #include <vector>
diff --git a/media-sound/chuck/files/chuck-1.3.1.3-makefile.patch b/media-sound/chuck/files/chuck-1.3.1.3-makefile.patch
new file mode 100644
index 000000000000..e1dad7f56613
--- /dev/null
+++ b/media-sound/chuck/files/chuck-1.3.1.3-makefile.patch
@@ -0,0 +1,39 @@
+diff -ru chuck-1.3.1.3.back/src/makefile chuck-1.3.1.3/src/makefile
+--- chuck-1.3.1.3.back/src/makefile 2012-10-07 15:55:19.000000000 +0200
++++ chuck-1.3.1.3/src/makefile 2012-10-07 15:57:54.000000000 +0200
+@@ -34,8 +34,6 @@
+
+ ifneq ($(CHUCK_DEBUG),)
+ CFLAGS+= -g
+-else
+-CFLAGS+= -O3
+ endif
+
+ ifneq ($(USE_64_BIT_SAMPLE),)
+diff -ru chuck-1.3.1.3.back/src/makefile.alsa chuck-1.3.1.3/src/makefile.alsa
+--- chuck-1.3.1.3.back/src/makefile.alsa 2012-10-07 15:55:19.000000000 +0200
++++ chuck-1.3.1.3/src/makefile.alsa 2012-10-07 15:57:20.000000000 +0200
+@@ -1,4 +1,4 @@
+
+-CFLAGS+= -D__LINUX_ALSA__ -O3 -fno-strict-aliasing -D__CK_SNDFILE_NATIVE__
++CFLAGS+= -D__LINUX_ALSA__ -fno-strict-aliasing -D__CK_SNDFILE_NATIVE__
+ LDFLAGS+= -lasound -lstdc++ -ldl -lm -lsndfile -lpthread
+
+diff -ru chuck-1.3.1.3.back/src/makefile.jack chuck-1.3.1.3/src/makefile.jack
+--- chuck-1.3.1.3.back/src/makefile.jack 2012-10-07 15:55:19.000000000 +0200
++++ chuck-1.3.1.3/src/makefile.jack 2012-10-07 15:57:34.000000000 +0200
+@@ -1,4 +1,4 @@
+
+-CFLAGS+= -D__UNIX_JACK__ -D__LINUX_JACK__ -O3 -fno-strict-aliasing -D__CK_SNDFILE_NATIVE__
++CFLAGS+= -D__UNIX_JACK__ -D__LINUX_JACK__ -fno-strict-aliasing -D__CK_SNDFILE_NATIVE__
+ LDFLAGS+= -lasound -ljack -lstdc++ -ldl -lm -lsndfile -lpthread
+
+diff -ru chuck-1.3.1.3.back/src/makefile.oss chuck-1.3.1.3/src/makefile.oss
+--- chuck-1.3.1.3.back/src/makefile.oss 2012-10-07 15:55:19.000000000 +0200
++++ chuck-1.3.1.3/src/makefile.oss 2012-10-07 15:57:16.000000000 +0200
+@@ -1,4 +1,4 @@
+
+-CFLAGS+= -D__LINUX_OSS__ -O3 -fno-strict-aliasing -D__CK_SNDFILE_NATIVE__
++CFLAGS+= -D__LINUX_OSS__ -fno-strict-aliasing -D__CK_SNDFILE_NATIVE__
+ LDFLAGS+= -lpthread -lstdc++ -ldl -lm -lsndfile
+
diff --git a/media-sound/chuck/files/chuck-1.3.5.1-makefile.patch b/media-sound/chuck/files/chuck-1.3.5.1-makefile.patch
new file mode 100644
index 000000000000..e714d20e6b92
--- /dev/null
+++ b/media-sound/chuck/files/chuck-1.3.5.1-makefile.patch
@@ -0,0 +1,27 @@
+--- chuck-1.3.5.1/src/makefile
++++ chuck-1.3.5.1/src/makefile
+@@ -40,8 +40,6 @@
+
+ ifneq ($(CHUCK_DEBUG),)
+ CFLAGS+= -g
+-else
+-CFLAGS+= -O3
+ endif
+
+ ifneq ($(USE_64_BIT_SAMPLE),)
+--- chuck-1.3.5.1/src/makefile.alsa
++++ chuck-1.3.5.1/src/makefile.alsa
+@@ -1,4 +1,4 @@
+
+-CFLAGS+= -D__LINUX_ALSA__ -D__PLATFORM_LINUX__ -O3 -fno-strict-aliasing -D__CK_SNDFILE_NATIVE__
++CFLAGS+= -D__LINUX_ALSA__ -D__PLATFORM_LINUX__ -fno-strict-aliasing -D__CK_SNDFILE_NATIVE__
+ LDFLAGS+= -lasound -lstdc++ -ldl -lm -lsndfile -lpthread
+
+--- chuck-1.3.5.1/src/makefile.jack
++++ chuck-1.3.5.1/src/makefile.jack
+@@ -1,4 +1,4 @@
+
+-CFLAGS+= -D__UNIX_JACK__ -D__PLATFORM_LINUX__ -O3 -fno-strict-aliasing -D__CK_SNDFILE_NATIVE__
++CFLAGS+= -D__UNIX_JACK__ -D__PLATFORM_LINUX__ -fno-strict-aliasing -D__CK_SNDFILE_NATIVE__
+ LDFLAGS+= -lasound -ljack -lstdc++ -ldl -lm -lsndfile -lpthread
+
diff --git a/media-sound/chuck/files/chuck.eselect-0.1 b/media-sound/chuck/files/chuck.eselect-0.1
new file mode 100644
index 000000000000..a074d237cf66
--- /dev/null
+++ b/media-sound/chuck/files/chuck.eselect-0.1
@@ -0,0 +1,152 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Manage /usr/bin/chuck audio engine"
+MAINTAINER="cedk@gentoo.org"
+SVN_DATE='$Date: 2008/07/20 13:49:00 $'
+VERSION=$(svn_date_to_version "${SVN_DATE}" )
+
+# find a list of unison symlink targets, best first
+find_targets() {
+ local f
+ for f in "${ROOT}"/usr/bin/chuck.{jack,alsa,oss}; do
+ if [[ -f ${f} ]] ; then
+ echo "${f##*/chuck.}"
+ fi
+ done | tac
+}
+
+# find version number of currently symlinked version
+identify_target() {
+ local f
+ f="$(canonicalise "${ROOT}"/usr/bin/chuck)"
+ echo "${f##*/chuck.}"
+}
+
+# try to remove the unison symlink
+remove_symlinks() {
+ rm -f "${ROOT}"/usr/bin/chuck &>/dev/null
+}
+
+# set the unison symlink
+set_symlinks() {
+ local target="${1}" targets
+ if is_number "${target}" && [[ ${target} -ge 1 ]] ; then
+ targets=( $(find_targets ) )
+ target=${targets[$(( ${target} - 1 ))]}
+ fi
+ if [[ -f "${ROOT}/usr/bin/chuck.${target}" ]] ; then
+ remove_symlinks
+ ln -s "chuck.${target}" "${ROOT}/usr/bin/chuck" || \
+ die "Could not set ${target} /usr/bin/chuck symlink"
+ else
+ die -q "Target \"${target}\" doesn't appear to be valid!"
+ fi
+}
+
+### show action ###
+
+describe_show() {
+ echo "Show the current chuck audio engine"
+}
+
+do_show() {
+ [[ -z "${@}" ]] || die -q "Too many parameters"
+
+ write_list_start "Current chuck audio engine:"
+ if [[ -L "${ROOT}/usr/bin/chuck" ]] ; then
+ write_kv_list_entry "$(identify_target)" ""
+ elif [[ -e "${ROOT}/usr/bin/chuck" ]] ; then
+ write_kv_list_entry "(not a symlink)" ""
+ else
+ write_kv_list_entry "(unset)" ""
+ fi
+}
+
+### list action ###
+
+describe_list() {
+ echo "List available chuck audio engines"
+}
+
+do_list() {
+ [[ -z "${@}" ]] || die -q "Too many parameters"
+
+ local i targets current
+ targets=( $(find_targets ) )
+ current=$(identify_target)
+ if [[ -n ${targets[@]} ]] ; then
+ for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do
+ [[ ${targets[${i}]} == ${current} ]] && \
+ targets[${i}]="${targets[${i}]} $(highlight '*' )"
+ done
+ write_list_start "Available chuck audio engines:"
+ write_numbered_list "${targets[@]}"
+ else
+ write_kv_list_entry "(none found)" ""
+ fi
+}
+
+### set action ###
+
+describe_set() {
+ echo "Set a new chuck audio engine"
+}
+
+describe_set_options() {
+ echo "target : Target audio engine or index from 'list' action"
+}
+
+describe_set_parameters() {
+ echo "<target>"
+}
+
+do_set() {
+ if [[ -z "${1}" ]] ; then
+ die -q "You didn't give me an audio engine"
+
+ elif [[ -n "${2}" ]] ; then
+ die -q "Too many parameters"
+
+ elif [[ -L "${ROOT}/usr/bin/chuck" ]] ; then
+ if ! remove_symlinks ; then
+ die -q "Can't remove existing audio engine symlink"
+ elif ! set_symlinks "${1}" ; then
+ die -q "Can't set new audio engine"
+ fi
+
+ elif [[ -e "${ROOT}/usr/bin/chuck" ]] ; then
+ die -q "${ROOT}/usr/bin/chuck seems to be from an old ebuild, please remove manually"
+
+ else
+ set_symlinks "${1}" || die -q "Can't set new audio engine"
+ fi
+}
+
+### update action ###
+
+describe_update() {
+ echo "Automatically update the chuck audio engine"
+}
+
+describe_update_options() {
+ echo "--if-unset : Do not override currently selected audio engine"
+}
+
+do_update() {
+ [[ -z "${1}" ]] || ( [[ -z "${2}" ]] && [[ "${1}" == "--if-unset" ]] ) || \
+ die -q "Usage error"
+
+ if [[ -L "${ROOT}/usr/bin/chuck" ]] ; then
+ [[ ${1} == "--if-unset" ]] && return
+ remove_symlinks || die -q "Can't remove existing symlink"
+ fi
+ if [[ -e "${ROOT}/usr/bin/chuck" ]] ; then
+ die -q "${ROOT}/usr/bin/chuck seems to be from an old ebuild, please remove manually"
+ elif ! [[ -z $(find_targets ) ]] ; then
+ set_symlinks 1 || die -q "Can't set a new audio engine"
+ fi
+}
+
+# vim: ts=4 sw=4 noet fdm=marker
diff --git a/media-sound/chuck/metadata.xml b/media-sound/chuck/metadata.xml
new file mode 100644
index 000000000000..aaa6999a44df
--- /dev/null
+++ b/media-sound/chuck/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>proaudio@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ ChucK is a programming language for real-time sound synthesis and music
+ creation. It is open-source and freely available on MacOS X, Windows, and
+ Linux. ChucK presents a unique time-based, concurrent programming model
+ that is precise and expressive (we call this strongly-timed), dynamic
+ control rates, and the ability to add and modify code on-the-fly. In
+ addition, ChucK supports MIDI, OpenSoundControl, HID device, and
+ multi-channel audio. It is fun and easy to learn, and offers composers,
+ researchers, and performers a powerful programming tool for building and
+ experimenting with complex audio synthesis/analysis programs, and real-time
+ interactive music.
+ </longdescription>
+</pkgmetadata>