summaryrefslogtreecommitdiff
path: root/multimedia
diff options
context:
space:
mode:
authordrochner <drochner@pkgsrc.org>2012-09-14 14:52:34 +0000
committerdrochner <drochner@pkgsrc.org>2012-09-14 14:52:34 +0000
commit64d686d58b8c3a58cfe163dc5f9f2cf50d387ea5 (patch)
tree431a2f224666fbc9b9bb5b81657ed83a86999d1a /multimedia
parent150fe4bcdc7cc24481d55a2e79ff26feef512c7c (diff)
downloadpkgsrc-64d686d58b8c3a58cfe163dc5f9f2cf50d387ea5.tar.gz
prepare a pkg for ffmpeg-0.10.4
The idea is to iron out build problems and replace the old ffmpeg pkg after the freeze.
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/ffmpeg010/DESCR3
-rw-r--r--multimedia/ffmpeg010/Makefile42
-rw-r--r--multimedia/ffmpeg010/Makefile.common85
-rw-r--r--multimedia/ffmpeg010/PLIST129
-rw-r--r--multimedia/ffmpeg010/buildlink3.mk42
-rw-r--r--multimedia/ffmpeg010/distinfo9
-rw-r--r--multimedia/ffmpeg010/options.mk114
-rw-r--r--multimedia/ffmpeg010/patches/patch-aa20
-rw-r--r--multimedia/ffmpeg010/patches/patch-ac13
-rw-r--r--multimedia/ffmpeg010/patches/patch-ap27
-rw-r--r--multimedia/ffmpeg010/patches/patch-configure67
11 files changed, 551 insertions, 0 deletions
diff --git a/multimedia/ffmpeg010/DESCR b/multimedia/ffmpeg010/DESCR
new file mode 100644
index 00000000000..7f379ea9c4b
--- /dev/null
+++ b/multimedia/ffmpeg010/DESCR
@@ -0,0 +1,3 @@
+FFmpeg is a complete, cross-platform solution to record, convert
+and stream audio and video. It includes libavcodec - the leading
+audio/video codec library.
diff --git a/multimedia/ffmpeg010/Makefile b/multimedia/ffmpeg010/Makefile
new file mode 100644
index 00000000000..5c3f9ac132c
--- /dev/null
+++ b/multimedia/ffmpeg010/Makefile
@@ -0,0 +1,42 @@
+# $NetBSD: Makefile,v 1.1 2012/09/14 14:52:34 drochner Exp $
+
+PKGNAME= ffmpeg-20120609.${DISTVERSION}
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= http://ffmpeg.mplayerhq.hu/
+COMMENT= Decoding, encoding and streaming software
+
+PKG_DESTDIR_SUPPORT= user-destdir
+
+CONFIGURE_ARGS+= --enable-avfilter
+#CONFIGURE_ARGS+= --enable-avfilter-lavf
+CONFIGURE_ARGS+= --enable-postproc
+
+INSTALLATION_DIRS= lib share/examples/ffmpeg share/doc/ffmpeg
+
+CONF_FILES+= ${PREFIX}/share/examples/ffmpeg/ffserver.conf \
+ ${PKG_SYSCONFDIR}/ffserver.conf
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "Darwin"
+CONFIGURE_ARGS+= --disable-asm
+.endif
+
+TEST_TARGET= check
+
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/doc/*.txt \
+ ${DESTDIR}${PREFIX}/share/doc/ffmpeg
+ ${INSTALL_DATA} ${WRKSRC}/doc/ffserver.conf \
+ ${DESTDIR}${PREFIX}/share/examples/ffmpeg
+
+.include "options.mk"
+
+.include "../../mk/compiler.mk"
+
+.if !empty(PKGSRC_COMPILER:Mclang)
+CFLAGS+= -no-integrated-as
+.endif
+
+.include "../../multimedia/ffmpeg010/Makefile.common"
diff --git a/multimedia/ffmpeg010/Makefile.common b/multimedia/ffmpeg010/Makefile.common
new file mode 100644
index 00000000000..eeea426ef10
--- /dev/null
+++ b/multimedia/ffmpeg010/Makefile.common
@@ -0,0 +1,85 @@
+# $NetBSD: Makefile.common,v 1.1 2012/09/14 14:52:34 drochner Exp $
+# used by multimedia/ffplay/Makefile
+# used by multimedia/ffmpeg/Makefile
+
+DISTNAME= ffmpeg-${DISTVERSION:S/-//g}
+CATEGORIES= multimedia
+MASTER_SITES= http://www.ffmpeg.org/releases/
+EXTRACT_SUFX= .tar.bz2
+
+DISTVERSION= 0.10.4
+PREV_PKGPATH= multimedia/ffmpeg-devel
+PATCHDIR= ${.CURDIR}/../../multimedia/ffmpeg010/patches
+
+HAS_CONFIGURE= YES
+USE_LANGUAGES+= c99
+USE_LIBTOOL= YES
+USE_TOOLS+= gmake texi2html pod2man
+
+.include "../../mk/compiler.mk"
+
+.if ${OPSYS} == "SunOS" && empty(CC_VERSION:Mgcc*)
+SUBST_CLASSES+= sunwspro
+SUBST_MESSAGE.sunwspro= Fixing compiler options for SunStudio C compiler.
+SUBST_STAGE.sunwspro= post-configure
+SUBST_FILES.sunwspro= config.mak
+SUBST_SED.sunwspro= -e "s/-O /-KPIC -DPIC /"
+SUBST_SED.sunwspro+= -e "s/-O3/-xO2/g"
+SUBST_SED.sunwspro+= -e "s/-std=c99/-xc99=all/"
+SUBST_SED.sunwspro+= -e "s/-Wl,-rpath-link,/-L /g"
+.endif
+
+BUILD_DEPENDS+= yasm>=0.7.2:../../devel/yasm
+
+REPLACE_PERL+= doc/texi2pod.pl
+REPLACE_SH+= configure version.sh
+
+SUBST_CLASSES+= conf
+SUBST_STAGE.conf= post-patch
+SUBST_FILES.conf= ffserver.c
+SUBST_SED.conf= -e 's,/etc/ffserver.conf,${PKG_SYSCONFDIR}/ffserver.conf,g'
+SUBST_MESSAGE.conf= Fixing configuration path.
+
+PLIST_SRC+= ${PKGDIR}/PLIST
+
+MAKE_ENV+= EXTRA_LIBS=${LIBGETOPT:Q}
+# LOCALBASE=${LOCALBASE:Q}
+
+# Let's not put garbage into /tmp
+CONFIGURE_ENV+= TMPDIR=${WRKSRC}/tmp
+
+CONFIGURE_ARGS+= --mandir=${PREFIX}/${PKGMANDIR}
+CONFIGURE_ARGS+= --cc=${CC:Q}
+CONFIGURE_ARGS+= --prefix=${PREFIX}
+CONFIGURE_ARGS+= --disable-debug
+CONFIGURE_ARGS+= --disable-optimizations
+CONFIGURE_ARGS+= --disable-stripping
+CONFIGURE_ARGS+= --enable-shared
+CONFIGURE_ARGS+= --enable-pthreads
+CONFIGURE_ARGS+= --enable-gpl
+
+.if ${OPSYS} == "SunOS"
+CONFIGURE_ARGS+= --disable-amd3dnow
+CONFIGURE_ARGS+= --disable-amd3dnowext
+CONFIGURE_ARGS+= --disable-mmx
+CONFIGURE_ARGS+= --disable-mmx2
+CONFIGURE_ARGS+= --disable-sse
+CONFIGURE_ARGS+= --disable-ssse3
+.else
+CONFIGURE_ARGS+= --enable-runtime-cpudetect
+.endif
+
+# No posix_memalign() in NetBSD 4.0 and earlier
+#
+.if !empty(MACHINE_PLATFORM:MNetBSD-[1-4].*-*)
+CONFIGURE_ARGS+= --enable-memalign-hack
+.endif
+
+pre-configure:
+ mkdir ${WRKSRC}/tmp
+
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../archivers/bzip2/buildlink3.mk"
+.include "../../devel/libgetopt/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/multimedia/ffmpeg010/PLIST b/multimedia/ffmpeg010/PLIST
new file mode 100644
index 00000000000..f11bdb9fcc5
--- /dev/null
+++ b/multimedia/ffmpeg010/PLIST
@@ -0,0 +1,129 @@
+@comment $NetBSD: PLIST,v 1.1 2012/09/14 14:52:34 drochner Exp $
+bin/ffmpeg
+bin/ffprobe
+bin/ffserver
+include/libavcodec/avcodec.h
+include/libavcodec/avfft.h
+include/libavcodec/dxva2.h
+include/libavcodec/opt.h
+include/libavcodec/vaapi.h
+include/libavcodec/vda.h
+include/libavcodec/vdpau.h
+include/libavcodec/version.h
+include/libavcodec/xvmc.h
+include/libavdevice/avdevice.h
+include/libavfilter/avcodec.h
+include/libavfilter/avfilter.h
+include/libavfilter/avfiltergraph.h
+include/libavfilter/buffersink.h
+include/libavfilter/version.h
+include/libavfilter/vsrc_buffer.h
+include/libavformat/avformat.h
+include/libavformat/avio.h
+include/libavformat/version.h
+include/libavutil/adler32.h
+include/libavutil/aes.h
+include/libavutil/attributes.h
+include/libavutil/audioconvert.h
+include/libavutil/avassert.h
+include/libavutil/avconfig.h
+include/libavutil/avstring.h
+include/libavutil/avutil.h
+include/libavutil/base64.h
+include/libavutil/bswap.h
+include/libavutil/common.h
+include/libavutil/cpu.h
+include/libavutil/crc.h
+include/libavutil/dict.h
+include/libavutil/error.h
+include/libavutil/eval.h
+include/libavutil/fifo.h
+include/libavutil/file.h
+include/libavutil/imgutils.h
+include/libavutil/intfloat.h
+include/libavutil/intfloat_readwrite.h
+include/libavutil/intreadwrite.h
+include/libavutil/lfg.h
+include/libavutil/log.h
+include/libavutil/lzo.h
+include/libavutil/mathematics.h
+include/libavutil/md5.h
+include/libavutil/mem.h
+include/libavutil/opt.h
+include/libavutil/parseutils.h
+include/libavutil/pixdesc.h
+include/libavutil/pixfmt.h
+include/libavutil/random_seed.h
+include/libavutil/rational.h
+include/libavutil/samplefmt.h
+include/libavutil/sha.h
+include/libpostproc/postprocess.h
+include/libswresample/swresample.h
+include/libswscale/swscale.h
+lib/libavcodec.a
+lib/libavcodec.so
+lib/libavcodec.so.53
+lib/libavcodec.so.53.61.100
+lib/libavdevice.a
+lib/libavdevice.so
+lib/libavdevice.so.53
+lib/libavdevice.so.53.4.100
+lib/libavfilter.a
+lib/libavfilter.so
+lib/libavfilter.so.2
+lib/libavfilter.so.2.61.100
+lib/libavformat.a
+lib/libavformat.so
+lib/libavformat.so.53
+lib/libavformat.so.53.32.100
+lib/libavutil.a
+lib/libavutil.so
+lib/libavutil.so.51
+lib/libavutil.so.51.35.100
+lib/libpostproc.a
+lib/libpostproc.so
+lib/libpostproc.so.52
+lib/libpostproc.so.52.0.100
+lib/libswresample.a
+lib/libswresample.so
+lib/libswresample.so.0
+lib/libswresample.so.0.6.100
+lib/libswscale.a
+lib/libswscale.so
+lib/libswscale.so.2
+lib/libswscale.so.2.1.100
+lib/pkgconfig/libavcodec.pc
+lib/pkgconfig/libavdevice.pc
+lib/pkgconfig/libavfilter.pc
+lib/pkgconfig/libavformat.pc
+lib/pkgconfig/libavutil.pc
+lib/pkgconfig/libpostproc.pc
+lib/pkgconfig/libswresample.pc
+lib/pkgconfig/libswscale.pc
+man/man1/ffmpeg.1
+man/man1/ffprobe.1
+man/man1/ffserver.1
+share/doc/ffmpeg/avutil.txt
+share/doc/ffmpeg/build_system.txt
+share/doc/ffmpeg/errno.txt
+share/doc/ffmpeg/ffmpeg.txt
+share/doc/ffmpeg/git-howto.txt
+share/doc/ffmpeg/issue_tracker.txt
+share/doc/ffmpeg/multithreading.txt
+share/doc/ffmpeg/optimization.txt
+share/doc/ffmpeg/rate_distortion.txt
+share/doc/ffmpeg/snow.txt
+share/doc/ffmpeg/soc.txt
+share/doc/ffmpeg/swresample.txt
+share/doc/ffmpeg/swscale.txt
+share/doc/ffmpeg/tablegen.txt
+share/doc/ffmpeg/viterbi.txt
+share/examples/ffmpeg/ffserver.conf
+share/ffmpeg/ffprobe.xsd
+share/ffmpeg/libvpx-1080p.ffpreset
+share/ffmpeg/libvpx-1080p50_60.ffpreset
+share/ffmpeg/libvpx-360p.ffpreset
+share/ffmpeg/libvpx-720p.ffpreset
+share/ffmpeg/libvpx-720p50_60.ffpreset
+share/ffmpeg/libx264-ipod320.ffpreset
+share/ffmpeg/libx264-ipod640.ffpreset
diff --git a/multimedia/ffmpeg010/buildlink3.mk b/multimedia/ffmpeg010/buildlink3.mk
new file mode 100644
index 00000000000..09a317a1a0e
--- /dev/null
+++ b/multimedia/ffmpeg010/buildlink3.mk
@@ -0,0 +1,42 @@
+# $NetBSD: buildlink3.mk,v 1.1 2012/09/14 14:52:34 drochner Exp $
+
+BUILDLINK_TREE+= ffmpeg
+
+.if !defined(FFMPEG_BUILDLINK3_MK)
+FFMPEG_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.ffmpeg+= ffmpeg>=0.6.1
+BUILDLINK_ABI_DEPENDS.ffmpeg+= ffmpeg>=20111104.0.7.7nb1
+BUILDLINK_PKGSRCDIR.ffmpeg?= ../../multimedia/ffmpeg
+
+pkgbase := ffmpeg
+. include "../../mk/pkg-build-options.mk"
+
+.include "../../mk/bsd.fast.prefs.mk"
+
+.if !empty(PKG_BUILD_OPTIONS.ffmpeg:Mtheora)
+. include "../../multimedia/libtheora/buildlink3.mk"
+.endif
+
+.if !empty(PKG_BUILD_OPTIONS.ffmpeg:Mxvid)
+. include "../../multimedia/xvidcore/buildlink3.mk"
+.endif
+
+.if !empty(PKG_BUILD_OPTIONS.ffmpeg:Mx264)
+. include "../../multimedia/x264-devel/buildlink3.mk"
+.endif
+
+.if !empty(PKG_BUILD_OPTIONS.ffmpeg:Mfaac)
+. include "../../audio/faac/buildlink3.mk"
+.endif
+
+.if !empty(PKG_BUILD_OPTIONS.ffmpeg:Mlibvpx)
+. include "../../multimedia/libvpx/buildlink3.mk"
+.endif
+
+.include "../../archivers/bzip2/buildlink3.mk"
+.include "../../devel/libgetopt/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.endif # FFMPEG_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -ffmpeg
diff --git a/multimedia/ffmpeg010/distinfo b/multimedia/ffmpeg010/distinfo
new file mode 100644
index 00000000000..1650b7b0ce4
--- /dev/null
+++ b/multimedia/ffmpeg010/distinfo
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.1 2012/09/14 14:52:34 drochner Exp $
+
+SHA1 (ffmpeg-0.10.4.tar.bz2) = 5f165dd055eb762b588a090f13bc29055a1a11ae
+RMD160 (ffmpeg-0.10.4.tar.bz2) = 97ec2a7690cf610a72f4198da91a59191cee3f4a
+Size (ffmpeg-0.10.4.tar.bz2) = 5853766 bytes
+SHA1 (patch-aa) = c9540d0ca0a671e9faa8b5b7847c103b515ac382
+SHA1 (patch-ac) = 14b39a2663be41395be0faae8270e18e2ba0891f
+SHA1 (patch-ap) = 0ea32afb145b55f0186fb14b1b07568d7442ddf3
+SHA1 (patch-configure) = edc359ba50cdc90ad3ce7529f72e07970b679303
diff --git a/multimedia/ffmpeg010/options.mk b/multimedia/ffmpeg010/options.mk
new file mode 100644
index 00000000000..3963d1e3b83
--- /dev/null
+++ b/multimedia/ffmpeg010/options.mk
@@ -0,0 +1,114 @@
+# $NetBSD: options.mk,v 1.1 2012/09/14 14:52:34 drochner Exp $
+
+# Global and legacy options
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.ffmpeg
+PKG_SUPPORTED_OPTIONS= faac lame libvpx opencore-amr theora vorbis x264 xvid
+PKG_SUGGESTED_OPTIONS= lame libvpx theora vorbis x264 xvid
+#PKG_OPTIONS_OPTIONAL_GROUPS= aac-decoder
+#PKG_OPTIONS_GROUP.aac-decoder= faac
+
+### Add vdpau if it is available
+.include "../../multimedia/libvdpau/available.mk"
+.if ${VDPAU_AVAILABLE} == "yes"
+PKG_SUPPORTED_OPTIONS+= vdpau
+PKG_SUGGESTED_OPTIONS+= vdpau
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+###
+### faac option
+###
+.if !empty(PKG_OPTIONS:Mfaac)
+RESTRICTED= This software may require the payment of patent royalties
+NO_BIN_ON_CDROM= ${RESTRICTED}
+NO_BIN_ON_FTP= ${RESTRICTED}
+CONFIGURE_ARGS+= --enable-libfaac
+CONFIGURE_ARGS+= --enable-nonfree
+.include "../../audio/faac/buildlink3.mk"
+.endif
+
+###
+### opencore-amr option
+###
+.if !empty(PKG_OPTIONS:Mopencore-amr)
+CONFIGURE_ARGS+= --enable-libopencore-amrnb
+CONFIGURE_ARGS+= --enable-libopencore-amrwb
+
+# "The OpenCORE external libraries are under the Apache License
+# 2.0. That license is incompatible with the LGPL v2.1 and the GPL
+# v2, but not with version 3 of those licenses. So to combine the
+# OpenCORE libraries with FFmpeg, the license version needs to be
+# upgraded by passing --enable-version3 to configure."
+CONFIGURE_ARGS+= --enable-version3
+# TODO: LICENSE
+
+.include "../../audio/opencore-amr/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-libopencore-amrnb
+CONFIGURE_ARGS+= --disable-libopencore-amrwb
+.endif
+
+###
+### OGG Theora support
+###
+.if !empty(PKG_OPTIONS:Mtheora)
+CONFIGURE_ARGS+= --enable-libtheora
+.include "../../multimedia/libtheora/buildlink3.mk"
+.endif
+
+###
+### OGG Vorbis support
+###
+.if !empty(PKG_OPTIONS:Mvorbis)
+CONFIGURE_ARGS+= --enable-libvorbis
+.include "../../audio/libvorbis/buildlink3.mk"
+.endif
+
+###
+### LAME MP3 encoder
+###
+.if !empty(PKG_OPTIONS:Mlame)
+# "lame-3.98" isn't compatible with "ffmpeg" which breaks audio encoding.
+BUILDLINK_ABI_DEPENDS.lame+= lame>=3.98.2nb1
+CONFIGURE_ARGS+= --enable-libmp3lame
+.include "../../audio/lame/buildlink3.mk"
+.endif
+
+###
+### XviD support
+###
+.if !empty(PKG_OPTIONS:Mxvid)
+CONFIGURE_ARGS+= --enable-libxvid
+.include "../../multimedia/xvidcore/buildlink3.mk"
+.endif
+
+###
+### x264 support
+###
+.if !empty(PKG_OPTIONS:Mx264)
+# ABI change between 20090326 and 20100201
+BUILDLINK_API_DEPENDS.x264-devel+= x264-devel>=20111207
+#BUILDLINK_API_DEPENDS.x264-devel+= x264-devel<20110102
+CONFIGURE_ARGS+= --enable-libx264
+.include "../../multimedia/x264-devel/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-libx264
+.endif
+
+###
+### VDPAU support
+###
+.if !empty(PKG_OPTIONS:Mvdpau)
+.include "../../multimedia/libvdpau/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-vdpau
+.endif
+
+.if !empty(PKG_OPTIONS:Mlibvpx)
+CONFIGURE_ARGS+= --enable-libvpx
+.include "../../multimedia/libvpx/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-libvpx
+.endif
diff --git a/multimedia/ffmpeg010/patches/patch-aa b/multimedia/ffmpeg010/patches/patch-aa
new file mode 100644
index 00000000000..8732fce9862
--- /dev/null
+++ b/multimedia/ffmpeg010/patches/patch-aa
@@ -0,0 +1,20 @@
+$NetBSD: patch-aa,v 1.1 2012/09/14 14:52:35 drochner Exp $
+
+--- libavutil/x86/cpu.c.orig 2011-07-07 20:46:02.000000000 +0000
++++ libavutil/x86/cpu.c
+@@ -86,6 +86,7 @@ int ff_get_cpu_flags_x86(void)
+ rval |= AV_CPU_FLAG_MMX2
+ #if HAVE_SSE
+ | AV_CPU_FLAG_SSE;
++#if !defined(__GNUC__) || (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
+ if (std_caps & (1<<26))
+ rval |= AV_CPU_FLAG_SSE2;
+ if (ecx & 1)
+@@ -105,6 +106,7 @@ int ff_get_cpu_flags_x86(void)
+ rval |= AV_CPU_FLAG_AVX;
+ }
+ #endif
++#endif /* gcc >= 4.2 */
+ #endif
+ ;
+ }
diff --git a/multimedia/ffmpeg010/patches/patch-ac b/multimedia/ffmpeg010/patches/patch-ac
new file mode 100644
index 00000000000..d70a02375ad
--- /dev/null
+++ b/multimedia/ffmpeg010/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1 2012/09/14 14:52:35 drochner Exp $
+
+--- Makefile.orig 2012-06-09 20:09:44.000000000 +0000
++++ Makefile
+@@ -124,7 +124,7 @@ install-progs: install-progs-yes $(PROGS
+
+ install-data: $(DATA_FILES)
+ $(Q)mkdir -p "$(DATADIR)"
+- $(INSTALL) -m 644 $(DATA_FILES) "$(DATADIR)"
++ $(INSTALL) -c -m 644 $(DATA_FILES) "$(DATADIR)"
+
+ uninstall: uninstall-libs uninstall-headers uninstall-progs uninstall-data
+
diff --git a/multimedia/ffmpeg010/patches/patch-ap b/multimedia/ffmpeg010/patches/patch-ap
new file mode 100644
index 00000000000..594e46195f0
--- /dev/null
+++ b/multimedia/ffmpeg010/patches/patch-ap
@@ -0,0 +1,27 @@
+$NetBSD: patch-ap,v 1.1 2012/09/14 14:52:35 drochner Exp $
+
+--- libavutil/common.h.orig 2012-01-12 21:34:32.000000000 +0000
++++ libavutil/common.h
+@@ -37,6 +37,22 @@
+ #include "attributes.h"
+ #include "libavutil/avconfig.h"
+
++#if defined(__cplusplus)
++#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__linux__)
++#undef _STDINT_H_
++#undef _SYS_STDINT_H_
++#undef _STDINT_H
++#undef _GCC_WRAP_STDINT_H
++#ifndef __STDC_CONSTANT_MACROS
++#define __STDC_CONSTANT_MACROS
++#endif
++#include <stdint.h>
++#endif /* FreeBSD | OpenBSD | linux */
++#if defined(__DragonFly__) || defined(__NetBSD__)
++#include <machine/int_const.h>
++#endif /* DragonFly | NetBSD */
++#endif /* __cplusplus */
++
+ #if AV_HAVE_BIGENDIAN
+ # define AV_NE(be, le) (be)
+ #else
diff --git a/multimedia/ffmpeg010/patches/patch-configure b/multimedia/ffmpeg010/patches/patch-configure
new file mode 100644
index 00000000000..1585396c115
--- /dev/null
+++ b/multimedia/ffmpeg010/patches/patch-configure
@@ -0,0 +1,67 @@
+$NetBSD: patch-configure,v 1.1 2012/09/14 14:52:35 drochner Exp $
+
+--- configure.orig 2012-06-09 20:09:44.000000000 +0000
++++ configure
+@@ -2604,6 +2604,11 @@ case $target_os in
+ ;;
+ netbsd)
+ disable symver
++ # NetBSD/macppc *really* needs PIC enabled. ffmpeg has repeatedly
++ # broken time and time again because PIC support has been removed
++ # from architectures that need it. So, if you touch this, please
++ # be careful and make sure that your changes work.
++ test "${subarch}" != "x86_32" && enable pic
+ oss_indev_extralibs="-lossaudio"
+ oss_outdev_extralibs="-lossaudio"
+ ;;
+@@ -2835,10 +2840,13 @@ check_cc <<EOF && enable attribute_may_a
+ union { int x; } __attribute__((may_alias)) x;
+ EOF
+
+-check_cc <<EOF || die "endian test failed"
+-unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
++check_exec <<EOF || enable bigendian
++int main()
++{
++ long one = 1;
++ return !(*((char *)(&one)));
++}
+ EOF
+-od -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
+
+ if enabled alpha; then
+
+@@ -3195,7 +3203,7 @@ else
+ fi
+ enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs
+
+-texi2html -version > /dev/null 2>&1 && enable texi2html || disable texi2html
++which texi2html > /dev/null 2>&1 && enable texi2html || disable texi2html
+ makeinfo --version > /dev/null 2>&1 && enable makeinfo || disable makeinfo
+
+ check_header linux/fb.h
+@@ -3291,6 +3299,7 @@ check_ldflags -Wl,--warn-common
+ check_ldflags -Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil
+ test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic
+
++if false; then
+ echo "X{};" > $TMPV
+ if test_ldflags -Wl,--version-script,$TMPV; then
+ append SHFLAGS '-Wl,--version-script,\$(SUBDIR)lib\$(NAME).ver'
+@@ -3303,6 +3312,7 @@ __asm__(".symver ff_foo,av_foo@VERSION")
+ void ff_foo(void) {}
+ EOF
+ fi
++fi
+
+ if [ -n "$optflags" ]; then
+ add_cflags $optflags
+@@ -3726,7 +3736,7 @@ Version: $version
+ Requires: $(enabled shared || echo $requires)
+ Requires.private: $(enabled shared && echo $requires)
+ Conflicts:
+-Libs: -L\${libdir} -l${shortname} $(enabled shared || echo $libs)
++Libs: -L\${libdir} -Wl,-R\${libdir} -l${shortname} $(enabled shared || echo $libs)
+ Libs.private: $(enabled shared && echo $libs)
+ Cflags: -I\${includedir}
+ EOF