Download raw body.
multimedia/handbrake: update to 1.10.2
On Wed, 12 Nov 2025 18:37:47 +0100,
Landry Breuil <landry@openbsd.org> wrote:
>
> Le Wed, Nov 12, 2025 at 05:15:09PM +0100, Kirill A. Korinsky a écrit :
> > ports@,
> >
> > I'd like to update multimedia/handbrake to 1.10.2
> >
> > I had started with clean patches folders.
> >
> > It builds, I had encoded a short test video.
> >
> > Anyway, any tests are welcomes, and OKs.
>
> I know this port has CONFIGURE_STYLE=simple, but...
>
> > @@ -40,6 +39,8 @@ BUILD_DEPENDS = devel/autoconf/${AUTOCON
> > devel/automake/${AUTOMAKE_VERSION} \
> > devel/gettext,-tools \
> > devel/libtool \
> > + devel/meson \
> > + devel/ninja \
>
> This feels... wrong.
>
> can't we somehow make it directly use the meson module with
> gtk/meson.build, instead of their homegrown horror of make/configure.py ?
>
this homegrown horror creates GNUmakefile which compiles some dependencies,
and after it's done it calls meson and after that ninja.
Before it was autoconf and make, but they decided to migrate to meson.
Here a bit cleaner diff where I nuke autotools, and it survived a build in
clean chroot. And I also put comment which explains why meson/ninja here.
Index: Makefile
===================================================================
RCS file: /home/cvs/ports/multimedia/handbrake/Makefile,v
diff -u -p -r1.30 Makefile
--- Makefile 1 Nov 2025 11:16:42 -0000 1.30
+++ Makefile 12 Nov 2025 17:52:00 -0000
@@ -1,9 +1,8 @@
COMMENT = open source video transcoder
-V = 1.6.1
+V = 1.10.2
DISTNAME = HandBrake-${V}-source
PKGNAME = handbrake-${V}
-REVISION = 6
EXTRACT_SUFX = .tar.bz2
CATEGORIES = multimedia x11
@@ -36,10 +35,10 @@ COMPILER = base-clang ports-gcc
MODULES = lang/python
MODPY_RUNDEP = No
-BUILD_DEPENDS = devel/autoconf/${AUTOCONF_VERSION} \
- devel/automake/${AUTOMAKE_VERSION} \
- devel/gettext,-tools \
- devel/libtool \
+# Yes, meson and ninja is called *during* the build but not at configure time...
+BUILD_DEPENDS = devel/libtool \
+ devel/meson \
+ devel/ninja \
textproc/intltool
LIB_DEPENDS = archivers/bzip2 \
@@ -54,7 +53,7 @@ LIB_DEPENDS = archivers/bzip2 \
devel/harfbuzz \
devel/jansson \
devel/libdvdread \
- graphics/ffmpeg>=6.1.2v1 \
+ graphics/ffmpeg \
graphics/jpeg \
graphics/zimg \
multimedia/aom \
@@ -78,13 +77,8 @@ SEPARATE_BUILD = Yes
CONFIGURE_STYLE = simple
CONFIGURE_SCRIPT = ${MODPY_BIN} ${WRKSRC}/make/configure.py
-# Yes, autoconf is called *during* the build but not at configure time...
USE_GMAKE = Yes
ALL_TARGET = build
-MAKE_ENV = AUTOCONF_VERSION="${AUTOCONF_VERSION}" \
- AUTOMAKE_VERSION="${AUTOMAKE_VERSION}" \
- AWK=/usr/bin/awk \
- MKDIR_P='/bin/mkdir -p'
MAKE_FILE = GNUmakefile
MAKE_FLAGS = CFLAGS="${CFLAGS}" \
LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib"
@@ -95,9 +89,6 @@ CXXFLAGS += -msse2
.endif
CFLAGS+= -D_NO_UPDATE_CHECK
-
-AUTOCONF_VERSION = 2.71
-AUTOMAKE_VERSION = 1.16
WRKDIST = ${WRKDIR}/HandBrake-${V}
Index: distinfo
===================================================================
RCS file: /home/cvs/ports/multimedia/handbrake/distinfo,v
diff -u -p -r1.6 distinfo
--- distinfo 29 May 2024 08:47:49 -0000 1.6
+++ distinfo 8 Nov 2025 18:57:55 -0000
@@ -1,2 +1,2 @@
-SHA256 (HandBrake-1.6.1-source.tar.bz2) = lMz+A9uRepFlAADFEPf9U/hE2hnxmtS0vhuPa8MajUw=
-SIZE (HandBrake-1.6.1-source.tar.bz2) = 15934833
+SHA256 (HandBrake-1.10.2-source.tar.bz2) = xl4cxPjPw2wkEHuSwo1g5x7xheyYPppYQfrP+v6l+Ns=
+SIZE (HandBrake-1.10.2-source.tar.bz2) = 9481895
Index: patches/patch-gtk_configure_ac
===================================================================
RCS file: patches/patch-gtk_configure_ac
diff -N patches/patch-gtk_configure_ac
--- patches/patch-gtk_configure_ac 28 Oct 2025 09:38:40 -0000 1.7
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-Get the proper library directory for -lhandbrake.
-
-Index: gtk/configure.ac
---- gtk/configure.ac.orig
-+++ gtk/configure.ac
-@@ -203,7 +203,7 @@ AM_CONDITIONAL([GHB_GTK_3_16], [test "$HAVE_GTK_316" -
-
- AM_CONDITIONAL([MINGW], [test "x$mingw_flag" = "xyes"])
-
--HB_LIBS="$HB_LIBS -lhandbrake -lavformat -lavfilter -lavcodec -lavutil -ldav1d -lswresample -lpostproc -ldvdnav -ldvdread -lmp3lame -lvorbis -lvorbisenc -logg -lswscale -ltheoraenc -ltheoradec -lvpx -lz -lbz2 -lbluray -lass -lfontconfig -lfreetype -lxml2 -ljansson -lopus -lspeex -lturbojpeg -llzma -lzimg -lSvtAv1Enc"
-+HB_LIBS="-L../../libhb $HB_LIBS -lhandbrake -lavformat -lavfilter -lavcodec -lavutil -ldav1d -lswresample -ldvdnav -ldvdread -lmp3lame -lvorbis -lvorbisenc -logg -lswscale -ltheoraenc -ltheoradec -lvpx -lz -lbz2 -lbluray -lass -lfontconfig -lfreetype -lxml2 -ljansson -lopus -lspeex -lturbojpeg -llzma -lzimg -lSvtAv1Enc"
- HB_CPPFLAGS="$HB_CPPFLAGS $HBINC"
-
- PKG_CHECK_MODULES([x264], [x264], sys_x264=yes, sys_x264=no)
Index: patches/patch-libhb_audio_resample_c
===================================================================
RCS file: patches/patch-libhb_audio_resample_c
diff -N patches/patch-libhb_audio_resample_c
--- patches/patch-libhb_audio_resample_c 21 Oct 2025 12:56:19 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-Index: libhb/audio_resample.c
---- libhb/audio_resample.c.orig
-+++ libhb/audio_resample.c
-@@ -90,10 +90,12 @@ static int is_mono(uint64_t layout)
- int ii, channel_count;
- int64_t mask;
-
-+#ifdef AV_CH_LAYOUT_NATIVE
- if (layout == AV_CH_LAYOUT_NATIVE)
- {
- return 0;
- }
-+#endif
- for (ii = 0, channel_count = 0, mask = 1;
- ii < 64 && channel_count < 2; ii++, mask <<= 1)
- {
Index: patches/patch-libhb_decavcodec_c
===================================================================
RCS file: /home/cvs/ports/multimedia/handbrake/patches/patch-libhb_decavcodec_c,v
diff -u -p -r1.3 patch-libhb_decavcodec_c
--- patches/patch-libhb_decavcodec_c 21 Oct 2025 12:58:14 -0000 1.3
+++ patches/patch-libhb_decavcodec_c 12 Nov 2025 15:05:30 -0000
@@ -1,64 +1,17 @@
Index: libhb/decavcodec.c
--- libhb/decavcodec.c.orig
+++ libhb/decavcodec.c
-@@ -2037,8 +2037,8 @@ static void compute_frame_duration( hb_work_private_t
- int64_t max_fps = 64LL;
+@@ -1320,11 +1320,13 @@ static hb_buffer_t *copy_frame( hb_work_private_t *pv
+ int type = AV_FRAME_DATA_DOVI_RPU_BUFFER;
+ sd = av_frame_get_side_data(pv->frame, type);
- // context->time_base may be in fields, so set the max *fields* per second
-- if ( pv->context->ticks_per_frame > 1 )
-- max_fps *= pv->context->ticks_per_frame;
-+ if ( pv->context->codec_descriptor->props & AV_CODEC_PROP_FIELDS )
-+ max_fps *= 2;
-
- if ( pv->title->opaque_priv )
- {
-@@ -2057,7 +2057,8 @@ static void compute_frame_duration( hb_work_private_t
- // Raw demuxers set a default fps of 25 and do not parse
- // a value from the container. So use the codec time_base
- // for raw demuxers.
-- else if (ic->iformat->raw_codec_id == AV_CODEC_ID_NONE)
-+ // See: https://github.com/HandBrake/HandBrake/pull/5884
-+ else if (st->start_time == AV_NOPTS_VALUE && st->duration == AV_NOPTS_VALUE)
- {
- // XXX We don't have a frame count or duration so try to use the
- // far less reliable time base info in the stream.
-@@ -2083,11 +2084,11 @@ static void compute_frame_duration( hb_work_private_t
- {
- duration = (double)pv->context->time_base.num /
- (double)pv->context->time_base.den;
-- if ( pv->context->ticks_per_frame > 1 )
-+ if ( pv->context->codec_descriptor->props & AV_CODEC_PROP_FIELDS )
- {
- // for ffmpeg 0.5 & later, the H.264 & MPEG-2 time base is
- // field rate rather than frame rate so convert back to frames.
-- duration *= pv->context->ticks_per_frame;
-+ duration *= 2;
- }
- }
- }
-@@ -2098,11 +2099,11 @@ static void compute_frame_duration( hb_work_private_t
- {
- duration = (double)pv->context->time_base.num /
- (double)pv->context->time_base.den;
-- if ( pv->context->ticks_per_frame > 1 )
-+ if ( pv->context->codec_descriptor->props & AV_CODEC_PROP_FIELDS )
++#ifdef AV_FRAME_DATA_DOVI_RPU_BUFFER_T35
+ if (sd == NULL)
{
- // for ffmpeg 0.5 & later, the H.264 & MPEG-2 time base is
- // field rate rather than frame rate so convert back to frames.
-- duration *= pv->context->ticks_per_frame;
-+ duration *= 2;
+ type = AV_FRAME_DATA_DOVI_RPU_BUFFER_T35;
+ sd = av_frame_get_side_data(pv->frame, type);
}
- }
- }
-@@ -2113,9 +2114,9 @@ static void compute_frame_duration( hb_work_private_t
- }
- pv->duration = duration * 90000.;
- pv->field_duration = pv->duration;
-- if ( pv->context->ticks_per_frame > 1 )
-+ if ( pv->context->codec_descriptor->props & AV_CODEC_PROP_FIELDS )
- {
-- pv->field_duration /= pv->context->ticks_per_frame;
-+ pv->field_duration /= 2;
- }
- }
++#endif
+ if (sd != NULL && sd->size > 0)
+ {
Index: patches/patch-libhb_encavcodec_c
===================================================================
RCS file: /home/cvs/ports/multimedia/handbrake/patches/patch-libhb_encavcodec_c,v
diff -u -p -r1.3 patch-libhb_encavcodec_c
--- patches/patch-libhb_encavcodec_c 21 Oct 2025 13:00:20 -0000 1.3
+++ patches/patch-libhb_encavcodec_c 12 Nov 2025 15:06:52 -0000
@@ -1,103 +1,12 @@
Index: libhb/encavcodec.c
--- libhb/encavcodec.c.orig
+++ libhb/encavcodec.c
-@@ -333,7 +333,7 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * j
- if ((job->vcodec == HB_VCODEC_FFMPEG_VCE_H264) || (job->vcodec == HB_VCODEC_FFMPEG_VCE_H265) || (job->vcodec == HB_VCODEC_FFMPEG_VCE_H265_10BIT))
- {
- // Set encoder preset
-- context->profile = FF_PROFILE_UNKNOWN;
-+ context->profile = AV_PROFILE_UNKNOWN;
- if (job->encoder_preset != NULL && *job->encoder_preset)
- {
- if ((!strcasecmp(job->encoder_preset, "balanced"))
-@@ -915,17 +915,17 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * j
- if (job->vcodec == HB_VCODEC_FFMPEG_VCE_H264)
- {
- // Set profile and level
-- context->profile = FF_PROFILE_UNKNOWN;
-+ context->profile = AV_PROFILE_UNKNOWN;
- if (job->encoder_profile != NULL && *job->encoder_profile)
- {
- if (!strcasecmp(job->encoder_profile, "baseline"))
-- context->profile = FF_PROFILE_H264_BASELINE;
-+ context->profile = AV_PROFILE_H264_BASELINE;
- else if (!strcasecmp(job->encoder_profile, "main"))
-- context->profile = FF_PROFILE_H264_MAIN;
-+ context->profile = AV_PROFILE_H264_MAIN;
- else if (!strcasecmp(job->encoder_profile, "high"))
-- context->profile = FF_PROFILE_H264_HIGH;
-+ context->profile = AV_PROFILE_H264_HIGH;
- }
-- context->level = FF_LEVEL_UNKNOWN;
-+ context->level = AV_LEVEL_UNKNOWN;
- if (job->encoder_level != NULL && *job->encoder_level)
- {
- int i = 1;
-@@ -941,13 +941,13 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * j
- if (job->vcodec == HB_VCODEC_FFMPEG_VCE_H265 || job->vcodec == HB_VCODEC_FFMPEG_VCE_H265_10BIT)
- {
- // Set profile and level
-- context->profile = FF_PROFILE_UNKNOWN;
-+ context->profile = AV_PROFILE_UNKNOWN;
- if (job->encoder_profile != NULL && *job->encoder_profile)
- {
- if (!strcasecmp(job->encoder_profile, "main"))
-- context->profile = FF_PROFILE_HEVC_MAIN;
-+ context->profile = AV_PROFILE_HEVC_MAIN;
- }
-- context->level = FF_LEVEL_UNKNOWN;
-+ context->level = AV_LEVEL_UNKNOWN;
- if (job->encoder_level != NULL && *job->encoder_level)
- {
- int i = 1;
-@@ -1000,15 +1000,15 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * j
-
- if (job->vcodec == HB_VCODEC_FFMPEG_MF_H264)
- {
-- context->profile = FF_PROFILE_UNKNOWN;
-+ context->profile = AV_PROFILE_UNKNOWN;
- if (job->encoder_profile != NULL && *job->encoder_profile)
- {
- if (!strcasecmp(job->encoder_profile, "baseline"))
-- context->profile = FF_PROFILE_H264_BASELINE;
-+ context->profile = AV_PROFILE_H264_BASELINE;
- else if (!strcasecmp(job->encoder_profile, "main"))
-- context->profile = FF_PROFILE_H264_MAIN;
-+ context->profile = AV_PROFILE_H264_MAIN;
- else if (!strcasecmp(job->encoder_profile, "high"))
-- context->profile = FF_PROFILE_H264_HIGH;
-+ context->profile = AV_PROFILE_H264_HIGH;
- }
-
+@@ -1614,7 +1614,7 @@ static int apply_encoder_level(AVCodecContext *context
+ break;
}
-@@ -1332,7 +1332,6 @@ static void Encode( hb_work_object_t *w, hb_buffer_t *
- when this frame finally pops out of the encoder we'll mark
- its buffer as the start of a chapter. */
- frame.pict_type = AV_PICTURE_TYPE_I;
-- frame.key_frame = 1;
- hb_chapter_enqueue(pv->chapter_queue, in);
- }
-
-@@ -1446,17 +1445,17 @@ int encavcodecWork( hb_work_object_t * w, hb_buffer_t
- static int apply_svt_av1_options(hb_job_t *job, AVCodecContext *context, AVDictionary **av_opts, hb_dict_t *opts)
- {
-- context->profile = FF_PROFILE_UNKNOWN;
-+ context->profile = AV_PROFILE_UNKNOWN;
- if (job->encoder_profile != NULL && *job->encoder_profile)
- {
- if (!strcasecmp(job->encoder_profile, "main"))
-- context->profile = FF_PROFILE_AV1_MAIN;
-+ context->profile = AV_PROFILE_AV1_MAIN;
- else if (!strcasecmp(job->encoder_profile, "high"))
-- context->profile = FF_PROFILE_AV1_HIGH;
-+ context->profile = AV_PROFILE_AV1_HIGH;
- else if (!strcasecmp(job->encoder_profile, "professional"))
-- context->profile = FF_PROFILE_AV1_PROFESSIONAL;
-+ context->profile = AV_PROFILE_AV1_PROFESSIONAL;
- }
- context->level = FF_LEVEL_UNKNOWN;
+ context->level = AV_LEVEL_UNKNOWN;
- if (job->encoder_level != NULL && *job->encoder_level)
+
+ if (level_names == NULL || level_values == NULL)
{
- int i = 1;
Index: patches/patch-libhb_encavcodecaudio_c
===================================================================
RCS file: /home/cvs/ports/multimedia/handbrake/patches/patch-libhb_encavcodecaudio_c,v
diff -u -p -r1.4 patch-libhb_encavcodecaudio_c
--- patches/patch-libhb_encavcodecaudio_c 21 Oct 2025 13:01:19 -0000 1.4
+++ patches/patch-libhb_encavcodecaudio_c 12 Nov 2025 15:08:30 -0000
@@ -1,29 +1,7 @@
Index: libhb/encavcodecaudio.c
--- libhb/encavcodecaudio.c.orig
+++ libhb/encavcodecaudio.c
-@@ -74,7 +74,7 @@ static int encavcodecaInit(hb_work_object_t *w, hb_job
- enum AVCodecID codec_id = AV_CODEC_ID_NONE;
- enum AVSampleFormat sample_fmt = AV_SAMPLE_FMT_FLTP;
- int bits_per_raw_sample = 0;
-- int profile = FF_PROFILE_UNKNOWN;
-+ int profile = AV_PROFILE_UNKNOWN;
-
- // override with encoder-specific values
- switch (audio->config.out.codec)
-@@ -99,10 +99,10 @@ static int encavcodecaInit(hb_work_object_t *w, hb_job
- switch (audio->config.out.codec)
- {
- case HB_ACODEC_FDK_HAAC:
-- profile = FF_PROFILE_AAC_HE;
-+ profile = AV_PROFILE_AAC_HE;
- break;
- default:
-- profile = FF_PROFILE_AAC_LOW;
-+ profile = AV_PROFILE_AAC_LOW;
- break;
- }
- // FFmpeg's libfdk-aac wrapper expects back channels for 5.1
-@@ -238,7 +238,7 @@ static int encavcodecaInit(hb_work_object_t *w, hb_job
+@@ -272,7 +272,7 @@ static int encavcodecaInit(hb_work_object_t *w, hb_job
pv->input_buf = malloc(pv->input_samples * sizeof(float));
// Some encoders in libav (e.g. fdk-aac) fail if the output buffer
// size is not some minimum value. 8K seems to be enough :(
Index: patches/patch-libhb_encx265_c
===================================================================
RCS file: /home/cvs/ports/multimedia/handbrake/patches/patch-libhb_encx265_c,v
diff -u -p -r1.1 patch-libhb_encx265_c
--- patches/patch-libhb_encx265_c 5 Dec 2024 16:06:34 -0000 1.1
+++ patches/patch-libhb_encx265_c 12 Nov 2025 15:23:20 -0000
@@ -1,19 +1,19 @@
-- contrib: update x265 to version 4.1 (#6430)
- 3e6479d666f76a5956bb5ce9a5d85ee8c925bbd3
-
Index: libhb/encx265.c
--- libhb/encx265.c.orig
+++ libhb/encx265.c
-@@ -441,10 +441,10 @@ int encx265Init(hb_work_object_t *w, hb_job_t *job)
- /* statsfile (but not 2-pass) */
- if (param->logLevel >= X265_LOG_DEBUG)
- {
-- if (param->csvfn == NULL)
-+ if (param->csvfn[0] == '\0')
- {
- pv->csvfn = hb_get_temporary_filename("x265.csv");
-- param->csvfn = strdup(pv->csvfn);
-+ snprintf(param->csvfn, X265_MAX_STRING_SIZE, "%s", pv->csvfn);
+@@ -269,6 +269,7 @@ int encx265Init(hb_work_object_t *w, hb_job_t *job)
}
- else
- {
+ }
+
++#if 0
+ if (job->ambient.ambient_illuminance.num && job->ambient.ambient_illuminance.den)
+ {
+ param->ambientIlluminance = hb_rescale_rational(job->ambient.ambient_illuminance, 10000);
+@@ -276,6 +277,7 @@ int encx265Init(hb_work_object_t *w, hb_job_t *job)
+ param->ambientLightY = hb_rescale_rational(job->ambient.ambient_light_y, 50000);
+ param->bEmitAmbientViewingEnvironment = 1;
+ }
++#endif
+
+ if (job->chroma_location != AVCHROMA_LOC_UNSPECIFIED)
+ {
Index: patches/patch-libhb_hbavfilter_c
===================================================================
RCS file: patches/patch-libhb_hbavfilter_c
diff -N patches/patch-libhb_hbavfilter_c
--- patches/patch-libhb_hbavfilter_c 21 Oct 2025 13:01:19 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,25 +0,0 @@
-Index: libhb/hbavfilter.c
---- libhb/hbavfilter.c.orig
-+++ libhb/hbavfilter.c
-@@ -271,6 +271,7 @@ void hb_avfilter_graph_update_init(hb_avfilter_graph_t
- {
- // Retrieve the parameters of the output filter
- AVFilterLink *link = graph->output->inputs[0];
-+ AVRational frame_rate = av_buffersink_get_frame_rate(graph->output);
- init->geometry.width = link->w;
- init->geometry.height = link->h;
- init->geometry.par.num = link->sample_aspect_ratio.num;
-@@ -278,10 +279,10 @@ void hb_avfilter_graph_update_init(hb_avfilter_graph_t
- init->pix_fmt = link->format;
- // avfilter can generate "unknown" framerates. If this happens
- // just pass along the source framerate.
-- if (link->frame_rate.num > 0 && link->frame_rate.den > 0)
-+ if (frame_rate.num > 0 && frame_rate.den > 0)
- {
-- init->vrate.num = link->frame_rate.num;
-- init->vrate.den = link->frame_rate.den;
-+ init->vrate.num = frame_rate.num;
-+ init->vrate.den = frame_rate.den;
- }
- }
-
Index: patches/patch-libhb_hbffmpeg_c
===================================================================
RCS file: patches/patch-libhb_hbffmpeg_c
diff -N patches/patch-libhb_hbffmpeg_c
--- patches/patch-libhb_hbffmpeg_c 21 Oct 2025 13:01:19 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,40 +0,0 @@
-Index: libhb/hbffmpeg.c
---- libhb/hbffmpeg.c.orig
-+++ libhb/hbffmpeg.c
-@@ -41,12 +41,17 @@ void hb_video_buffer_to_avframe(AVFrame *frame, hb_buf
- frame->linesize[2] = buf->plane[2].stride;
-
- frame->pts = buf->s.start;
-- frame->reordered_opaque = buf->s.duration;
- frame->width = buf->f.width;
- frame->height = buf->f.height;
- frame->format = buf->f.fmt;
-- frame->interlaced_frame = !!buf->s.combed;
-- frame->top_field_first = !!(buf->s.flags & PIC_FLAG_TOP_FIELD_FIRST);
-+ if (!!buf->s.combed)
-+ frame->flags |= AV_FRAME_FLAG_INTERLACED;
-+ else
-+ frame->flags &= ~AV_FRAME_FLAG_INTERLACED;
-+ if (!!(buf->s.flags & PIC_FLAG_TOP_FIELD_FIRST))
-+ frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST;
-+ else
-+ frame->flags &= ~AV_FRAME_FLAG_TOP_FIELD_FIRST;
-
- frame->format = buf->f.fmt;
- frame->color_primaries = hb_colr_pri_hb_to_ff(buf->f.color_prim);
-@@ -65,13 +70,12 @@ void hb_avframe_set_video_buffer_flags(hb_buffer_t * b
- }
-
- buf->s.start = av_rescale_q(frame->pts, time_base, (AVRational){1, 90000});
-- buf->s.duration = frame->reordered_opaque;
-
-- if (frame->top_field_first)
-+ if (frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST)
- {
- buf->s.flags |= PIC_FLAG_TOP_FIELD_FIRST;
- }
-- if (!frame->interlaced_frame)
-+ if (!(frame->flags & AV_FRAME_FLAG_INTERLACED))
- {
- buf->s.flags |= PIC_FLAG_PROGRESSIVE_FRAME;
- }
Index: patches/patch-libhb_muxavformat_c
===================================================================
RCS file: patches/patch-libhb_muxavformat_c
diff -N patches/patch-libhb_muxavformat_c
--- patches/patch-libhb_muxavformat_c 21 Oct 2025 13:11:32 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,45 +0,0 @@
-Index: libhb/muxavformat.c
---- libhb/muxavformat.c.orig
-+++ libhb/muxavformat.c
-@@ -556,10 +556,11 @@ static int avformatInit( hb_mux_object_t * m )
- uint8_t *mastering_data = av_malloc(sizeof(AVMasteringDisplayMetadata));
- memcpy(mastering_data, &mastering, sizeof(AVMasteringDisplayMetadata));
-
-- av_stream_add_side_data(track->st,
-+ av_packet_side_data_add(&track->st->codecpar->coded_side_data,
-+ &track->st->codecpar->nb_coded_side_data,
- AV_PKT_DATA_MASTERING_DISPLAY_METADATA,
- mastering_data,
-- sizeof(AVMasteringDisplayMetadata));
-+ sizeof(AVMasteringDisplayMetadata), 0);
- }
-
- if (job->coll.max_cll && job->coll.max_fall)
-@@ -571,10 +572,11 @@ static int avformatInit( hb_mux_object_t * m )
- uint8_t *coll_data = av_malloc(sizeof(AVContentLightMetadata));
- memcpy(coll_data, &coll, sizeof(AVContentLightMetadata));
-
-- av_stream_add_side_data(track->st,
-+ av_packet_side_data_add(&track->st->codecpar->coded_side_data,
-+ &track->st->codecpar->nb_coded_side_data,
- AV_PKT_DATA_CONTENT_LIGHT_LEVEL,
- coll_data,
-- sizeof(AVContentLightMetadata));
-+ sizeof(AVContentLightMetadata), 0);
- }
- }
-
-@@ -884,9 +886,10 @@ static int avformatInit( hb_mux_object_t * m )
-
- track = audio->priv.mux_data;
- fallback_track = fallback->priv.mux_data;
-- sd = (int*)av_stream_new_side_data(track->st,
-- AV_PKT_DATA_FALLBACK_TRACK,
-- sizeof(int));
-+ sd = (int*)av_packet_side_data_new(&track->st->codecpar->coded_side_data,
-+ &track->st->codecpar->nb_coded_side_data,
-+ AV_PKT_DATA_FALLBACK_TRACK,
-+ sizeof(int), 0);
- if (sd != NULL)
- {
- *sd = fallback_track->st->index;
Index: patches/patch-libhb_scan_c
===================================================================
RCS file: patches/patch-libhb_scan_c
diff -N patches/patch-libhb_scan_c
--- patches/patch-libhb_scan_c 21 Oct 2025 13:02:56 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-Index: libhb/scan.c
---- libhb/scan.c.orig
-+++ libhb/scan.c
-@@ -1459,7 +1459,7 @@ static void LookForAudio(hb_scan_t *scan, hb_title_t *
- const AVCodec *codec = avcodec_find_decoder(audio->config.in.codec_param);
- if (codec != NULL)
- {
-- if (info.profile != FF_PROFILE_UNKNOWN)
-+ if (info.profile != AV_PROFILE_UNKNOWN)
- {
- profile_name = av_get_profile_name(codec, info.profile);
- }
Index: patches/patch-libhb_stream_c
===================================================================
RCS file: patches/patch-libhb_stream_c
diff -N patches/patch-libhb_stream_c
--- patches/patch-libhb_stream_c 21 Oct 2025 13:02:56 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,67 +0,0 @@
-Index: libhb/stream.c
---- libhb/stream.c.orig
-+++ libhb/stream.c
-@@ -4052,16 +4052,16 @@ static int probe_dts_profile( hb_stream_t *stream, hb_
- }
- switch (info.profile)
- {
-- case FF_PROFILE_DTS:
-- case FF_PROFILE_DTS_ES:
-- case FF_PROFILE_DTS_96_24:
-+ case AV_PROFILE_DTS:
-+ case AV_PROFILE_DTS_ES:
-+ case AV_PROFILE_DTS_96_24:
- pes->codec = HB_ACODEC_DCA;
- pes->stream_type = 0x82;
- pes->stream_kind = A;
- break;
-
-- case FF_PROFILE_DTS_HD_HRA:
-- case FF_PROFILE_DTS_HD_MA:
-+ case AV_PROFILE_DTS_HD_HRA:
-+ case AV_PROFILE_DTS_HD_MA:
- pes->stream_type = 0;
- pes->stream_kind = A;
- break;
-@@ -5408,14 +5408,14 @@ static void add_ffmpeg_audio(hb_title_t *title, hb_str
- {
- switch (codecpar->profile)
- {
-- case FF_PROFILE_DTS:
-- case FF_PROFILE_DTS_ES:
-- case FF_PROFILE_DTS_96_24:
-+ case AV_PROFILE_DTS:
-+ case AV_PROFILE_DTS_ES:
-+ case AV_PROFILE_DTS_96_24:
- audio->config.in.codec = HB_ACODEC_DCA;
- break;
-
-- case FF_PROFILE_DTS_HD_MA:
-- case FF_PROFILE_DTS_HD_HRA:
-+ case AV_PROFILE_DTS_HD_MA:
-+ case AV_PROFILE_DTS_HD_HRA:
- audio->config.in.codec = HB_ACODEC_DCA_HD;
- break;
-
-@@ -5846,9 +5846,9 @@ static hb_title_t *ffmpeg_title_scan( hb_stream_t *str
- }
-
- int j;
-- for (j = 0; j < st->nb_side_data; j++)
-+ for (j = 0; j < codecpar->nb_coded_side_data; j++)
- {
-- AVPacketSideData sd = st->side_data[j];
-+ AVPacketSideData sd = codecpar->coded_side_data[j];
- switch (sd.type)
- {
- case AV_PKT_DATA_DISPLAYMATRIX:
-@@ -5899,7 +5899,8 @@ static hb_title_t *ffmpeg_title_scan( hb_stream_t *str
- // title->video_timebase.den = st->time_base.den;
- title->video_timebase.num = 1;
- title->video_timebase.den = 90000;
-- if (ic->iformat->raw_codec_id != AV_CODEC_ID_NONE)
-+ // See: https://github.com/HandBrake/HandBrake/pull/5884
-+ if (st->start_time == AV_NOPTS_VALUE && st->duration == AV_NOPTS_VALUE)
- {
- title->flags |= HBTF_RAW_VIDEO;
- }
Index: patches/patch-make_configure_py
===================================================================
RCS file: /home/cvs/ports/multimedia/handbrake/patches/patch-make_configure_py,v
diff -u -p -r1.5 patch-make_configure_py
--- patches/patch-make_configure_py 29 May 2024 08:47:50 -0000 1.5
+++ patches/patch-make_configure_py 12 Nov 2025 15:48:40 -0000
@@ -1,9 +1,16 @@
-Do not look for CMake; we don't need it.
-
Index: make/configure.py
--- make/configure.py.orig
+++ make/configure.py
-@@ -1638,13 +1638,10 @@ try:
+@@ -1449,7 +1449,7 @@ def createCLI( cross = None ):
+ grp.add_argument( '--disable-vce', dest="enable_vce", action='store_false', help=(( 'disable %s' %h ) if h != argparse.SUPPRESS else h) )
+
+ h = IfHost( 'libdovi', '*-*-*', none=argparse.SUPPRESS ).value
+- grp.add_argument( '--enable-libdovi', dest="enable_libdovi", default=not Tools.cargo.fail and not Tools.cargoc.fail, action='store_true', help=(( 'enable %s' %h ) if h != argparse.SUPPRESS else h) )
++ grp.add_argument( '--enable-libdovi', dest="enable_libdovi", default=False, action='store_true', help=(( 'enable %s' %h ) if h != argparse.SUPPRESS else h) )
+ grp.add_argument( '--disable-libdovi', dest="enable_libdovi", action='store_false', help=(( 'disable %s' %h ) if h != argparse.SUPPRESS else h) )
+
+
+@@ -1657,13 +1657,10 @@ try:
class Tools:
ar = ToolProbe( 'AR.exe', 'ar', 'ar', abort=True )
cp = ToolProbe( 'CP.exe', 'cp', 'cp', abort=True )
@@ -17,7 +24,7 @@ Index: make/configure.py
python = ToolProbe( 'PYTHON.exe', 'python', os.path.basename(sys.executable), abort=True )
gcc_tools = ['GCC.gcc',
-@@ -1659,14 +1656,9 @@ try:
+@@ -1678,16 +1675,11 @@ try:
else:
gmake = ToolProbe( 'GMAKE.exe', 'make', 'gmake', 'make', abort=True )
@@ -26,13 +33,15 @@ Index: make/configure.py
libtool = ToolProbe( 'LIBTOOL.exe', 'libtool', 'libtool', abort=True )
lipo = ToolProbe( 'LIPO.exe', 'lipo', 'lipo', abort=False )
pkgconfig = ToolProbe( 'PKGCONFIG.exe', 'pkgconfig', 'pkg-config', abort=True, minversion=[0,27,0] )
-- meson = ToolProbe( 'MESON.exe', 'meson', 'meson', abort=True, minversion=[0,47,0] )
+ meson = ToolProbe( 'MESON.exe', 'meson', 'meson', abort=True, minversion=[0,51,0] )
- nasm = ToolProbe( 'NASM.exe', 'asm', 'nasm', abort=True, minversion=[2,13,0] )
-- ninja = ToolProbe( 'NINJA.exe', 'ninja', 'ninja-build', 'ninja', abort=True )
+ ninja = ToolProbe( 'NINJA.exe', 'ninja', 'ninja-build', 'ninja', abort=True )
+- cargo = ToolProbe( 'CARGO.exe', 'cargo', 'cargo', abort=False )
+- cargoc = ToolProbe( 'CARGO-C.exe', 'cargo-cbuild', 'cargo-cbuild', abort=False )
xcodebuild = ToolProbe( 'XCODEBUILD.exe', 'xcodebuild', 'xcodebuild', abort=(True if (not xcode_opts['disabled'] and (build_tuple.match('*-*-darwin*') and cross is None)) else False), versionopt='-version', minversion=[10,3,0] )
-@@ -1765,10 +1757,6 @@ try:
+@@ -1787,10 +1779,6 @@ try:
#####################################
# Requires oneVPL which requires CMake 3.16.3 or later
Tools.cmake = ToolProbe('CMAKE.exe', 'cmake', 'cmake', abort=True, minversion=[3,16,3])
Index: patches/patch-make_include_gcc_defs
===================================================================
RCS file: patches/patch-make_include_gcc_defs
diff -N patches/patch-make_include_gcc_defs
--- patches/patch-make_include_gcc_defs 29 May 2024 08:47:50 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,36 +0,0 @@
-- Remove hardcoded optimization flags.
-- Proper -I and -L dirs.
-
-Index: make/include/gcc.defs
---- make/include/gcc.defs.orig
-+++ make/include/gcc.defs
-@@ -66,10 +66,10 @@ GCC.args.g.none = -g0
- GCC.args.g.min = -gdwarf-2 -g1
- GCC.args.g.std = -gdwarf-2
- GCC.args.g.max = -gdwarf-2 -g3
--GCC.args.O.none = -O0
--GCC.args.O.size = -Os
--GCC.args.O.size-aggressive = -Oz
--GCC.args.O.speed = -O3
-+GCC.args.O.none =
-+GCC.args.O.size =
-+GCC.args.O.size-aggressive =
-+GCC.args.O.speed =
- GCC.args.cpu.none =
- GCC.args.cpu.native =
- ifeq ($(HOST.machine),$(filter $(HOST.machine),i686 x86_64))
-@@ -80,12 +80,12 @@ GCC.args.lto.off = -fno-lto
- GCC.args.lto.on = -flto
- GCC.args.lto.thin = -flto=thin
- GCC.args.D = -D$(1)
--GCC.args.I = -I$(1)
-+GCC.args.I = -I$(1) -I$(LOCALBASE)/include -I$(X11BASE)/include
- GCC.args.muldefs = -Wl,--allow-multiple-definition
- GCC.args.start = -Wl,--start-group
- GCC.args.F = -F$(1)
- GCC.args.f = -framework $(1)
--GCC.args.L = -L$(1)
-+GCC.args.L = -L$(1) -L$(LOCALBASE)/lib -L$(X11BASE)/lib
- GCC.args.l = -l$(1)
- GCC.args.end = -Wl,--end-group
-
Index: patches/patch-make_include_main_defs
===================================================================
RCS file: /home/cvs/ports/multimedia/handbrake/patches/patch-make_include_main_defs,v
diff -u -p -r1.4 patch-make_include_main_defs
--- patches/patch-make_include_main_defs 29 May 2024 08:47:50 -0000 1.4
+++ patches/patch-make_include_main_defs 12 Nov 2025 14:49:13 -0000
@@ -1,9 +1,7 @@
-Rip out all the optional dependencies.
-
Index: make/include/main.defs
--- make/include/main.defs.orig
+++ make/include/main.defs
-@@ -7,97 +7,6 @@ include $(SRC/)make/include/tool.defs
+@@ -8,105 +8,6 @@ include $(SRC/)make/include/tool.defs
###############################################################################
@@ -17,7 +15,6 @@ Index: make/include/main.defs
- MODULES += contrib/freetype
- MODULES += contrib/fribidi
- MODULES += contrib/harfbuzz
-- MODULES += contrib/libxml2
- MODULES += contrib/libass
- MODULES += contrib/libogg
- MODULES += contrib/libvorbis
@@ -70,8 +67,13 @@ Index: make/include/main.defs
- MODULES += contrib/nvenc
-endif
-
+-ifeq (1,$(FEATURE.libdovi))
+- MODULES += contrib/libdovi
+-endif
+-
-ifneq (,$(filter $(HOST.system),darwin))
- MODULES += contrib/xz
+- MODULES += contrib/bin2c
-endif
-
-ifneq (,$(filter $(HOST.machine),arm64 aarch64))
@@ -97,6 +99,10 @@ Index: make/include/main.defs
- MODULES += contrib/libiconv
-endif
-
+-ifneq (,$(filter $(HOST.system),netbsd))
+- # needed to avoid conflict with jpeg-9e
+- MODULES += contrib/libjpeg-turbo
+-endif
-
## these must come after contrib since some contrib modules are optional
MODULES += libhb
Index: patches/patch-test_module_defs
===================================================================
RCS file: /home/cvs/ports/multimedia/handbrake/patches/patch-test_module_defs,v
diff -u -p -r1.2 patch-test_module_defs
--- patches/patch-test_module_defs 28 Oct 2025 09:38:40 -0000 1.2
+++ patches/patch-test_module_defs 12 Nov 2025 15:36:06 -0000
@@ -1,13 +1,12 @@
Index: test/module.defs
--- test/module.defs.orig
+++ test/module.defs
-@@ -16,7 +16,7 @@ TEST.libs = $(LIBHB.a)
- TEST.GCC.l = \
-- ass avformat avfilter avcodec avutil swresample postproc mp3lame dvdnav \
-+ ass avformat avfilter avcodec avutil swresample mp3lame dvdnav \
- dvdread fribidi swscale vpx theoraenc theoradec vorbis vorbisenc ogg \
-- x264 bluray freetype xml2 bz2 z jansson harfbuzz opus speex lzma dav1d \
-+ x264 x265 bluray freetype xml2 bz2 z jansson harfbuzz opus speex lzma dav1d \
- turbojpeg zimg SvtAv1Enc
+@@ -17,7 +17,7 @@ TEST.GCC.L = $(CONTRIB.build/)lib
+ TEST.libs = $(LIBHB.a)
- ifeq (,$(filter $(HOST.system),darwin cygwin mingw))
+ TEST.pkgconfig_libs = libass libavformat libavfilter libavcodec libavutil libswresample dvdnav \
+- dvdread libswscale theoraenc theoradec vorbis vorbisenc ogg x264 libbluray \
++ dvdread libswscale theoraenc theoradec vorbis vorbisenc ogg x264 x265 libbluray \
+ jansson libturbojpeg SvtAv1Enc
+
+ TEST.pkgconfig_libs += $(foreach m,$(MODULES.NAMES),$($m.OSL.libs))
Index: pkg/PLIST
===================================================================
RCS file: /home/cvs/ports/multimedia/handbrake/pkg/PLIST,v
diff -u -p -r1.5 PLIST
--- pkg/PLIST 29 May 2024 08:47:50 -0000 1.5
+++ pkg/PLIST 12 Nov 2025 15:49:39 -0000
@@ -3,46 +3,26 @@ bin/HandBrake
@bin bin/ghb
share/applications/fr.handbrake.ghb.desktop
share/icons/hicolor/scalable/apps/fr.handbrake.ghb.svg
-share/icons/hicolor/scalable/apps/hb-icon.svg
-share/locale/af/LC_MESSAGES/ghb.mo
share/locale/bg/LC_MESSAGES/ghb.mo
share/locale/ca/LC_MESSAGES/ghb.mo
share/locale/co/
share/locale/co/LC_MESSAGES/
share/locale/co/LC_MESSAGES/ghb.mo
-share/locale/cs/LC_MESSAGES/ghb.mo
-share/locale/da/LC_MESSAGES/ghb.mo
share/locale/de/LC_MESSAGES/ghb.mo
share/locale/es/LC_MESSAGES/ghb.mo
share/locale/eu/LC_MESSAGES/ghb.mo
share/locale/fi/LC_MESSAGES/ghb.mo
share/locale/fr/LC_MESSAGES/ghb.mo
-share/locale/he/LC_MESSAGES/ghb.mo
-share/locale/hr/LC_MESSAGES/ghb.mo
share/locale/it/LC_MESSAGES/ghb.mo
share/locale/ja/LC_MESSAGES/ghb.mo
-share/locale/ka/LC_MESSAGES/ghb.mo
share/locale/ko/LC_MESSAGES/ghb.mo
share/locale/nl/LC_MESSAGES/ghb.mo
-share/locale/no/LC_MESSAGES/ghb.mo
-share/locale/pl/LC_MESSAGES/ghb.mo
-share/locale/pt/LC_MESSAGES/ghb.mo
share/locale/pt_BR/LC_MESSAGES/ghb.mo
-share/locale/ro/LC_MESSAGES/ghb.mo
-share/locale/ru/LC_MESSAGES/ghb.mo
-share/locale/si/LC_MESSAGES/ghb.mo
-share/locale/sk/LC_MESSAGES/ghb.mo
share/locale/sl_SI/
share/locale/sl_SI/LC_MESSAGES/
share/locale/sl_SI/LC_MESSAGES/ghb.mo
share/locale/sv/LC_MESSAGES/ghb.mo
-share/locale/th/LC_MESSAGES/ghb.mo
-share/locale/tr/LC_MESSAGES/ghb.mo
-share/locale/uk_UA/
-share/locale/uk_UA/LC_MESSAGES/
-share/locale/uk_UA/LC_MESSAGES/ghb.mo
share/locale/zh_CN/LC_MESSAGES/ghb.mo
-share/locale/zh_TW/LC_MESSAGES/ghb.mo
share/metainfo/
share/metainfo/fr.handbrake.ghb.metainfo.xml
@tag update-desktop-database
--
wbr, Kirill
multimedia/handbrake: update to 1.10.2