commit:     392de6dd77e91ee43961785e740907adc4b3dc44
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 28 20:40:27 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Sep 29 15:57:45 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=392de6dd

media-video/ccextractor: add 0.89, EAPI 7 -> 8

With >=0.90 going Rust, this is as far as I am willing to go to help
keep this package in ::gentoo.

Bug: https://bugs.gentoo.org/651524
Closes: https://bugs.gentoo.org/953940
Closes: https://bugs.gentoo.org/957248
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 media-video/ccextractor/Manifest                   |  1 +
 media-video/ccextractor/ccextractor-0.89.ebuild    | 34 ++++++++++++++++++++++
 .../files/ccextractor-0.89-cflags.patch            | 11 +++++++
 .../files/ccextractor-0.89-cmake4.patch            | 23 +++++++++++++++
 .../files/ccextractor-0.89-libdir.patch            | 10 +++++++
 5 files changed, 79 insertions(+)

diff --git a/media-video/ccextractor/Manifest b/media-video/ccextractor/Manifest
index 39618793fff9..d510250f5f72 100644
--- a/media-video/ccextractor/Manifest
+++ b/media-video/ccextractor/Manifest
@@ -1 +1,2 @@
 DIST ccextractor-0.88.tar.gz 41110344 BLAKE2B 
c0223f482eba2b1c0b80f24fcfbf0654fe6899d6123d4278b21df2558ba77da4e2212c5a0e67d27c670f466767022f1b3e5f557e156564f61269bc48c8ebfd31
 SHA512 
bb9442905f3c5d095b9b34eb318dc445a0ba484c22c4f061071cc2a1159ec9304b8aab5ea9e95348679e8c5ed378d4b2e471d6f7f933b7fa968f3443f1d5380f
+DIST ccextractor-0.89.tar.gz 42851949 BLAKE2B 
678f38cf3f61af8601bc7e0cc1311df288e26a092cdd4ae93978a4245045b7856d28d678663e841e7a3c4043cfb662e4452a2c9eec99fce7fc3d55125871d027
 SHA512 
4c0ede441807df4b7ec1818489eeea9b317c79b4589c9db853edc7d23ead841f9a8fd5aa53a48f16080ee4c2bfb52c915aa482a79b91020fb45ee2533fe53a2c

diff --git a/media-video/ccextractor/ccextractor-0.89.ebuild 
b/media-video/ccextractor/ccextractor-0.89.ebuild
new file mode 100644
index 000000000000..8870f50c6be1
--- /dev/null
+++ b/media-video/ccextractor/ccextractor-0.89.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Extract closed captioning subtitles from video to SRT"
+HOMEPAGE="https://ccextractor.org/";
+SRC_URI="https://github.com/CCExtractor/ccextractor/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+CMAKE_USE_DIR="${S}/src"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+BDEPEND="
+       app-arch/unzip
+       virtual/pkgconfig"
+RDEPEND="
+       media-libs/libpng:0=
+       sys-libs/zlib:="
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+       "${FILESDIR}/${P}-libdir.patch"
+       "${FILESDIR}/${P}-cflags.patch"
+       "${FILESDIR}/${P}-cmake4.patch" # bug 953940
+)
+
+src_install() {
+       cmake_src_install
+       dodoc docs/*.TXT
+}

diff --git a/media-video/ccextractor/files/ccextractor-0.89-cflags.patch 
b/media-video/ccextractor/files/ccextractor-0.89-cflags.patch
new file mode 100644
index 000000000000..58517ef55f8b
--- /dev/null
+++ b/media-video/ccextractor/files/ccextractor-0.89-cflags.patch
@@ -0,0 +1,11 @@
+--- a/src/lib_ccx/CMakeLists.txt
++++ b/src/lib_ccx/CMakeLists.txt
+@@ -3,7 +3,7 @@ cmake_policy (SET CMP0037 NEW)
+ if(MSVC)
+     set (CMAKE_C_FLAGS "-W3 /wd4005 /wd4996")
+ else (MSVC)
+-    set (CMAKE_C_FLAGS "-Wall -Wno-pointer-sign -g -std=gnu99")
++    set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
+ endif(MSVC)
+ 
+ if(WIN32)

diff --git a/media-video/ccextractor/files/ccextractor-0.89-cmake4.patch 
b/media-video/ccextractor/files/ccextractor-0.89-cmake4.patch
new file mode 100644
index 000000000000..6bfd5c51eb7c
--- /dev/null
+++ b/media-video/ccextractor/files/ccextractor-0.89-cmake4.patch
@@ -0,0 +1,23 @@
+From b92ca87835e41c87a0b636f38171954cae4faf8b Mon Sep 17 00:00:00 2001
+From: Emily <[email protected]>
+Date: Mon, 12 Aug 2024 15:35:32 +0100
+Subject: [PATCH] [IMPROVEMENT] Raise CMake minimum to 3.24.0 [effectively]
+
+asturm 2025-09-28: was: "Use Corrosion to build Rust code (#1630)"
+
+---
+ src/CMakeLists.txt      |  8 ++---
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index b1ae689b4..3852799b4 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -1,6 +1,6 @@
+-cmake_minimum_required (VERSION 3.0.2)
++cmake_minimum_required (VERSION 3.24.0)
+ 
+ project (CCExtractor)
+ 
+ option (WITH_FFMPEG "Build using FFmpeg demuxer and decoder" OFF)
+ option (WITH_OCR "Build with OCR (Optical Character Recognition) feature" OFF)

diff --git a/media-video/ccextractor/files/ccextractor-0.89-libdir.patch 
b/media-video/ccextractor/files/ccextractor-0.89-libdir.patch
new file mode 100644
index 000000000000..a8521ff1aa9c
--- /dev/null
+++ b/media-video/ccextractor/files/ccextractor-0.89-libdir.patch
@@ -0,0 +1,10 @@
+--- a/src/lib_ccx/CMakeLists.txt
++++ b/src/lib_ccx/CMakeLists.txt
+@@ -107,6 +107,6 @@ file (WRITE ccx.pc "prefix=${CMAKE_INSTALL_PREFIX}\n"
+                   "Libs.private: -lpng\n"
+                   )
+ 
+-install (TARGETS ccx DESTINATION lib)
++install (TARGETS ccx DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ install (FILES ${HeaderFiles} DESTINATION include)
+ install (FILES ccx.pc DESTINATION lib/pkgconfig)

Reply via email to