summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <drac@gentoo.org>2007-07-24 15:03:49 +0000
committerSamuli Suominen <drac@gentoo.org>2007-07-24 15:03:49 +0000
commit3ff8f7b1e6ab75451992d41722a3af6d11d7e89e (patch)
tree8b96c3c9187a54b8c91d38b233fed0991474329a /media-sound/freebirth
parentNeed gnome-python; bug #184067 (diff)
downloadgentoo-2-3ff8f7b1e6ab75451992d41722a3af6d11d7e89e.tar.gz
gentoo-2-3ff8f7b1e6ab75451992d41722a3af6d11d7e89e.tar.bz2
gentoo-2-3ff8f7b1e6ab75451992d41722a3af6d11d7e89e.zip
Port to GTK+-2 and install menu entry.
(Portage version: 2.1.3_rc9)
Diffstat (limited to 'media-sound/freebirth')
-rw-r--r--media-sound/freebirth/ChangeLog8
-rw-r--r--media-sound/freebirth/files/digest-freebirth-0.3.2-r13
-rw-r--r--media-sound/freebirth/files/freebirth-0.3.2-gentoo-2.patch199
-rw-r--r--media-sound/freebirth/freebirth-0.3.2-r1.ebuild36
4 files changed, 245 insertions, 1 deletions
diff --git a/media-sound/freebirth/ChangeLog b/media-sound/freebirth/ChangeLog
index a663fdb51276..99c1e75703ac 100644
--- a/media-sound/freebirth/ChangeLog
+++ b/media-sound/freebirth/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-sound/freebirth
# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/freebirth/ChangeLog,v 1.10 2007/02/03 18:58:13 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/freebirth/ChangeLog,v 1.11 2007/07/24 15:03:49 drac Exp $
+
+*freebirth-0.3.2-r1 (24 Jul 2007)
+
+ 24 Jul 2007; Samuli Suominen <drac@gentoo.org>
+ +files/freebirth-0.3.2-gentoo-2.patch, +freebirth-0.3.2-r1.ebuild:
+ Port to GTK+-2 and install menu entry.
03 Feb 2007; Diego Pettenò <flameeyes@gentoo.org> ChangeLog:
Regenerate digest in Manifest2 format.
diff --git a/media-sound/freebirth/files/digest-freebirth-0.3.2-r1 b/media-sound/freebirth/files/digest-freebirth-0.3.2-r1
new file mode 100644
index 000000000000..61a444e06ca1
--- /dev/null
+++ b/media-sound/freebirth/files/digest-freebirth-0.3.2-r1
@@ -0,0 +1,3 @@
+MD5 672fc239f583a76b5519ac03a76d25d7 freebirth-0.3.2.tar.gz 2456900
+RMD160 45d86fe5f8a8ad18c71d6814e0b844e32d9d3f60 freebirth-0.3.2.tar.gz 2456900
+SHA256 8cdee757be747eae337826ec9ca9244798c36f75c82f10dfd2c09facfc623f96 freebirth-0.3.2.tar.gz 2456900
diff --git a/media-sound/freebirth/files/freebirth-0.3.2-gentoo-2.patch b/media-sound/freebirth/files/freebirth-0.3.2-gentoo-2.patch
new file mode 100644
index 000000000000..a164d297b2b2
--- /dev/null
+++ b/media-sound/freebirth/files/freebirth-0.3.2-gentoo-2.patch
@@ -0,0 +1,199 @@
+diff -ur freebirth-0.3.2.orig/freebirth.c freebirth-0.3.2/freebirth.c
+--- freebirth-0.3.2.orig/freebirth.c 2000-01-13 20:42:26.000000000 +0200
++++ freebirth-0.3.2/freebirth.c 2007-07-24 17:36:41.000000000 +0300
+@@ -248,15 +248,15 @@
+ //bass_e = env_new(1025,10000,(sample_producer *)osc_blender);
+ sl = g_slist_append(sl, bass_e);
+
+- kick = raw_wave_new("raw/kick.raw");
++ kick = raw_wave_new("/usr/share/freebirth/raw/kick.raw");
+ sl = g_slist_append(sl, kick);
+- snare = raw_wave_new("raw/snare.raw");
++ snare = raw_wave_new("/usr/share/freebirth/raw/snare.raw");
+ sl = g_slist_append(sl, snare);
+- cl_hat = raw_wave_new("raw/cl_hat.raw");
++ cl_hat = raw_wave_new("/usr/share/freebirth/raw/cl_hat.raw");
+ sl = g_slist_append(sl, cl_hat);
+- op_hat = raw_wave_new("raw/op_hat.raw");
++ op_hat = raw_wave_new("/usr/share/freebirth/raw/op_hat.raw");
+ sl = g_slist_append(sl, op_hat);
+- samp_1 = raw_wave_new("raw/samp_1.raw");
++ samp_1 = raw_wave_new("/usr/share/freebirth/raw/samp_1.raw");
+ sl = g_slist_append(sl, samp_1);
+
+ sources = (sample_producer**)
+@@ -1087,7 +1087,7 @@
+
+
+ /*effect window */
+- effect_window = gtk_window_new (GTK_WINDOW_DIALOG);
++ effect_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title(GTK_WINDOW (effect_window), "Effects");
+ gtk_widget_set_style(effect_window,window_style);
+ effect_box = gtk_vbox_new(FALSE,10);
+@@ -1109,7 +1109,7 @@
+
+
+ /* sample freq window */
+- sample_freq_window = gtk_window_new (GTK_WINDOW_DIALOG);
++ sample_freq_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title(GTK_WINDOW (sample_freq_window), "Sample Pitch");
+ sample_freq_box = gtk_vbox_new(TRUE,10);
+ gtk_widget_set_style(sample_freq_window,window_style);
+diff -ur freebirth-0.3.2.orig/fuse_loops.c freebirth-0.3.2/fuse_loops.c
+--- freebirth-0.3.2.orig/fuse_loops.c 1999-02-27 04:02:23.000000000 +0200
++++ freebirth-0.3.2/fuse_loops.c 2007-07-24 17:36:41.000000000 +0300
+@@ -122,7 +122,18 @@
+ fprintf(file, "/* generated file -- don't edit */\n");
+ fprintf(file, "#include <unistd.h>\n");
+ fprintf(file, "#include <math.h>\n");
++ fprintf(file, "#include <endian.h>\n");
+ fprintf(file, "#include \"freebirth.h\"\n");
++ fprintf(file, "/* borrowed from glib2 */\n");
++ fprintf(file, "#define SHORT_SWAP_LE_BE(val) ((short) ( \\\n");
++ fprintf(file, " (short) ((short) (val) >> 8) | \\\n");
++ fprintf(file, " (short) ((short) (val) << 8)))\n");
++ fprintf(file, "static void swap_endian(short *data, int length)\n");
++ fprintf(file, "{\n");
++ fprintf(file, " int i;\n");
++ fprintf(file, " for (i = 0; i < length; i += 1, data++)\n");
++ fprintf(file, " *data = SHORT_SWAP_LE_BE(*data);\n");
++ fprintf(file, "}\n");
+ fprintf(file, "\n");
+
+ fprintf(file, "sample_producer *sp[%d];\n", g_list_length(order));
+@@ -172,6 +183,9 @@
+ fprintf(file, " }\n");
+ fprintf(file, "\n");
+
++ fprintf(file, "#if __BYTE_ORDER == __BIG_ENDIAN\n");
++ fprintf(file, " swap_endian(buffer, 2 * TBASS_BUFF_SIZE);\n");
++ fprintf(file, "#endif\n");
+ fprintf(file, " write(fd, buffer, 2 * TBASS_BUFF_SIZE * sizeof(short));\n");
+ fprintf(file, "\n");
+
+diff -ur freebirth-0.3.2.orig/gtkdial.c freebirth-0.3.2/gtkdial.c
+--- freebirth-0.3.2.orig/gtkdial.c 1999-02-16 01:58:31.000000000 +0200
++++ freebirth-0.3.2/gtkdial.c 2007-07-24 17:36:41.000000000 +0300
+@@ -75,8 +75,6 @@
+ sizeof (GtkDialClass),
+ (GtkClassInitFunc) gtk_dial_class_init,
+ (GtkObjectInitFunc) gtk_dial_init,
+- (GtkArgSetFunc) NULL,
+- (GtkArgGetFunc) NULL,
+ };
+
+ dial_type = gtk_type_unique (gtk_widget_get_type (), &dial_info);
+diff -ur freebirth-0.3.2.orig/Makefile freebirth-0.3.2/Makefile
+--- freebirth-0.3.2.orig/Makefile 2000-01-13 01:37:14.000000000 +0200
++++ freebirth-0.3.2/Makefile 2007-07-24 17:36:41.000000000 +0300
+@@ -2,9 +2,9 @@
+ #
+
+ CC=gcc
+-LOADLIBES=-lm $(shell gtk-config --libs)
+-CFLAGS=-g -O6 -Wall $(shell gtk-config --cflags)
+-LDFLAGS=
++LOADLIBES=-lm -L/usr/lib -lgtk-x11-2.0
++CFLAGS=-g -Wall $(shell pkg-config --cflags gtk+-2.0)
++LDFLAGS=$(shell pkg-config --libs gtk+-2.0)
+
+ OFILES=\
+ oscillator.o sequencer.o envelope.o filter.o gtkdial.o mixer.o \
+diff -ur freebirth-0.3.2.orig/raw_wave.c freebirth-0.3.2/raw_wave.c
+--- freebirth-0.3.2.orig/raw_wave.c 2000-01-13 01:40:33.000000000 +0200
++++ freebirth-0.3.2/raw_wave.c 2007-07-24 17:36:41.000000000 +0300
+@@ -21,18 +21,36 @@
+ #include "raw_wave.h"
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <math.h>
++#include <endian.h>
++
++/* borrowed from glib2 */
++#define SHORT_SWAP_LE_BE(val) ((short) ( \
++ (short) ((short) (val) >> 8) | \
++ (short) ((short) (val) << 8)))
++static void swap_endian(short *data, int length)
++{
++ int i;
++ for (i = 0; i < length; i += 1, data++)
++ *data = SHORT_SWAP_LE_BE(*data);
++}
+
+ static char *get_full_path(char *fn)
+ {
+ char *full_fn;
+ char *fb_samples;
+
+- if (fn == NULL || fn[0] == '/') return fn;
+ fb_samples = getenv("FB_SAMPLES");
+ if (fb_samples == NULL) fb_samples = FB_SAMPLES;
+- sprintf(full_fn = (char *)malloc(strlen(fb_samples) + 1 + strlen(fn) + 1),
+- "%s/%s", fb_samples, fn);
++ full_fn = (char *)malloc(strlen(fb_samples) + 1 + strlen(fn) + 1);
++
++ if (fn == NULL || fn[0] == '/') { /* path is valid already */
++ sprintf(full_fn, "%s", fn);
++ } else {
++ sprintf(full_fn, "%s/%s", fb_samples, fn); /* add path */
++ }
++
+ return full_fn;
+ }
+
+@@ -76,10 +94,13 @@
+
+ }
+ this->length += count;
++#if __BYTE_ORDER == __BIG_ENDIAN
++ swap_endian(tmp, this->length);
++#endif
+ this->table = (sample *)malloc(sizeof(sample) * this->length);
+- for(i = 0; i < this->length;i++)
++ for(i = 0; i < this->length;i++) {
+ this->table[i] = (sample)tmp[i];
+-
++ }
+ fclose(in);
+ free(tmp);
+ }
+@@ -126,6 +147,7 @@
+
+ }
+ }
++
+ return this->buffer;
+ }
+
+@@ -145,7 +167,7 @@
+ void raw_wave_set_sample_file(raw_wave* this, char *filename)
+ {
+ FILE *in;
+- if (this->filename != 0) free(this->filename);
++ if (this->filename != NULL) free(this->filename);
+ this->filename = get_full_path(filename);
+ in = fopen(this->filename,"r");
+ if( in==NULL )
+@@ -243,7 +265,7 @@
+ /* set table to zero here check if it is zero in */
+ /* _fill_table */
+ out->table = 0;
+- out->filename = 0;
++ out->filename = NULL;
+ raw_wave_set_sample_file(out, filename);
+
+ out->buffer = (sample *)malloc(sizeof(sample) * TBASS_BUFF_SIZE);
+diff -ur freebirth-0.3.2.orig/raw_wave.h freebirth-0.3.2/raw_wave.h
+--- freebirth-0.3.2.orig/raw_wave.h 2000-01-13 20:44:05.000000000 +0200
++++ freebirth-0.3.2/raw_wave.h 2007-07-24 17:41:14.000000000 +0300
+@@ -62,7 +62,7 @@
+ event *event_pitch_change_new(int seq_handle, double pitch);
+
+ // #define FB_SAMPLES "/usr/local/lib/freebirth"
+-#define FB_SAMPLES "."
++#define FB_SAMPLES "/usr/lib/freebirth"
+
+ /*
+ Local Variables:
diff --git a/media-sound/freebirth/freebirth-0.3.2-r1.ebuild b/media-sound/freebirth/freebirth-0.3.2-r1.ebuild
new file mode 100644
index 000000000000..16d5c1e4aa77
--- /dev/null
+++ b/media-sound/freebirth/freebirth-0.3.2-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/freebirth/freebirth-0.3.2-r1.ebuild,v 1.1 2007/07/24 15:03:49 drac Exp $
+
+inherit eutils
+
+DESCRIPTION="Free software bass synthesizer step sequencer"
+HOMEPAGE="http://www.bitmechanic.com/projects/freebirth"
+SRC_URI="http://www.bitmechanic.com/projects/freebirth/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE=""
+
+RDEPEND=">=x11-libs/gtk+-2"
+DEPEND="${RDEPEND}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-gentoo-2.patch
+}
+
+src_compile() {
+ emake || die "emake failed."
+}
+
+src_install() {
+ dobin ${PN}
+ insinto /usr/lib/${PN}/raw
+ doins raw/*.raw
+ dodoc CHANGES NEXT_VERSION README
+ doicon xpm/${PN}.xpm
+ make_desktop_entry ${PN} ${PN} ${PN}.xpm
+}