diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-10-10 12:33:30 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-10-10 12:38:10 +0000 |
commit | ecb9150a7ffce0a0658d2c7218c252df2d794ec4 (patch) | |
tree | 14d9f128f6ff9e68b442c6306f688676c4755072 /main/ffmpeg1 | |
parent | 3c2b28a3f1ff8568d0bcd163f8d2c9c192e7c3cb (diff) | |
download | aports-ecb9150a7ffce0a0658d2c7218c252df2d794ec4.tar.bz2 aports-ecb9150a7ffce0a0658d2c7218c252df2d794ec4.tar.xz |
main/ffmpeg1: ffmpeg-1 for compat reasons
xbmc does not build against ffmpeg-2.0
Diffstat (limited to 'main/ffmpeg1')
-rw-r--r-- | main/ffmpeg1/APKBUILD | 89 | ||||
-rw-r--r-- | main/ffmpeg1/configure-dlvsym.patch | 30 | ||||
-rw-r--r-- | main/ffmpeg1/fix-defines.patch | 10 | ||||
-rw-r--r-- | main/ffmpeg1/fix-libv4l2-errors.patch | 25 |
4 files changed, 154 insertions, 0 deletions
diff --git a/main/ffmpeg1/APKBUILD b/main/ffmpeg1/APKBUILD new file mode 100644 index 0000000000..27793f3efa --- /dev/null +++ b/main/ffmpeg1/APKBUILD @@ -0,0 +1,89 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=ffmpeg1 +pkgver=1.2.4 +pkgrel=0 +pkgdesc="Complete and free Internet live audio and video broadcasting solution for Linux/Unix" +url="http://ffmpeg.org/" +arch="all" +license="GPL" +subpackages="$pkgname-dev $pkgname-doc $pkgname-libs" +makedepends="lame-dev libvorbis-dev faac-dev xvidcore-dev zlib-dev + imlib2-dev x264-dev libtheora-dev coreutils bzip2-dev perl libvpx-dev + libvpx-dev sdl-dev libxfixes-dev libva-dev alsa-lib-dev rtmpdump-dev + v4l-utils-dev yasm" +depends= +source="http://ffmpeg.org/releases/ffmpeg-$pkgver.tar.bz2 + configure-dlvsym.patch + fix-defines.patch + fix-libv4l2-errors.patch" + +_builddir="$srcdir"/ffmpeg-$pkgver +prepare() { + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + local _dbg="--disable-debug" + local _asm="" + [ -n "$DEBUG" ] && _dbg="--enable-debug" + [ "$CARCH" = "x86" ] && _asm="--disable-asm" + cd "$_builddir" + ./configure \ + --prefix=/usr \ + --enable-gpl \ + --enable-libmp3lame \ + --enable-librtmp \ + --enable-libvorbis \ + --enable-libfaac \ + --enable-libvpx \ + --enable-libxvid \ + --enable-libx264 \ + --enable-libtheora \ + --enable-libv4l2 \ + --enable-nonfree \ + --enable-postproc \ + --enable-pic \ + --enable-pthreads \ + --enable-shared \ + --enable-x11grab \ + --disable-stripping \ + --disable-static \ + --enable-vaapi \ + $_asm $_dbg \ + || return 1 + make || return 1 + ${CC:-gcc} -o tools/qt-faststart $CFLAGS tools/qt-faststart.c || return 1 + make doc/ffmpeg.1 doc/ffplay.1 doc/ffserver.1 || return 1 +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir" install install-man || return 1 + install -D -m755 tools/qt-faststart "$pkgdir/usr/bin/qt-faststart" || return 1 +# strip --strip-debug "$pkgdir"/usr/lib/*.a || return 1 +} + +libs() { + pkgdesc="Libraries for ffmpeg" + replaces="ffmpeg" + mkdir -p "$subpkgdir"/usr + mv "$pkgdir"/usr/lib "$subpkgdir"/usr +} + +md5sums="f1cfdbaae308214beeb621746300de16 ffmpeg-1.2.4.tar.bz2 +2cdc11a99bf97c63c7cca27b073cb47c configure-dlvsym.patch +fad4fc1e886146a4a2befc8fda052d50 fix-defines.patch +2b6897f352583ee8efdc0c09ef27a30f fix-libv4l2-errors.patch" +sha256sums="3b96c8ce1b86575cd74f540e5b7a52681554289017d4b974e4efad2a09290ddf ffmpeg-1.2.4.tar.bz2 +0854db61ec784935d77516ba9a467ba61e118f951149c07acb6887a6b417ac55 configure-dlvsym.patch +4ccac0cf75fe53685c4cdda4061f7248de9a9b98e11f8e3aed8e1822b94d35d1 fix-defines.patch +872236e91e393b62a1a9d7aebdf0c417314f874a67cef55ad37b39ee57cf9edb fix-libv4l2-errors.patch" +sha512sums="9c3bf2b31cc0d0028cb83b9c4821073b7c11a0c24ca44f6353086e67c208c45840e71810d70309b655fb1e7b8bbe073f9ab7f336d8064c0e6130244a806a10b2 ffmpeg-1.2.4.tar.bz2 +635c80ca801577439bd1cf8470fb760755c243e59adc8b4d9b8412f24e2dc336802afddde09f3d59443e29d92123d0308482be8ad32ab0f265c960315632636f configure-dlvsym.patch +ea2630d4ae5383bc24a322318aa8c41af745145755333660deec4ed256096eca73a49c41a0921544dfaa53d8087378cb2b5654001332c7262ea39f18e5c472c8 fix-defines.patch +56bba30f200c748d47d60d2b18147522dbceec7e8c97f434d3dbfa239547113a3e9d3b280e22816adeafa994b22eefac4b968448afef1a07aa1c46d3ec359e68 fix-libv4l2-errors.patch" diff --git a/main/ffmpeg1/configure-dlvsym.patch b/main/ffmpeg1/configure-dlvsym.patch new file mode 100644 index 0000000000..b48a8e7883 --- /dev/null +++ b/main/ffmpeg1/configure-dlvsym.patch @@ -0,0 +1,30 @@ +diff --git a/configure b/configure +index c54706a..b5b3225 100755 +--- a/configure ++++ b/configure +@@ -1053,6 +1053,7 @@ HAVE_LIST=" + dev_video_bktr_ioctl_bt848_h + dlfcn_h + dlopen ++ dlvsym + dos_paths + ebp_available + ebx_available +@@ -3053,14 +3054,15 @@ check_ldflags -Wl,--warn-common + check_ldflags '-Wl,-rpath-link,\$(BUILD_ROOT)/libpostproc -Wl,-rpath-link,\$(BUILD_ROOT)/libswscale -Wl,-rpath-link,\$(BUILD_ROOT)/libavfilter -Wl,-rpath-link,\$(BUILD_ROOT)/libavdevice -Wl,-rpath-link,\$(BUILD_ROOT)/libavformat -Wl,-rpath-link,\$(BUILD_ROOT)/libavcodec -Wl,-rpath-link,\$(BUILD_ROOT)/libavutil' + test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic + ++check_func dlvsym -lld + echo "X{};" > $TMPV + if test_ldflags -Wl,--version-script,$TMPV; then + append SHFLAGS '-Wl,--version-script,\$(SUBDIR)lib\$(NAME).ver' +- check_cc <<EOF && enable symver_asm_label ++ enabled dlvsym && check_cc <<EOF && enable symver_asm_label + void ff_foo(void) __asm__ ("av_foo@VERSION"); + void ff_foo(void) { ${inline_asm+__asm__($quotes);} } + EOF +- check_cc <<EOF && enable symver_gnu_asm ++ enabled dlvsym && check_cc <<EOF && enable symver_gnu_asm + __asm__(".symver ff_foo,av_foo@VERSION"); + void ff_foo(void) {} + EOF diff --git a/main/ffmpeg1/fix-defines.patch b/main/ffmpeg1/fix-defines.patch new file mode 100644 index 0000000000..8479e8b8d3 --- /dev/null +++ b/main/ffmpeg1/fix-defines.patch @@ -0,0 +1,10 @@ +--- ffmpeg-1.2.2.orig/libavutil/error.c ++++ ffmpeg-1.2.2/libavutil/error.c +@@ -17,6 +17,7 @@ + */ + + #undef _GNU_SOURCE ++#define _XOPEN_SOURCE 600 + #include "avutil.h" + #include "avstring.h" + #include "common.h" diff --git a/main/ffmpeg1/fix-libv4l2-errors.patch b/main/ffmpeg1/fix-libv4l2-errors.patch new file mode 100644 index 0000000000..cd3ad43147 --- /dev/null +++ b/main/ffmpeg1/fix-libv4l2-errors.patch @@ -0,0 +1,25 @@ +commit bcd3eb3 +Author: Giorgio Vazzana <mywing81@gmail.com> +Date: Fri Mar 8 13:03:43 2013 +0100 + + lavd/v4l2: silence libv4l2 logging + + Signed-off-by: Michael Niedermayer <michaelni@gmx.at> + +diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c +index 0c1eb85..2d7773a 100644 +--- a/libavdevice/v4l2.c ++++ b/libavdevice/v4l2.c +@@ -884,6 +884,12 @@ static int v4l2_read_header(AVFormatContext *s1) + if (!st) + return AVERROR(ENOMEM); + ++#if CONFIG_LIBV4L2 ++ /* silence libv4l2 logging. if fopen() fails v4l2_log_file will be NULL ++ and errors will get sent to stderr */ ++ v4l2_log_file = fopen("/dev/null", "w"); ++#endif ++ + s->fd = device_open(s1); + if (s->fd < 0) + return s->fd; |