head	1.2;
access;
symbols;
locks; strict;
comment	@# @;


1.2
date	2026.08.12.12.39.42;	author adam;	state Exp;
branches;
next	1.1;
commitid	stvdbdoA9DMjzlRG;

1.1
date	2026.08.12.03.43.35;	author ryoon;	state Exp;
branches;
next	;
commitid	2m59YBR1kiEvBiRG;


desc
@@


1.2
log
@ffmpeg9 ffplay9: updated to 9.0.1

9.0.1:
 Bump for 9.0.1
 avcodec/lcldec: clear what the multithread chunks leave undecoded
 avformat/mlv: end the LJ92 packet where its data ends
 avformat/mpegts: reject a max_packet_size below one TS payload
 avformat/mpegts: keep the PES payload within max_packet_size
 avfilter/spectrumsynth: negotiate one pixel format for both inputs
 avfilter/afir: bound the crossfades by the samples of the input frame
 Update for 9.0.1
 avformat/webp_anim_dec: use ffio_read_size for ICCP and EXIF chunk
 avformat/webp_anim_dec: use ffio_read_size for ICCP and EXIF chunks
 avformat/rtpenc_av1: do not narrow the OBU size to (long)
 avformat/rtpenc_av1: Check num_lebs
 avformat/rtpenc_av1: bound OBU size in the keyframe search loop
 avformat/gopher: Fix CRLF injection
 avformat/rtpenc_vc2hq: reject data units larger than the RTP payload buffer
 avformat/dashdec: reject a negative fragment index
 avformat/hevc: reject hvcC NAL arrays that overflow the 16-bit count
 avformat/mpegenc: reject stream counts that overflow the system header
 avformat/mpegenc: pass buffer size into put_system_header()
 avformat/librist: honor the caller buffer size in librist_read
 avformat/scd: reject zero-channel tracks
 avcodec/dolby_e: Add error recovery when parse_mantissas run out of bits
 avfilter/af_pan: check the id of named input channels before use
 swscale: avoid overflow in fast bilinear edge handling
 avformat/shared: Use correct printf specifier
 Revert "lavfi/bwdif: fix heap-buffer-overflow with small height videos"
 avfilter/vf_bwdif: fix line boundary checks for >8 bits content
 avformat/rawutils: reject raw RGB frames that do not fit an AVPacket
 avcodec/nvenc: write AV1 timecode metadata in AV1 syntax
 avcodec/utils: add ff_alloc_timecode_metadata_av1()
 avcodec/utils: factor the timecode fields out of ff_alloc_timecode_sei
 vulkan_encode_av1: set primary_ref_frame to a reference name, not a slot
 avformat/mov: reject a trun sample count the input cannot hold
 RELEASE_NOTES: Based on the version from 8.0
 avformat/mp3enc: fix underflow of the LAME encoder delay
 avformat/os_support: fix return value of win32_rename
 vulkan_encode: fix leak and swallowed errors in init_base_units()
 avfilter/dnn: fix async teardown race condition in all backends
 avcodec/tiff: reject inflate output shorter than the strip
 avformat/dashdec: check NULL pointer before use str_end_offset
 avformat/dashdec: check NULL pointer of av_strtok value before use it
 avfilter/vf_scale_cuda: fix non-scaling format conversion
 fftools/opt_common: fix format string bug in print_program_info
 avformat/dashdec: fix integer truncation in calc_max_seg_no()
 swscale/x86: fix SIGILL in u8 SCALE on SSE4-only CPUs
 avdevice/android_camera: fix OOB read in metadata parsing
 avformat/dashdec: don't stop at the first input EOF
 avformat/iamf_parse: check that num_sub_mixes and num_audio_elements in Mix Presentations are not zero
 avformat/iamf_parse: bound the output mix gain duration by the audio elements
 avcodec/cbs_h266: size vps_direct_ref_layer_flag for the full layer range
 avcodec/vulkan/ffv1_dec_setup: act on the slice header rejection
 avcodec/ffv1dec: reject a remap that produces zero entries
 avcodec/ffv1dec: mark the slice damaged when its remap fails
 avcodec/vulkan/ffv1_dec_setup: bound the fltmap write
 avcodec/vulkan/ffv1_dec_setup: test mul_count as unsigned
 avcodec/vulkan/ffv1_dec_setup: reject a remap that produces zero entries
 avcodec/pgssubdec: always give an output rect a palette
 scale_d3d11: Fix hw_frame_ctx reference leak
 avcodec/cfhd: reject transform-2 output wider than the plane
 avformat/rtsp: clear authentication on cross-origin redirects
 avcodec/dovi_rpuenc: normalize vdr_dm_metadata_present to 0/1
 avcodec/dovi_rpuenc: validate vdr_rpu_id from the input metadata
 avcodec/bsf/dovi_rpu: handle update_rpu() returning no RPU
 avcodec/dovi_rpudec: bound num_x/y_partitions
 avcodec/dovi_rpuenc: validate the data mapping before generation
 avfilter/af_arnndn: pad the DCT input buffers to the read length
 doc/nut.texi: point at the latest spec in the git repository
 avformat/mov: bound sgpd sync entry_count by the atom size
 avcodec/rscc: do not leave uninitilized data when the input is too short
 avcodec/dvbsub_parser: avoid signed overflow in the capacity check
 avformat/tls_openssl: bind peer identity for numeric-IP verify
 avformat/codec2: avoid integer overflow in packet size and duration
 avfilter/vf_xpsnr: avoid a zero block size on small frames
 avcodec/cbs_av1: pad the ITU-T T.35 payload buffer
 avcodec/screenpresso: reject deflate output shorter than the frame
 avformat/hls: Enforce protocol checks when opening child playlists
 avformat/hlsenc: Fix heap buffer overflow in parse_playlist()
 avformat/hlsenc: Handle extensionless URIs in extract_segment_number()
 avfilter/vf_lut3d: do not compute size*size before the size is validated
 avfilter/vf_hqdn3d: support dynamic frame sizes
 avfilter/vf_hqdn3d: reject unsupported frame parameter changes
 avcodec/bsf/truehd_core: clear profile value on init()
 avcodec/bsf/eac3_core: clear profile value on init()
 avformat/iamf_parse: fix inverted subblock duration validation
 avcodec/get_buffer: use frame pixel format instead of context
 avformat/lcevc: add a log context parameter to all functions
