summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2013-10-07 13:18:14 +0200
committerSebastian Dröge <sebastian@centricular.com>2013-10-31 12:45:03 +0100
commitb87f546ded5758ea0a71e87fe78c10b223cfa0dc (patch)
tree1f379d02c1c4e9c600ab5556980b1aea5225aef3
parent81d68c88e9fab94a18286a14737a2dd2e3d8276d (diff)
libtheora: Switch to tarball
Also include a fix for examples using png_sizeof
-rw-r--r--recipes/libtheora.recipe8
-rw-r--r--recipes/libtheora/0001-Add-option-to-disable-doc.patch62
-rw-r--r--recipes/libtheora/0002-Update-makefiles.patch135
-rw-r--r--recipes/libtheora/0003-Fix-linking-of-theora-encoder-library.patch24
-rw-r--r--recipes/libtheora/0004-Use-our-automake-version-and-not-an-older-one.patch24
-rw-r--r--recipes/libtheora/0005-Update-Makefile.in-too-to-avoid-needing-to-call-auto.patch34
-rw-r--r--recipes/libtheora/0006-examples-Don-t-use-png_sizeof.patch28
7 files changed, 315 insertions, 0 deletions
diff --git a/recipes/libtheora.recipe b/recipes/libtheora.recipe
index e5dbd8bb..6f83e413 100644
--- a/recipes/libtheora.recipe
+++ b/recipes/libtheora.recipe
@@ -5,8 +5,16 @@ class Recipe(recipe.Recipe):
name = 'libtheora'
version = '1.1.1'
licenses = [License.BSD]
+ stype = SourceType.TARBALL
+ url = 'http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2'
deps = ['libogg', 'libvorbis']
allow_parallel_build = False
+ patches = ['libtheora/0001-Add-option-to-disable-doc.patch',
+ 'libtheora/0002-Update-makefiles.patch',
+ 'libtheora/0003-Fix-linking-of-theora-encoder-library.patch',
+ 'libtheora/0004-Use-our-automake-version-and-not-an-older-one.patch',
+ 'libtheora/0005-Update-Makefile.in-too-to-avoid-needing-to-call-auto.patch',
+ 'libtheora/0006-examples-Don-t-use-png_sizeof.patch']
files_libs = ['libtheora', 'libtheoradec', 'libtheoraenc']
files_bins = ['dvconnect', 'encodedv', 'dubdv']
diff --git a/recipes/libtheora/0001-Add-option-to-disable-doc.patch b/recipes/libtheora/0001-Add-option-to-disable-doc.patch
new file mode 100644
index 00000000..521fd02b
--- /dev/null
+++ b/recipes/libtheora/0001-Add-option-to-disable-doc.patch
@@ -0,0 +1,62 @@
+From 401ce869518455d2979dc785ae8431aa27937032 Mon Sep 17 00:00:00 2001
+From: Andoni Morales Alastruey <ylatuya@gmail.com>
+Date: Wed, 7 Mar 2012 12:48:54 +0100
+Subject: [PATCH 1/6] Add option to disable doc
+
+---
+ configure.ac | 18 +++++++++++++-----
+ doc/Makefile.am | 2 +-
+ 2 files changed, 14 insertions(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 8260bdf..f4918a4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -409,6 +409,19 @@ AC_ARG_ENABLE(examples,
+ [ ac_enable_examples=$enableval ], [ ac_enable_examples=yes] )
+ AM_CONDITIONAL(THEORA_ENABLE_EXAMPLES, [test "x${ac_enable_examples}" != xno])
+
++ac_enable_doc=yes
++AC_ARG_ENABLE(doc,
++ [ --disable-doc disable documentation ],
++ [ ac_enable_doc=$enableval ], [ ac_enable_doc=yes] )
++
++doc_build="no"
++if test $HAVE_DOXYGEN = "yes"; then
++if test $ac_build_doc = "yes"; then
++ doc_build="yes"
++fi
++fi
++AM_CONDITIONAL([BUILD_DOC], [test x$doc_build = xyes])
++
+ dnl --------------------------------------------------
+ dnl Check for headers
+ dnl --------------------------------------------------
+@@ -471,11 +484,6 @@ AS_AC_EXPAND(INCLUDEDIR, ${includedir})
+ AS_AC_EXPAND(BINDIR, ${bindir})
+ AS_AC_EXPAND(DOCDIR, ${datadir}/doc)
+
+-if test $HAVE_DOXYGEN = "false"; then
+- doc_build="no"
+-else
+- doc_build="yes"
+-fi
+ if test $BUILD_SPEC = "false"; then
+ spec_build="no"
+ else
+diff --git a/doc/Makefile.am b/doc/Makefile.am
+index 30eaad8..a81d63d 100644
+--- a/doc/Makefile.am
++++ b/doc/Makefile.am
+@@ -12,7 +12,7 @@ doc_DATA = $(static_docs) doxygen-build.stamp
+
+ EXTRA_DIST = $(static_docs) Doxyfile.in
+
+-if HAVE_DOXYGEN
++if BUILD_DOC
+ doxygen-build.stamp: Doxyfile $(top_srcdir)/include/theora/*.h
+ doxygen
+ touch doxygen-build.stamp
+--
+1.8.3.1
+
diff --git a/recipes/libtheora/0002-Update-makefiles.patch b/recipes/libtheora/0002-Update-makefiles.patch
new file mode 100644
index 00000000..b32c1461
--- /dev/null
+++ b/recipes/libtheora/0002-Update-makefiles.patch
@@ -0,0 +1,135 @@
+From 70c7fe8163b2d76d7f7e2d68d85b21c30ad45348 Mon Sep 17 00:00:00 2001
+From: Andoni Morales Alastruey <ylatuya@gmail.com>
+Date: Wed, 7 Mar 2012 13:04:25 +0100
+Subject: [PATCH 2/6] Update makefiles
+
+---
+ configure | 45 ++++++++++++++++++++++++++++++++++++++++-----
+ doc/Makefile.in | 13 +++++++------
+ 2 files changed, 47 insertions(+), 11 deletions(-)
+
+diff --git a/configure b/configure
+index 9703bcb..2864b4e 100755
+--- a/configure
++++ b/configure
+@@ -833,6 +833,9 @@ HAVE_PDFLATEX
+ HAVE_DOXYGEN_FALSE
+ HAVE_DOXYGEN_TRUE
+ HAVE_DOXYGEN
++BUILD_DOC_FALSE
++BUILD_DOC_TRUE
++BUILD_DOC
+ ACLOCAL_AMFLAGS
+ OTOOL64
+ OTOOL
+@@ -961,6 +964,7 @@ enable_libtool_lock
+ enable_spec
+ enable_valgrind_testing
+ enable_asm
++enable_doc
+ with_ogg
+ with_ogg_libraries
+ with_ogg_includes
+@@ -1636,6 +1640,7 @@ Optional Features:
+ optimize for fast installation [default=yes]
+ --disable-libtool-lock avoid locking (might break parallel builds)
+ --disable-spec do not build spec
++ --disable-doc do not build documentation
+ --enable-valgrind-testing enable running of tests inside Valgrind
+ --disable-asm disable assembly optimizations
+ --disable-oggtest Do not try to compile and run a test Ogg program
+@@ -11604,6 +11609,33 @@ if test $HAVE_DOXYGEN = "false"; then
+ $as_echo "$as_me: WARNING: *** doxygen not found, API documentation will not be built" >&2;}
+ fi
+
++ac_build_doc=yes
++# Check whether --enable-doc was given.
++if test "${enable_doc+set}" = set; then
++ enableval=$enable_doc;
++ if test "x$enableval" = "xno"; then
++ ac_build_doc=$enableval
++ fi
++else
++ ac_build_doc=yes
++fi
++
++doc_build="no"
++if test $HAVE_DOXYGEN = "yes"; then
++ if test $ac_build_doc = "yes"; then
++ doc_build="yes"
++ fi
++fi
++
++BUILD_DOC=$doc_build
++if test "x${doc_build}" != xno; then
++ BUILD_DOC_TRUE=
++ BUILD_DOC_FALSE='#'
++else
++ BUILD_DOC_TRUE='#'
++ BUILD_DOC_FALSE=
++fi
++
+ BUILD_SPEC="false"
+ ac_build_spec=yes
+ # Check whether --enable-spec was given.
+@@ -14059,6 +14091,13 @@ $as_echo "$as_me: error: conditional \"BUILD_SPEC\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
++if test -z "${BUILD_DOC_TRUE}" && test -z "${BUILD_DOC_FALSE}"; then
++ { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_DOC\" was never defined.
++Usually this means the macro was only invoked conditionally." >&5
++$as_echo "$as_me: error: conditional \"BUILD_DOC\" was never defined.
++Usually this means the macro was only invoked conditionally." >&2;}
++ { (exit 1); exit 1; }; }
++fi
+ if test -z "${CPU_x86_64_TRUE}" && test -z "${CPU_x86_64_FALSE}"; then
+ { { $as_echo "$as_me:$LINENO: error: conditional \"CPU_x86_64\" was never defined.
+ Usually this means the macro was only invoked conditionally." >&5
+@@ -16419,11 +16458,7 @@ fi
+ exec_prefix=$exec_prefix_save
+
+
+-if test $HAVE_DOXYGEN = "false"; then
+- doc_build="no"
+-else
+- doc_build="yes"
+-fi
++
+ if test $BUILD_SPEC = "false"; then
+ spec_build="no"
+ else
+diff --git a/doc/Makefile.in b/doc/Makefile.in
+index aae84ac..ec7f978 100644
+--- a/doc/Makefile.in
++++ b/doc/Makefile.in
+@@ -90,6 +90,7 @@ GETOPT_OBJS = @GETOPT_OBJS@
+ GREP = @GREP@
+ HAVE_BIBTEX = @HAVE_BIBTEX@
+ HAVE_DOXYGEN = @HAVE_DOXYGEN@
++BUILD_DOC = @BUILD_DOC@
+ HAVE_PDFLATEX = @HAVE_PDFLATEX@
+ HAVE_PKG_CONFIG = @HAVE_PKG_CONFIG@
+ HAVE_TRANSFIG = @HAVE_TRANSFIG@
+@@ -451,12 +452,12 @@ uninstall-info: uninstall-info-recursive
+ uninstall-info-recursive uninstall-local uninstall-recursive
+
+
+-@HAVE_DOXYGEN_TRUE@doxygen-build.stamp: Doxyfile $(top_srcdir)/include/theora/*.h
+-@HAVE_DOXYGEN_TRUE@ doxygen
+-@HAVE_DOXYGEN_TRUE@ touch doxygen-build.stamp
+-@HAVE_DOXYGEN_FALSE@doxygen-build.stamp:
+-@HAVE_DOXYGEN_FALSE@ echo "*** Warning: Doxygen not found; documentation will not be built."
+-@HAVE_DOXYGEN_FALSE@ touch doxygen-build.stamp
++@BUILD_DOC_TRUE@doxygen-build.stamp: Doxyfile $(top_srcdir)/include/theora/*.h
++@BUILD_DOC_TRUE@ doxygen
++@BUILD_DOC_TRUE@ touch doxygen-build.stamp
++@BUILD_DOC_FALSE@doxygen-build.stamp:
++@BUILD_DOC_FALSE@ echo "*** Warning: Doxygen not found; documentation will not be built."
++@BUILD_DOC_FALSE@ touch doxygen-build.stamp
+
+ dist-hook:
+ if test -d libtheora; then \
+--
+1.8.3.1
+
diff --git a/recipes/libtheora/0003-Fix-linking-of-theora-encoder-library.patch b/recipes/libtheora/0003-Fix-linking-of-theora-encoder-library.patch
new file mode 100644
index 00000000..2b9b6393
--- /dev/null
+++ b/recipes/libtheora/0003-Fix-linking-of-theora-encoder-library.patch
@@ -0,0 +1,24 @@
+From b76bd2eedc46aa9c1c2dfbefc473bccf69b8712f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian.droege@collabora.co.uk>
+Date: Wed, 22 Aug 2012 15:58:57 +0200
+Subject: [PATCH 3/6] Fix linking of theora encoder library
+
+---
+ lib/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index 89ce261..88c4990 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -78,6 +78,7 @@ encoder_uniq_sources = \
+ encoder_sources = \
+ apiwrapper.c \
+ fragment.c \
++ info.c \
+ idct.c \
+ internal.c \
+ state.c \
+--
+1.8.3.1
+
diff --git a/recipes/libtheora/0004-Use-our-automake-version-and-not-an-older-one.patch b/recipes/libtheora/0004-Use-our-automake-version-and-not-an-older-one.patch
new file mode 100644
index 00000000..02679b64
--- /dev/null
+++ b/recipes/libtheora/0004-Use-our-automake-version-and-not-an-older-one.patch
@@ -0,0 +1,24 @@
+From a5bcb0eaa7fc9ef4136dbee9eeed4a9814ea0c01 Mon Sep 17 00:00:00 2001
+From: Andoni Morales Alastruey <ylatuya@gmail.com>
+Date: Fri, 25 Jan 2013 16:35:36 +0100
+Subject: [PATCH 4/6] Use our automake version and not an older one
+
+---
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index d833491..d888e11 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,6 +1,6 @@
+ ## Process this file with automake to produce Makefile.in
+
+-AUTOMAKE_OPTIONS = foreign 1.6 dist-zip dist-bzip2
++AUTOMAKE_OPTIONS = foreign dist-zip dist-bzip2
+
+ if THEORA_ENABLE_EXAMPLES
+ EXAMPLES_DIR = examples
+--
+1.8.3.1
+
diff --git a/recipes/libtheora/0005-Update-Makefile.in-too-to-avoid-needing-to-call-auto.patch b/recipes/libtheora/0005-Update-Makefile.in-too-to-avoid-needing-to-call-auto.patch
new file mode 100644
index 00000000..9f3de633
--- /dev/null
+++ b/recipes/libtheora/0005-Update-Makefile.in-too-to-avoid-needing-to-call-auto.patch
@@ -0,0 +1,34 @@
+From 9deed3241d5c638cb36dd69df293e6cec9fd7415 Mon Sep 17 00:00:00 2001
+From: Andoni Morales Alastruey <ylatuya@gmail.com>
+Date: Wed, 20 Feb 2013 16:32:38 +0100
+Subject: [PATCH 5/6] Update Makefile.in too to avoid needing to call
+ autogen.sh
+
+---
+ lib/Makefile.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/lib/Makefile.in b/lib/Makefile.in
+index f26ccdc..434afcb 100644
+--- a/lib/Makefile.in
++++ b/lib/Makefile.in
+@@ -206,6 +206,7 @@ lib_LTLIBRARIES = libtheoradec.la libtheoraenc.la libtheora.la
+ @THEORA_DISABLE_ENCODE_FALSE@encoder_sources = \
+ @THEORA_DISABLE_ENCODE_FALSE@ apiwrapper.c \
+ @THEORA_DISABLE_ENCODE_FALSE@ fragment.c \
++@THEORA_DISABLE_ENCODE_FALSE@ info.c \
+ @THEORA_DISABLE_ENCODE_FALSE@ idct.c \
+ @THEORA_DISABLE_ENCODE_FALSE@ internal.c \
+ @THEORA_DISABLE_ENCODE_FALSE@ state.c \
+@@ -368,7 +369,7 @@ libtheoraenc_la_LIBADD =
+ @CPU_x86_64_TRUE@@THEORA_DISABLE_ENCODE_FALSE@ $(am__objects_8) \
+ @CPU_x86_64_TRUE@@THEORA_DISABLE_ENCODE_FALSE@ $(am__objects_9)
+ @THEORA_DISABLE_ENCODE_TRUE@am__objects_11 = $(am__objects_7)
+-@THEORA_DISABLE_ENCODE_FALSE@am__objects_11 = apiwrapper.lo fragment.lo \
++@THEORA_DISABLE_ENCODE_FALSE@am__objects_11 = apiwrapper.lo info.lo fragment.lo \
+ @THEORA_DISABLE_ENCODE_FALSE@ idct.lo internal.lo state.lo \
+ @THEORA_DISABLE_ENCODE_FALSE@ quant.lo $(am__objects_10) \
+ @THEORA_DISABLE_ENCODE_FALSE@ $(am__objects_7)
+--
+1.8.3.1
+
diff --git a/recipes/libtheora/0006-examples-Don-t-use-png_sizeof.patch b/recipes/libtheora/0006-examples-Don-t-use-png_sizeof.patch
new file mode 100644
index 00000000..072f2be2
--- /dev/null
+++ b/recipes/libtheora/0006-examples-Don-t-use-png_sizeof.patch
@@ -0,0 +1,28 @@
+From 51fe3dbf5429c4d7a37ce348b0947a60f1c36ee6 Mon Sep 17 00:00:00 2001
+From: Edward Hervey <bilboed@bilboed.com>
+Date: Mon, 7 Oct 2013 13:15:20 +0200
+Subject: [PATCH 6/6] examples: Don't use png_sizeof
+
+---
+ examples/png2theora.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/examples/png2theora.c b/examples/png2theora.c
+index 71a0d0f..ed24c2a 100644
+--- a/examples/png2theora.c
++++ b/examples/png2theora.c
+@@ -462,9 +462,9 @@ png_read(const char *pathname, unsigned int *w, unsigned int *h, unsigned char *
+ png_set_strip_alpha(png_ptr);
+
+ row_data = (png_bytep)png_malloc(png_ptr,
+- 3*height*width*png_sizeof(*row_data));
++ 3*height*width*sizeof(*row_data));
+ row_pointers = (png_bytep *)png_malloc(png_ptr,
+- height*png_sizeof(*row_pointers));
++ height*sizeof(*row_pointers));
+ for(y = 0; y < height; y++) {
+ row_pointers[y] = row_data + y*(3*width);
+ }
+--
+1.8.3.1
+