diff --git a/mythtv-33.1-binutils-2.41.patch b/mythtv-33.1-binutils-2.41.patch deleted file mode 100644 index 3c68815..0000000 --- a/mythtv-33.1-binutils-2.41.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 9572dc5a124b46ac60c6cea34994ccc69ec53442 Mon Sep 17 00:00:00 2001 -From: David Engel -Date: Thu, 27 Jul 2023 20:49:56 -0500 -Subject: [PATCH] Fix FFmpeg compilation with binutils >= 2.41. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This is from FFmpeg commit effadce6c756247ea8bae32dc13bb3e6f464f0eb . - - Author: RĂ©mi Denis-Courmont - Date: Sun Jul 16 18:18:02 2023 +0300 - - avcodec/x86/mathops: clip constants used with shift instructions within inline assembly - - Fixes assembling with binutil as >= 2.41 - - Signed-off-by: James Almer - -Refs #765 - -(cherry picked from commit f9f9bba62ee2743c816cb2b9634b6b4397e5e2e3) ---- - .../external/FFmpeg/libavcodec/x86/mathops.h | 26 ++++++++++++++++--- - 1 file changed, 23 insertions(+), 3 deletions(-) - -diff --git a/mythtv/external/FFmpeg/libavcodec/x86/mathops.h b/mythtv/external/FFmpeg/libavcodec/x86/mathops.h -index 6298f5ed198..ca7e2dffc10 100644 ---- a/mythtv/external/FFmpeg/libavcodec/x86/mathops.h -+++ b/mythtv/external/FFmpeg/libavcodec/x86/mathops.h -@@ -35,12 +35,20 @@ - static av_always_inline av_const int MULL(int a, int b, unsigned shift) - { - int rt, dummy; -+ if (__builtin_constant_p(shift)) - __asm__ ( - "imull %3 \n\t" - "shrdl %4, %%edx, %%eax \n\t" - :"=a"(rt), "=d"(dummy) -- :"a"(a), "rm"(b), "ci"((uint8_t)shift) -+ :"a"(a), "rm"(b), "i"(shift & 0x1F) - ); -+ else -+ __asm__ ( -+ "imull %3 \n\t" -+ "shrdl %4, %%edx, %%eax \n\t" -+ :"=a"(rt), "=d"(dummy) -+ :"a"(a), "rm"(b), "c"((uint8_t)shift) -+ ); - return rt; - } - -@@ -113,19 +121,31 @@ __asm__ volatile(\ - // avoid +32 for shift optimization (gcc should do that ...) - #define NEG_SSR32 NEG_SSR32 - static inline int32_t NEG_SSR32( int32_t a, int8_t s){ -+ if (__builtin_constant_p(s)) - __asm__ ("sarl %1, %0\n\t" - : "+r" (a) -- : "ic" ((uint8_t)(-s)) -+ : "i" (-s & 0x1F) - ); -+ else -+ __asm__ ("sarl %1, %0\n\t" -+ : "+r" (a) -+ : "c" ((uint8_t)(-s)) -+ ); - return a; - } - - #define NEG_USR32 NEG_USR32 - static inline uint32_t NEG_USR32(uint32_t a, int8_t s){ -+ if (__builtin_constant_p(s)) - __asm__ ("shrl %1, %0\n\t" - : "+r" (a) -- : "ic" ((uint8_t)(-s)) -+ : "i" (-s & 0x1F) - ); -+ else -+ __asm__ ("shrl %1, %0\n\t" -+ : "+r" (a) -+ : "c" ((uint8_t)(-s)) -+ ); - return a; - } - diff --git a/mythtv-34.0-x265-4.0.patch b/mythtv-34.0-x265-4.0.patch new file mode 100644 index 0000000..5f11c81 --- /dev/null +++ b/mythtv-34.0-x265-4.0.patch @@ -0,0 +1,79 @@ +--- FFmpeg/libavcodec/libx265.c.x265-4.0 2024-02-13 15:03:25.000000000 +0100 ++++ FFmpeg/libavcodec/libx265.c 2024-11-11 09:41:23.812186607 +0100 +@@ -504,7 +504,13 @@ + { + libx265Context *ctx = avctx->priv_data; + x265_picture x265pic; +- x265_picture x265pic_out = { 0 }; ++#if X265_BUILD >= 210 ++ x265_picture x265pic_layers_out[MAX_SCALABLE_LAYERS]; ++ x265_picture* x265pic_lyrptr_out[MAX_SCALABLE_LAYERS]; ++#else ++ x265_picture x265pic_solo_out = { 0 }; ++#endif ++ x265_picture* x265pic_out; + x265_nal *nal; + uint8_t *dst; + int pict_type; +@@ -575,8 +581,16 @@ + } + } + ++#if X265_BUILD >= 210 ++ for (i = 0; i < MAX_SCALABLE_LAYERS; i++) ++ x265pic_lyrptr_out[i] = &x265pic_layers_out[i]; ++ ++ ret = ctx->api->encoder_encode(ctx->encoder, &nal, &nnal, ++ pic ? &x265pic : NULL, x265pic_lyrptr_out); ++#else + ret = ctx->api->encoder_encode(ctx->encoder, &nal, &nnal, +- pic ? &x265pic : NULL, &x265pic_out); ++ pic ? &x265pic : NULL, &x265pic_solo_out); ++#endif + + av_freep(&x265pic.quantOffsets); + +@@ -604,10 +618,16 @@ + pkt->flags |= AV_PKT_FLAG_KEY; + } + +- pkt->pts = x265pic_out.pts; +- pkt->dts = x265pic_out.dts; ++#if X265_BUILD >= 210 ++ x265pic_out = x265pic_lyrptr_out[0]; ++#else ++ x265pic_out = &x265pic_solo_out; ++#endif ++ ++ pkt->pts = x265pic_out->pts; ++ pkt->dts = x265pic_out->dts; + +- switch (x265pic_out.sliceType) { ++ switch (x265pic_out->sliceType) { + case X265_TYPE_IDR: + case X265_TYPE_I: + pict_type = AV_PICTURE_TYPE_I; +@@ -625,17 +645,17 @@ + } + + #if X265_BUILD >= 130 +- if (x265pic_out.sliceType == X265_TYPE_B) ++ if (x265pic_out->sliceType == X265_TYPE_B) + #else +- if (x265pic_out.frameData.sliceType == 'b') ++ if (x265pic_out->frameData.sliceType == 'b') + #endif + pkt->flags |= AV_PKT_FLAG_DISPOSABLE; + +- ff_side_data_set_encoder_stats(pkt, x265pic_out.frameData.qp * FF_QP2LAMBDA, NULL, 0, pict_type); ++ ff_side_data_set_encoder_stats(pkt, x265pic_out->frameData.qp * FF_QP2LAMBDA, NULL, 0, pict_type); + +- if (x265pic_out.userData) { +- memcpy(&avctx->reordered_opaque, x265pic_out.userData, sizeof(avctx->reordered_opaque)); +- av_freep(&x265pic_out.userData); ++ if (x265pic_out->userData) { ++ memcpy(&avctx->reordered_opaque, x265pic_out->userData, sizeof(avctx->reordered_opaque)); ++ av_freep(&x265pic_out->userData); + } else + avctx->reordered_opaque = 0; + diff --git a/mythtv.spec b/mythtv.spec index 80c6948..1c53514 100644 --- a/mythtv.spec +++ b/mythtv.spec @@ -2,7 +2,7 @@ %define majver %(echo %version | cut -d. -f1-2) Name: mythtv Version: 34.0 -Release: 2mamba +Release: 3mamba Summary: A digital video recorder (DVR) application Group: Applications/Multimedia Vendor: openmamba @@ -24,11 +24,18 @@ Source11: mythtv-mysql.txt Source12: mythtv-PACKAGE-LICENSING Patch1: mythtv-31.0-gcc-11.patch Patch3: mythtv-32.0-glibc-2.35.patch -Patch4: mythtv-33.1-binutils-2.41.patch +Patch5: mythtv-34.0-x265-4.0.patch License: GPL, LGPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel +BuildRequires: libQt5Core +BuildRequires: libQt5DBus +BuildRequires: libQt5Gui +BuildRequires: libQt5Network +BuildRequires: libQt5Sql BuildRequires: libQt5WebKit-devel +BuildRequires: libQt5Widgets +BuildRequires: libQt5Xml BuildRequires: libSDL2-devel BuildRequires: libX11-devel BuildRequires: libXext-devel @@ -89,16 +96,17 @@ BuildRequires: perl-XML-Simple BuildRequires: perl-XML-TreeBuilder BuildRequires: perl-devel BuildRequires: perl-libwww -BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtscript-devel +BuildRequires: systemd ## AUTOBUILDREQ-END -BuildRequires: libx265-devel >= 3.6-1mamba +BuildRequires: libx265-devel >= 0:4.0-1mamba BuildRequires: python3-devel >= 3.11.5-3mamba BuildRequires: desktop-file-utils BuildRequires: gcc-c++ BuildRequires: nasm BuildRequires: yasm-devel BuildRequires: xproto-devel +Provides: user(mythtv) Requires: libmythtv = %{?epoch:%epoch:}%{version}-%{release} %description @@ -168,7 +176,10 @@ This package contains the documentation for %{name}, #:<< _EOF %patch 1 -p1 %patch 3 -p1 -#%patch 4 -p1 -b .binutils-2.41 + +cd mythtv/external/FFmpeg +%patch 5 -p1 -b .x265-4.0 +cd ../../.. rm -rf contrib/Win32 contrib/OSX #chmod -x themes/default/htmls/*.html @@ -282,22 +293,17 @@ rm -rf %{buildroot}%{_libdir}/mythtv/filters/*.*a %{_sbindir}/useradd -c "mythtvbackend User" \ -s /sbin/nologin -r -d %{_localstatedir}/lib/mythtv -G video mythtv 2> /dev/null || : -%post -n libmythtv -p /sbin/ldconfig -%postun -n libmythtv -p /sbin/ldconfig - %files %defattr(-,root,root) %dir %{_sysconfdir}/mythtv %config(noreplace) %{_sysconfdir}/mythtv/mysql.txt %config(noreplace) %{_sysconfdir}/mythtv/config.xml -%attr(-,mythtv,mythtv) %dir %{_localstatedir}/lib/mythtv -%attr(-,mythtv,mythtv) %dir %{_localstatedir}/cache/mythtv -%attr(-,mythtv,mythtv) %dir %{_localstatedir}/log/mythtv +%attr(-,mythtv,video) %dir %{_localstatedir}/lib/mythtv +%attr(-,mythtv,video) %dir %{_localstatedir}/cache/mythtv +%attr(-,mythtv,video) %dir %{_localstatedir}/log/mythtv %{_bindir}/myth* %{_unitdir}/mythbackend.service %dir %{_libdir}/mythtv -#%dir %{_libdir}/mythtv/filters -#%{_libdir}/mythtv/filters/*.so %dir %{_libdir}/mythtv/plugins %dir %{_datadir}/mythtv %{_datadir}/mythtv/*.xml @@ -313,7 +319,6 @@ rm -rf %{buildroot}%{_libdir}/mythtv/filters/*.*a %{_datadir}/mythtv/locales %{_datadir}/mythtv/metadata %{_datadir}/mythtv/themes -#%{_datadir}/mythtv/ttvdb %{_datadir}/pixmaps/*.png %{_datadir}/applications/*.desktop @@ -355,6 +360,9 @@ rm -rf %{buildroot}%{_libdir}/mythtv/filters/*.*a ##%doc contrib database %changelog +* Sun Nov 10 2024 Automatic Build System 34.0-3mamba +- rebuilt by autoport with build requirements: libx265-devel>=0:4.0-1mamba + * Sat May 04 2024 Automatic Build System 34.0-2mamba - rebuilt by autoport with build requirements: libx265-devel>=3.6-1mamba