aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Ribbers <bribbers@disroot.org>2023-03-18 18:30:54 +0100
committerBart Ribbers <bribbers@disroot.org>2023-03-18 18:40:46 +0000
commit3876df9b6bacd7a4db6d2a336ef81b8f50d4d00b (patch)
tree043296240f15e4654df7baad1edd02eac15240ab
parent7060a05d7ee4f4eb7ad15ae51390f46fda14d00c (diff)
community/subtitlecomposer: backport various deprecation and removal commits
Without this it wasn't able to open any videos for example. Upstream really just needs to push a new release...
-rw-r--r--community/subtitlecomposer/APKBUILD35
-rw-r--r--community/subtitlecomposer/ffmpeg5.patch66
-rw-r--r--community/subtitlecomposer/ffmpeg6.patch13
3 files changed, 29 insertions, 85 deletions
diff --git a/community/subtitlecomposer/APKBUILD b/community/subtitlecomposer/APKBUILD
index 168a162a382..5cb7ea67bc4 100644
--- a/community/subtitlecomposer/APKBUILD
+++ b/community/subtitlecomposer/APKBUILD
@@ -2,10 +2,11 @@
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=subtitlecomposer
pkgver=0.7.1
-pkgrel=6
+pkgrel=7
# armhf blocked by extra-cmake-modules
# s390x, armv7, riscv64 and aarch64 blocked by OpenGLES
-arch="all !armhf !s390x !armv7 !aarch64 !riscv64"
+# x86 fails to build, "call of overloaded 'createIndex(const int&, int, long long unsigned int)' is ambiguous"
+arch="all !armhf !s390x !armv7 !aarch64 !riscv64 !x86"
url="https://subtitlecomposer.kde.org/"
pkgdesc="The open source text-based subtitle editor"
license="GPL-2.0-only"
@@ -30,8 +31,19 @@ makedepends="
"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/subtitlecomposer/subtitlecomposer-$pkgver.tar.xz
- ffmpeg5.patch
- ffmpeg6.patch
+ $pkgname-0001-Fix-invalid-memory-read.patch::https://invent.kde.org/multimedia/subtitlecomposer/-/commit/2ec9412ddf297ec7b64e780f3c107ec1678ef703.patch
+ $pkgname-0002-Fixed-crash-when-closing-subtitle.patch::https://invent.kde.org/multimedia/subtitlecomposer/-/commit/3fe2fb49c613641da78ac1d176415387af1573ff.patch
+ $pkgname-0003-Fix-crashes-on-empty-lines-list.patch::https://invent.kde.org/multimedia/subtitlecomposer/-/commit/17811ce518f2db3db4ecb15c81ed774593715713.patch
+ $pkgname-0004-Removed-QSharedData-instances-from-stack.patch::https://invent.kde.org/multimedia/subtitlecomposer/-/commit/fa7b2dd651fc568c15e215633eacc7094fd4c052.patch
+ $pkgname-0005-Fixed-memory-leaks.patch::https://invent.kde.org/multimedia/subtitlecomposer/-/commit/911b94b36b1536083e09d427f858baa421acf86b.patch
+ $pkgname-0006-LinesItemDelegate-fix-inline-rich-editor-crash.patch::https://invent.kde.org/multimedia/subtitlecomposer/-/commit/82f907f4e468857c8e5b1e7fbf967cdd3a18a128.patch
+ $pkgname-0007-Fix-compilation-with-ffmpeg5-63.patch::https://invent.kde.org/multimedia/subtitlecomposer/-/commit/4f4f560e40ba0b760cf688eb024be3cc734ca347.patch
+ $pkgname-0008-VideoPlayer-Fix-usage-of-deprecated-removed-AVCodec-.patch::https://invent.kde.org/multimedia/subtitlecomposer/-/commit/d8f9797d9c0d45fa9f4402f79c539544b74d2cc7.patch
+ $pkgname-0009-Replaced-Kross-with-QJSEngine.patch::https://invent.kde.org/multimedia/subtitlecomposer/-/commit/4a8df2a16c929f179fe69f1c3e867c03780874c5.patch
+ $pkgname-0010-Organized-Tools-menu-scripts.patch::https://invent.kde.org/multimedia/subtitlecomposer/-/commit/2ac561d176aadc465ed030666fe11020577281c5.patch
+ $pkgname-0011-Improved-script-manager.patch::https://invent.kde.org/multimedia/subtitlecomposer/-/commit/328b5994957b17941238cc2d47c3795dc15518f9.patch
+ $pkgname-0012-SciptManager-fixed-wrong-filename-title-use.patch::https://invent.kde.org/multimedia/subtitlecomposer/-/commit/1af1bfd7552fe14c4c5e972ade6592f03ce0b969.patch
+ $pkgname-0013-newer-ffmpeg.patch::https://invent.kde.org/multimedia/subtitlecomposer/-/commit/12f4d7f49d0b1a7fc02b0836521a285e7b6bac9d.patch
"
subpackages="$pkgname-lang"
@@ -54,6 +66,17 @@ package() {
sha512sums="
b486a1be8b414409af4ec2d2ccc86a7e9f34040f114b0efbbf817b5157d85b5f9a37d80272b468a389128f10c12316bf028dd86e2a7434a2b001bfd185208b92 subtitlecomposer-0.7.1.tar.xz
-1b6b93e9e5bf00c8291b2de7365b217d62d7d453f4e949dc042960a3258483049959525dd8891ed0fd8f8954afefccf325137de063122ac2d1cc506f248cd885 ffmpeg5.patch
-1d9437a801ea16e716d620bccc57b8f559ec711d5d01f7ef7d15e872c69ab1f88a6771d17f54597d17ce35e79a2826d62963e32fef1e6334b098d91b3988a7a0 ffmpeg6.patch
+0320f193a664055051b6b55ea3f8fcaf4a44a19807a5b261c1f4f272eef659a8f31fe9349ad7f87abbef7a77a6ca8fa10c093bef6e2e1daf3a1a155101a7b5bc subtitlecomposer-0001-Fix-invalid-memory-read.patch
+e4f6830aa65fbecf0f8c6e8b28123f8812f553830bdd40e60f8fe1849cf5c07b323dad562395abc0df47173e25116b4b60e04c8055b447fda4ef420721ca8eb6 subtitlecomposer-0002-Fixed-crash-when-closing-subtitle.patch
+6b69438f5b11878d4407458755260319ff8cce89c703a9eebfb641690aebaeb3174cba587e5ee1c84c164f2c07012124093c23e52d8f549482412579baf74591 subtitlecomposer-0003-Fix-crashes-on-empty-lines-list.patch
+8042327f8bfacd95d5d4bee919288ee4d58c5068404ce3fc1285dc4e70ee015f6bf6a3d0810b1acc18318b0deb0ec8eed1b2c4dc3b0d8da6ec172e869275686e subtitlecomposer-0004-Removed-QSharedData-instances-from-stack.patch
+a507a8252ab1dff34527af16fd0878dbc70c37cd9ce43330ccca5c7dddab6e835dd523b24ef81cbfe3b793365f845dd4297196764493aa8268a5f7b618a3ff32 subtitlecomposer-0005-Fixed-memory-leaks.patch
+afaad6dd11a08f8917e2257c85f768013fd17d6c71148bf5d0601549036f926f1b08e3238e7146ba0a9262edf84806cea1e70ab878039459cdc1dad9178bc129 subtitlecomposer-0006-LinesItemDelegate-fix-inline-rich-editor-crash.patch
+457dbeefeb3a9867836e980592c52b120aa4dd9205f317e13d35e8bcd9ca81ae843b77bb6fe097030ac88d3c4c61f38cac02533e5137e6c54a2339fdd60f0fc1 subtitlecomposer-0007-Fix-compilation-with-ffmpeg5-63.patch
+35fe30d123aafef39f6684407bd9bbe86e85f9a9fcabf9cd91971dbd7b51acd9f48f1f2d2242f062cc02ba516f15aa8903beb210e74b7a465f45feaa5f0a4a6d subtitlecomposer-0008-VideoPlayer-Fix-usage-of-deprecated-removed-AVCodec-.patch
+214c0a2df5e3ef807021c747d861aaa384d3ad51ebe2307d0cf66b1d36603f4ade86c2743ce913ae026a26da28ce602fe5534d8984e72a9b5e2169495a844976 subtitlecomposer-0009-Replaced-Kross-with-QJSEngine.patch
+6808653af712bb2ed12b414f4fbdfde4564d7fd9d242e7d236a76e2426b4bb1a8813f275007294a749b09252208174fdda44575a96d90bec7722280e27912d39 subtitlecomposer-0010-Organized-Tools-menu-scripts.patch
+641978930a52cc0fa6e3edd97f1e2f3f9d5a033cdb070b73c2b56c0b5010f5df519bf93f7aad59253e900015b69820b0d71a1188ae8a43494c7afa1b0f612a2f subtitlecomposer-0011-Improved-script-manager.patch
+f7bb65288bd625e69737b1a9cc8db14ac75e50a5acdf06ec50c98e21898911b3a7ee9729e20ff8578f5306da143c1bf31015b2f7df08c94989235c9e475b3c76 subtitlecomposer-0012-SciptManager-fixed-wrong-filename-title-use.patch
+e79cfd5aadd9117dc3d1c03ddd2f8ce2083cc279868abf63285b7248b0010eef1c7b8b717584750a148c8aee41378a7349ebfe29eaa93438b053fe40eb6e7a87 subtitlecomposer-0013-newer-ffmpeg.patch
"
diff --git a/community/subtitlecomposer/ffmpeg5.patch b/community/subtitlecomposer/ffmpeg5.patch
deleted file mode 100644
index d917397b8ad..00000000000
--- a/community/subtitlecomposer/ffmpeg5.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-Patch-Source: https://invent.kde.org/multimedia/subtitlecomposer/-/commit/4f4f560e40ba0b760cf688eb024be3cc734ca347
-From 4f4f560e40ba0b760cf688eb024be3cc734ca347 Mon Sep 17 00:00:00 2001
-From: Mladen Milinkovic <maxrd2@smoothware.net>
-Date: Tue, 25 Jan 2022 14:01:56 +0100
-Subject: [PATCH] Fix compilation with ffmpeg5 #63
-
----
- src/streamprocessor/streamprocessor.cpp | 2 +-
- src/videoplayer/backend/decoder.h | 1 +
- src/videoplayer/backend/framequeue.h | 1 +
- src/videoplayer/backend/streamdemuxer.cpp | 2 +-
- 4 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/src/streamprocessor/streamprocessor.cpp b/src/streamprocessor/streamprocessor.cpp
-index b86795e..8faf8a2 100644
---- a/src/streamprocessor/streamprocessor.cpp
-+++ b/src/streamprocessor/streamprocessor.cpp
-@@ -195,7 +195,7 @@ StreamProcessor::findStream(int streamType, int streamIndex, bool imageSub)
- int ret;
- char errorText[1024];
-
-- AVCodec *dec = avcodec_find_decoder(m_avStream->codecpar->codec_id);
-+ const AVCodec *dec = avcodec_find_decoder(m_avStream->codecpar->codec_id);
- if(!dec) {
- qWarning() << "Failed to find decoder for stream" << i;
- return false;
-diff --git a/src/videoplayer/backend/decoder.h b/src/videoplayer/backend/decoder.h
-index 4ab95b2..fb6840d 100644
---- a/src/videoplayer/backend/decoder.h
-+++ b/src/videoplayer/backend/decoder.h
-@@ -11,6 +11,7 @@
- #include <QThread>
-
- extern "C" {
-+#include "libavcodec/avcodec.h"
- #include "libavformat/avformat.h"
- }
-
-diff --git a/src/videoplayer/backend/framequeue.h b/src/videoplayer/backend/framequeue.h
-index dc9b2fa..ece1166 100644
---- a/src/videoplayer/backend/framequeue.h
-+++ b/src/videoplayer/backend/framequeue.h
-@@ -9,6 +9,7 @@
- #define FRAMEQUEUE_H
-
- extern "C" {
-+#include "libavcodec/avcodec.h"
- #include "libavformat/avformat.h"
- }
-
-diff --git a/src/videoplayer/backend/streamdemuxer.cpp b/src/videoplayer/backend/streamdemuxer.cpp
-index 1e339b3..e8320ea 100644
---- a/src/videoplayer/backend/streamdemuxer.cpp
-+++ b/src/videoplayer/backend/streamdemuxer.cpp
-@@ -230,7 +230,7 @@ StreamDemuxer::componentOpen(int streamIndex)
- {
- AVFormatContext *ic = m_vs->fmtContext;
- AVCodecContext *avCtx;
-- AVCodec *codec;
-+ const AVCodec *codec;
- AVDictionary *opts = nullptr;
- AVDictionaryEntry *t = nullptr;
- int sampleRate, nbChannels;
---
-GitLab
-
diff --git a/community/subtitlecomposer/ffmpeg6.patch b/community/subtitlecomposer/ffmpeg6.patch
deleted file mode 100644
index 842ee03fb67..00000000000
--- a/community/subtitlecomposer/ffmpeg6.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/videoplayer/backend/streamdemuxer.cpp b/src/videoplayer/backend/streamdemuxer.cpp
-index 1e339b3..cf75b82 100644
---- a/src/videoplayer/backend/streamdemuxer.cpp
-+++ b/src/videoplayer/backend/streamdemuxer.cpp
-@@ -506,7 +506,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;