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
commitdf2f6a2e15e76c64da58a6f4fe2d597c926ab7cc (patch)
tree6d033207e32078c9cad0d677d6b004bb39b7f3d1 /media-sound
parentAdded freetype2 as dependency; bug #206414. (diff)
downloadhistorical-df2f6a2e15e76c64da58a6f4fe2d597c926ab7cc.tar.gz
historical-df2f6a2e15e76c64da58a6f4fe2d597c926ab7cc.tar.bz2
historical-df2f6a2e15e76c64da58a6f4fe2d597c926ab7cc.zip
New ebuild for bug #142175
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'media-sound')
-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..594b41082f6a
--- /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 1936 RMD160 2e35f6f28a8a51950ed33e99974f86ae597673f3 SHA1 bcab0c2bb2bbceb664caa03c530891a8086e40ca SHA256 df0a529020cf5f18b8e2a0a2a3b02542196d5b37aa040dad29a02aa10eaf0fbd
+MISC ChangeLog 420 RMD160 736949e14fa0114e382aa1a30ca3a481fb8b7ef7 SHA1 1f5f3b766c6e6e88d7ba9e54945a59318844bb9c SHA256 b78754bff3d55b639f757b2e373b37b0a0e87ae605086312cd910d038f61640f
+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
+}