[vlc-commits] contrib: add opus 0.9.14

Rafaël Carré git at videolan.org
Mon Aug 6 17:52:07 CEST 2012


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Mon Aug  6 17:50:44 2012 +0200| [3e954c9811e72ef7486be92723bb96f7e5b4af06] | committer: Rafaël Carré

contrib: add opus 0.9.14

disabled for now until we have a decoder

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3e954c9811e72ef7486be92723bb96f7e5b4af06
---

 ...og2-invocation-in-tests-reported-by-Rafa-.patch |   29 +++++++++++++++++
 ...-stack-protector-check-use-AC_LINK_IFELSE.patch |   25 +++++++++++++++
 contrib/src/opus/SHA512SUMS                        |    1 +
 contrib/src/opus/rules.mak                         |   33 ++++++++++++++++++++
 4 files changed, 88 insertions(+)

diff --git a/contrib/src/opus/0001-Avoid-C99-log2-invocation-in-tests-reported-by-Rafa-.patch b/contrib/src/opus/0001-Avoid-C99-log2-invocation-in-tests-reported-by-Rafa-.patch
new file mode 100644
index 0000000..2b35b4c
--- /dev/null
+++ b/contrib/src/opus/0001-Avoid-C99-log2-invocation-in-tests-reported-by-Rafa-.patch
@@ -0,0 +1,29 @@
+From f16543b65a7f91a38ca3fa1a4944599440608daf Mon Sep 17 00:00:00 2001
+From: Gregory Maxwell <greg at xiph.org>
+Date: Mon, 6 Aug 2012 11:45:58 -0400
+Subject: [PATCH] =?UTF-8?q?Avoid=20C99=20log2=20invocation=20in=20tests=20re?=
+ =?UTF-8?q?ported=20by=20Rafa=C3=ABl=20Carr=C3=A9=20on=20android.?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+---
+ celt/tests/test_unit_mathops.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/celt/tests/test_unit_mathops.c b/celt/tests/test_unit_mathops.c
+index 8119bc1..e33d3ae 100644
+--- a/celt/tests/test_unit_mathops.c
++++ b/celt/tests/test_unit_mathops.c
+@@ -209,7 +209,7 @@ void testilog2(void)
+    opus_val32 x;
+    for (x=1;x<=268435455;x+=127)
+    {
+-      opus_val32 error = abs(celt_ilog2(x)-(int)floor(log2(x)));
++      opus_val32 error = abs(celt_ilog2(x)-(int)floor(celt_log2(x)));
+       if (error!=0)
+       {
+          printf("celt_ilog2 failed: celt_ilog2(x)!=floor(log2(x)) (x = %d, error = %d)\n",x,error);
+-- 
+1.7.10.4
+
diff --git a/contrib/src/opus/0001-Make-stack-protector-check-use-AC_LINK_IFELSE.patch b/contrib/src/opus/0001-Make-stack-protector-check-use-AC_LINK_IFELSE.patch
new file mode 100644
index 0000000..ef3f4b7
--- /dev/null
+++ b/contrib/src/opus/0001-Make-stack-protector-check-use-AC_LINK_IFELSE.patch
@@ -0,0 +1,25 @@
+From c329045758ccd614284f0b7cca859bc046ba1ae3 Mon Sep 17 00:00:00 2001
+From: Gregory Maxwell <greg at xiph.org>
+Date: Sat, 7 Jul 2012 02:29:56 -0400
+Subject: [PATCH] Make stack-protector check use AC_LINK_IFELSE.
+
+---
+ configure.ac |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4a2499f..330cfde 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -224,7 +224,7 @@ if test "x$ac_cv_c_compiler_gnu" = "xyes" ; then
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fstack-protector-all"
+ AC_MSG_CHECKING([if ${CC} supports -fstack-protector-all])
+-AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])],
++AC_LINK_IFELSE([AC_LANG_SOURCE([void main(void){char foo;}])],
+       [ AC_MSG_RESULT([yes])
+         STACK_PROTECTOR="-fstack-protector-all" ],
+         AC_MSG_RESULT([no]))
+-- 
+1.7.10.4
+
diff --git a/contrib/src/opus/SHA512SUMS b/contrib/src/opus/SHA512SUMS
new file mode 100644
index 0000000..9ec912c
--- /dev/null
+++ b/contrib/src/opus/SHA512SUMS
@@ -0,0 +1 @@
+d5e038f068ee45bca823fa3e4ece072fac6b7070ba248a9af37832e1642449bad4a6233599439bf6c0271a20492508eca0e57f839ade161a0ff26ec966c22911  opus-0.9.14.tar.gz
diff --git a/contrib/src/opus/rules.mak b/contrib/src/opus/rules.mak
new file mode 100644
index 0000000..5c9d94b
--- /dev/null
+++ b/contrib/src/opus/rules.mak
@@ -0,0 +1,33 @@
+# opus
+
+OPUS_VERSION := 0.9.14
+
+OPUS_URL := http://downloads.xiph.org/releases/opus/opus-$(OPUS_VERSION).tar.gz
+
+#PKGS += opus
+ifeq ($(call need_pkg,"opus >= 0.9.14"),)
+PKGS_FOUND += opus
+endif
+
+$(TARBALLS)/opus-$(OPUS_VERSION).tar.gz:
+	$(call download,$(OPUS_URL))
+
+.sum-opus: opus-$(OPUS_VERSION).tar.gz
+
+opus: opus-$(OPUS_VERSION).tar.gz .sum-opus
+	$(UNPACK)
+	$(APPLY) $(SRC)/opus/0001-Make-stack-protector-check-use-AC_LINK_IFELSE.patch
+	$(APPLY) $(SRC)/opus/0001-Avoid-C99-log2-invocation-in-tests-reported-by-Rafa-.patch
+	$(UPDATE_AUTOCONFIG)
+	$(MOVE)
+
+OPUS_CONF=
+ifdef HAVE_FPU
+OPUS_CONF += --enable-fixed-point
+endif
+
+.opus: opus
+	$(RECONF)
+	cd $< && $(HOSTVARS) ./configure $(HOSTCONF) $(OPUS_CONF)
+	cd $< && $(MAKE) install
+	touch $@



More information about the vlc-commits mailing list