summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2009-07-03 19:27:06 +0000
committerAlexis Ballier <aballier@gentoo.org>2009-07-03 19:27:06 +0000
commit072cffcbddcdf956cf23e795435e108f3c59ec62 (patch)
treea7b2bbe8e497239b556a38a729f1c4c3c463c4c8 /media-libs/opencore-amr
parentRevision bump. Introduces the network-cron USE flag, like usbutils and pciut... (diff)
downloadgentoo-2-072cffcbddcdf956cf23e795435e108f3c59ec62.tar.gz
gentoo-2-072cffcbddcdf956cf23e795435e108f3c59ec62.tar.bz2
gentoo-2-072cffcbddcdf956cf23e795435e108f3c59ec62.zip
initial import, ebuild by me
(Portage version: 2.2_rc33/cvs/Linux x86_64)
Diffstat (limited to 'media-libs/opencore-amr')
-rw-r--r--media-libs/opencore-amr/ChangeLog11
-rw-r--r--media-libs/opencore-amr/files/opencore-amr-0.1.1-libdir.patch60
-rw-r--r--media-libs/opencore-amr/files/opencore-amr-0.1.1-pic.patch66
-rw-r--r--media-libs/opencore-amr/metadata.xml5
-rw-r--r--media-libs/opencore-amr/opencore-amr-0.1.1.ebuild35
5 files changed, 177 insertions, 0 deletions
diff --git a/media-libs/opencore-amr/ChangeLog b/media-libs/opencore-amr/ChangeLog
new file mode 100644
index 000000000000..fdc48688d34a
--- /dev/null
+++ b/media-libs/opencore-amr/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for media-libs/opencore-amr
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/opencore-amr/ChangeLog,v 1.1 2009/07/03 19:27:06 aballier Exp $
+
+*opencore-amr-0.1.1 (03 Jul 2009)
+
+ 03 Jul 2009; Alexis Ballier <aballier@gentoo.org>
+ +opencore-amr-0.1.1.ebuild, +files/opencore-amr-0.1.1-libdir.patch,
+ +files/opencore-amr-0.1.1-pic.patch, +metadata.xml:
+ initial import, ebuild by me
+
diff --git a/media-libs/opencore-amr/files/opencore-amr-0.1.1-libdir.patch b/media-libs/opencore-amr/files/opencore-amr-0.1.1-libdir.patch
new file mode 100644
index 000000000000..b832c875475a
--- /dev/null
+++ b/media-libs/opencore-amr/files/opencore-amr-0.1.1-libdir.patch
@@ -0,0 +1,60 @@
+Index: opencore-amr/amrnb/Makefile
+===================================================================
+--- opencore-amr.orig/amrnb/Makefile
++++ opencore-amr/amrnb/Makefile
+@@ -2,6 +2,7 @@
+ # a detached gsm_amr directory
+ OC_BASE = ../opencore
+ AMR_BASE = $(OC_BASE)/codecs_v2/audio/gsm_amr
++LIBDIR=lib
+
+ # To compile as C instead of C++, define BUILD_AS_C
+ ifneq (, $(BUILD_AS_C))
+@@ -77,12 +78,12 @@ libopencore-amrnb.a: $(OBJS)
+ ar rcs $@ $+
+
+ install: libopencore-amrnb.a $(SHLIB)
+- install -d $(DESTDIR)$(PREFIX)/lib
+- install -m 644 libopencore-amrnb.a $(DESTDIR)$(PREFIX)/lib
+- install $(SHLIB) $(DESTDIR)$(PREFIX)/lib
++ install -d $(DESTDIR)$(PREFIX)/$(LIBDIR)
++ install -m 644 libopencore-amrnb.a $(DESTDIR)$(PREFIX)/$(LIBDIR)
++ install $(SHLIB) $(DESTDIR)$(PREFIX)/$(LIBDIR)
+ ifneq ($(shell uname), Darwin)
+- ln -sf $(SHLIB) $(DESTDIR)$(PREFIX)/lib/$(SONAME)
+- ln -sf $(SONAME) $(DESTDIR)$(PREFIX)/lib/libopencore-amrnb.so
++ ln -sf $(SHLIB) $(DESTDIR)$(PREFIX)/$(LIBDIR)/$(SONAME)
++ ln -sf $(SONAME) $(DESTDIR)$(PREFIX)/$(LIBDIR)/libopencore-amrnb.so
+ endif
+ install -d $(DESTDIR)$(PREFIX)/include/opencore-amrnb
+ install -m 644 interf_dec.h $(DESTDIR)$(PREFIX)/include/opencore-amrnb
+Index: opencore-amr/amrwb/Makefile
+===================================================================
+--- opencore-amr.orig/amrwb/Makefile
++++ opencore-amr/amrwb/Makefile
+@@ -2,6 +2,7 @@
+ # a detached gsm_amr directory
+ OC_BASE = ../opencore
+ AMR_BASE = $(OC_BASE)/codecs_v2/audio/gsm_amr
++LIBDIR=lib
+
+ # To compile as C instead of C++, define BUILD_AS_C
+ ifneq (, $(BUILD_AS_C))
+@@ -63,12 +64,12 @@ libopencore-amrwb.a: $(OBJS)
+ ar rcs $@ $+
+
+ install: libopencore-amrwb.a $(SHLIB)
+- install -d $(DESTDIR)$(PREFIX)/lib
+- install -m 644 libopencore-amrwb.a $(DESTDIR)$(PREFIX)/lib
+- install $(SHLIB) $(DESTDIR)$(PREFIX)/lib
++ install -d $(DESTDIR)$(PREFIX)/$(LIBDIR)
++ install -m 644 libopencore-amrwb.a $(DESTDIR)$(PREFIX)/$(LIBDIR)
++ install $(SHLIB) $(DESTDIR)$(PREFIX)/$(LIBDIR)
+ ifneq ($(shell uname), Darwin)
+- ln -sf $(SHLIB) $(DESTDIR)$(PREFIX)/lib/$(SONAME)
+- ln -sf $(SONAME) $(DESTDIR)$(PREFIX)/lib/libopencore-amrwb.so
++ ln -sf $(SHLIB) $(DESTDIR)$(PREFIX)/$(LIBDIR)/$(SONAME)
++ ln -sf $(SONAME) $(DESTDIR)$(PREFIX)/$(LIBDIR)/libopencore-amrwb.so
+ endif
+ install -d $(DESTDIR)$(PREFIX)/include/opencore-amrwb
+ install -m 644 dec_if.h $(DESTDIR)$(PREFIX)/include/opencore-amrwb
diff --git a/media-libs/opencore-amr/files/opencore-amr-0.1.1-pic.patch b/media-libs/opencore-amr/files/opencore-amr-0.1.1-pic.patch
new file mode 100644
index 000000000000..1664ac4f49d7
--- /dev/null
+++ b/media-libs/opencore-amr/files/opencore-amr-0.1.1-pic.patch
@@ -0,0 +1,66 @@
+Index: opencore-amr/amrnb/Makefile
+===================================================================
+--- opencore-amr.orig/amrnb/Makefile
++++ opencore-amr/amrnb/Makefile
+@@ -41,6 +41,7 @@ COMMON_OBJS := $(COMMON_SRC:.cpp=.o)
+ COMMON_OBJS := $(patsubst %,$(COMMON_SRC_DIR)/%, $(COMMON_OBJS))
+
+ OBJS = wrapper.o $(DEC_OBJS) $(ENC_OBJS) $(COMMON_OBJS)
++SOBJS = $(OBJS:%.o=%.lo)
+
+ #Versioning
+ MAJOR = 0
+@@ -59,13 +60,19 @@ SHLIB = libopencore-amrnb.$(SHLIB_EXT)
+
+ all: libopencore-amrnb.a $(SHLIB)
+
+-$(SHLIB): $(OBJS)
++$(SHLIB): $(SOBJS)
+ ifeq ($(shell uname), Darwin)
+ $(CXX) $(SHLIB_FLAGS) -o $@ $+ $(LDFLAGS)
+ else
+ $(CXX) $(SHLIB_FLAGS) -o $@ $+ -Wl,-soname,$(SONAME) $(LDFLAGS)
+ endif
+
++%.lo: %.c
++ $(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -DPIC -c $< -o $@
++
++%.lo: %.cpp
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -DPIC -c $< -o $@
++
+ libopencore-amrnb.a: $(OBJS)
+ ar rcs $@ $+
+
+Index: opencore-amr/amrwb/Makefile
+===================================================================
+--- opencore-amr.orig/amrwb/Makefile
++++ opencore-amr/amrwb/Makefile
+@@ -27,6 +27,7 @@ DEC_OBJS := $(DEC_SRC:.cpp=.o)
+ DEC_OBJS := $(patsubst %,$(DEC_SRC_DIR)/%, $(DEC_OBJS))
+
+ OBJS = wrapper.o $(DEC_OBJS)
++SOBJS = $(OBJS:%.o=%.lo)
+
+ #Versioning
+ MAJOR = 0
+@@ -45,13 +46,19 @@ SHLIB = libopencore-amrwb.$(SHLIB_EXT)
+
+ all: libopencore-amrwb.a $(SHLIB)
+
+-$(SHLIB): $(OBJS)
++$(SHLIB): $(SOBJS)
+ ifeq ($(shell uname), Darwin)
+ $(CXX) $(SHLIB_FLAGS) -o $@ $+ $(LDFLAGS)
+ else
+ $(CXX) $(SHLIB_FLAGS) -o $@ $+ -Wl,-soname,$(SONAME) $(LDFLAGS)
+ endif
+
++%.lo: %.c
++ $(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -DPIC -c $< -o $@
++
++%.lo: %.cpp
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -fPIC -DPIC -c $< -o $@
++
+ libopencore-amrwb.a: $(OBJS)
+ ar rcs $@ $+
+
diff --git a/media-libs/opencore-amr/metadata.xml b/media-libs/opencore-amr/metadata.xml
new file mode 100644
index 000000000000..ae573a60407f
--- /dev/null
+++ b/media-libs/opencore-amr/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>
diff --git a/media-libs/opencore-amr/opencore-amr-0.1.1.ebuild b/media-libs/opencore-amr/opencore-amr-0.1.1.ebuild
new file mode 100644
index 000000000000..ee05dff9ec09
--- /dev/null
+++ b/media-libs/opencore-amr/opencore-amr-0.1.1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/opencore-amr/opencore-amr-0.1.1.ebuild,v 1.1 2009/07/03 19:27:06 aballier Exp $
+
+EAPI=2
+
+inherit toolchain-funcs eutils multilib
+
+DESCRIPTION="Implementation of Adaptive Multi Rate Narrowband and Wideband speech codec"
+HOMEPAGE="http://opencore-amr.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-pic.patch"
+ epatch "${FILESDIR}/${P}-libdir.patch"
+}
+
+src_compile() {
+ tc-export CC CXX
+ emake || die
+}
+
+src_install() {
+ emake PREFIX=/usr DESTDIR="${D}" LIBDIR="$(get_libdir)" install || die
+}