summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-sound/brutefir')
-rw-r--r--media-sound/brutefir/Manifest1
-rw-r--r--media-sound/brutefir/brutefir-1.0k-r1.ebuild47
-rw-r--r--media-sound/brutefir/files/brutefir-1.0k-ld.patch132
-rw-r--r--media-sound/brutefir/metadata.xml5
4 files changed, 185 insertions, 0 deletions
diff --git a/media-sound/brutefir/Manifest b/media-sound/brutefir/Manifest
new file mode 100644
index 000000000000..2843905b2440
--- /dev/null
+++ b/media-sound/brutefir/Manifest
@@ -0,0 +1 @@
+DIST brutefir-1.0k.tar.gz 246987 SHA256 e262ea30402e06a23c0396b46b38019f7e9bc66493feabb8792d43e16068e715
diff --git a/media-sound/brutefir/brutefir-1.0k-r1.ebuild b/media-sound/brutefir/brutefir-1.0k-r1.ebuild
new file mode 100644
index 000000000000..da9aba6ad9f1
--- /dev/null
+++ b/media-sound/brutefir/brutefir-1.0k-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="Software convolution engine for applying long FIR filters"
+HOMEPAGE="http://www.ludd.luth.se/~torger/brutefir.html"
+SRC_URI="http://www.ludd.luth.se/~torger/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+
+RDEPEND="media-libs/alsa-lib
+ media-sound/jack-audio-connection-kit
+ sci-libs/fftw:3.0"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-ld.patch
+}
+
+src_compile() {
+ tc-export AS CC
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake LIBDIR="/usr/$(get_libdir)" DESTDIR="${D}" \
+ install || die "emake install failed"
+ dodoc CHANGES README
+
+ insinto /usr/share/${PN}
+ doins xtc_config directpath.txt crosspath.txt massive_config \
+ bench1_config bench2_config bench3_config bench4_config \
+ bench5_config || die "doins failed"
+}
+
+pkg_postinst() {
+ elog "Brutefir is a complicated piece of software. Please"
+ elog "read the documentation first! You can find"
+ elog "documentation here: http://www.ludd.luth.se/~torger/brutefir.html"
+ elog "Example config files are in /usr/share/brutefir"
+}
diff --git a/media-sound/brutefir/files/brutefir-1.0k-ld.patch b/media-sound/brutefir/files/brutefir-1.0k-ld.patch
new file mode 100644
index 000000000000..6860b5f360b5
--- /dev/null
+++ b/media-sound/brutefir/files/brutefir-1.0k-ld.patch
@@ -0,0 +1,132 @@
+The problem is that it passes -fPIC to the linker, and it does not use gcc as
+frontend, it uses ld directly. The problem is that -f on ld that produces a
+DT_AUXILIARY rather than causing any PIC code production. Fix also DESTDIR
+handling and add LIBDIR variable for multilib systems.
+
+See, http://bugs.gentoo.org/252338
+
+diff -ur brutefir-1.0k.orig/Makefile brutefir-1.0k/Makefile
+--- brutefir-1.0k.orig/Makefile 2009-03-31 22:36:20.000000000 +0300
++++ brutefir-1.0k/Makefile 2009-06-21 05:44:03.000000000 +0300
+@@ -1,11 +1,13 @@
+ ###################################
+ # Where to install
+-INSTALL_PREFIX = $(DESTDIR)/usr/local
++# PREFIX = /usr/local
++PREFIX = /usr
++LIBDIR = $(PREFIX)/lib
+
+ ###################################
+ # Where to find libraries, and their header files.
+-LIBPATHS = -L/usr/local/lib
+-INCLUDE = -I/usr/local/include
++# LIBPATHS = -L/usr/local/lib
++# INCLUDE = -I/usr/local/include
+ ifdef FFTW_PATH
+ LIBPATHS += -L$(FFTW_PATH)/lib
+ INCLUDE += -I$(FFTW_PATH)/include
+@@ -17,19 +19,15 @@
+
+ ###################################
+ # Binaries
+-FLEX = flex
+-LD = ld
+-CC = gcc
+-AS = as
++FLEX ?= flex
++CC ?= gcc
++AS ?= as
+
+ ###################################
+ # Flags
+-CC_WARN = -Wall -Wlong-long -Wpointer-arith -Wshadow \
++CFLAGS += -Wall -Wlong-long -Wpointer-arith -Wshadow \
+ -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes \
+ -Wmissing-prototypes -Wmissing-declarations -Wnested-externs
+-CC_FLAGS = $(DEFINE) -O2
+-CC_FPIC = -fPIC
+-LD_SHARED = -shared
+
+ ###################################
+ # Objects and libs for targets
+@@ -74,7 +72,7 @@
+ BRUTEFIR_OBJS += $(BRUTEFIR_IA32_OBJS)
+ endif
+ BRUTEFIR_LIBS += -ldl
+-LDMULTIPLEDEFS = -Xlinker --allow-multiple-definition
++LINKFLAGS = -fPIC -shared -Xlinker --allow-multiple-definition
+ # assume that we have alsa, osss and jack
+ LIB_TARGETS += alsa.bfio
+ LIB_TARGETS += oss.bfio
+@@ -83,11 +81,11 @@
+
+ # Solaris
+ ifeq ($(UNAME),SunOS)
+-CC_WARN = -Wall -Wlong-long -Wpointer-arith -Wshadow \
++CFLAGS += -Wall -Wlong-long -Wpointer-arith -Wshadow \
+ -Wcast-qual -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations \
+ -Wnested-externs
+ ifeq ($(UNAME_P),sparc)
+-CC_FLAGS += -Wa,-xarch=v8plus
++CFLAGS += -Wa,-xarch=v8plus
+ endif
+ BRUTEFIR_LIBS += -lrt -ldl
+ endif
+@@ -112,43 +110,44 @@
+ $(AS) -o $@ $<
+
+ %.fpic.o: %.c
+- $(CC) -o $@ -c $(INCLUDE) $(CC_FPIC) $(CC_WARN) $(CC_FLAGS) $<
++ $(CC) -fPIC -shared -o $@ -c $(INCLUDE) $(CFLAGS) $<
+
+ %.o: %.c
+- $(CC) -o $@ -c $(INCLUDE) $(CC_WARN) $(CC_FLAGS) $<
++ $(CC) -o $@ -c $(INCLUDE) $(CFLAGS) $<
+
+ # special rule to avoid to get warnings from code generated by flex
+ bfconf_lexical.o: bfconf_lexical.c
+- $(CC) -o $@ -c $(INCLUDE) $(CC_FLAGS) $<
++ $(CC) -o $@ -c $(INCLUDE) $(CFLAGS) $<
+
+ %.c: %.lex
+ $(FLEX) -o$@ $<
+
+ brutefir: $(BRUTEFIR_OBJS)
+- $(CC) $(LIBPATHS) $(LDMULTIPLEDEFS) -o $@ $(BRUTEFIR_OBJS) $(BRUTEFIR_LIBS)
++ $(CC) $(LDFLAGS) $(LDMULTIPLEDEFS) $(CFLAGS) $(LIBPATHS) -o $@ $(BRUTEFIR_OBJS) $(BRUTEFIR_LIBS)
+
+ alsa.bfio: $(BFIO_ALSA_OBJS)
+- $(LD) $(LD_SHARED) $(CC_FPIC) $(LIBPATHS) -o $@ $(BFIO_ALSA_OBJS) $(BFIO_ALSA_LIBS) -lc
++ $(CC) $(LINKFLAGS) $(LDFLAGS) $(CFLAGS) $(LIBPATHS) -o $@ $(BFIO_ALSA_OBJS) $(BFIO_ALSA_LIBS) -lc
+
+ oss.bfio: $(BFIO_OSS_OBJS)
+- $(LD) $(LD_SHARED) $(CC_FPIC) $(LIBPATHS) -o $@ $(BFIO_OSS_OBJS) -lc
++ $(CC) $(LINKFLAGS) $(LDFLAGS) $(CFLAGS) $(LIBPATHS) -o $@ $(BFIO_OSS_OBJS) -lc
+
+ jack.bfio: $(BFIO_JACK_OBJS)
+- $(LD) $(LD_SHARED) $(CC_FPIC) $(LIBPATHS) -o $@ $(BFIO_JACK_OBJS) $(BFIO_JACK_LIBS) -lc
++ $(CC) $(LINKFLAGS) $(LDFLAGS) $(CFLAGS) $(LIBPATHS) -o $@ $(BFIO_JACK_OBJS) $(BFIO_JACK_LIBS) -lc
+
+ file.bfio: $(BFIO_FILE_OBJS)
+- $(LD) $(LD_SHARED) $(CC_FPIC) $(LIBPATHS) -o $@ $(BFIO_FILE_OBJS) -lc
++ $(CC) $(LINKFLAGS) $(LDFLAGS) $(CFLAGS) $(LIBPATHS) -o $@ $(BFIO_FILE_OBJS) -lc
+
+ cli.bflogic: $(BFLOGIC_CLI_OBJS)
+- $(LD) $(LD_SHARED) $(CC_FPIC) $(LIBPATHS) -o $@ $(BFLOGIC_CLI_OBJS) -lc
++ $(CC) $(LINKFLAGS) $(LDFLAGS) $(CFLAGS) $(LIBPATHS) -o $@ $(BFLOGIC_CLI_OBJS) -lc
+
+ eq.bflogic: $(BFLOGIC_EQ_OBJS)
+- $(LD) $(LD_SHARED) $(CC_FPIC) $(LIBPATHS) -o $@ $(BFLOGIC_EQ_OBJS) -lc
++ $(CC) $(LINKFLAGS) $(LDFLAGS) $(CFLAGS) $(LIBPATHS) -o $@ $(BFLOGIC_EQ_OBJS) -lc
+
+ install: $(BIN_TARGETS) $(LIB_TARGETS)
+- install -d $(INSTALL_PREFIX)/bin $(INSTALL_PREFIX)/lib/brutefir
+- install $(BIN_TARGETS) $(INSTALL_PREFIX)/bin
+- install $(LIB_TARGETS) $(INSTALL_PREFIX)/lib/brutefir
++ install -d $(DESTDIR)$(PREFIX)/bin
++ install $(BIN_TARGETS) $(DESTDIR)$(PREFIX)/bin
++ install -d $(DESTDIR)$(LIBDIR)/brutefir
++ install $(LIB_TARGETS) $(DESTDIR)$(LIBDIR)/brutefir
+
+ clean:
+ rm -f *.core core bfconf_lexical.c $(BRUTEFIR_OBJS) $(BFIO_FILE_OBJS) \
diff --git a/media-sound/brutefir/metadata.xml b/media-sound/brutefir/metadata.xml
new file mode 100644
index 000000000000..e1774e3d9ad7
--- /dev/null
+++ b/media-sound/brutefir/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sound</herd>
+</pkgmetadata>