diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-sound/chuck/files | |
download | gentoo-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/files')
-rw-r--r-- | media-sound/chuck/files/chuck-1.2.1.1-hid-smc.patch | 149 | ||||
-rw-r--r-- | media-sound/chuck/files/chuck-1.2.1.2-gcc44.patch | 12 | ||||
-rw-r--r-- | media-sound/chuck/files/chuck-1.3.1.3-makefile.patch | 39 | ||||
-rw-r--r-- | media-sound/chuck/files/chuck-1.3.5.1-makefile.patch | 27 | ||||
-rw-r--r-- | media-sound/chuck/files/chuck.eselect-0.1 | 152 |
5 files changed, 379 insertions, 0 deletions
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 |