From 42621152fa4fe37326c199558c5d1f89dfd42794 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Fri, 27 May 2011 09:53:08 +0000 Subject: main/ffmpeg: fix segfault due to symver beeing used problem was that configure script only checked if symver was supported by toolchain. Our toolchain supports it but uclibc's ld.so does not. So we check if ld.so has dlvsym() ref #664 --- main/ffmpeg/APKBUILD | 14 ++++++++++---- main/ffmpeg/configure-dlvsym.patch | 30 ++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 main/ffmpeg/configure-dlvsym.patch diff --git a/main/ffmpeg/APKBUILD b/main/ffmpeg/APKBUILD index 2315b24657..879919b55b 100644 --- a/main/ffmpeg/APKBUILD +++ b/main/ffmpeg/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa pkgname=ffmpeg pkgver=0.6.3 -pkgrel=1 +pkgrel=2 pkgdesc="Complete and free Internet live audio and video broadcasting solution for Linux/Unix" url="http://ffmpeg.org/" arch="all" @@ -12,12 +12,17 @@ makedepends="lame-dev libvorbis-dev faad2-dev faac-dev xvidcore-dev zlib-dev libvpx-dev sdl-dev" depends= source="http://ffmpeg.org/releases/ffmpeg-$pkgver.tar.bz2 - pic.patch" + pic.patch + configure-dlvsym.patch" _builddir="$srcdir"/$pkgname-$pkgver prepare() { cd "$_builddir" - patch -p1 -i "$srcdir"/pic.patch + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done } build() { @@ -57,4 +62,5 @@ package() { # strip --strip-debug "$pkgdir"/usr/lib/*.a || return 1 } md5sums="cdf4ad9b2a4d195b5ca874494bc7b0b0 ffmpeg-0.6.3.tar.bz2 -d4870ae7350caed041d2b39e406a173b pic.patch" +d4870ae7350caed041d2b39e406a173b pic.patch +2cdc11a99bf97c63c7cca27b073cb47c configure-dlvsym.patch" diff --git a/main/ffmpeg/configure-dlvsym.patch b/main/ffmpeg/configure-dlvsym.patch new file mode 100644 index 0000000000..b48a8e7883 --- /dev/null +++ b/main/ffmpeg/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 <