From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AE5F115800A for ; Tue, 25 Jul 2023 12:35:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DCB7AE085E; Tue, 25 Jul 2023 12:35:22 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B9803E085E for ; Tue, 25 Jul 2023 12:35:22 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8C15A34097F for ; Tue, 25 Jul 2023 12:35:21 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DD023DBB for ; Tue, 25 Jul 2023 12:35:19 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1690288462.a5539b941812b7f16e54e588eff7dfb7d4305063.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/subtitlecomposer/, media-video/subtitlecomposer/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-ffmpeg6-1.patch media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-ffmpeg6-2.patch media-video/subtitlecomposer/subtitlecomposer-0.7.1-r2.ebuild X-VCS-Directories: media-video/subtitlecomposer/ media-video/subtitlecomposer/files/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: a5539b941812b7f16e54e588eff7dfb7d4305063 X-VCS-Branch: master Date: Tue, 25 Jul 2023 12:35:19 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 6ecc2047-36be-4370-8e21-7eefac7221a3 X-Archives-Hash: ca47be5d36a946466575d7c214b2cd0f commit: a5539b941812b7f16e54e588eff7dfb7d4305063 Author: Andreas Sturmlechner gentoo org> AuthorDate: Tue Jul 25 12:34:22 2023 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Tue Jul 25 12:34:22 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5539b94 media-video/subtitlecomposer: Fix build and runtime with >=ffmpeg-6 Upstream commits: 12f4d7f49d0b1a7fc02b0836521a285e7b6bac9d 0bb0e6ed99d5a4200cc89fc6e8b3013c70465402 Closes: https://bugs.gentoo.org/910048 Signed-off-by: Andreas Sturmlechner gentoo.org> .../files/subtitlecomposer-0.7.1-ffmpeg6-1.patch | 25 +++++++++ .../files/subtitlecomposer-0.7.1-ffmpeg6-2.patch | 42 +++++++++++++++ .../subtitlecomposer-0.7.1-r2.ebuild | 62 ++++++++++++++++++++++ 3 files changed, 129 insertions(+) diff --git a/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-ffmpeg6-1.patch b/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-ffmpeg6-1.patch new file mode 100644 index 000000000000..7e0d873992a5 --- /dev/null +++ b/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-ffmpeg6-1.patch @@ -0,0 +1,25 @@ +From 12f4d7f49d0b1a7fc02b0836521a285e7b6bac9d Mon Sep 17 00:00:00 2001 +From: Albert Astals Cid +Date: Sat, 4 Mar 2023 10:58:04 +0100 +Subject: [PATCH] Use non deprecated ffmpeg api + +--- + src/videoplayer/backend/streamdemuxer.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/videoplayer/backend/streamdemuxer.cpp b/src/videoplayer/backend/streamdemuxer.cpp +index e3bd808a..39222d8c 100644 +--- a/src/videoplayer/backend/streamdemuxer.cpp ++++ b/src/videoplayer/backend/streamdemuxer.cpp +@@ -504,7 +504,7 @@ StreamDemuxer::run() + + { // find_stream_info + const int origNbStreams = ic->nb_streams; +- AVDictionary **opts = (AVDictionary **)av_mallocz_array(origNbStreams, sizeof(*opts)); ++ AVDictionary **opts = (AVDictionary **)av_calloc(origNbStreams, sizeof(*opts)); + if(!opts) { + av_log(nullptr, AV_LOG_ERROR, "Could not alloc memory for stream options.\n"); + goto cleanup; +-- +GitLab + diff --git a/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-ffmpeg6-2.patch b/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-ffmpeg6-2.patch new file mode 100644 index 000000000000..58c3e9d9dfd3 --- /dev/null +++ b/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-ffmpeg6-2.patch @@ -0,0 +1,42 @@ +From 0bb0e6ed99d5a4200cc89fc6e8b3013c70465402 Mon Sep 17 00:00:00 2001 +From: Mladen Milinkovic +Date: Mon, 5 Jun 2023 10:13:15 +0200 +Subject: [PATCH] StreamProcessor: fixed embedded ASS decoding + +Seems embeded ASS subtitle format got changed in FFmpeg 6. Haven't found +any references to it tho, so this might still be borked in some cases. +--- + src/streamprocessor/streamprocessor.cpp | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/src/streamprocessor/streamprocessor.cpp b/src/streamprocessor/streamprocessor.cpp +index b759b0d3..1e883780 100644 +--- a/src/streamprocessor/streamprocessor.cpp ++++ b/src/streamprocessor/streamprocessor.cpp +@@ -537,11 +537,10 @@ StreamProcessor::processText() + case SUBTITLE_ASS: { + #if 1 + const char *assText = sub->ass; +- if(strncmp("Dialogue", assText, 8) != 0) +- break; +- ++ // FIXME: did ass format change with ffmpeg6? can't find any references ++ const int textLocation = strncmp("Dialogue", assText, 8) ? 8 : 9; + // Dialogue: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text +- for(int c = 9; c && *assText; assText++) { ++ for(int c = textLocation; c && *assText; assText++) { + if(*assText == ',') + c--; + } +@@ -550,7 +549,7 @@ StreamProcessor::processText() + "{\\c&H0000ff&}red {\\c&H00ff00&}green {\\c&Hff0000&}blue{\\r}\\n" + "Another {\\b100}bold\\h{\\i1}bolditalic{\\b0\\i0} some{\\anidfsd} unsupported tag"; + #endif +- QString assChunk(assText); ++ QString assChunk = QString::fromUtf8(assText); + + assChunk + .replace(QStringLiteral("\\N"), QStringLiteral("\n")) +-- +GitLab + diff --git a/media-video/subtitlecomposer/subtitlecomposer-0.7.1-r2.ebuild b/media-video/subtitlecomposer/subtitlecomposer-0.7.1-r2.ebuild new file mode 100644 index 000000000000..84b4fcd68249 --- /dev/null +++ b/media-video/subtitlecomposer/subtitlecomposer-0.7.1-r2.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ECM_TEST="forceoptional" +KFMIN=5.106.0 +QTMIN=5.15.9 +inherit ecm kde.org + +DESCRIPTION="Text-based subtitles editor" +HOMEPAGE="https://subtitlecomposer.kde.org/" +PATCHSET="${P}-patchset-1" +SRC_URI="mirror://kde/stable/${PN}/${P}.tar.xz + https://dev.gentoo.org/~asturm/distfiles/${PATCHSET}.tar.xz" + +LICENSE="GPL-2" +SLOT="5" +KEYWORDS="~amd64 ~x86" +IUSE="unicode" + +DEPEND=" + >=dev-qt/qtdeclarative-${QTMIN}:5 + >=dev-qt/qtgui-${QTMIN}:5 + >=dev-qt/qtwidgets-${QTMIN}:5 + >=kde-frameworks/kcodecs-${KFMIN}:5 + >=kde-frameworks/kcompletion-${KFMIN}:5 + >=kde-frameworks/kconfig-${KFMIN}:5 + >=kde-frameworks/kconfigwidgets-${KFMIN}:5 + >=kde-frameworks/kcoreaddons-${KFMIN}:5 + >=kde-frameworks/ki18n-${KFMIN}:5 + >=kde-frameworks/kio-${KFMIN}:5 + >=kde-frameworks/ktextwidgets-${KFMIN}:5 + >=kde-frameworks/kwidgetsaddons-${KFMIN}:5 + >=kde-frameworks/kxmlgui-${KFMIN}:5 + >=kde-frameworks/sonnet-${KFMIN}:5 + media-libs/openal + media-video/ffmpeg:0= + unicode? ( dev-libs/icu:= ) +" +RDEPEND="${DEPEND}" +BDEPEND=" + sys-devel/gettext + virtual/pkgconfig +" + +PATCHES=( + "${WORKDIR}/${PATCHSET}/${P}-tests-optional.patch" + "${WORKDIR}/${PATCHSET}/${P}-gles-support.patch" # bug 820035 + "${WORKDIR}/${PATCHSET}/${P}-ffmpeg-5.patch" # bug 834416 + "${WORKDIR}/${PATCHSET}/${P}-replace-kross-w-qjsengine.patch" # bug 755956 + "${FILESDIR}"/${P}-ffmpeg6-{1,2}.patch # bug 910048 +) + +src_configure() { + local mycmakeargs=( + -DCMAKE_DISABLE_FIND_PACKAGE_PocketSphinx=ON # bug 616706 + $(cmake_use_find_package unicode ICU) + ) + + ecm_src_configure +}