diff options
author | ryoon <ryoon@pkgsrc.org> | 2016-03-05 08:52:23 +0000 |
---|---|---|
committer | ryoon <ryoon@pkgsrc.org> | 2016-03-05 08:52:23 +0000 |
commit | 135519782a987ef2e7e897e1b3d4c13fe33b17aa (patch) | |
tree | e3b48b04eda5973bf0d94ed9416e2ad360ffc694 /multimedia/ffmpeg3 | |
parent | bbde267b847ee1a1b0f84152afd2a553740764ab (diff) | |
download | pkgsrc-135519782a987ef2e7e897e1b3d4c13fe33b17aa.tar.gz |
Import ffmpeg3-3.0 as multimedia/ffmpeg3.
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 3.
Diffstat (limited to 'multimedia/ffmpeg3')
-rw-r--r-- | multimedia/ffmpeg3/ALTERNATIVES | 3 | ||||
-rw-r--r-- | multimedia/ffmpeg3/DESCR | 5 | ||||
-rw-r--r-- | multimedia/ffmpeg3/Makefile | 53 | ||||
-rw-r--r-- | multimedia/ffmpeg3/Makefile.common | 92 | ||||
-rw-r--r-- | multimedia/ffmpeg3/PLIST | 183 | ||||
-rw-r--r-- | multimedia/ffmpeg3/buildlink3.mk | 54 | ||||
-rw-r--r-- | multimedia/ffmpeg3/distinfo | 12 | ||||
-rw-r--r-- | multimedia/ffmpeg3/options.mk | 186 | ||||
-rw-r--r-- | multimedia/ffmpeg3/patches/patch-Makefile | 15 | ||||
-rw-r--r-- | multimedia/ffmpeg3/patches/patch-configure | 58 | ||||
-rw-r--r-- | multimedia/ffmpeg3/patches/patch-libavutil_common.h | 27 | ||||
-rw-r--r-- | multimedia/ffmpeg3/patches/patch-libavutil_opencl.c | 15 | ||||
-rw-r--r-- | multimedia/ffmpeg3/patches/patch-libavutil_x86_asm.h | 18 | ||||
-rw-r--r-- | multimedia/ffmpeg3/patches/patch-libavutil_x86_cpu.c | 20 |
14 files changed, 741 insertions, 0 deletions
diff --git a/multimedia/ffmpeg3/ALTERNATIVES b/multimedia/ffmpeg3/ALTERNATIVES new file mode 100644 index 00000000000..17e6eb32163 --- /dev/null +++ b/multimedia/ffmpeg3/ALTERNATIVES @@ -0,0 +1,3 @@ +bin/ffmpeg @PREFIX@/bin/ffmpeg3 +bin/ffprobe @PREFIX@/bin/ffprobe3 +bin/ffserver @PREFIX@/bin/ffserver3 diff --git a/multimedia/ffmpeg3/DESCR b/multimedia/ffmpeg3/DESCR new file mode 100644 index 00000000000..636d826a206 --- /dev/null +++ b/multimedia/ffmpeg3/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 3. diff --git a/multimedia/ffmpeg3/Makefile b/multimedia/ffmpeg3/Makefile new file mode 100644 index 00000000000..2f574d86851 --- /dev/null +++ b/multimedia/ffmpeg3/Makefile @@ -0,0 +1,53 @@ +# $NetBSD: Makefile,v 1.1 2016/03/05 08:52:23 ryoon Exp $ + +PKGNAME= ${DISTNAME:S/ffmpeg/ffmpeg3/} +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= http://ffmpeg.mplayerhq.hu/ +COMMENT= Decoding, encoding and streaming software (v3.x) + +CONFIGURE_ARGS+= --enable-avfilter +#CONFIGURE_ARGS+= --enable-avfilter-lavf +CONFIGURE_ARGS+= --enable-postproc +CONFIGURE_ARGS+= --disable-ffplay + +INSTALLATION_DIRS= lib/ffmpeg3 share/doc/ffmpeg3 share/examples/ffmpeg3 + +CONF_FILES+= ${PREFIX}/share/examples/ffmpeg3/ffserver.conf \ + ${PKG_SYSCONFDIR}/ffserver.conf + +.include "../../mk/bsd.prefs.mk" + +.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS]) +CONFIGURE_ARGS+= --enable-cross-compile +CONFIGURE_ARGS+= --arch=${MACHINE_ARCH} +CONFIGURE_ARGS+= --host-cc=${NATIVE_CC:Q} +CONFIGURE_ARGS+= --host-ld=${NATIVE_CC:Q} +CONFIGURE_ARGS+= --target-os=${LOWER_OPSYS} +.endif + +TEST_TARGET= check + +post-install: + ${INSTALL_DATA} ${WRKSRC}/doc/*.txt \ + ${DESTDIR}${PREFIX}/share/doc/ffmpeg3 + ${INSTALL_DATA} ${WRKSRC}/doc/ffserver.conf \ + ${DESTDIR}${PREFIX}/share/examples/ffmpeg3 + +.include "options.mk" + +.include "../../mk/compiler.mk" + +# disable asm on i386 for non-gcc and gcc < 4.2 +.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.*) +CFLAGS+= -mstackrealign -mpreferred-stack-boundary=4 +. endif +.endif + +.include "../../multimedia/ffmpeg3/Makefile.common" diff --git a/multimedia/ffmpeg3/Makefile.common b/multimedia/ffmpeg3/Makefile.common new file mode 100644 index 00000000000..ca967acaa96 --- /dev/null +++ b/multimedia/ffmpeg3/Makefile.common @@ -0,0 +1,92 @@ +# $NetBSD: Makefile.common,v 1.1 2016/03/05 08:52:23 ryoon Exp $ +# used by multimedia/ffmpeg3/Makefile +# used by multimedia/ffplay3/Makefile + +DISTNAME= ffmpeg-3.0 +CATEGORIES= multimedia +MASTER_SITES= http://www.ffmpeg.org/releases/ +EXTRACT_SUFX= .tar.xz + +LICENSE= gnu-lgpl-v2.1 AND gnu-gpl-v2 + +PATCHDIR= ${.CURDIR}/../../multimedia/ffmpeg3/patches + +USE_LANGUAGES= c99 +USE_LIBTOOL= yes +USE_TOOLS+= gmake texi2html pod2man +HAS_CONFIGURE= yes +CONFIGURE_ARGS+= --cc=${CC:Q} +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+= --mandir=${PREFIX}/${PKGMANDIR} +CONFIGURE_ARGS+= --prefix=${PREFIX} + +CONFIGURE_ARGS+= --progs-suffix=3 +CONFIGURE_ARGS+= --datadir=${PREFIX}/share/ffmpeg3 +CONFIGURE_ARGS+= --incdir=${PREFIX}/include/ffmpeg3 +CONFIGURE_ARGS+= --libdir=${PREFIX}/lib/ffmpeg3 +CONFIGURE_ARGS+= --shlibdir=${PREFIX}/lib/ffmpeg3 +LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/ffmpeg3 + +PLIST_VARS+= opencl + +.if !empty(MACHINE_PLATFORM:MDarwin-1[2-9].*-*) +CONFIGURE_ARGS+= --enable-opencl +PLIST.opencl= yes +.endif + +.if ${OPSYS} == "SunOS" +USE_TOOLS+= bash:build +CONFIG_SHELL= ${TOOLS_PATH.bash} +.endif + +CONFIGURE_ARGS+= --enable-runtime-cpudetect + +# 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} + +pre-configure: + mkdir ${WRKSRC}/tmp + +.include "../../archivers/bzip2/buildlink3.mk" +.include "../../devel/libgetopt/buildlink3.mk" +.include "../../devel/zlib/buildlink3.mk" +.include "../../mk/pthread.buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/multimedia/ffmpeg3/PLIST b/multimedia/ffmpeg3/PLIST new file mode 100644 index 00000000000..9cd2e4e1730 --- /dev/null +++ b/multimedia/ffmpeg3/PLIST @@ -0,0 +1,183 @@ +@comment $NetBSD: PLIST,v 1.1 2016/03/05 08:52:23 ryoon Exp $ +bin/ffmpeg3 +bin/ffprobe3 +bin/ffserver3 +include/ffmpeg3/libavcodec/avcodec.h +include/ffmpeg3/libavcodec/avdct.h +include/ffmpeg3/libavcodec/avfft.h +include/ffmpeg3/libavcodec/d3d11va.h +include/ffmpeg3/libavcodec/dirac.h +include/ffmpeg3/libavcodec/dv_profile.h +include/ffmpeg3/libavcodec/dxva2.h +include/ffmpeg3/libavcodec/qsv.h +include/ffmpeg3/libavcodec/vaapi.h +include/ffmpeg3/libavcodec/vda.h +include/ffmpeg3/libavcodec/vdpau.h +include/ffmpeg3/libavcodec/version.h +include/ffmpeg3/libavcodec/videotoolbox.h +include/ffmpeg3/libavcodec/vorbis_parser.h +include/ffmpeg3/libavcodec/xvmc.h +include/ffmpeg3/libavdevice/avdevice.h +include/ffmpeg3/libavdevice/version.h +include/ffmpeg3/libavfilter/avfilter.h +include/ffmpeg3/libavfilter/avfiltergraph.h +include/ffmpeg3/libavfilter/buffersink.h +include/ffmpeg3/libavfilter/buffersrc.h +include/ffmpeg3/libavfilter/version.h +include/ffmpeg3/libavformat/avformat.h +include/ffmpeg3/libavformat/avio.h +include/ffmpeg3/libavformat/version.h +include/ffmpeg3/libavutil/adler32.h +include/ffmpeg3/libavutil/aes.h +include/ffmpeg3/libavutil/aes_ctr.h +include/ffmpeg3/libavutil/attributes.h +include/ffmpeg3/libavutil/audio_fifo.h +include/ffmpeg3/libavutil/avassert.h +include/ffmpeg3/libavutil/avconfig.h +include/ffmpeg3/libavutil/avstring.h +include/ffmpeg3/libavutil/avutil.h +include/ffmpeg3/libavutil/base64.h +include/ffmpeg3/libavutil/blowfish.h +include/ffmpeg3/libavutil/bprint.h +include/ffmpeg3/libavutil/bswap.h +include/ffmpeg3/libavutil/buffer.h +include/ffmpeg3/libavutil/camellia.h +include/ffmpeg3/libavutil/cast5.h +include/ffmpeg3/libavutil/channel_layout.h +include/ffmpeg3/libavutil/common.h +include/ffmpeg3/libavutil/cpu.h +include/ffmpeg3/libavutil/crc.h +include/ffmpeg3/libavutil/des.h +include/ffmpeg3/libavutil/dict.h +include/ffmpeg3/libavutil/display.h +include/ffmpeg3/libavutil/downmix_info.h +include/ffmpeg3/libavutil/error.h +include/ffmpeg3/libavutil/eval.h +include/ffmpeg3/libavutil/ffversion.h +include/ffmpeg3/libavutil/fifo.h +include/ffmpeg3/libavutil/file.h +include/ffmpeg3/libavutil/frame.h +include/ffmpeg3/libavutil/hash.h +include/ffmpeg3/libavutil/hmac.h +include/ffmpeg3/libavutil/imgutils.h +include/ffmpeg3/libavutil/intfloat.h +include/ffmpeg3/libavutil/intreadwrite.h +include/ffmpeg3/libavutil/lfg.h +include/ffmpeg3/libavutil/log.h +include/ffmpeg3/libavutil/lzo.h +include/ffmpeg3/libavutil/macros.h +include/ffmpeg3/libavutil/mastering_display_metadata.h +include/ffmpeg3/libavutil/mathematics.h +include/ffmpeg3/libavutil/md5.h +include/ffmpeg3/libavutil/mem.h +include/ffmpeg3/libavutil/motion_vector.h +include/ffmpeg3/libavutil/murmur3.h +include/ffmpeg3/libavutil/opt.h +include/ffmpeg3/libavutil/parseutils.h +include/ffmpeg3/libavutil/pixdesc.h +include/ffmpeg3/libavutil/pixelutils.h +include/ffmpeg3/libavutil/pixfmt.h +include/ffmpeg3/libavutil/random_seed.h +include/ffmpeg3/libavutil/rational.h +include/ffmpeg3/libavutil/rc4.h +include/ffmpeg3/libavutil/replaygain.h +include/ffmpeg3/libavutil/ripemd.h +include/ffmpeg3/libavutil/samplefmt.h +include/ffmpeg3/libavutil/sha.h +include/ffmpeg3/libavutil/sha512.h +include/ffmpeg3/libavutil/stereo3d.h +include/ffmpeg3/libavutil/tea.h +include/ffmpeg3/libavutil/threadmessage.h +include/ffmpeg3/libavutil/time.h +include/ffmpeg3/libavutil/timecode.h +include/ffmpeg3/libavutil/timestamp.h +include/ffmpeg3/libavutil/tree.h +include/ffmpeg3/libavutil/twofish.h +include/ffmpeg3/libavutil/version.h +include/ffmpeg3/libavutil/xtea.h +include/ffmpeg3/libpostproc/postprocess.h +include/ffmpeg3/libpostproc/version.h +include/ffmpeg3/libswresample/swresample.h +include/ffmpeg3/libswresample/version.h +include/ffmpeg3/libswscale/swscale.h +include/ffmpeg3/libswscale/version.h +lib/ffmpeg3/libavcodec.a +lib/ffmpeg3/libavcodec.so +lib/ffmpeg3/libavcodec.so.57 +lib/ffmpeg3/libavcodec.so.57.24.102 +lib/ffmpeg3/libavdevice.a +lib/ffmpeg3/libavdevice.so +lib/ffmpeg3/libavdevice.so.57 +lib/ffmpeg3/libavdevice.so.57.0.101 +lib/ffmpeg3/libavfilter.a +lib/ffmpeg3/libavfilter.so +lib/ffmpeg3/libavfilter.so.6 +lib/ffmpeg3/libavfilter.so.6.31.100 +lib/ffmpeg3/libavformat.a +lib/ffmpeg3/libavformat.so +lib/ffmpeg3/libavformat.so.57 +lib/ffmpeg3/libavformat.so.57.25.100 +lib/ffmpeg3/libavutil.a +lib/ffmpeg3/libavutil.so +lib/ffmpeg3/libavutil.so.55 +lib/ffmpeg3/libavutil.so.55.17.103 +lib/ffmpeg3/libpostproc.a +lib/ffmpeg3/libpostproc.so +lib/ffmpeg3/libpostproc.so.54 +lib/ffmpeg3/libpostproc.so.54.0.100 +lib/ffmpeg3/libswresample.a +lib/ffmpeg3/libswresample.so +lib/ffmpeg3/libswresample.so.2 +lib/ffmpeg3/libswresample.so.2.0.101 +lib/ffmpeg3/libswscale.a +lib/ffmpeg3/libswscale.so +lib/ffmpeg3/libswscale.so.4 +lib/ffmpeg3/libswscale.so.4.0.100 +lib/ffmpeg3/pkgconfig/libavcodec.pc +lib/ffmpeg3/pkgconfig/libavdevice.pc +lib/ffmpeg3/pkgconfig/libavfilter.pc +lib/ffmpeg3/pkgconfig/libavformat.pc +lib/ffmpeg3/pkgconfig/libavutil.pc +lib/ffmpeg3/pkgconfig/libpostproc.pc +lib/ffmpeg3/pkgconfig/libswresample.pc +lib/ffmpeg3/pkgconfig/libswscale.pc +share/doc/ffmpeg3/build_system.txt +share/doc/ffmpeg3/errno.txt +share/doc/ffmpeg3/ffmpeg.txt +share/doc/ffmpeg3/filter_design.txt +share/doc/ffmpeg3/issue_tracker.txt +share/doc/ffmpeg3/mips.txt +share/doc/ffmpeg3/multithreading.txt +share/doc/ffmpeg3/optimization.txt +share/doc/ffmpeg3/rate_distortion.txt +share/doc/ffmpeg3/snow.txt +share/doc/ffmpeg3/swresample.txt +share/doc/ffmpeg3/swscale.txt +share/doc/ffmpeg3/tablegen.txt +share/doc/ffmpeg3/writing_filters.txt +share/examples/ffmpeg3/ffserver.conf +share/ffmpeg3/examples/Makefile +share/ffmpeg3/examples/README +share/ffmpeg3/examples/avio_dir_cmd.c +share/ffmpeg3/examples/avio_reading.c +share/ffmpeg3/examples/decoding_encoding.c +share/ffmpeg3/examples/demuxing_decoding.c +share/ffmpeg3/examples/extract_mvs.c +share/ffmpeg3/examples/filter_audio.c +share/ffmpeg3/examples/filtering_audio.c +share/ffmpeg3/examples/filtering_video.c +share/ffmpeg3/examples/http_multiclient.c +share/ffmpeg3/examples/metadata.c +share/ffmpeg3/examples/muxing.c +share/ffmpeg3/examples/qsvdec.c +share/ffmpeg3/examples/remuxing.c +share/ffmpeg3/examples/resampling_audio.c +share/ffmpeg3/examples/scaling_video.c +share/ffmpeg3/examples/transcode_aac.c +share/ffmpeg3/examples/transcoding.c +share/ffmpeg3/ffprobe.xsd +share/ffmpeg3/libvpx-1080p.ffpreset +share/ffmpeg3/libvpx-1080p50_60.ffpreset +share/ffmpeg3/libvpx-360p.ffpreset +share/ffmpeg3/libvpx-720p.ffpreset +share/ffmpeg3/libvpx-720p50_60.ffpreset diff --git a/multimedia/ffmpeg3/buildlink3.mk b/multimedia/ffmpeg3/buildlink3.mk new file mode 100644 index 00000000000..e4ab9f54d69 --- /dev/null +++ b/multimedia/ffmpeg3/buildlink3.mk @@ -0,0 +1,54 @@ +# $NetBSD: buildlink3.mk,v 1.1 2016/03/05 08:52:23 ryoon Exp $ + +BUILDLINK_TREE+= ffmpeg3 + +.if !defined(FFMPEG3_BUILDLINK3_MK) +FFMPEG3_BUILDLINK3_MK:= + +BUILDLINK_API_DEPENDS.ffmpeg3+= ffmpeg3>=3.0 +BUILDLINK_ABI_DEPENDS.ffmpeg3+= ffmpeg3>=3.0 +BUILDLINK_PKGSRCDIR.ffmpeg3?= ../../multimedia/ffmpeg3 + +pkgbase := ffmpeg3 +. include "../../mk/pkg-build-options.mk" + +.include "../../mk/bsd.fast.prefs.mk" + +.if !empty(PKG_BUILD_OPTIONS.ffmpeg3:Mfreetype) +. include "../../graphics/freetype2/buildlink3.mk" +.endif + +.if !empty(PKG_BUILD_OPTIONS.ffmpeg3:Mfontconfig) +. include "../../fonts/fontconfig/buildlink3.mk" +.endif + +.if !empty(PKG_BUILD_OPTIONS.ffmpeg3:Mtheora) +. include "../../multimedia/libtheora/buildlink3.mk" +.endif + +.if !empty(PKG_BUILD_OPTIONS.ffmpeg3:Mxvid) +. include "../../multimedia/xvidcore/buildlink3.mk" +.endif + +.if !empty(PKG_BUILD_OPTIONS.ffmpeg3:Mx264) +. include "../../multimedia/x264-devel/buildlink3.mk" +.endif + +.if !empty(PKG_BUILD_OPTIONS.ffmpeg3:Mfaac) +. include "../../audio/faac/buildlink3.mk" +.endif + +.if !empty(PKG_BUILD_OPTIONS.ffmpeg3:Mlibvpx) +. include "../../multimedia/libvpx/buildlink3.mk" +.endif + +BUILDLINK_INCDIRS.ffmpeg3+= include/ffmpeg3 +BUILDLINK_LIBDIRS.ffmpeg3+= lib/ffmpeg3 +BUILDLINK_FNAME_TRANSFORM.ffmpeg3+= -e 's|lib/ffmpeg3/pkgconfig/|lib/pkgconfig/|' + +.include "../../archivers/bzip2/buildlink3.mk" +.include "../../devel/libgetopt/buildlink3.mk" +.include "../../devel/zlib/buildlink3.mk" +.endif # FFMPEG3_BUILDLINK3_MK + +BUILDLINK_TREE+= -ffmpeg3 diff --git a/multimedia/ffmpeg3/distinfo b/multimedia/ffmpeg3/distinfo new file mode 100644 index 00000000000..af865c1f366 --- /dev/null +++ b/multimedia/ffmpeg3/distinfo @@ -0,0 +1,12 @@ +$NetBSD: distinfo,v 1.1 2016/03/05 08:52:23 ryoon Exp $ + +SHA1 (ffmpeg-3.0.tar.xz) = 383c8d3758aea027f1452fa98ae9016a28f74d8f +RMD160 (ffmpeg-3.0.tar.xz) = 542a711c39cb7270abd2835654f0abb565b0ba41 +SHA512 (ffmpeg-3.0.tar.xz) = f3d9ff422112d24509d4cc73aa7b79fb858e8454fa44aa3d05cb1a1b1094dfa2c97680ffa6bb17aac4caf36e8dda1802a7f9f212e0f5f5ca74e7d45cacb2cfcc +Size (ffmpeg-3.0.tar.xz) = 7463604 bytes +SHA1 (patch-Makefile) = e3cb5cedccd2840f36ab90cd2f4b7987e1098a56 +SHA1 (patch-configure) = e57e2501e63a05e9eeefc688e311a16729d1a711 +SHA1 (patch-libavutil_common.h) = de36efed3a8a2069e170e5afe77eb122a46d14b2 +SHA1 (patch-libavutil_opencl.c) = 3366c6c2aa7daaf097298214d2fff7c60c645ca4 +SHA1 (patch-libavutil_x86_asm.h) = 85c5403e97449639253d3c97391dfbb4cadb2548 +SHA1 (patch-libavutil_x86_cpu.c) = 499b0fc3081971a2bba2724bd051aab14c531239 diff --git a/multimedia/ffmpeg3/options.mk b/multimedia/ffmpeg3/options.mk new file mode 100644 index 00000000000..ac47365e040 --- /dev/null +++ b/multimedia/ffmpeg3/options.mk @@ -0,0 +1,186 @@ +# $NetBSD: options.mk,v 1.1 2016/03/05 08:52:23 ryoon Exp $ + +# Global and legacy options + +PKG_OPTIONS_VAR= PKG_OPTIONS.ffmpeg3 +PKG_SUPPORTED_OPTIONS= ass faac fdk-aac fontconfig freetype gnutls lame \ + libvpx opencore-amr openssl theora vorbis x264 x265 \ + xcb xvid +PKG_SUGGESTED_OPTIONS= lame ass freetype fontconfig libvpx openssl \ + theora vorbis x264 xvid + +# 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" + +# Fontconfig +.if !empty(PKG_OPTIONS:Mfontconfig) +USE_TOOLS+= pkg-config +CONFIGURE_ARGS+= --enable-fontconfig +.include "../../fonts/fontconfig/buildlink3.mk" +.else +CONFIGURE_ARGS+= --disable-fontconfig +.endif + +# freetype option +.if !empty(PKG_OPTIONS:Mfreetype) +USE_TOOLS+= pkg-config +CONFIGURE_ARGS+= --enable-libfreetype +.include "../../graphics/freetype2/buildlink3.mk" +.else +CONFIGURE_ARGS+= --disable-libfreetype +.endif + +# 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 + +# Fraunhofer FDK AAC codec support +.if !empty(PKG_OPTIONS:Mfdk-aac) +RESTRICTED= This software may require the payment of patent royalties +NO_BIN_ON_CDROM= ${RESTRICTED} +NO_BIN_ON_FTP= ${RESTRICTED} +CONFIGURE_ARGS+= --enable-libfdk_aac +CONFIGURE_ARGS+= --enable-nonfree +.include "../../audio/fdk-aac/buildlink3.mk" +.endif + +# GnuTLS support +.if !empty(PKG_OPTIONS:Mgnutls) +CONFIGURE_ARGS+= --enable-gnutls +.include "../../security/gnutls/buildlink3.mk" +.else +CONFIGURE_ARGS+= --disable-gnutls +.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 + +# OpenSSL support +.if !empty(PKG_OPTIONS:Mopenssl) +CONFIGURE_ARGS+= --enable-nonfree +CONFIGURE_ARGS+= --enable-openssl +.include "../../security/openssl/buildlink3.mk" +.else +CONFIGURE_ARGS+= --disable-openssl +.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 +CONFIGURE_ARGS+= --enable-libx264 +.include "../../multimedia/x264-devel/buildlink3.mk" +.else +CONFIGURE_ARGS+= --disable-libx264 +.endif + +# x265 support +.if !empty(PKG_OPTIONS:Mx265) +CONFIGURE_ARGS+= --enable-libx265 +.include "../../multimedia/x265/buildlink3.mk" +.else +CONFIGURE_ARGS+= --disable-libx265 +.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 + +# X11 screen capture support using libxcb +.if !empty(PKG_OPTIONS:Mxcb) +CONFIGURE_ARGS+= --enable-libxcb +CONFIGURE_ARGS+= --enable-libxcb-shape +CONFIGURE_ARGS+= --enable-libxcb-shm +CONFIGURE_ARGS+= --enable-libxcb-xfixes +.include "../../x11/libxcb/buildlink3.mk" +.else +CONFIGURE_ARGS+= --disable-libxcb +.endif diff --git a/multimedia/ffmpeg3/patches/patch-Makefile b/multimedia/ffmpeg3/patches/patch-Makefile new file mode 100644 index 00000000000..d23465741cc --- /dev/null +++ b/multimedia/ffmpeg3/patches/patch-Makefile @@ -0,0 +1,15 @@ +$NetBSD: patch-Makefile,v 1.1 2016/03/05 08:52:23 ryoon Exp $ + +--- Makefile.orig 2016-01-15 16:58:32.000000000 +0000 ++++ Makefile +@@ -159,8 +159,8 @@ install-progs: install-progs-yes $(AVPRO + + 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/ffmpeg3/patches/patch-configure b/multimedia/ffmpeg3/patches/patch-configure new file mode 100644 index 00000000000..f8d566ca61d --- /dev/null +++ b/multimedia/ffmpeg3/patches/patch-configure @@ -0,0 +1,58 @@ +$NetBSD: patch-configure,v 1.1 2016/03/05 08:52:23 ryoon Exp $ + +--- configure.orig 2016-02-15 02:29:37.000000000 +0000 ++++ configure +@@ -4490,6 +4490,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 +@@ -4943,10 +4948,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 ppc64 || enabled bigendian; then + disable vsx +@@ -5851,6 +5859,7 @@ enabled xmm_clobber_test && + -Wl,--wrap,sws_scale || + disable xmm_clobber_test + ++if false; then + echo "X { local: *; };" > $TMPV + if test_ldflags -Wl,--version-script,$TMPV; then + append SHFLAGS '-Wl,--version-script,\$(SUBDIR)lib\$(NAME).ver' +@@ -5866,6 +5875,7 @@ EOF + __asm__(".symver ff_foo,av_foo@VERSION"); + void ff_foo(void) {} + EOF ++fi + + if [ -z "$optflags" ]; then + if enabled small; then +@@ -6512,7 +6522,7 @@ Version: $version + Requires: $(enabled shared || echo $requires) + Requires.private: $(enabled shared && echo $requires) + Conflicts: +-Libs: -L\${libdir} $(enabled rpath && echo "-Wl,-rpath,\${libdir}") -l${shortname} $(enabled shared || echo $libs) ++Libs: -L\${libdir} -Wl,-R\${libdir} $(enabled rpath && echo "-Wl,-rpath,\${libdir}") -l${shortname} $(enabled shared || echo $libs) + Libs.private: $(enabled shared && echo $libs) + Cflags: -I\${includedir} + EOF diff --git a/multimedia/ffmpeg3/patches/patch-libavutil_common.h b/multimedia/ffmpeg3/patches/patch-libavutil_common.h new file mode 100644 index 00000000000..171b8820bdf --- /dev/null +++ b/multimedia/ffmpeg3/patches/patch-libavutil_common.h @@ -0,0 +1,27 @@ +$NetBSD: patch-libavutil_common.h,v 1.1 2016/03/05 08:52:23 ryoon Exp $ + +--- libavutil/common.h.orig 2016-01-15 16:58:36.000000000 +0000 ++++ libavutil/common.h +@@ -43,6 +43,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/ffmpeg3/patches/patch-libavutil_opencl.c b/multimedia/ffmpeg3/patches/patch-libavutil_opencl.c new file mode 100644 index 00000000000..5aedb9f5519 --- /dev/null +++ b/multimedia/ffmpeg3/patches/patch-libavutil_opencl.c @@ -0,0 +1,15 @@ +$NetBSD: patch-libavutil_opencl.c,v 1.1 2016/03/05 08:52:23 ryoon Exp $ + +Fix undeclared identifier error. + +--- libavutil/opencl.c.orig 2016-02-15 02:29:42.000000000 +0000 ++++ libavutil/opencl.c +@@ -453,7 +453,7 @@ cl_program av_opencl_compile(const char + char *log = NULL; + + LOCK_OPENCL; +- for (i = 0; i < opencl_ctx.kernel_code_count; i++) { ++ for (int i = 0; i < opencl_ctx.kernel_code_count; i++) { + // identify a program using a unique name within the kernel source + ptr = av_stristr(opencl_ctx.kernel_code[i].kernel_string, program_name); + if (ptr && !opencl_ctx.kernel_code[i].is_compiled) { diff --git a/multimedia/ffmpeg3/patches/patch-libavutil_x86_asm.h b/multimedia/ffmpeg3/patches/patch-libavutil_x86_asm.h new file mode 100644 index 00000000000..1f723d7907e --- /dev/null +++ b/multimedia/ffmpeg3/patches/patch-libavutil_x86_asm.h @@ -0,0 +1,18 @@ +$NetBSD: patch-libavutil_x86_asm.h,v 1.1 2016/03/05 08:52:23 ryoon Exp $ + +avoid SunOS regset.h definition for REG_SP + +--- libavutil/x86/asm.h.orig 2016-01-15 16:58:37.000000000 +0000 ++++ libavutil/x86/asm.h +@@ -27,6 +27,11 @@ + typedef struct xmm_reg { uint64_t a, b; } xmm_reg; + typedef struct ymm_reg { uint64_t a, b, c, d; } ymm_reg; + ++/* avoid SunOS regset.h definition for REG_SP */ ++#if defined (__sun) && defined (REG_SP) ++#undef REG_SP ++#endif ++ + #if ARCH_X86_64 + # define OPSIZE "q" + # define REG_a "rax" diff --git a/multimedia/ffmpeg3/patches/patch-libavutil_x86_cpu.c b/multimedia/ffmpeg3/patches/patch-libavutil_x86_cpu.c new file mode 100644 index 00000000000..186ae4c0726 --- /dev/null +++ b/multimedia/ffmpeg3/patches/patch-libavutil_x86_cpu.c @@ -0,0 +1,20 @@ +$NetBSD: patch-libavutil_x86_cpu.c,v 1.1 2016/03/05 08:52:23 ryoon Exp $ + +--- libavutil/x86/cpu.c.orig 2016-01-15 16:58:37.000000000 +0000 ++++ libavutil/x86/cpu.c +@@ -116,6 +116,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) +@@ -138,6 +139,7 @@ int ff_get_cpu_flags_x86(void) + } + } + #endif /* HAVE_AVX */ ++#endif /* gcc >= 4.2 */ + #endif /* HAVE_SSE */ + } + if (max_std_level >= 7) { |