On Tue Aug 11, 2026 at 10:31:39PM +0200, Kirill A. Korinsky wrote:
> ports@,
> 
> here next trivial diff to fix compatibility textproc/calibre against
> ffmpeg-9.0 by backporting exited commit.
> 
> It was build tested against both ffmpeg-9.0 and ffmpeg-8.1.2
> 
> Test? Ok?

OK rsadowski@

> 
> Index: Makefile
> ===================================================================
> RCS file: /home/cvs/ports/textproc/calibre/Makefile,v
> diff -u -p -r1.112 Makefile
> --- Makefile  13 Apr 2026 05:44:26 -0000      1.112
> +++ Makefile  11 Aug 2026 20:13:59 -0000
> @@ -1,7 +1,7 @@
>  COMMENT =            ebook management application
>  
>  V =                  8.0.1
> -REVISION =           1
> +REVISION =           2
>  DISTNAME =           calibre-$V
>  
>  CATEGORIES =         textproc
> Index: patches/patch-setup_build_py
> ===================================================================
> RCS file: /home/cvs/ports/textproc/calibre/patches/patch-setup_build_py,v
> diff -u -p -r1.12 patch-setup_build_py
> --- patches/patch-setup_build_py      13 Apr 2026 05:44:26 -0000      1.12
> +++ patches/patch-setup_build_py      11 Aug 2026 20:24:13 -0000
> @@ -21,7 +21,7 @@ Index: setup/build.py
>   
>       if ishaiku:
>           cflags.append('-lpthread')
> -@@ -726,6 +729,7 @@ sip-file = {os.path.basename(sipf)!r}
> +@@ -726,6 +728,7 @@ sip-file = {os.path.basename(sipf)!r}
>   
>       def build_pyqt_extension(self, ext, sbf):
>           self.info(f'\n####### Building {ext.name} extension', '#'*7)
> @@ -29,7 +29,7 @@ Index: setup/build.py
>           src_dir = os.path.dirname(sbf)
>           cwd = os.getcwd()
>           try:
> -@@ -733,7 +737,7 @@ sip-file = {os.path.basename(sipf)!r}
> +@@ -733,7 +736,7 @@ sip-file = {os.path.basename(sipf)!r}
>               env = os.environ.copy()
>               if is_macos_universal_build:
>                   env['ARCHS'] = 'x86_64 arm64'
> Index: patches/patch-src_calibre_utils_ffmpeg_c
> ===================================================================
> RCS file: patches/patch-src_calibre_utils_ffmpeg_c
> diff -N patches/patch-src_calibre_utils_ffmpeg_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_calibre_utils_ffmpeg_c  11 Aug 2026 20:24:24 -0000
> @@ -0,0 +1,14 @@
> +https://github.com/kovidgoyal/calibre/commit/49af1f0904e00351ffbf9ad430a37bfe66226bae
> +
> +Index: src/calibre/utils/ffmpeg.c
> +--- src/calibre/utils/ffmpeg.c.orig
> ++++ src/calibre/utils/ffmpeg.c
> +@@ -240,7 +240,7 @@ open_output_file(Transcoder *t) {
> +     av_channel_layout_default(&t->enc_ctx->ch_layout, 
> t->dec_ctx->ch_layout.nb_channels);
> +     t->enc_ctx->sample_rate = t->dec_ctx->sample_rate;
> +     int ret;
> +-#if LIBAVCODEC_VERSION_MAJOR >= 61 && LIBAVCODEC_VERSION_MINOR >= 14
> ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(61, 13, 100)
> +     const enum AVSampleFormat *sample_fmts = NULL;
> +     ret = avcodec_get_supported_config(t->dec_ctx, output_codec, 
> AV_CODEC_CONFIG_SAMPLE_FORMAT, 0, (const void**)&sample_fmts, NULL);
> +     t->enc_ctx->sample_fmt = (ret >= 0 && sample_fmts) ? sample_fmts[0] : 
> t->dec_ctx->sample_fmt;
> 
> 
> -- 
> wbr, Kirill
> 

Reply via email to