@
text
@# $NetBSD: Makefile.common,v 1.1 2026/08/12 03:43:35 ryoon Exp $
# used by multimedia/ffmpeg9/Makefile
# used by multimedia/ffplay9/Makefile

DISTNAME=	ffmpeg-9.0.1
CATEGORIES=	multimedia
MASTER_SITES=	https://www.ffmpeg.org/releases/
EXTRACT_SUFX=	.tar.xz

LICENSE=	gnu-lgpl-v2.1 AND gnu-gpl-v2 ${ADDITIONAL_LICENSE}

PATCHDIR=	${.CURDIR}/../../multimedia/ffmpeg9/patches
DISTINFO_FILE=	${.CURDIR}/../../multimedia/ffmpeg9/distinfo
FILESDIR=	${.CURDIR}/../../multimedia/ffmpeg9/files

USE_LIBTOOL=		yes
USE_TOOLS+=		gmake pod2man perl pkg-config
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=9

CONFIGURE_ARGS+=	--enable-runtime-cpudetect
CONFIGURE_ARGS+=	--datadir=${PREFIX}/share/ffmpeg9
CONFIGURE_ARGS+=	--docdir=${PREFIX}/share/doc/ffmpeg9
CONFIGURE_ARGS+=	--incdir=${PREFIX}/include/ffmpeg9
CONFIGURE_ARGS+=	--libdir=${PREFIX}/lib/ffmpeg9
CONFIGURE_ARGS+=	--shlibdir=${PREFIX}/lib/ffmpeg9
LDFLAGS+=		${COMPILER_RPATH_FLAG}${PREFIX}/lib/ffmpeg9

.include "../../mk/compiler.mk"

# https://github.com/homebrew-ffmpeg/homebrew-ffmpeg/issues/140
.if ${CC_VERSION:Mclang-15.*}
LDFLAGS.Darwin+=	-Wl,-ld_classic
.endif

.if ${USE_CROSS_COMPILE:tl} == yes
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}
.  include "../../mk/endian.mk"
.  if ${MACHINE_ENDIAN} == "big"
CONFIGURE_ENV+=		bigendian=yes
.  endif
.endif

# fails otherwise due to movz/movn in assembler code
.if ${MACHINE_ARCH:Mmips64*} || ${MACHINE_ARCH:Mmipsn64*}
CFLAGS.NetBSD+=		-march=mips4
.endif

# altivec support is detected at runtime, and only code that is gated
# on the runtime detection can use it.  The code in ffmpeg that is
# gated on the runtime detection doesn't need -maltivec -mabi=altivec.
# But passing -maltivec -mabi=altivec tells the compiler that _any_
# code, whether or not gated on runtime detection, can be done with
# altivec -- and the compiler will quietly take advantage of this,
# e.g. to zero-initialize objects on the stack.  This doesn't work too
# well on powerpc CPUs without altivec, so nix the arguments.
.if ${MACHINE_ARCH:Mpowerpc*}
BUILDLINK_TRANSFORM+=	rm:-maltivec
BUILDLINK_TRANSFORM+=	rm:-mabi=altivec
.endif

.if ${MACHINE_PLATFORM:MDarwin-1[2-9].*-*} || ${MACHINE_PLATFORM:MDarwin-2[0-9].*}
CONFIGURE_ARGS+=	--enable-opencl
.endif

.if ${OPSYS} == "SunOS"
USE_TOOLS+=	bash:build
CONFIG_SHELL=	${TOOLS_PATH.bash}
.endif

# Let's not put garbage into /tmp
CONFIGURE_ENV+=		TMPDIR=${WRKSRC}/tmp

.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

.if ${MACHINE_ARCH} == x86_64 || ${MACHINE_ARCH} == i386
TOOL_DEPENDS+=	nasm>=2.13:../../devel/nasm
.endif

REPLACE_PERL+=	doc/texi2pod.pl

PLIST_SRC+=	${PKGDIR}/PLIST

MAKE_ENV+=	EXTRA_LIBS=${LIBGETOPT:Q}

pre-configure:
	${MKDIR} ${WRKSRC}/tmp
.if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} < 100000
	${MKDIR} ${BUILDLINK_DIR}/include/sys
	cp ${FILESDIR}/videoio.h ${BUILDLINK_DIR}/include/sys
.endif

.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/atomic64.mk"
.include "../../mk/pthread.buildlink3.mk"
@


1.1
log
@multimedia/ffmpeg9: import ffmpeg9-9.0

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 9.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.common,v 1.5 2026/06/22 05:33:16 adam Exp $
d5 1
a5 1
DISTNAME=	ffmpeg-9.0
@

