diff options
author | adam <adam@pkgsrc.org> | 2018-04-26 07:56:57 +0000 |
---|---|---|
committer | adam <adam@pkgsrc.org> | 2018-04-26 07:56:57 +0000 |
commit | 6e8e40c302127a51a72e973f116c994fc2cef415 (patch) | |
tree | 2766356f4b8788afe6f555c7035a8b63edaf12c2 /multimedia | |
parent | 086ea06ecd007e8f7f3015bddf7423f488711ba3 (diff) | |
download | pkgsrc-6e8e40c302127a51a72e973f116c994fc2cef415.tar.gz |
ffmpeg4/ffplay4: added version 4.0
version 4.0:
- Bitstream filters for editing metadata in H.264, HEVC and MPEG-2 streams
- Dropped support for OpenJPEG versions 2.0 and below. Using OpenJPEG now
requires 2.1 (or later) and pkg-config.
- VDA dropped (use VideoToolbox instead)
- MagicYUV encoder
- Raw AMR-NB and AMR-WB demuxers
- TiVo ty/ty+ demuxer
- Intel QSV-accelerated MJPEG encoding
- PCE support for extended channel layouts in the AAC encoder
- native aptX and aptX HD encoder and decoder
- Raw aptX and aptX HD muxer and demuxer
- NVIDIA NVDEC-accelerated H.264, HEVC, MJPEG, MPEG-1/2/4, VC1, VP8/9 hwaccel decoding
- Intel QSV-accelerated overlay filter
- mcompand audio filter
- acontrast audio filter
- OpenCL overlay filter
- video mix filter
- video normalize filter
- audio lv2 wrapper filter
- VAAPI MJPEG and VP8 decoding
- AMD AMF H.264 and HEVC encoders
- video fillborders filter
- video setrange filter
- nsp demuxer
- support LibreSSL (via libtls)
- AVX-512/ZMM support added
- Dropped support for building for Windows XP. The minimum supported Windows
version is Windows Vista.
- deconvolve video filter
- entropy video filter
- hilbert audio filter source
- aiir audio filter
- aiff: add support for CD-ROM XA ADPCM
- Removed the ffserver program
- Removed the ffmenc and ffmdec muxer and demuxer
- VideoToolbox HEVC encoder and hwaccel
- VAAPI-accelerated ProcAmp (color balance), denoise and sharpness filters
- Add android_camera indev
- codec2 en/decoding via libcodec2
- muxer/demuxer for raw codec2 files and .c2 files
- Moved nvidia codec headers into an external repository.
They can be found at http://git.videolan.org/?p=ffmpeg/nv-codec-headers.git
- native SBC encoder and decoder
- drmeter audio filter
- hapqa_extract bitstream filter
- filter_units bitstream filter
- AV1 Support through libaom
- E-AC-3 dependent frames support
- bitstream filter for extracting E-AC-3 core
- Haivision SRT protocol via libsrt
- segafilm muxer
- vfrdet filter
Diffstat (limited to 'multimedia')
-rw-r--r-- | multimedia/Makefile | 4 | ||||
-rw-r--r-- | multimedia/ffmpeg4/ALTERNATIVES | 2 | ||||
-rw-r--r-- | multimedia/ffmpeg4/DESCR | 5 | ||||
-rw-r--r-- | multimedia/ffmpeg4/Makefile | 55 | ||||
-rw-r--r-- | multimedia/ffmpeg4/Makefile.common | 90 | ||||
-rw-r--r-- | multimedia/ffmpeg4/PLIST | 259 | ||||
-rw-r--r-- | multimedia/ffmpeg4/buildlink3.mk | 59 | ||||
-rw-r--r-- | multimedia/ffmpeg4/distinfo | 13 | ||||
-rw-r--r-- | multimedia/ffmpeg4/options.mk | 221 | ||||
-rw-r--r-- | multimedia/ffmpeg4/patches/patch-Makefile | 15 | ||||
-rw-r--r-- | multimedia/ffmpeg4/patches/patch-configure | 52 | ||||
-rw-r--r-- | multimedia/ffmpeg4/patches/patch-doc_Makefile | 31 | ||||
-rw-r--r-- | multimedia/ffmpeg4/patches/patch-libavformat_sctp.c | 17 | ||||
-rw-r--r-- | multimedia/ffmpeg4/patches/patch-libavutil_common.h | 29 | ||||
-rw-r--r-- | multimedia/ffmpeg4/patches/patch-libavutil_x86_asm.h | 18 | ||||
-rw-r--r-- | multimedia/ffmpeg4/patches/patch-libavutil_x86_cpu.c | 22 | ||||
-rw-r--r-- | multimedia/ffplay4/DESCR | 3 | ||||
-rw-r--r-- | multimedia/ffplay4/Makefile | 35 | ||||
-rw-r--r-- | multimedia/ffplay4/PLIST | 3 |
19 files changed, 932 insertions, 1 deletions
diff --git a/multimedia/Makefile b/multimedia/Makefile index e52abf7fe06..83a52eb6500 100644 --- a/multimedia/Makefile +++ b/multimedia/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.261 2018/04/25 21:38:52 kamil Exp $ +# $NetBSD: Makefile,v 1.262 2018/04/26 07:56:57 adam Exp $ # COMMENT= Multimedia utilities @@ -32,11 +32,13 @@ SUBDIR+= ffmpeg1 SUBDIR+= ffmpeg2 SUBDIR+= ffmpeg2theora SUBDIR+= ffmpeg3 +SUBDIR+= ffmpeg4 SUBDIR+= ffmpegthumbnailer SUBDIR+= ffmpegthumbs SUBDIR+= ffplay1 SUBDIR+= ffplay2 SUBDIR+= ffplay3 +SUBDIR+= ffplay4 SUBDIR+= flashplayer SUBDIR+= flvstreamer SUBDIR+= fuppes diff --git a/multimedia/ffmpeg4/ALTERNATIVES b/multimedia/ffmpeg4/ALTERNATIVES new file mode 100644 index 00000000000..8c2db0110ea --- /dev/null +++ b/multimedia/ffmpeg4/ALTERNATIVES @@ -0,0 +1,2 @@ +bin/ffmpeg @PREFIX@/bin/ffmpeg4 +bin/ffprobe @PREFIX@/bin/ffprobe4 diff --git a/multimedia/ffmpeg4/DESCR b/multimedia/ffmpeg4/DESCR new file mode 100644 index 00000000000..636d826a206 --- /dev/null +++ b/multimedia/ffmpeg4/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/ffmpeg4/Makefile b/multimedia/ffmpeg4/Makefile new file mode 100644 index 00000000000..20ff5878ae4 --- /dev/null +++ b/multimedia/ffmpeg4/Makefile @@ -0,0 +1,55 @@ +# $NetBSD: Makefile,v 1.1 2018/04/26 07:56:57 adam Exp $ + +PKGNAME= ${DISTNAME:S/ffmpeg/ffmpeg4/} +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-avresample +CONFIGURE_ARGS+= --enable-postproc +CONFIGURE_ARGS+= --enable-rpath +CONFIGURE_ARGS+= --disable-ffplay + +INSTALLATION_DIRS= lib/ffmpeg4 share/doc/ffmpeg4 share/examples/ffmpeg4 + +.include "../../mk/bsd.prefs.mk" + +.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS]) +CONFIGURE_ARGS+= --enable-cross-compile +CONFIGURE_ARGS+= --host-cc=${NATIVE_CC:Q} +CONFIGURE_ARGS+= --host-ld=${NATIVE_CC:Q} +CONFIGURE_ARGS+= --target-os=${LOWER_OPSYS} +.endif + +PRINT_PLIST_AWK+= /html/ { $$0 = "$${PLIST.doc}" $$0 } +PRINT_PLIST_AWK+= /opencl/ { $$0 = "$${PLIST.opencl}" $$0 } + +TEST_TARGET= check + +post-install: + ${INSTALL_DATA} ${WRKSRC}/doc/*.txt \ + ${DESTDIR}${PREFIX}/share/doc/ffmpeg4 + +.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-[456].*) +CFLAGS+= -mstackrealign -mpreferred-stack-boundary=4 +. endif +.endif + +# configure script uses uname -m to detect arch, as opposed to uname -p in +# GNU/configure. Unable to detect NetBSD/macppc hosts correctly. +CONFIGURE_ARGS+= --arch=${MACHINE_ARCH} + +.include "../../multimedia/ffmpeg4/Makefile.common" diff --git a/multimedia/ffmpeg4/Makefile.common b/multimedia/ffmpeg4/Makefile.common new file mode 100644 index 00000000000..946ce6973dc --- /dev/null +++ b/multimedia/ffmpeg4/Makefile.common @@ -0,0 +1,90 @@ +# $NetBSD: Makefile.common,v 1.1 2018/04/26 07:56:57 adam Exp $ +# used by multimedia/ffmpeg4/Makefile +# used by multimedia/ffplay4/Makefile + +DISTNAME= ffmpeg-4.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/ffmpeg4/patches + +USE_LANGUAGES= c99 +USE_LIBTOOL= yes +USE_TOOLS+= gmake pod2man perl +HAS_CONFIGURE= yes +CONFIGURE_ARGS+= --cc=${CC:Q} +CONFIGURE_ARGS+= --disable-debug +CONFIGURE_ARGS+= --disable-optimizations +CONFIGURE_ARGS+= --disable-stripping +CONFIGURE_ARGS+= --enable-gpl +CONFIGURE_ARGS+= --enable-libxml2 +CONFIGURE_ARGS+= --enable-pthreads +CONFIGURE_ARGS+= --enable-shared +CONFIGURE_ARGS+= --mandir=${PREFIX}/${PKGMANDIR} +CONFIGURE_ARGS+= --prefix=${PREFIX} + +CONFIGURE_ARGS+= --progs-suffix=4 +CONFIGURE_ARGS+= --datadir=${PREFIX}/share/ffmpeg4 +CONFIGURE_ARGS+= --docdir=${PREFIX}/share/doc/ffmpeg4 +CONFIGURE_ARGS+= --incdir=${PREFIX}/include/ffmpeg4 +CONFIGURE_ARGS+= --libdir=${PREFIX}/lib/ffmpeg4 +CONFIGURE_ARGS+= --shlibdir=${PREFIX}/lib/ffmpeg4 +LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/ffmpeg4 + +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 !empty(PKGSRC_COMPILER:Msunpro) +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+= nasm>=2.13:../../devel/nasm + +REPLACE_PERL+= doc/texi2pod.pl +REPLACE_SH+= configure ffbuild/version.sh + +PLIST_SRC+= ${PKGDIR}/PLIST + +MAKE_ENV+= EXTRA_LIBS=${LIBGETOPT:Q} + +pre-configure: + mkdir ${WRKSRC}/tmp + +.include "../../archivers/bzip2/buildlink3.mk" +.include "../../archivers/xz/buildlink3.mk" +.include "../../devel/libgetopt/buildlink3.mk" +.include "../../devel/zlib/buildlink3.mk" +.include "../../textproc/libxml2/buildlink3.mk" +.include "../../mk/pthread.buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/multimedia/ffmpeg4/PLIST b/multimedia/ffmpeg4/PLIST new file mode 100644 index 00000000000..52542d4a2b5 --- /dev/null +++ b/multimedia/ffmpeg4/PLIST @@ -0,0 +1,259 @@ +@comment $NetBSD: PLIST,v 1.1 2018/04/26 07:56:57 adam Exp $ +bin/ffmpeg4 +bin/ffprobe4 +include/ffmpeg4/libavcodec/ac3_parser.h +include/ffmpeg4/libavcodec/adts_parser.h +include/ffmpeg4/libavcodec/avcodec.h +include/ffmpeg4/libavcodec/avdct.h +include/ffmpeg4/libavcodec/avfft.h +include/ffmpeg4/libavcodec/d3d11va.h +include/ffmpeg4/libavcodec/dirac.h +include/ffmpeg4/libavcodec/dv_profile.h +include/ffmpeg4/libavcodec/dxva2.h +include/ffmpeg4/libavcodec/jni.h +include/ffmpeg4/libavcodec/mediacodec.h +include/ffmpeg4/libavcodec/qsv.h +include/ffmpeg4/libavcodec/vaapi.h +include/ffmpeg4/libavcodec/vdpau.h +include/ffmpeg4/libavcodec/version.h +include/ffmpeg4/libavcodec/videotoolbox.h +include/ffmpeg4/libavcodec/vorbis_parser.h +include/ffmpeg4/libavcodec/xvmc.h +include/ffmpeg4/libavdevice/avdevice.h +include/ffmpeg4/libavdevice/version.h +include/ffmpeg4/libavfilter/avfilter.h +include/ffmpeg4/libavfilter/buffersink.h +include/ffmpeg4/libavfilter/buffersrc.h +include/ffmpeg4/libavfilter/version.h +include/ffmpeg4/libavformat/avformat.h +include/ffmpeg4/libavformat/avio.h +include/ffmpeg4/libavformat/version.h +include/ffmpeg4/libavresample/avresample.h +include/ffmpeg4/libavresample/version.h +include/ffmpeg4/libavutil/adler32.h +include/ffmpeg4/libavutil/aes.h +include/ffmpeg4/libavutil/aes_ctr.h +include/ffmpeg4/libavutil/attributes.h +include/ffmpeg4/libavutil/audio_fifo.h +include/ffmpeg4/libavutil/avassert.h +include/ffmpeg4/libavutil/avconfig.h +include/ffmpeg4/libavutil/avstring.h +include/ffmpeg4/libavutil/avutil.h +include/ffmpeg4/libavutil/base64.h +include/ffmpeg4/libavutil/blowfish.h +include/ffmpeg4/libavutil/bprint.h +include/ffmpeg4/libavutil/bswap.h +include/ffmpeg4/libavutil/buffer.h +include/ffmpeg4/libavutil/camellia.h +include/ffmpeg4/libavutil/cast5.h +include/ffmpeg4/libavutil/channel_layout.h +include/ffmpeg4/libavutil/common.h +include/ffmpeg4/libavutil/cpu.h +include/ffmpeg4/libavutil/crc.h +include/ffmpeg4/libavutil/des.h +include/ffmpeg4/libavutil/dict.h +include/ffmpeg4/libavutil/display.h +include/ffmpeg4/libavutil/downmix_info.h +include/ffmpeg4/libavutil/encryption_info.h +include/ffmpeg4/libavutil/error.h +include/ffmpeg4/libavutil/eval.h +include/ffmpeg4/libavutil/ffversion.h +include/ffmpeg4/libavutil/fifo.h +include/ffmpeg4/libavutil/file.h +include/ffmpeg4/libavutil/frame.h +include/ffmpeg4/libavutil/hash.h +include/ffmpeg4/libavutil/hmac.h +include/ffmpeg4/libavutil/hwcontext.h +include/ffmpeg4/libavutil/hwcontext_cuda.h +include/ffmpeg4/libavutil/hwcontext_d3d11va.h +include/ffmpeg4/libavutil/hwcontext_drm.h +include/ffmpeg4/libavutil/hwcontext_dxva2.h +include/ffmpeg4/libavutil/hwcontext_mediacodec.h +include/ffmpeg4/libavutil/hwcontext_qsv.h +include/ffmpeg4/libavutil/hwcontext_vaapi.h +include/ffmpeg4/libavutil/hwcontext_vdpau.h +include/ffmpeg4/libavutil/hwcontext_videotoolbox.h +include/ffmpeg4/libavutil/imgutils.h +include/ffmpeg4/libavutil/intfloat.h +include/ffmpeg4/libavutil/intreadwrite.h +include/ffmpeg4/libavutil/lfg.h +include/ffmpeg4/libavutil/log.h +include/ffmpeg4/libavutil/lzo.h +include/ffmpeg4/libavutil/macros.h +include/ffmpeg4/libavutil/mastering_display_metadata.h +include/ffmpeg4/libavutil/mathematics.h +include/ffmpeg4/libavutil/md5.h +include/ffmpeg4/libavutil/mem.h +include/ffmpeg4/libavutil/motion_vector.h +include/ffmpeg4/libavutil/murmur3.h +include/ffmpeg4/libavutil/opt.h +include/ffmpeg4/libavutil/parseutils.h +include/ffmpeg4/libavutil/pixdesc.h +include/ffmpeg4/libavutil/pixelutils.h +include/ffmpeg4/libavutil/pixfmt.h +include/ffmpeg4/libavutil/random_seed.h +include/ffmpeg4/libavutil/rational.h +include/ffmpeg4/libavutil/rc4.h +include/ffmpeg4/libavutil/replaygain.h +include/ffmpeg4/libavutil/ripemd.h +include/ffmpeg4/libavutil/samplefmt.h +include/ffmpeg4/libavutil/sha.h +include/ffmpeg4/libavutil/sha512.h +include/ffmpeg4/libavutil/spherical.h +include/ffmpeg4/libavutil/stereo3d.h +include/ffmpeg4/libavutil/tea.h +include/ffmpeg4/libavutil/threadmessage.h +include/ffmpeg4/libavutil/time.h +include/ffmpeg4/libavutil/timecode.h +include/ffmpeg4/libavutil/timestamp.h +include/ffmpeg4/libavutil/tree.h +include/ffmpeg4/libavutil/twofish.h +include/ffmpeg4/libavutil/version.h +include/ffmpeg4/libavutil/xtea.h +include/ffmpeg4/libpostproc/postprocess.h +include/ffmpeg4/libpostproc/version.h +include/ffmpeg4/libswresample/swresample.h +include/ffmpeg4/libswresample/version.h +include/ffmpeg4/libswscale/swscale.h +include/ffmpeg4/libswscale/version.h +lib/ffmpeg4/libavcodec.a +lib/ffmpeg4/libavcodec.so +lib/ffmpeg4/libavcodec.so.58 +lib/ffmpeg4/libavcodec.so.58.18.100 +lib/ffmpeg4/libavdevice.a +lib/ffmpeg4/libavdevice.so +lib/ffmpeg4/libavdevice.so.58 +lib/ffmpeg4/libavdevice.so.58.3.100 +lib/ffmpeg4/libavfilter.a +lib/ffmpeg4/libavfilter.so +lib/ffmpeg4/libavfilter.so.7 +lib/ffmpeg4/libavfilter.so.7.16.100 +lib/ffmpeg4/libavformat.a +lib/ffmpeg4/libavformat.so +lib/ffmpeg4/libavformat.so.58 +lib/ffmpeg4/libavformat.so.58.12.100 +lib/ffmpeg4/libavresample.a +lib/ffmpeg4/libavresample.so +lib/ffmpeg4/libavresample.so.4 +lib/ffmpeg4/libavresample.so.4.0.0 +lib/ffmpeg4/libavutil.a +lib/ffmpeg4/libavutil.so +lib/ffmpeg4/libavutil.so.56 +lib/ffmpeg4/libavutil.so.56.14.100 +lib/ffmpeg4/libpostproc.a +lib/ffmpeg4/libpostproc.so +lib/ffmpeg4/libpostproc.so.55 +lib/ffmpeg4/libpostproc.so.55.1.100 +lib/ffmpeg4/libswresample.a +lib/ffmpeg4/libswresample.so +lib/ffmpeg4/libswresample.so.3 +lib/ffmpeg4/libswresample.so.3.1.100 +lib/ffmpeg4/libswscale.a +lib/ffmpeg4/libswscale.so +lib/ffmpeg4/libswscale.so.5 +lib/ffmpeg4/libswscale.so.5.1.100 +lib/ffmpeg4/pkgconfig/libavcodec.pc +lib/ffmpeg4/pkgconfig/libavdevice.pc +lib/ffmpeg4/pkgconfig/libavfilter.pc +lib/ffmpeg4/pkgconfig/libavformat.pc +lib/ffmpeg4/pkgconfig/libavresample.pc +lib/ffmpeg4/pkgconfig/libavutil.pc +lib/ffmpeg4/pkgconfig/libpostproc.pc +lib/ffmpeg4/pkgconfig/libswresample.pc +lib/ffmpeg4/pkgconfig/libswscale.pc +man/man1/ffmpeg-all4.1 +man/man1/ffmpeg-bitstream-filters4.1 +man/man1/ffmpeg-codecs4.1 +man/man1/ffmpeg-devices4.1 +man/man1/ffmpeg-filters4.1 +man/man1/ffmpeg-formats4.1 +man/man1/ffmpeg-protocols4.1 +man/man1/ffmpeg-resampler4.1 +man/man1/ffmpeg-scaler4.1 +man/man1/ffmpeg-utils4.1 +man/man1/ffmpeg4.1 +man/man1/ffprobe-all4.1 +man/man1/ffprobe4.1 +man/man3/libavcodec4.3 +man/man3/libavdevice4.3 +man/man3/libavfilter4.3 +man/man3/libavformat4.3 +man/man3/libavutil4.3 +man/man3/libswresample4.3 +man/man3/libswscale4.3 +share/doc/ffmpeg4/build_system.txt +${PLIST.doc}share/doc/ffmpeg4/developer.html +share/doc/ffmpeg4/errno.txt +${PLIST.doc}share/doc/ffmpeg4/faq.html +${PLIST.doc}share/doc/ffmpeg4/fate.html +${PLIST.doc}share/doc/ffmpeg4/ffmpeg-all.html +${PLIST.doc}share/doc/ffmpeg4/ffmpeg-bitstream-filters.html +${PLIST.doc}share/doc/ffmpeg4/ffmpeg-codecs.html +${PLIST.doc}share/doc/ffmpeg4/ffmpeg-devices.html +${PLIST.doc}share/doc/ffmpeg4/ffmpeg-filters.html +${PLIST.doc}share/doc/ffmpeg4/ffmpeg-formats.html +${PLIST.doc}share/doc/ffmpeg4/ffmpeg-protocols.html +${PLIST.doc}share/doc/ffmpeg4/ffmpeg-resampler.html +${PLIST.doc}share/doc/ffmpeg4/ffmpeg-scaler.html +${PLIST.doc}share/doc/ffmpeg4/ffmpeg-utils.html +${PLIST.doc}share/doc/ffmpeg4/ffmpeg.html +share/doc/ffmpeg4/ffmpeg.txt +${PLIST.doc}share/doc/ffmpeg4/ffprobe-all.html +${PLIST.doc}share/doc/ffmpeg4/ffprobe.html +${PLIST.doc}share/doc/ffmpeg4/ffserver-all.html +${PLIST.doc}share/doc/ffmpeg4/ffserver.html +share/doc/ffmpeg4/filter_design.txt +${PLIST.doc}share/doc/ffmpeg4/general.html +${PLIST.doc}share/doc/ffmpeg4/git-howto.html +share/doc/ffmpeg4/issue_tracker.txt +share/doc/ffmpeg4/libav-merge.txt +${PLIST.doc}share/doc/ffmpeg4/libavcodec.html +${PLIST.doc}share/doc/ffmpeg4/libavdevice.html +${PLIST.doc}share/doc/ffmpeg4/libavfilter.html +${PLIST.doc}share/doc/ffmpeg4/libavformat.html +${PLIST.doc}share/doc/ffmpeg4/libavutil.html +${PLIST.doc}share/doc/ffmpeg4/libswresample.html +${PLIST.doc}share/doc/ffmpeg4/libswscale.html +share/doc/ffmpeg4/mips.txt +share/doc/ffmpeg4/multithreading.txt +${PLIST.doc}share/doc/ffmpeg4/nut.html +share/doc/ffmpeg4/optimization.txt +${PLIST.doc}share/doc/ffmpeg4/platform.html +share/doc/ffmpeg4/rate_distortion.txt +share/doc/ffmpeg4/snow.txt +share/doc/ffmpeg4/swresample.txt +share/doc/ffmpeg4/swscale.txt +share/doc/ffmpeg4/tablegen.txt +share/doc/ffmpeg4/undefined.txt +share/doc/ffmpeg4/writing_filters.txt +share/ffmpeg4/examples/Makefile +share/ffmpeg4/examples/README +share/ffmpeg4/examples/avio_dir_cmd.c +share/ffmpeg4/examples/avio_reading.c +share/ffmpeg4/examples/decode_audio.c +share/ffmpeg4/examples/decode_video.c +share/ffmpeg4/examples/demuxing_decoding.c +share/ffmpeg4/examples/encode_audio.c +share/ffmpeg4/examples/encode_video.c +share/ffmpeg4/examples/extract_mvs.c +share/ffmpeg4/examples/filter_audio.c +share/ffmpeg4/examples/filtering_audio.c +share/ffmpeg4/examples/filtering_video.c +share/ffmpeg4/examples/http_multiclient.c +share/ffmpeg4/examples/hw_decode.c +share/ffmpeg4/examples/metadata.c +share/ffmpeg4/examples/muxing.c +share/ffmpeg4/examples/qsvdec.c +share/ffmpeg4/examples/remuxing.c +share/ffmpeg4/examples/resampling_audio.c +share/ffmpeg4/examples/scaling_video.c +share/ffmpeg4/examples/transcode_aac.c +share/ffmpeg4/examples/transcoding.c +share/ffmpeg4/examples/vaapi_encode.c +share/ffmpeg4/examples/vaapi_transcode.c +share/ffmpeg4/ffprobe.xsd +share/ffmpeg4/libvpx-1080p.ffpreset +share/ffmpeg4/libvpx-1080p50_60.ffpreset +share/ffmpeg4/libvpx-360p.ffpreset +share/ffmpeg4/libvpx-720p.ffpreset +share/ffmpeg4/libvpx-720p50_60.ffpreset diff --git a/multimedia/ffmpeg4/buildlink3.mk b/multimedia/ffmpeg4/buildlink3.mk new file mode 100644 index 00000000000..ba772ef5e26 --- /dev/null +++ b/multimedia/ffmpeg4/buildlink3.mk @@ -0,0 +1,59 @@ +# $NetBSD: buildlink3.mk,v 1.1 2018/04/26 07:56:57 adam Exp $ + +BUILDLINK_TREE+= ffmpeg4 + +.if !defined(FFMPEG4_BUILDLINK3_MK) +FFMPEG4_BUILDLINK3_MK:= + +BUILDLINK_API_DEPENDS.ffmpeg4+= ffmpeg4>=4.0 +BUILDLINK_ABI_DEPENDS.ffmpeg4+= ffmpeg4>=4.0 +BUILDLINK_PKGSRCDIR.ffmpeg4?= ../../multimedia/ffmpeg4 + +pkgbase := ffmpeg4 +.include "../../mk/pkg-build-options.mk" + +.include "../../mk/bsd.fast.prefs.mk" + +.if !empty(PKG_BUILD_OPTIONS.ffmpeg4:Mfreetype) +. include "../../graphics/freetype2/buildlink3.mk" +.endif + +.if !empty(PKG_BUILD_OPTIONS.ffmpeg4:Mfontconfig) +. include "../../fonts/fontconfig/buildlink3.mk" +.endif + +.if !empty(PKG_BUILD_OPTIONS.ffmpeg4:Mtheora) +. include "../../multimedia/libtheora/buildlink3.mk" +.endif + +.if !empty(PKG_BUILD_OPTIONS.ffmpeg4:Mxvid) +. include "../../multimedia/xvidcore/buildlink3.mk" +.endif + +.if !empty(PKG_BUILD_OPTIONS.ffmpeg4:Mx264) +. include "../../multimedia/x264-devel/buildlink3.mk" +.endif + +.if !empty(PKG_BUILD_OPTIONS.ffmpeg4:Mlibvpx) +. include "../../multimedia/libvpx/buildlink3.mk" +.endif + +.if !empty(PKG_BUILD_OPTIONS.ffmpeg4:Mvaapi) +. include "../../multimedia/libva/buildlink3.mk" +.endif + +.if !empty(PKG_BUILD_OPTIONS.ffmpeg4:Mvdpau) +. include "../../multimedia/libvdpau/buildlink3.mk" +.endif + +BUILDLINK_INCDIRS.ffmpeg4+= include/ffmpeg4 +BUILDLINK_LIBDIRS.ffmpeg4+= lib/ffmpeg4 +BUILDLINK_FNAME_TRANSFORM.ffmpeg4+= -e 's|lib/ffmpeg4/pkgconfig/|lib/pkgconfig/|' + +.include "../../archivers/bzip2/buildlink3.mk" +.include "../../archivers/xz/buildlink3.mk" +.include "../../devel/libgetopt/buildlink3.mk" +.include "../../devel/zlib/buildlink3.mk" +.endif # FFMPEG4_BUILDLINK3_MK + +BUILDLINK_TREE+= -ffmpeg4 diff --git a/multimedia/ffmpeg4/distinfo b/multimedia/ffmpeg4/distinfo new file mode 100644 index 00000000000..1b8d974608e --- /dev/null +++ b/multimedia/ffmpeg4/distinfo @@ -0,0 +1,13 @@ +$NetBSD: distinfo,v 1.1 2018/04/26 07:56:57 adam Exp $ + +SHA1 (ffmpeg-4.0.tar.xz) = 1f85916c154a4d6a342d7ec1f909bbc58a92c19d +RMD160 (ffmpeg-4.0.tar.xz) = 905285cf32e1b00d320c51c0a94cbd670fab6649 +SHA512 (ffmpeg-4.0.tar.xz) = 78026f31cd0235a4167b2a6f3c5414fe3dd5e9d70a20f59aea08f8b9b94c13e87159074a50981877b3280cdd28c50bf5ff7e7bebdf992750be379984324f6329 +Size (ffmpeg-4.0.tar.xz) = 8656948 bytes +SHA1 (patch-Makefile) = 2d27f218ee49179fdea14bb5c86c506dfb64dbd6 +SHA1 (patch-configure) = 299a6d7cbf3c1a566b96ea8d934ae4d623d4110f +SHA1 (patch-doc_Makefile) = 3b86307323fa565f9ad19c5bcb6ea71d323062fc +SHA1 (patch-libavformat_sctp.c) = 22bad9c7dc152aec3c60e0009899af241f495535 +SHA1 (patch-libavutil_common.h) = d0f1093bc82567807b39dde990ee347f90a082c9 +SHA1 (patch-libavutil_x86_asm.h) = 8f48f9e8ec08b5176bb40fc0021f3bb913dbef22 +SHA1 (patch-libavutil_x86_cpu.c) = 9c97e68fde0fcb19741e034a803d509040ea4487 diff --git a/multimedia/ffmpeg4/options.mk b/multimedia/ffmpeg4/options.mk new file mode 100644 index 00000000000..b8fd5a6ff26 --- /dev/null +++ b/multimedia/ffmpeg4/options.mk @@ -0,0 +1,221 @@ +# $NetBSD: options.mk,v 1.1 2018/04/26 07:56:57 adam Exp $ + +# Global and legacy options + +PKG_OPTIONS_VAR= PKG_OPTIONS.ffmpeg4 +PKG_SUPPORTED_OPTIONS= ass bluray doc fdk-aac fontconfig freetype gnutls \ + lame libvpx opencore-amr openssl opus rpi \ + rtmp theora vorbis x11 x264 x265 xcb xvid +PKG_SUGGESTED_OPTIONS= lame ass bluray freetype fontconfig libvpx openssl \ + theora vorbis x11 x264 xvid + +PLIST_VARS+= doc + +# 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 + +# doc option +.if !empty(PKG_OPTIONS:Mdoc) +PLIST.doc= yes +USE_TOOLS+= texi2html +CONFIGURE_ARGS+= --enable-htmlpages +.else +CONFIGURE_ARGS+= --disable-htmlpages +.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 + +# RTMP support via librtmp +.if !empty(PKG_OPTIONS:Mrtmp) +CONFIGURE_ARGS+= --enable-librtmp +.include "../../net/rtmpdump/buildlink3.mk" +.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 + +# OPUS support +.if !empty(PKG_OPTIONS:Mopus) +CONFIGURE_ARGS+= --enable-libopus +.include "../../audio/libopus/buildlink3.mk" +.endif + +# Raspberry Pi support +.if !empty(PKG_OPTIONS:Mrpi) +CONFIGURE_ARGS+= --disable-xvmc +CONFIGURE_ARGS+= --enable-omx-rpi +CONFIGURE_ARGS+= --enable-mmal +SUBST_CLASSES+= vc +SUBST_STAGE.vc= pre-configure +SUBST_MESSAGE.vc= Fixing path to VideoCore libraries. +SUBST_FILES.vc= configure +SUBST_SED.vc+= -e 's;-isystem/opt/vc;-I${PREFIX};g' +SUBST_SED.vc+= -e 's;/opt/vc;${PREFIX};g' +.include "../../misc/raspberrypi-userland/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) && !empty(PKG_OPTIONS:Mx11) +CONFIGURE_ARGS+= --enable-vdpau +.include "../../multimedia/libvdpau/buildlink3.mk" +.else +CONFIGURE_ARGS+= --disable-vdpau +.endif + +# VAAPI support +.if !empty(PKG_OPTIONS:Mvaapi) && !empty(PKG_OPTIONS:Mx11) +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 + +# Bluray support +.if !empty(PKG_OPTIONS:Mbluray) +CONFIGURE_ARGS+= --enable-libbluray +.include "../../multimedia/libbluray/buildlink3.mk" +.else +CONFIGURE_ARGS+= --disable-libbluray +.endif diff --git a/multimedia/ffmpeg4/patches/patch-Makefile b/multimedia/ffmpeg4/patches/patch-Makefile new file mode 100644 index 00000000000..ff32c1d1b5c --- /dev/null +++ b/multimedia/ffmpeg4/patches/patch-Makefile @@ -0,0 +1,15 @@ +$NetBSD: patch-Makefile,v 1.1 2018/04/26 07:56:57 adam Exp $ + +Do "install -c". + +--- Makefile.orig 2018-04-20 10:02:55.000000000 +0000 ++++ Makefile +@@ -125,7 +125,7 @@ install-libs: install-libs-yes + + install-data: $(DATA_FILES) + $(Q)mkdir -p "$(DATADIR)" +- $(INSTALL) -m 644 $(DATA_FILES) "$(DATADIR)" ++ $(INSTALL) -c -m 644 $(DATA_FILES) "$(DATADIR)" + + uninstall: uninstall-data uninstall-headers uninstall-libs uninstall-pkgconfig + diff --git a/multimedia/ffmpeg4/patches/patch-configure b/multimedia/ffmpeg4/patches/patch-configure new file mode 100644 index 00000000000..760ab8545e1 --- /dev/null +++ b/multimedia/ffmpeg4/patches/patch-configure @@ -0,0 +1,52 @@ +$NetBSD: patch-configure,v 1.1 2018/04/26 07:56:57 adam Exp $ + +Enable PIC on non-i386 NetBSD. +Do not use 'rsync'. + +--- configure.orig 2018-04-20 10:02:55.000000000 +0000 ++++ configure +@@ -2165,7 +2165,6 @@ TOOLCHAIN_FEATURES=" + inline_asm_labels + inline_asm_nonlocal_labels + pragma_deprecated +- rsync_contimeout + symver_asm_label + symver_gnu_asm + vfp_args +@@ -5043,6 +5042,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 +@@ -5429,10 +5433,13 @@ done + check_cc pragma_deprecated "" '_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")' + + # The global variable ensures the bits appear unchanged in the object file. +-test_cc <<EOF || die "endian test failed" +-unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E'; ++test_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 + + check_cc const_nan math.h "struct { double d; } static const bar[] = { { NAN } }" + +@@ -6190,7 +6197,6 @@ enabled makeinfo \ + disabled makeinfo_html && texi2html --help 2> /dev/null | grep -q 'init-file' && enable texi2html || disable texi2html + perl -v > /dev/null 2>&1 && enable perl || disable perl + pod2man --help > /dev/null 2>&1 && enable pod2man || disable pod2man +-rsync --help 2> /dev/null | grep -q 'contimeout' && enable rsync_contimeout || disable rsync_contimeout + + # check V4L2 codecs available in the API + check_header linux/fb.h diff --git a/multimedia/ffmpeg4/patches/patch-doc_Makefile b/multimedia/ffmpeg4/patches/patch-doc_Makefile new file mode 100644 index 00000000000..bcf74aa8ede --- /dev/null +++ b/multimedia/ffmpeg4/patches/patch-doc_Makefile @@ -0,0 +1,31 @@ +$NetBSD: patch-doc_Makefile,v 1.1 2018/04/26 07:56:57 adam Exp $ + +Make man pages and html docs versioned. + +--- doc/Makefile.orig 2016-02-15 02:29:37.000000000 +0000 ++++ doc/Makefile +@@ -14,8 +14,8 @@ COMPONENTS-$(CONFIG_AVFORMAT) += ffmpe + COMPONENTS-$(CONFIG_AVDEVICE) += ffmpeg-devices + COMPONENTS-$(CONFIG_AVFILTER) += ffmpeg-filters + +-MANPAGES1 = $(AVPROGS-yes:%=doc/%.1) $(AVPROGS-yes:%=doc/%-all.1) $(COMPONENTS-yes:%=doc/%.1) +-MANPAGES3 = $(LIBRARIES-yes:%=doc/%.3) ++MANPAGES1 = $(AVPROGS-yes:%=doc/%4.1) $(AVPROGS-yes:%=doc/%-all4.1) $(COMPONENTS-yes:%=doc/%4.1) ++MANPAGES3 = $(LIBRARIES-yes:%=doc/%4.3) + MANPAGES = $(MANPAGES1) $(MANPAGES3) + PODPAGES = $(AVPROGS-yes:%=doc/%.pod) $(AVPROGS-yes:%=doc/%-all.pod) $(COMPONENTS-yes:%=doc/%.pod) $(LIBRARIES-yes:%=doc/%.pod) + HTMLPAGES = $(AVPROGS-yes:%=doc/%.html) $(AVPROGS-yes:%=doc/%-all.html) $(COMPONENTS-yes:%=doc/%.html) $(LIBRARIES-yes:%=doc/%.html) \ +@@ -114,10 +114,10 @@ doc/%-all.pod: doc/%.texi $(SRC_PATH)/do + $(Q)$(TEXIDEP) + $(M)perl $(SRC_PATH)/doc/texi2pod.pl -Dconfig-all=yes -Idoc $< $@ + +-doc/%.1 doc/%.3: TAG = MAN +-doc/%.1: doc/%.pod $(GENTEXI) ++doc/%4.1 doc/%4.3: TAG = MAN ++doc/%4.1: doc/%.pod $(GENTEXI) + $(M)pod2man --section=1 --center=" " --release=" " --date=" " $< > $@ +-doc/%.3: doc/%.pod $(GENTEXI) ++doc/%4.3: doc/%.pod $(GENTEXI) + $(M)pod2man --section=3 --center=" " --release=" " --date=" " $< > $@ + + $(DOCS) doc/doxy/html: | doc/ diff --git a/multimedia/ffmpeg4/patches/patch-libavformat_sctp.c b/multimedia/ffmpeg4/patches/patch-libavformat_sctp.c new file mode 100644 index 00000000000..e1aebc152a3 --- /dev/null +++ b/multimedia/ffmpeg4/patches/patch-libavformat_sctp.c @@ -0,0 +1,17 @@ +$NetBSD: patch-libavformat_sctp.c,v 1.1 2018/04/26 07:56:57 adam Exp $ + +Fix for NetBSD 7. + +--- libavformat/sctp.c.orig 2018-02-12 19:57:53.000000000 +0000 ++++ libavformat/sctp.c +@@ -40,6 +40,10 @@ + #include <netinet/in.h> + #include <netinet/sctp.h> + ++#ifndef IPPROTO_SCTP ++#define IPPROTO_SCTP 132 ++#endif ++ + #include "config.h" + + #if HAVE_POLL_H diff --git a/multimedia/ffmpeg4/patches/patch-libavutil_common.h b/multimedia/ffmpeg4/patches/patch-libavutil_common.h new file mode 100644 index 00000000000..21f7320961e --- /dev/null +++ b/multimedia/ffmpeg4/patches/patch-libavutil_common.h @@ -0,0 +1,29 @@ +$NetBSD: patch-libavutil_common.h,v 1.1 2018/04/26 07:56:57 adam Exp $ + +Add required int includes on various opensource platforms. + +--- 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/ffmpeg4/patches/patch-libavutil_x86_asm.h b/multimedia/ffmpeg4/patches/patch-libavutil_x86_asm.h new file mode 100644 index 00000000000..362a3d52625 --- /dev/null +++ b/multimedia/ffmpeg4/patches/patch-libavutil_x86_asm.h @@ -0,0 +1,18 @@ +$NetBSD: patch-libavutil_x86_asm.h,v 1.1 2018/04/26 07:56:57 adam Exp $ + +Avoid SunOS regset.h definition for REG_SP + +--- libavutil/x86/asm.h.orig 2016-10-28 18:31:25.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 FF_OPSIZE "q" + # define FF_REG_a "rax" diff --git a/multimedia/ffmpeg4/patches/patch-libavutil_x86_cpu.c b/multimedia/ffmpeg4/patches/patch-libavutil_x86_cpu.c new file mode 100644 index 00000000000..60179fa7eec --- /dev/null +++ b/multimedia/ffmpeg4/patches/patch-libavutil_x86_cpu.c @@ -0,0 +1,22 @@ +$NetBSD: patch-libavutil_x86_cpu.c,v 1.1 2018/04/26 07:56:57 adam Exp $ + +Make a part of the code depend on GCC >= 4.2. + +--- 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) { diff --git a/multimedia/ffplay4/DESCR b/multimedia/ffplay4/DESCR new file mode 100644 index 00000000000..6aa0c009ad0 --- /dev/null +++ b/multimedia/ffplay4/DESCR @@ -0,0 +1,3 @@ +FFplay is a very simple and portable media player using the FFmpeg +libraries and the SDL library. It is mostly used as a testbed for +the various FFmpeg APIs. diff --git a/multimedia/ffplay4/Makefile b/multimedia/ffplay4/Makefile new file mode 100644 index 00000000000..588f13768ea --- /dev/null +++ b/multimedia/ffplay4/Makefile @@ -0,0 +1,35 @@ +# $NetBSD: Makefile,v 1.1 2018/04/26 07:56:58 adam Exp $ + +PKGNAME= ${DISTNAME:S/ffmpeg/ffplay4/} +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= https://ffmpeg.org/ +COMMENT= Simple SDL frontend for FFmpeg + +DISTINFO_FILE= ${.CURDIR}/../ffmpeg4/distinfo + +CONFIGURE_ARGS+= --disable-ffmpeg +CONFIGURE_ARGS+= --disable-ffprobe +CONFIGURE_ARGS+= --disable-encoders +CONFIGURE_ARGS+= --disable-decoders +CONFIGURE_ARGS+= --disable-hwaccels +CONFIGURE_ARGS+= --disable-muxers +CONFIGURE_ARGS+= --disable-demuxers +CONFIGURE_ARGS+= --disable-parsers +CONFIGURE_ARGS+= --disable-bsfs +CONFIGURE_ARGS+= --disable-protocols +CONFIGURE_ARGS+= --disable-devices +CONFIGURE_ARGS+= --disable-filters +CONFIGURE_ARGS+= --enable-ffplay +CONFIGURE_ARGS+= --enable-dct +CONFIGURE_ARGS+= --enable-mdct +CONFIGURE_ARGS+= --enable-rdft + +INSTALLATION_DIRS+= bin ${PKGMANDIR}/man1 + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/ffplay4 ${DESTDIR}${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/doc/ffplay4.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1 + +.include "../../devel/SDL2/buildlink3.mk" +.include "../../multimedia/ffmpeg4/buildlink3.mk" +.include "../../multimedia/ffmpeg4/Makefile.common" diff --git a/multimedia/ffplay4/PLIST b/multimedia/ffplay4/PLIST new file mode 100644 index 00000000000..bea5edc1fb5 --- /dev/null +++ b/multimedia/ffplay4/PLIST @@ -0,0 +1,3 @@ +@comment $NetBSD: PLIST,v 1.1 2018/04/26 07:56:58 adam Exp $ +bin/ffplay4 +man/man1/ffplay4.1 |