summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Krier <cedk@gentoo.org>2008-03-29 23:21:04 +0000
committerCédric Krier <cedk@gentoo.org>2008-03-29 23:21:04 +0000
commit466730d084382b495d3699a1e635d0b9ed515a4a (patch)
treecc123d51902d6a9517ae9eb03bc4c610b8381842 /media-sound/miniaudicle
parentAdded freetype2 as dependency; bug #206414. (diff)
downloadgentoo-2-466730d084382b495d3699a1e635d0b9ed515a4a.tar.gz
gentoo-2-466730d084382b495d3699a1e635d0b9ed515a4a.tar.bz2
gentoo-2-466730d084382b495d3699a1e635d0b9ed515a4a.zip
New ebuild for bug #142175
(Portage version: 2.1.4.4)
Diffstat (limited to 'media-sound/miniaudicle')
-rw-r--r--media-sound/miniaudicle/ChangeLog11
-rw-r--r--media-sound/miniaudicle/Manifest5
-rw-r--r--media-sound/miniaudicle/files/miniaudicle-0.1.3.8-hid-smc.patch148
-rw-r--r--media-sound/miniaudicle/metadata.xml14
-rw-r--r--media-sound/miniaudicle/miniaudicle-0.1.3.8.ebuild74
5 files changed, 252 insertions, 0 deletions
diff --git a/media-sound/miniaudicle/ChangeLog b/media-sound/miniaudicle/ChangeLog
new file mode 100644
index 000000000000..0ea947ea9745
--- /dev/null
+++ b/media-sound/miniaudicle/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for media-sound/miniaudicle
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/miniaudicle/ChangeLog,v 1.1 2008/03/29 23:21:04 cedk Exp $
+
+*miniaudicle-0.1.3.8 (29 Mar 2008)
+
+ 29 Mar 2008; Cédric Krier <cedk@gentoo.org>
+ +files/miniaudicle-0.1.3.8-hid-smc.patch, +metadata.xml,
+ +miniaudicle-0.1.3.8.ebuild:
+ New ebuild for bug #142175
+
diff --git a/media-sound/miniaudicle/Manifest b/media-sound/miniaudicle/Manifest
new file mode 100644
index 000000000000..eff1dc742df1
--- /dev/null
+++ b/media-sound/miniaudicle/Manifest
@@ -0,0 +1,5 @@
+AUX miniaudicle-0.1.3.8-hid-smc.patch 3101 RMD160 f8b325dd7da234c3bb85d13f3acc69e1a1f274c9 SHA1 7f4aa83ed7e437e90774f408f0c6392b53094121 SHA256 20c137254828b1638c5ef1aecb25d5eaa674fb3c723d98a45c41843e38bb3d73
+DIST miniAudicle-0.1.3.8.tgz 2253821 RMD160 d332fffb4cddadf3f144ffc84f7fd62ec6bc82be SHA1 fbebccaf90fe11951fb104848444bcda292df5a1 SHA256 adfbd244a7963e646c466f70111fee4ecf32eee500c4c9a33ca9b52387631cd6
+EBUILD miniaudicle-0.1.3.8.ebuild 1826 RMD160 fb186d81a082f3ddf4066160cfedcbe70f421019 SHA1 79708eb22dd93eeb73874c187c95b18ff4625fe9 SHA256 2f80b6559399e2c63025e73562b083356caef34db45fdd95e02982e795b363da
+MISC ChangeLog 327 RMD160 a490c8db42c9d1e9baf80819d4c4d85f57299a43 SHA1 885c204be7a3056a84fc0360362c98d264fc63ef SHA256 2b9f03c97d91ec9e7d9a6f36848121e5d6d7686d37827a9fee2c7b2c5599b81f
+MISC metadata.xml 405 RMD160 33bef0e9877b6e20dcf8d558327eb775cace4084 SHA1 54acba4e626df4d51aed5cd2d855770cf45dff95 SHA256 bc3639b5d9f5b72f07a88b90aad07da64da85bb37bc3f7d9ab5d5a15a8d82fd4
diff --git a/media-sound/miniaudicle/files/miniaudicle-0.1.3.8-hid-smc.patch b/media-sound/miniaudicle/files/miniaudicle-0.1.3.8-hid-smc.patch
new file mode 100644
index 000000000000..de1265511a0b
--- /dev/null
+++ b/media-sound/miniaudicle/files/miniaudicle-0.1.3.8-hid-smc.patch
@@ -0,0 +1,148 @@
+diff -ru miniAudicle-0.1.3.8~/chuck-1.2.1.1/src/util_hid.cpp miniAudicle-0.1.3.8/chuck-1.2.1.1/src/util_hid.cpp
+--- miniAudicle-0.1.3.8~/chuck-1.2.1.1/src/util_hid.cpp 2008-03-29 23:46:07.000000000 +0100
++++ miniAudicle-0.1.3.8/chuck-1.2.1.1/src/util_hid.cpp 2008-03-29 23:46:36.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
diff --git a/media-sound/miniaudicle/metadata.xml b/media-sound/miniaudicle/metadata.xml
new file mode 100644
index 000000000000..4c34aa0bc9d4
--- /dev/null
+++ b/media-sound/miniaudicle/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>no-herd</herd>
+ <maintainer>
+ <email>cedk@gentoo.org</email>
+ <name>Cédric Krier</name>
+ </maintainer>
+ <longdescription lang="en">
+ a light-weight integrated development environment for the ChucK digital
+ audio programming language
+ </longdescription>
+</pkgmetadata>
+
diff --git a/media-sound/miniaudicle/miniaudicle-0.1.3.8.ebuild b/media-sound/miniaudicle/miniaudicle-0.1.3.8.ebuild
new file mode 100644
index 000000000000..cf69f6cc09e2
--- /dev/null
+++ b/media-sound/miniaudicle/miniaudicle-0.1.3.8.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/miniaudicle/miniaudicle-0.1.3.8.ebuild,v 1.1 2008/03/29 23:21:04 cedk Exp $
+
+inherit eutils toolchain-funcs flag-o-matic
+
+MY_P=${P/a/A}
+
+DESCRIPTION="integrated development + performance environment for chuck"
+HOMEPAGE="http://audicle.cs.princeton.edu/mini/"
+SRC_URI="http://audicle.cs.princeton.edu/mini/release/files/${MY_P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="oss jack alsa"
+
+RDEPEND="jack? ( media-sound/jack-audio-connection-kit )
+ alsa? ( >=media-libs/alsa-lib-0.9 )
+ media-libs/libsndfile
+ >=x11-libs/wxGTK-2.6"
+DEPEND="${RDEPEND}
+ sys-devel/bison
+ sys-devel/flex"
+
+S=${WORKDIR}/${MY_P}
+
+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/${P}-hid-smc.patch"
+}
+
+src_compile() {
+ local backend
+ if use jack; then
+ backend="jack"
+ elif use oss; then
+ backend="oss"
+ else
+ backend="alsa"
+ fi
+ einfo "Compiling against ${backend}"
+
+ # when compiled with -march=athlon or -march=athlon-xp
+ # miniaudicle 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
+
+ cd "${S}"/chuck/src
+ emake -f "makefile.${backend}" CC=$(tc-getCC) CXX=$(tc-getCXX) || die "emake failed"
+
+ cd "${S}"
+ emake -f "makefile.${backend}" CC=$(tc-getCC) CXX=$(tc-getCXX) || die "emake failed"
+}
+
+src_install() {
+ dobin wxw/miniAudicle
+ dodoc BUGS README.linux VERSIONS
+}