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/miniaudicle
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/miniaudicle')
-rw-r--r--media-sound/miniaudicle/Manifest1
-rw-r--r--media-sound/miniaudicle/files/miniaudicle-0.1.3.8-gcc44.patch159
-rw-r--r--media-sound/miniaudicle/files/miniaudicle-0.1.3.8-hid-smc.patch148
-rw-r--r--media-sound/miniaudicle/files/miniaudicle-0.1.3.8-void-to-int-cast.patch58
-rw-r--r--media-sound/miniaudicle/metadata.xml12
-rw-r--r--media-sound/miniaudicle/miniaudicle-0.1.3.8-r2.ebuild95
6 files changed, 473 insertions, 0 deletions
diff --git a/media-sound/miniaudicle/Manifest b/media-sound/miniaudicle/Manifest
new file mode 100644
index 000000000000..955f93152e70
--- /dev/null
+++ b/media-sound/miniaudicle/Manifest
@@ -0,0 +1 @@
+DIST miniAudicle-0.1.3.8.tgz 2253821 SHA256 adfbd244a7963e646c466f70111fee4ecf32eee500c4c9a33ca9b52387631cd6 SHA512 6d2b9596174f1f6aa2f246cf880b920f9855b93e57b437e355acc880cd2980b8aa21fa2ce870230c9e0ca7403bd43ce865f79b7fa188e8fea906aac24ce3e16d WHIRLPOOL ff3d7a3ad66fa31339e10637ae96b1c7fbe378cfbe07a2e1572a738c2d22298e88913c7a0a383d90d209817a53422a21100bfca72f18e0c2f53981d22ddd7d2a
diff --git a/media-sound/miniaudicle/files/miniaudicle-0.1.3.8-gcc44.patch b/media-sound/miniaudicle/files/miniaudicle-0.1.3.8-gcc44.patch
new file mode 100644
index 000000000000..7b1bc9c06d3e
--- /dev/null
+++ b/media-sound/miniaudicle/files/miniaudicle-0.1.3.8-gcc44.patch
@@ -0,0 +1,159 @@
+diff -ur miniAudicle-0.1.3.8-orig/chuck/src/chuck_vm.cpp miniAudicle-0.1.3.8/chuck/src/chuck_vm.cpp
+--- miniAudicle-0.1.3.8-orig/chuck/src/chuck_vm.cpp 2009-06-27 21:15:03.000000000 -0400
++++ miniAudicle-0.1.3.8/chuck/src/chuck_vm.cpp 2009-06-27 21:15:00.000000000 -0400
+@@ -47,6 +47,7 @@
+ #else
+ #include <unistd.h>
+ #include <pthread.h>
++ #include <algorithm>
+ #endif
+
+
+diff -ur miniAudicle-0.1.3.8-orig/chuck/src/rtaudio.cpp miniAudicle-0.1.3.8/chuck/src/rtaudio.cpp
+--- miniAudicle-0.1.3.8-orig/chuck/src/rtaudio.cpp 2009-06-27 21:15:03.000000000 -0400
++++ miniAudicle-0.1.3.8/chuck/src/rtaudio.cpp 2009-06-27 21:15:00.000000000 -0400
+@@ -50,6 +50,7 @@
+ #include "chuck_errmsg.h"
+ #include "digiio_rtaudio.h"
+ #include <stdio.h>
++#include <climits>
+ // old
+ // #include "RtAudio.h"
+ // #include <iostream>
+diff -ur miniAudicle-0.1.3.8-orig/chuck/src/ugen_stk.cpp miniAudicle-0.1.3.8/chuck/src/ugen_stk.cpp
+--- miniAudicle-0.1.3.8-orig/chuck/src/ugen_stk.cpp 2009-06-27 21:15:03.000000000 -0400
++++ miniAudicle-0.1.3.8/chuck/src/ugen_stk.cpp 2009-06-27 21:15:00.000000000 -0400
+@@ -41,6 +41,7 @@
+ #include <string.h>
+ #include <time.h>
+ #include <float.h>
++#include <climits>
+
+
+
+diff -ur miniAudicle-0.1.3.8-orig/chuck/src/ugen_xxx.cpp miniAudicle-0.1.3.8/chuck/src/ugen_xxx.cpp
+--- miniAudicle-0.1.3.8-orig/chuck/src/ugen_xxx.cpp 2009-06-27 21:11:20.000000000 -0400
++++ miniAudicle-0.1.3.8/chuck/src/ugen_xxx.cpp 2009-06-27 21:15:31.000000000 -0400
+@@ -2587,7 +2587,7 @@
+ // open it
+ SF_INFO info;
+ info.format = 0;
+- char * format = strrchr( filename, '.');
++ const char * format = strrchr( filename, '.');
+ if( format && strcmp( format, ".raw" ) == 0 )
+ {
+ fprintf( stderr, "[chuck](via SndBuf) %s :: type is '.raw'...\n assuming 16 bit signed mono (PCM)\n", filename );
+diff -ur miniAudicle-0.1.3.8-orig/chuck/src/util_hid.cpp miniAudicle-0.1.3.8/chuck/src/util_hid.cpp
+--- miniAudicle-0.1.3.8-orig/chuck/src/util_hid.cpp 2009-06-27 21:15:03.000000000 -0400
++++ miniAudicle-0.1.3.8/chuck/src/util_hid.cpp 2009-06-27 21:15:00.000000000 -0400
+@@ -37,6 +37,7 @@
+
+ #include <vector>
+ #include <map>
++#include <climits>
+
+ using namespace std;
+
+diff -ur miniAudicle-0.1.3.8-orig/chuck/src/util_opsc.cpp miniAudicle-0.1.3.8/chuck/src/util_opsc.cpp
+--- miniAudicle-0.1.3.8-orig/chuck/src/util_opsc.cpp 2009-06-27 21:15:03.000000000 -0400
++++ miniAudicle-0.1.3.8/chuck/src/util_opsc.cpp 2009-06-27 21:15:00.000000000 -0400
+@@ -56,6 +56,7 @@
+ #include <netinet/tcp.h>
+ #include <arpa/inet.h>
+ #include <netdb.h>
++#include <algorithm>
+ #endif
+
+ #if defined(__MACOSX_CORE__)
+diff -ur miniAudicle-0.1.3.8-orig/chuck/src/util_string.h miniAudicle-0.1.3.8/chuck/src/util_string.h
+--- miniAudicle-0.1.3.8-orig/chuck/src/util_string.h 2009-06-27 21:11:20.000000000 -0400
++++ miniAudicle-0.1.3.8/chuck/src/util_string.h 2009-06-27 21:16:12.000000000 -0400
+@@ -36,6 +36,7 @@
+ #include "chuck_def.h"
+ #include <string>
+ #include <vector>
++#include <cstdio>
+
+
+ // itoa
+diff -ur miniAudicle-0.1.3.8-orig/wxw/icons/add.xpm miniAudicle-0.1.3.8/wxw/icons/add.xpm
+--- miniAudicle-0.1.3.8-orig/wxw/icons/add.xpm 2009-06-27 21:15:03.000000000 -0400
++++ miniAudicle-0.1.3.8/wxw/icons/add.xpm 2009-06-27 21:15:00.000000000 -0400
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * add_xpm[] = {
++static const char * add_xpm[] = {
+ "32 32 47 1",
+ " c None",
+ ". c #C3F8BE",
+diff -ur miniAudicle-0.1.3.8-orig/wxw/icons/led-blue.xpm miniAudicle-0.1.3.8/wxw/icons/led-blue.xpm
+--- miniAudicle-0.1.3.8-orig/wxw/icons/led-blue.xpm 2009-06-27 21:15:03.000000000 -0400
++++ miniAudicle-0.1.3.8/wxw/icons/led-blue.xpm 2009-06-27 21:15:00.000000000 -0400
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * led_blue_xpm[] = {
++static const char * led_blue_xpm[] = {
+ "28 28 431 2",
+ " c None",
+ ". c #949394",
+diff -ur miniAudicle-0.1.3.8-orig/wxw/icons/led-green.xpm miniAudicle-0.1.3.8/wxw/icons/led-green.xpm
+--- miniAudicle-0.1.3.8-orig/wxw/icons/led-green.xpm 2009-06-27 21:15:03.000000000 -0400
++++ miniAudicle-0.1.3.8/wxw/icons/led-green.xpm 2009-06-27 21:15:00.000000000 -0400
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * led_green_xpm[] = {
++static const char * led_green_xpm[] = {
+ "28 28 443 2",
+ " c None",
+ ". c #959696",
+diff -ur miniAudicle-0.1.3.8-orig/wxw/icons/led-off.xpm miniAudicle-0.1.3.8/wxw/icons/led-off.xpm
+--- miniAudicle-0.1.3.8-orig/wxw/icons/led-off.xpm 2009-06-27 21:15:03.000000000 -0400
++++ miniAudicle-0.1.3.8/wxw/icons/led-off.xpm 2009-06-27 21:15:00.000000000 -0400
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * led_off_xpm[] = {
++static const char * led_off_xpm[] = {
+ "28 28 143 2",
+ " c None",
+ ". c #959595",
+diff -ur miniAudicle-0.1.3.8-orig/wxw/icons/led-red.xpm miniAudicle-0.1.3.8/wxw/icons/led-red.xpm
+--- miniAudicle-0.1.3.8-orig/wxw/icons/led-red.xpm 2009-06-27 21:15:03.000000000 -0400
++++ miniAudicle-0.1.3.8/wxw/icons/led-red.xpm 2009-06-27 21:15:00.000000000 -0400
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * led_red_xpm[] = {
++static const char * led_red_xpm[] = {
+ "28 28 434 2",
+ " c None",
+ ". c #959594",
+diff -ur miniAudicle-0.1.3.8-orig/wxw/icons/miniAudicle.xpm miniAudicle-0.1.3.8/wxw/icons/miniAudicle.xpm
+--- miniAudicle-0.1.3.8-orig/wxw/icons/miniAudicle.xpm 2009-06-27 21:15:03.000000000 -0400
++++ miniAudicle-0.1.3.8/wxw/icons/miniAudicle.xpm 2009-06-27 21:15:00.000000000 -0400
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * miniAudicle_xpm[] = {
++static const char * miniAudicle_xpm[] = {
+ "128 128 1543 2",
+ " c None",
+ ". c #FF9D20",
+diff -ur miniAudicle-0.1.3.8-orig/wxw/icons/remove.xpm miniAudicle-0.1.3.8/wxw/icons/remove.xpm
+--- miniAudicle-0.1.3.8-orig/wxw/icons/remove.xpm 2009-06-27 21:15:03.000000000 -0400
++++ miniAudicle-0.1.3.8/wxw/icons/remove.xpm 2009-06-27 21:15:00.000000000 -0400
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * remove_xpm[] = {
++static const char * remove_xpm[] = {
+ "32 32 177 2",
+ " c None",
+ ". c #FFB6B5",
+diff -ur miniAudicle-0.1.3.8-orig/wxw/icons/replace.xpm miniAudicle-0.1.3.8/wxw/icons/replace.xpm
+--- miniAudicle-0.1.3.8-orig/wxw/icons/replace.xpm 2009-06-27 21:15:03.000000000 -0400
++++ miniAudicle-0.1.3.8/wxw/icons/replace.xpm 2009-06-27 21:15:00.000000000 -0400
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * replace_xpm[] = {
++static const char * replace_xpm[] = {
+ "32 32 114 2",
+ " c None",
+ ". c #5764FF",
+
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/files/miniaudicle-0.1.3.8-void-to-int-cast.patch b/media-sound/miniaudicle/files/miniaudicle-0.1.3.8-void-to-int-cast.patch
new file mode 100644
index 000000000000..926788c6f20c
--- /dev/null
+++ b/media-sound/miniaudicle/files/miniaudicle-0.1.3.8-void-to-int-cast.patch
@@ -0,0 +1,58 @@
+Index: miniAudicle-0.1.3.8/wxw/mAPreferencesWindow.cpp
+===================================================================
+--- miniAudicle-0.1.3.8.orig/wxw/mAPreferencesWindow.cpp
++++ miniAudicle-0.1.3.8/wxw/mAPreferencesWindow.cpp
+@@ -828,7 +828,7 @@ void mAPreferencesWindow::LoadGUIToMiniA
+ selected_item = audio_output->GetSelection();
+ if( selected_item != wxNOT_FOUND )
+ {
+- int dac = ( int ) audio_output->GetClientData( selected_item );
++ int dac = ( intptr_t ) audio_output->GetClientData( selected_item );
+ config->Write( mAPreferencesAudioOutput, dac );
+ ma->set_dac( dac );
+ }
+@@ -837,7 +837,7 @@ void mAPreferencesWindow::LoadGUIToMiniA
+ selected_item = audio_input->GetSelection();
+ if( selected_item != wxNOT_FOUND )
+ {
+- int adc = ( int ) audio_input->GetClientData( selected_item );
++ int adc = ( intptr_t ) audio_input->GetClientData( selected_item );
+ config->Write( mAPreferencesAudioInput, adc );
+ ma->set_adc( adc );
+ }
+@@ -846,7 +846,7 @@ void mAPreferencesWindow::LoadGUIToMiniA
+ selected_item = output_channels->GetSelection();
+ if( selected_item != wxNOT_FOUND )
+ {
+- int num_outputs = ( int ) output_channels->GetClientData( selected_item );
++ int num_outputs = ( intptr_t ) output_channels->GetClientData( selected_item );
+ config->Write( mAPreferencesOutputChannels, num_outputs );
+ ma->set_num_outputs( num_outputs );
+ }
+@@ -855,7 +855,7 @@ void mAPreferencesWindow::LoadGUIToMiniA
+ selected_item = input_channels->GetSelection();
+ if( selected_item != wxNOT_FOUND )
+ {
+- int num_inputs = ( int ) input_channels->GetClientData( selected_item );
++ int num_inputs = ( intptr_t ) input_channels->GetClientData( selected_item );
+ config->Write( mAPreferencesInputChannels, num_inputs );
+ ma->set_num_inputs( num_inputs );
+ }
+@@ -864,7 +864,7 @@ void mAPreferencesWindow::LoadGUIToMiniA
+ selected_item = sample_rate->GetSelection();
+ if( selected_item != wxNOT_FOUND )
+ {
+- int _sample_rate = ( int ) sample_rate->GetClientData( selected_item );
++ int _sample_rate = ( intptr_t ) sample_rate->GetClientData( selected_item );
+ config->Write( mAPreferencesSampleRate, _sample_rate );
+ ma->set_sample_rate( _sample_rate );
+ }
+@@ -873,7 +873,7 @@ void mAPreferencesWindow::LoadGUIToMiniA
+ selected_item = buffer_size->GetSelection();
+ if( selected_item != wxNOT_FOUND )
+ {
+- int _buffer_size = ( int ) buffer_size->GetClientData( selected_item );
++ int _buffer_size = ( intptr_t ) buffer_size->GetClientData( selected_item );
+ config->Write( mAPreferencesBufferSize, _buffer_size );
+ ma->set_buffer_size( _buffer_size );
+ }
diff --git a/media-sound/miniaudicle/metadata.xml b/media-sound/miniaudicle/metadata.xml
new file mode 100644
index 000000000000..ac5c42297c90
--- /dev/null
+++ b/media-sound/miniaudicle/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </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-r2.ebuild b/media-sound/miniaudicle/miniaudicle-0.1.3.8-r2.ebuild
new file mode 100644
index 000000000000..fc561c4adb02
--- /dev/null
+++ b/media-sound/miniaudicle/miniaudicle-0.1.3.8-r2.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+WX_GTK_VER=2.8
+inherit eutils toolchain-funcs flag-o-matic wxwidgets
+
+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="amd64 x86"
+IUSE="+alsa jack oss"
+
+RDEPEND="jack? ( media-sound/jack-audio-connection-kit )
+ alsa? ( >=media-libs/alsa-lib-0.9 )
+ media-libs/libsndfile
+ >=x11-libs/gtk+-2.10:2
+ x11-libs/wxGTK:2.8[X]
+ app-eselect/eselect-miniaudicle"
+DEPEND="${RDEPEND}
+ sys-devel/bison
+ sys-devel/flex"
+
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="|| ( alsa jack oss )"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${P}-hid-smc.patch" \
+ "${FILESDIR}/${P}-gcc44.patch" \
+ "${FILESDIR}/${P}-void-to-int-cast.patch"
+
+ sed -i -e 's/make -C/#make -C/' \
+ -e 's/g++/$(CXX)/' \
+ -e 's/-O3 -c/-c $(CFLAGS)/' \
+ -e 's/$(LIBS)/$(LDFLAGS) $(LIBS)/' \
+ makefile.* || die "sed failed"
+
+ # Respect LDFLAGS in bundled media-sound/chuck
+ # prevent underlinking with pthreads library
+ sed -i -e 's/$(LIBS)/$(LDFLAGS) $(LIBS) -lpthread/' \
+ chuck/src/makefile.* || die "sed failed"
+
+ epatch_user
+}
+
+compile_backend() {
+ local backend="$1"
+ einfo "Compiling against ${backend}"
+ cd "${S}/chuck/src"
+ emake -f "makefile.${backend}" CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)"
+ cd "${S}"
+ emake -f "makefile.${backend}" CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)"
+ mv wxw/miniAudicle{,-${backend}}
+ emake -f "makefile.${backend}" clean
+ cd "${S}/chuck/src"
+ emake -f "makefile.${backend}" clean
+}
+
+src_compile() {
+ # 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
+
+ use jack && compile_backend jack
+ use alsa && compile_backend alsa
+ use oss && compile_backend oss
+}
+
+src_install() {
+ use jack && dobin wxw/miniAudicle-jack
+ use alsa && dobin wxw/miniAudicle-alsa
+ use oss && dobin wxw/miniAudicle-oss
+ dodoc BUGS README.linux VERSIONS
+}
+
+pkg_postinst() {
+ elog "miniAudicle now can use many audio engines, so you can specify audio engine"
+ elog "with miniAudicle-{jack,alsa,oss}"
+ elog "Or you can use 'eselect miniaudicle' to set the audio engine"
+
+ einfo "Calling eselect miniaudicle update..."
+ eselect miniaudicle update --if-unset
+}