diff options
Diffstat (limited to 'multimedia')
-rw-r--r-- | multimedia/ffmpeg1/DESCR | 5 | ||||
-rw-r--r-- | multimedia/ffmpeg1/Makefile | 60 | ||||
-rw-r--r-- | multimedia/ffmpeg1/Makefile.common | 87 | ||||
-rw-r--r-- | multimedia/ffmpeg1/PLIST | 154 | ||||
-rw-r--r-- | multimedia/ffmpeg1/buildlink3.mk | 45 | ||||
-rw-r--r-- | multimedia/ffmpeg1/distinfo | 9 | ||||
-rw-r--r-- | multimedia/ffmpeg1/options.mk | 148 | ||||
-rw-r--r-- | multimedia/ffmpeg1/patches/patch-aa | 20 | ||||
-rw-r--r-- | multimedia/ffmpeg1/patches/patch-ac | 15 | ||||
-rw-r--r-- | multimedia/ffmpeg1/patches/patch-ap | 27 | ||||
-rw-r--r-- | multimedia/ffmpeg1/patches/patch-configure | 58 |
11 files changed, 628 insertions, 0 deletions
diff --git a/multimedia/ffmpeg1/DESCR b/multimedia/ffmpeg1/DESCR new file mode 100644 index 00000000000..da7df7fa162 --- /dev/null +++ b/multimedia/ffmpeg1/DESCR @@ -0,0 +1,5 @@ +FFmpeg is a complete, cross-platform solution to record, convert +and stream audio and video. It includes libavcodec - the leading +audio/video codec library. + +This package contains major version 1. diff --git a/multimedia/ffmpeg1/Makefile b/multimedia/ffmpeg1/Makefile new file mode 100644 index 00000000000..8147958afb9 --- /dev/null +++ b/multimedia/ffmpeg1/Makefile @@ -0,0 +1,60 @@ +# $NetBSD: Makefile,v 1.1 2014/08/11 23:01:50 wiz Exp $ + +PKGNAME= ffmpeg1-${DISTVERSION} +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= http://ffmpeg.mplayerhq.hu/ +COMMENT= Decoding, encoding and streaming software (v1.x) + +CONFIGURE_ARGS+= --enable-avfilter +#CONFIGURE_ARGS+= --enable-avfilter-lavf +CONFIGURE_ARGS+= --enable-postproc + +INSTALLATION_DIRS= lib share/examples/ffmpeg1 share/doc/ffmpeg1 + +CONF_FILES+= ${PREFIX}/share/examples/ffmpeg1/ffserver.conf \ + ${PKG_SYSCONFDIR}/ffserver.conf + +# Needs to come before bsd.prefs.mk or compiler.mk, USE_LIBTOOL is set too late. +USE_GCC_RUNTIME= yes + +.include "../../mk/bsd.prefs.mk" + +.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS]) +CONFIGURE_ARGS+= --enable-cross-compile +CONFIGURE_ARGS+= --target-os=${LOWER_OPSYS} +CONFIGURE_ARGS+= --arch=${MACHINE_ARCH} +CONFIGURE_ARGS+= --host-cc=${NATIVE_CC:Q} +CONFIGURE_ARGS+= --host-ld=${NATIVE_CC:Q} +.endif + +TEST_TARGET= check + +post-install: + ${INSTALL_DATA} ${WRKSRC}/doc/*.txt \ + ${DESTDIR}${PREFIX}/share/doc/ffmpeg1 + ${INSTALL_DATA} ${WRKSRC}/doc/ffserver.conf \ + ${DESTDIR}${PREFIX}/share/examples/ffmpeg1 + +.include "options.mk" + +.include "../../mk/compiler.mk" + +# disable asm on i386 for non-gcc and gcc < 4.2 +# no alignment options needed for gcc >= 4.6 on i386 +.if ${MACHINE_ARCH} == "i386" +. if !empty(MACHINE_PLATFORM:MDarwin-*-i386) \ + || !empty(MACHINE_PLATFORM:MSunOS-*-i386) \ + || !empty(CC_VERSION:Mgcc-[123]*) \ + || !empty(CC_VERSION:Mgcc-4.[01]*) \ + || empty(CC_VERSION:Mgcc*) +CONFIGURE_ARGS+= --disable-asm +. elif !empty(CC_VERSION:Mgcc-4.[2345]*) +CFLAGS+= -mstackrealign -mpreferred-stack-boundary=4 +. endif +.endif + +.if !empty(PKGSRC_COMPILER:Mclang) +CFLAGS+= -no-integrated-as +.endif + +.include "../../multimedia/ffmpeg1/Makefile.common" diff --git a/multimedia/ffmpeg1/Makefile.common b/multimedia/ffmpeg1/Makefile.common new file mode 100644 index 00000000000..0424ad58c32 --- /dev/null +++ b/multimedia/ffmpeg1/Makefile.common @@ -0,0 +1,87 @@ +# $NetBSD: Makefile.common,v 1.1 2014/08/11 23:01:50 wiz Exp $ +# used by multimedia/ffplay1/Makefile +# used by multimedia/ffmpeg1/Makefile + +DISTNAME= ffmpeg-${DISTVERSION:S/-//g} +CATEGORIES= multimedia +MASTER_SITES= http://www.ffmpeg.org/releases/ +EXTRACT_SUFX= .tar.bz2 + +LICENSE= gnu-lgpl-v2.1 AND gnu-gpl-v2 + +DISTVERSION= 1.2.7 +PREV_PKGPATH= multimedia/ffmpeg +PATCHDIR= ${.CURDIR}/../../multimedia/ffmpeg1/patches + +USE_LANGUAGES= c99 +USE_LIBTOOL= yes +USE_TOOLS+= gmake texi2html pod2man +HAS_CONFIGURE= yes +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 + +CONFIGURE_ARGS+= --progs-suffix=1 +CONFIGURE_ARGS+= --datadir=${PREFIX}/share/ffmpeg1 +CONFIGURE_ARGS+= --incdir=${PREFIX}/include/ffmpeg1 +CONFIGURE_ARGS+= --libdir=${PREFIX}/lib/ffmpeg1 +CONFIGURE_ARGS+= --shlibdir=${PREFIX}/lib/ffmpeg1 +LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/ffmpeg1 + +.if ${OPSYS} == "SunOS" +CONFIGURE_ARGS+= --disable-asm +.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 + +# Let's not put garbage into /tmp +CONFIGURE_ENV+= TMPDIR=${WRKSRC}/tmp + +.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} + +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/ffmpeg1/PLIST b/multimedia/ffmpeg1/PLIST new file mode 100644 index 00000000000..9cf8da8d621 --- /dev/null +++ b/multimedia/ffmpeg1/PLIST @@ -0,0 +1,154 @@ +@comment $NetBSD: PLIST,v 1.1 2014/08/11 23:01:50 wiz Exp $ +bin/ffmpeg1 +bin/ffprobe1 +bin/ffserver1 +include/ffmpeg1/libavcodec/avcodec.h +include/ffmpeg1/libavcodec/avfft.h +include/ffmpeg1/libavcodec/dxva2.h +include/ffmpeg1/libavcodec/old_codec_ids.h +include/ffmpeg1/libavcodec/vaapi.h +include/ffmpeg1/libavcodec/vda.h +include/ffmpeg1/libavcodec/vdpau.h +include/ffmpeg1/libavcodec/version.h +include/ffmpeg1/libavcodec/xvmc.h +include/ffmpeg1/libavdevice/avdevice.h +include/ffmpeg1/libavdevice/version.h +include/ffmpeg1/libavfilter/asrc_abuffer.h +include/ffmpeg1/libavfilter/avcodec.h +include/ffmpeg1/libavfilter/avfilter.h +include/ffmpeg1/libavfilter/avfiltergraph.h +include/ffmpeg1/libavfilter/buffersink.h +include/ffmpeg1/libavfilter/buffersrc.h +include/ffmpeg1/libavfilter/version.h +include/ffmpeg1/libavformat/avformat.h +include/ffmpeg1/libavformat/avio.h +include/ffmpeg1/libavformat/version.h +include/ffmpeg1/libavutil/adler32.h +include/ffmpeg1/libavutil/aes.h +include/ffmpeg1/libavutil/attributes.h +include/ffmpeg1/libavutil/audio_fifo.h +include/ffmpeg1/libavutil/audioconvert.h +include/ffmpeg1/libavutil/avassert.h +include/ffmpeg1/libavutil/avconfig.h +include/ffmpeg1/libavutil/avstring.h +include/ffmpeg1/libavutil/avutil.h +include/ffmpeg1/libavutil/base64.h +include/ffmpeg1/libavutil/blowfish.h +include/ffmpeg1/libavutil/bprint.h +include/ffmpeg1/libavutil/bswap.h +include/ffmpeg1/libavutil/channel_layout.h +include/ffmpeg1/libavutil/common.h +include/ffmpeg1/libavutil/cpu.h +include/ffmpeg1/libavutil/crc.h +include/ffmpeg1/libavutil/dict.h +include/ffmpeg1/libavutil/error.h +include/ffmpeg1/libavutil/eval.h +include/ffmpeg1/libavutil/fifo.h +include/ffmpeg1/libavutil/file.h +include/ffmpeg1/libavutil/hmac.h +include/ffmpeg1/libavutil/imgutils.h +include/ffmpeg1/libavutil/intfloat.h +include/ffmpeg1/libavutil/intfloat_readwrite.h +include/ffmpeg1/libavutil/intreadwrite.h +include/ffmpeg1/libavutil/lfg.h +include/ffmpeg1/libavutil/log.h +include/ffmpeg1/libavutil/lzo.h +include/ffmpeg1/libavutil/mathematics.h +include/ffmpeg1/libavutil/md5.h +include/ffmpeg1/libavutil/mem.h +include/ffmpeg1/libavutil/old_pix_fmts.h +include/ffmpeg1/libavutil/opt.h +include/ffmpeg1/libavutil/parseutils.h +include/ffmpeg1/libavutil/pixdesc.h +include/ffmpeg1/libavutil/pixfmt.h +include/ffmpeg1/libavutil/random_seed.h +include/ffmpeg1/libavutil/rational.h +include/ffmpeg1/libavutil/samplefmt.h +include/ffmpeg1/libavutil/sha.h +include/ffmpeg1/libavutil/time.h +include/ffmpeg1/libavutil/timecode.h +include/ffmpeg1/libavutil/timestamp.h +include/ffmpeg1/libavutil/version.h +include/ffmpeg1/libavutil/xtea.h +include/ffmpeg1/libpostproc/postprocess.h +include/ffmpeg1/libpostproc/version.h +include/ffmpeg1/libswresample/swresample.h +include/ffmpeg1/libswresample/version.h +include/ffmpeg1/libswscale/swscale.h +include/ffmpeg1/libswscale/version.h +lib/ffmpeg1/libavcodec.a +lib/ffmpeg1/libavcodec.so +lib/ffmpeg1/libavcodec.so.54 +lib/ffmpeg1/libavcodec.so.54.92.100 +lib/ffmpeg1/libavdevice.a +lib/ffmpeg1/libavdevice.so +lib/ffmpeg1/libavdevice.so.54 +lib/ffmpeg1/libavdevice.so.54.3.103 +lib/ffmpeg1/libavfilter.a +lib/ffmpeg1/libavfilter.so +lib/ffmpeg1/libavfilter.so.3 +lib/ffmpeg1/libavfilter.so.3.42.103 +lib/ffmpeg1/libavformat.a +lib/ffmpeg1/libavformat.so +lib/ffmpeg1/libavformat.so.54 +lib/ffmpeg1/libavformat.so.54.63.104 +lib/ffmpeg1/libavutil.a +lib/ffmpeg1/libavutil.so +lib/ffmpeg1/libavutil.so.52 +lib/ffmpeg1/libavutil.so.52.18.100 +lib/ffmpeg1/libpostproc.a +lib/ffmpeg1/libpostproc.so +lib/ffmpeg1/libpostproc.so.52 +lib/ffmpeg1/libpostproc.so.52.2.100 +lib/ffmpeg1/libswresample.a +lib/ffmpeg1/libswresample.so +lib/ffmpeg1/libswresample.so.0 +lib/ffmpeg1/libswresample.so.0.17.102 +lib/ffmpeg1/libswscale.a +lib/ffmpeg1/libswscale.so +lib/ffmpeg1/libswscale.so.2 +lib/ffmpeg1/libswscale.so.2.2.100 +lib/ffmpeg1/pkgconfig/libavcodec.pc +lib/ffmpeg1/pkgconfig/libavdevice.pc +lib/ffmpeg1/pkgconfig/libavfilter.pc +lib/ffmpeg1/pkgconfig/libavformat.pc +lib/ffmpeg1/pkgconfig/libavutil.pc +lib/ffmpeg1/pkgconfig/libpostproc.pc +lib/ffmpeg1/pkgconfig/libswresample.pc +lib/ffmpeg1/pkgconfig/libswscale.pc +share/doc/ffmpeg1/avutil.txt +share/doc/ffmpeg1/build_system.txt +share/doc/ffmpeg1/errno.txt +share/doc/ffmpeg1/ffmpeg.txt +share/doc/ffmpeg1/filter_design.txt +share/doc/ffmpeg1/git-howto.txt +share/doc/ffmpeg1/issue_tracker.txt +share/doc/ffmpeg1/mips.txt +share/doc/ffmpeg1/multithreading.txt +share/doc/ffmpeg1/optimization.txt +share/doc/ffmpeg1/rate_distortion.txt +share/doc/ffmpeg1/snow.txt +share/doc/ffmpeg1/soc.txt +share/doc/ffmpeg1/swresample.txt +share/doc/ffmpeg1/swscale.txt +share/doc/ffmpeg1/tablegen.txt +share/doc/ffmpeg1/viterbi.txt +share/examples/ffmpeg1/ffserver.conf +share/ffmpeg1/examples/Makefile +share/ffmpeg1/examples/README +share/ffmpeg1/examples/decoding_encoding.c +share/ffmpeg1/examples/demuxing.c +share/ffmpeg1/examples/filtering_audio.c +share/ffmpeg1/examples/filtering_video.c +share/ffmpeg1/examples/metadata.c +share/ffmpeg1/examples/muxing.c +share/ffmpeg1/examples/resampling_audio.c +share/ffmpeg1/examples/scaling_video.c +share/ffmpeg1/ffprobe.xsd +share/ffmpeg1/libvpx-1080p.ffpreset +share/ffmpeg1/libvpx-1080p50_60.ffpreset +share/ffmpeg1/libvpx-360p.ffpreset +share/ffmpeg1/libvpx-720p.ffpreset +share/ffmpeg1/libvpx-720p50_60.ffpreset +share/ffmpeg1/libx264-ipod320.ffpreset +share/ffmpeg1/libx264-ipod640.ffpreset diff --git a/multimedia/ffmpeg1/buildlink3.mk b/multimedia/ffmpeg1/buildlink3.mk new file mode 100644 index 00000000000..f2c7878887c --- /dev/null +++ b/multimedia/ffmpeg1/buildlink3.mk @@ -0,0 +1,45 @@ +# $NetBSD: buildlink3.mk,v 1.1 2014/08/11 23:01:50 wiz Exp $ + +BUILDLINK_TREE+= ffmpeg1 + +.if !defined(FFMPEG1_BUILDLINK3_MK) +FFMPEG1_BUILDLINK3_MK:= + +BUILDLINK_API_DEPENDS.ffmpeg1+= ffmpeg1>=1.2.6nb1 +BUILDLINK_PKGSRCDIR.ffmpeg1?= ../../multimedia/ffmpeg1 + +pkgbase := ffmpeg1 +. include "../../mk/pkg-build-options.mk" + +.include "../../mk/bsd.fast.prefs.mk" + +.if !empty(PKG_BUILD_OPTIONS.ffmpeg1:Mtheora) +. include "../../multimedia/libtheora/buildlink3.mk" +.endif + +.if !empty(PKG_BUILD_OPTIONS.ffmpeg1:Mxvid) +. include "../../multimedia/xvidcore/buildlink3.mk" +.endif + +.if !empty(PKG_BUILD_OPTIONS.ffmpeg1:Mx264) +. include "../../multimedia/x264-devel/buildlink3.mk" +.endif + +.if !empty(PKG_BUILD_OPTIONS.ffmpeg1:Mfaac) +. include "../../audio/faac/buildlink3.mk" +.endif + +.if !empty(PKG_BUILD_OPTIONS.ffmpeg1:Mlibvpx) +. include "../../multimedia/libvpx/buildlink3.mk" +.endif + +BUILDLINK_INCDIRS.ffmpeg1+= include/ffmpeg1 +BUILDLINK_LIBDIRS.ffmpeg1+= lib/ffmpeg1 +BUILDLINK_FNAME_TRANSFORM.ffmpeg1+= -e 's|lib/ffmpeg1/pkgconfig/|lib/pkgconfig/|' + +.include "../../archivers/bzip2/buildlink3.mk" +.include "../../devel/libgetopt/buildlink3.mk" +.include "../../devel/zlib/buildlink3.mk" +.endif # FFMPEG1_BUILDLINK3_MK + +BUILDLINK_TREE+= -ffmpeg1 diff --git a/multimedia/ffmpeg1/distinfo b/multimedia/ffmpeg1/distinfo new file mode 100644 index 00000000000..d1360ecf732 --- /dev/null +++ b/multimedia/ffmpeg1/distinfo @@ -0,0 +1,9 @@ +$NetBSD: distinfo,v 1.1 2014/08/11 23:01:50 wiz Exp $ + +SHA1 (ffmpeg-1.2.7.tar.bz2) = ff49a6b28e174f9f8072638d8251e1e447666ef6 +RMD160 (ffmpeg-1.2.7.tar.bz2) = ac1df042ebb63f815292f48d899bd8cb70098112 +Size (ffmpeg-1.2.7.tar.bz2) = 5969563 bytes +SHA1 (patch-aa) = 14006874aee07e7e41803269040f0ae0157d931d +SHA1 (patch-ac) = ff8a7a5fdfd4987ef2835bd7360a78efd4310253 +SHA1 (patch-ap) = ebbd0c169f228af37ae2dd54b27d5dba11a34c5e +SHA1 (patch-configure) = a04493172f7600cc9ebbda6c140915b1169f5f14 diff --git a/multimedia/ffmpeg1/options.mk b/multimedia/ffmpeg1/options.mk new file mode 100644 index 00000000000..cd75de3afbf --- /dev/null +++ b/multimedia/ffmpeg1/options.mk @@ -0,0 +1,148 @@ +# $NetBSD: options.mk,v 1.1 2014/08/11 23:01:50 wiz Exp $ + +# Global and legacy options + +PKG_OPTIONS_VAR= PKG_OPTIONS.ffmpeg +PKG_SUPPORTED_OPTIONS= faac lame ass libvpx theora vorbis x264 xvid \ + opencore-amr +PKG_SUGGESTED_OPTIONS= lame ass 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 + +### Add VAAPI if it is available +.include "../../multimedia/libva/available.mk" +.if ${VAAPI_AVAILABLE} == "yes" +PKG_SUPPORTED_OPTIONS+= vaapi +PKG_SUGGESTED_OPTIONS+= vaapi +.endif + +### +.include "../../mk/bsd.options.mk" + +### +### ass option +### +.if !empty(PKG_OPTIONS:Mass) +USE_TOOLS+= pkg-config +CONFIGURE_ARGS+= --enable-libass +.include "../../multimedia/libass/buildlink3.mk" +.else +CONFIGURE_ARGS+= --disable-libass +.endif + +### +### 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) +CONFIGURE_ARGS+= --enable-vdpau +.include "../../multimedia/libvdpau/buildlink3.mk" +.else +CONFIGURE_ARGS+= --disable-vdpau +.endif + +### +### VAAPI support +### +.if !empty(PKG_OPTIONS:Mvaapi) +CONFIGURE_ARGS+= --enable-vaapi +.include "../../multimedia/libva/buildlink3.mk" +.else +CONFIGURE_ARGS+= --disable-vaapi +.endif + +### +### VPX support +### +.if !empty(PKG_OPTIONS:Mlibvpx) +CONFIGURE_ARGS+= --enable-libvpx +.include "../../multimedia/libvpx/buildlink3.mk" +.else +CONFIGURE_ARGS+= --disable-libvpx +.endif diff --git a/multimedia/ffmpeg1/patches/patch-aa b/multimedia/ffmpeg1/patches/patch-aa new file mode 100644 index 00000000000..093130a8d15 --- /dev/null +++ b/multimedia/ffmpeg1/patches/patch-aa @@ -0,0 +1,20 @@ +$NetBSD: patch-aa,v 1.1 2014/08/11 23:01:50 wiz Exp $ + +--- libavutil/x86/cpu.c.orig 2013-01-06 21:53:29.000000000 +0000 ++++ libavutil/x86/cpu.c +@@ -115,6 +115,7 @@ int ff_get_cpu_flags_x86(void) + #if HAVE_SSE + if (std_caps & (1 << 25)) + rval |= 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) +@@ -134,6 +135,7 @@ int ff_get_cpu_flags_x86(void) + rval |= AV_CPU_FLAG_AVX; + } + #endif /* HAVE_AVX */ ++#endif /* gcc >= 4.2 */ + #endif /* HAVE_SSE */ + } + diff --git a/multimedia/ffmpeg1/patches/patch-ac b/multimedia/ffmpeg1/patches/patch-ac new file mode 100644 index 00000000000..42d95d68176 --- /dev/null +++ b/multimedia/ffmpeg1/patches/patch-ac @@ -0,0 +1,15 @@ +$NetBSD: patch-ac,v 1.1 2014/08/11 23:01:50 wiz Exp $ + +--- Makefile.orig 2012-09-28 01:37:35.000000000 +0000 ++++ Makefile +@@ -139,8 +139,8 @@ install-progs: install-progs-yes $(PROGS + + install-data: $(DATA_FILES) $(EXAMPLES_FILES) + $(Q)mkdir -p "$(DATADIR)/examples" +- $(INSTALL) -m 644 $(DATA_FILES) "$(DATADIR)" +- $(INSTALL) -m 644 $(EXAMPLES_FILES) "$(DATADIR)/examples" ++ $(INSTALL) -c -m 644 $(DATA_FILES) "$(DATADIR)" ++ $(INSTALL) -c -m 644 $(EXAMPLES_FILES) "$(DATADIR)/examples" + + uninstall: uninstall-libs uninstall-headers uninstall-progs uninstall-data + diff --git a/multimedia/ffmpeg1/patches/patch-ap b/multimedia/ffmpeg1/patches/patch-ap new file mode 100644 index 00000000000..2ae5e4253c0 --- /dev/null +++ b/multimedia/ffmpeg1/patches/patch-ap @@ -0,0 +1,27 @@ +$NetBSD: patch-ap,v 1.1 2014/08/11 23:01:50 wiz Exp $ + +--- libavutil/common.h.orig 2013-01-06 21:53:29.000000000 +0000 ++++ libavutil/common.h +@@ -39,6 +39,22 @@ + #include "version.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/ffmpeg1/patches/patch-configure b/multimedia/ffmpeg1/patches/patch-configure new file mode 100644 index 00000000000..45612a1e242 --- /dev/null +++ b/multimedia/ffmpeg1/patches/patch-configure @@ -0,0 +1,58 @@ +$NetBSD: patch-configure,v 1.1 2014/08/11 23:01:50 wiz Exp $ + +--- configure.orig 2013-07-27 23:49:20.000000000 +0000 ++++ configure +@@ -3225,6 +3225,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" + enabled gcc || check_ldflags -Wl,-zmuldefs +@@ -3555,10 +3560,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 + +@@ -4092,6 +4100,7 @@ enabled xmm_clobber_test && + -Wl,--wrap,sws_scale || + disable xmm_clobber_test + ++if false; then + echo "X{};" > $TMPV + if test_ldflags -Wl,--version-script,$TMPV; then + append SHFLAGS '-Wl,--version-script,\$(SUBDIR)lib\$(NAME).ver' +@@ -4104,6 +4113,7 @@ __asm__(".symver ff_foo,av_foo@VERSION") + void ff_foo(void) {} + EOF + fi ++fi + + if [ -z "$optflags" ]; then + if enabled small; then +@@ -4560,7 +4570,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 |