Tue Nov 29 17:58:17 2011 UTC ()
Unbreak ffmpeg on NetBSD/macppc... again -- and a big fat comment warning
about this next to the relevant piece of code.  Looking at the CVS logs,
it's the 3rd time I fix this.  This, in turn, fixes the build of libdlna.

To fix the package, use the "proper" syntax to enable PIC within the
configure script, instead of applying what seems to be a hack. As before,
i386 is left PIC-less or otherwise ffmpeg breaks.

Tested on macppc and amd64.


(jmmv)
diff -r1.78 -r1.79 pkgsrc/multimedia/ffmpeg/Makefile
diff -r1.49 -r1.50 pkgsrc/multimedia/ffmpeg/distinfo
diff -r1.14 -r1.15 pkgsrc/multimedia/ffmpeg/patches/patch-configure

cvs diff -r1.78 -r1.79 pkgsrc/multimedia/ffmpeg/Attic/Makefile (expand / switch to unified diff)

--- pkgsrc/multimedia/ffmpeg/Attic/Makefile 2011/11/28 11:00:28 1.78
+++ pkgsrc/multimedia/ffmpeg/Attic/Makefile 2011/11/29 17:58:17 1.79
@@ -1,17 +1,18 @@ @@ -1,17 +1,18 @@
1# $NetBSD: Makefile,v 1.78 2011/11/28 11:00:28 drochner Exp $ 1# $NetBSD: Makefile,v 1.79 2011/11/29 17:58:17 jmmv Exp $
2 2
3# XXX This is release 0.7.8 but we had date-based pkgnames before. 3# XXX This is release 0.7.8 but we had date-based pkgnames before.
4PKGNAME= ffmpeg-20111121.${DISTVERSION} 4PKGNAME= ffmpeg-20111121.${DISTVERSION}
 5PKGREVISION= 1
5 6
6MAINTAINER= pkgsrc-users@NetBSD.org 7MAINTAINER= pkgsrc-users@NetBSD.org
7HOMEPAGE= http://ffmpeg.mplayerhq.hu/ 8HOMEPAGE= http://ffmpeg.mplayerhq.hu/
8COMMENT= Decoding, encoding and streaming software 9COMMENT= Decoding, encoding and streaming software
9 10
10PKG_DESTDIR_SUPPORT= user-destdir 11PKG_DESTDIR_SUPPORT= user-destdir
11 12
12CONFIGURE_ARGS+= --enable-avfilter 13CONFIGURE_ARGS+= --enable-avfilter
13#CONFIGURE_ARGS+= --enable-avfilter-lavf 14#CONFIGURE_ARGS+= --enable-avfilter-lavf
14CONFIGURE_ARGS+= --enable-postproc 15CONFIGURE_ARGS+= --enable-postproc
15CONFIGURE_ARGS+= --enable-libvorbis 16CONFIGURE_ARGS+= --enable-libvorbis
16CONFIGURE_ARGS+= --enable-libmp3lame 17CONFIGURE_ARGS+= --enable-libmp3lame
17CONFIGURE_ARGS+= --enable-libx264 18CONFIGURE_ARGS+= --enable-libx264

cvs diff -r1.49 -r1.50 pkgsrc/multimedia/ffmpeg/Attic/distinfo (expand / switch to unified diff)

--- pkgsrc/multimedia/ffmpeg/Attic/distinfo 2011/11/28 11:00:28 1.49
+++ pkgsrc/multimedia/ffmpeg/Attic/distinfo 2011/11/29 17:58:17 1.50
@@ -1,10 +1,10 @@ @@ -1,10 +1,10 @@
1$NetBSD: distinfo,v 1.49 2011/11/28 11:00:28 drochner Exp $ 1$NetBSD: distinfo,v 1.50 2011/11/29 17:58:17 jmmv Exp $
2 2
3SHA1 (ffmpeg-0.7.8.tar.bz2) = df4983c028a61d4bf3baceab3bae535b91b8928a 3SHA1 (ffmpeg-0.7.8.tar.bz2) = df4983c028a61d4bf3baceab3bae535b91b8928a
4RMD160 (ffmpeg-0.7.8.tar.bz2) = 8f69a6bc5caaba4e3d440c2d5dc96a946454a52c 4RMD160 (ffmpeg-0.7.8.tar.bz2) = 8f69a6bc5caaba4e3d440c2d5dc96a946454a52c
5Size (ffmpeg-0.7.8.tar.bz2) = 4530406 bytes 5Size (ffmpeg-0.7.8.tar.bz2) = 4530406 bytes
6SHA1 (patch-aa) = c9540d0ca0a671e9faa8b5b7847c103b515ac382 6SHA1 (patch-aa) = c9540d0ca0a671e9faa8b5b7847c103b515ac382
7SHA1 (patch-ac) = 4eba6e68d3fab082a957fa08f5618561f3b4aecb 7SHA1 (patch-ac) = 4eba6e68d3fab082a957fa08f5618561f3b4aecb
8SHA1 (patch-ad) = d3e06c855ab1a5ff3ddb0bee108ea88166c32cb6 8SHA1 (patch-ad) = d3e06c855ab1a5ff3ddb0bee108ea88166c32cb6
9SHA1 (patch-ap) = 85b5f775c1b66b682585bd56a304dee19e45765f 9SHA1 (patch-ap) = 85b5f775c1b66b682585bd56a304dee19e45765f
10SHA1 (patch-configure) = 355743ab745fb4c47ff6c5ca403573660ec7ecb6 10SHA1 (patch-configure) = 242f16e06a30b8e55193ee647ab78e9fb2645231

cvs diff -r1.14 -r1.15 pkgsrc/multimedia/ffmpeg/patches/Attic/patch-configure (expand / switch to unified diff)

--- pkgsrc/multimedia/ffmpeg/patches/Attic/patch-configure 2011/11/07 10:43:35 1.14
+++ pkgsrc/multimedia/ffmpeg/patches/Attic/patch-configure 2011/11/29 17:58:17 1.15
@@ -1,57 +1,58 @@ @@ -1,57 +1,58 @@
1$NetBSD: patch-configure,v 1.14 2011/11/07 10:43:35 drochner Exp $ 1$NetBSD: patch-configure,v 1.15 2011/11/29 17:58:17 jmmv Exp $
2 2
3--- configure.orig 2011-11-04 21:30:00.000000000 +0000 3--- configure.orig 2011-11-21 19:49:30.000000000 +0000
4+++ configure 4+++ configure
5@@ -2412,6 +2412,10 @@ case $target_os in 5@@ -2412,6 +2412,11 @@ case $target_os in
6 ;; 6 ;;
7 netbsd) 7 netbsd)
8 disable symver 8 disable symver
9+ if test "${subarch}" != "x86_32"; then 9+ # NetBSD/macppc *really* needs PIC enabled. ffmpeg has repeatedly
10+ LIBOBJFLAGS='$(PIC)' 10+ # broken time and time again because PIC support has been removed
11+ SHFLAGS='-shared' 11+ # from architectures that need it. So, if you touch this, please
12+ fi 12+ # be careful and make sure that your changes work.
 13+ test "${subarch}" != "x86_32" && enable pic
13 oss_indev_extralibs="-lossaudio" 14 oss_indev_extralibs="-lossaudio"
14 oss_outdev_extralibs="-lossaudio" 15 oss_outdev_extralibs="-lossaudio"
15 ;; 16 ;;
16@@ -2637,10 +2641,13 @@ check_cc <<EOF && enable attribute_may_a 17@@ -2637,10 +2642,13 @@ check_cc <<EOF && enable attribute_may_a
17 union { int x; } __attribute__((may_alias)) x; 18 union { int x; } __attribute__((may_alias)) x;
18 EOF 19 EOF
19  20
20-check_cc <<EOF || die "endian test failed" 21-check_cc <<EOF || die "endian test failed"
21-unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E'; 22-unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
22+check_exec <<EOF || enable bigendian 23+check_exec <<EOF || enable bigendian
23+int main() 24+int main()
24+{ 25+{
25+ long one = 1; 26+ long one = 1;
26+ return !(*((char *)(&one))); 27+ return !(*((char *)(&one)));
27+} 28+}
28 EOF 29 EOF
29-od -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian 30-od -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
30  31
31 if enabled alpha; then 32 if enabled alpha; then
32  33
33@@ -2974,7 +2981,7 @@ else 34@@ -2974,7 +2982,7 @@ else
34 fi 35 fi
35 enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs 36 enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs
36  37
37-texi2html -version > /dev/null 2>&1 && enable texi2html || disable texi2html 38-texi2html -version > /dev/null 2>&1 && enable texi2html || disable texi2html
38+which texi2html > /dev/null 2>&1 && enable texi2html || disable texi2html 39+which texi2html > /dev/null 2>&1 && enable texi2html || disable texi2html
39  40
40 check_header linux/fb.h 41 check_header linux/fb.h
41 check_header linux/videodev.h 42 check_header linux/videodev.h
42@@ -3060,6 +3067,7 @@ check_ldflags -Wl,--warn-common 43@@ -3060,6 +3068,7 @@ check_ldflags -Wl,--warn-common
43 check_ldflags -Wl,-rpath-link,libpostproc -Wl,-rpath-link,libswscale -Wl,-rpath-link,libavfilter -Wl,-rpath-link,libavdevice -Wl,-rpath-link,libavformat -Wl,-rpath-link,libavcodec -Wl,-rpath-link,libavutil 44 check_ldflags -Wl,-rpath-link,libpostproc -Wl,-rpath-link,libswscale -Wl,-rpath-link,libavfilter -Wl,-rpath-link,libavdevice -Wl,-rpath-link,libavformat -Wl,-rpath-link,libavcodec -Wl,-rpath-link,libavutil
44 test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic 45 test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic
45  46
46+if false; then 47+if false; then
47 echo "X{};" > $TMPV 48 echo "X{};" > $TMPV
48 if test_ldflags -Wl,--version-script,$TMPV; then 49 if test_ldflags -Wl,--version-script,$TMPV; then
49 append SHFLAGS '-Wl,--version-script,\$(SUBDIR)lib\$(NAME).ver' 50 append SHFLAGS '-Wl,--version-script,\$(SUBDIR)lib\$(NAME).ver'
50@@ -3072,6 +3080,7 @@ __asm__(".symver ff_foo,av_foo@VERSION") 51@@ -3072,6 +3081,7 @@ __asm__(".symver ff_foo,av_foo@VERSION")
51 void ff_foo(void) {} 52 void ff_foo(void) {}
52 EOF 53 EOF
53 fi 54 fi
54+fi 55+fi
55  56
56 if enabled small; then 57 if enabled small; then
57 add_cflags $size_cflags 58 add_cflags $size_cflags