commit:     56b84c7fc59ef6085d5080e679bda72470255d07
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Nov  8 23:04:09 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Nov  8 23:04:16 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56b84c7f

media-video/ccextractor: bump to 0.88

Bug: https://bugs.gentoo.org/752510
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-video/ccextractor/Manifest                   |  1 +
 media-video/ccextractor/ccextractor-0.88.ebuild    | 33 +++++++++++++
 .../files/ccextractor-0.88-cflags.patch            | 13 +++++
 .../files/ccextractor-0.88-fno-common.patch        | 55 ++++++++++++++++++++++
 .../files/ccextractor-0.88-libdir.patch            | 12 +++++
 5 files changed, 114 insertions(+)

diff --git a/media-video/ccextractor/Manifest b/media-video/ccextractor/Manifest
index 58c7c84ab38..3dd0343cb3f 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-src-nowin.0.85.zip 1843154 BLAKE2B 
507018e76ed075de033df10c8af235ab7095b3dcf85c10398d9a7c8dbec338c6fe43f98b4f337419945b5deb9290d8652caa54c70de5fdfb0364b9dc48468379
 SHA512 
53adc017b7b1679302677e3773aabdcceddabdd8a6550cf8b9fb98150b7323a1cc6dbe67a48ebcdf22a4d013c00831907799032dd0f7f6f06943252be8177cec

diff --git a/media-video/ccextractor/ccextractor-0.88.ebuild 
b/media-video/ccextractor/ccextractor-0.88.ebuild
new file mode 100644
index 00000000000..72d1707c169
--- /dev/null
+++ b/media-video/ccextractor/ccextractor-0.88.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake flag-o-matic
+
+DESCRIPTION="Extract closed captioning subtitles from video to SRT"
+HOMEPAGE="https://www.ccextractor.org/";
+SRC_URI="https://github.com/CCExtractor/ccextractor/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+S="${WORKDIR}/${P}/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}/ccextractor-0.88-fno-common.patch"
+       "${FILESDIR}/ccextractor-0.88-libdir.patch"
+       "${FILESDIR}/ccextractor-0.88-cflags.patch"
+)
+
+src_install() {
+       cmake_src_install
+       dodoc ../docs/*.TXT
+}

diff --git a/media-video/ccextractor/files/ccextractor-0.88-cflags.patch 
b/media-video/ccextractor/files/ccextractor-0.88-cflags.patch
new file mode 100644
index 00000000000..7f0e0e9b23d
--- /dev/null
+++ b/media-video/ccextractor/files/ccextractor-0.88-cflags.patch
@@ -0,0 +1,13 @@
+diff --git a/lib_ccx/CMakeLists.txt b/lib_ccx/CMakeLists.txt
+index 172ef42..0d00660 100644
+--- a/lib_ccx/CMakeLists.txt
++++ b/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 -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.88-fno-common.patch 
b/media-video/ccextractor/files/ccextractor-0.88-fno-common.patch
new file mode 100644
index 00000000000..1f42132bf8b
--- /dev/null
+++ b/media-video/ccextractor/files/ccextractor-0.88-fno-common.patch
@@ -0,0 +1,55 @@
+From dfd25022e2a775a8b5eb03e4ad28bab6fe6a0658 Mon Sep 17 00:00:00 2001
+From: Ed Marshall <[email protected]>
+Date: Sat, 1 Feb 2020 15:03:22 -0800
+Subject: [PATCH] Fix multiple definitions with new -fno-common default in GCC
+ 10
+
+---
+ ccextractor.c              | 3 +++
+ ccextractor.h              | 4 ++--
+ lib_ccx/ccx_decoders_708.h | 4 ++--
+ 3 files changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/ccextractor.c b/ccextractor.c
+index a2fb0a24f..8ed27936d 100644
+--- a/ccextractor.c
++++ b/ccextractor.c
+@@ -9,6 +9,9 @@ License: GPL 2.0
+ 
+ volatile int terminate_asap = 0;
+ 
++struct ccx_s_options ccx_options;
++struct lib_ccx_ctx *signal_ctx;
++
+ void sigusr1_handler(int sig)
+ {
+       mprint("Caught SIGUSR1. Filename Change Requested\n");
+diff --git a/ccextractor.h b/ccextractor.h
+index 4e9ae68f6..e5cde3055 100644
+--- a/ccextractor.h
++++ b/ccextractor.h
+@@ -41,8 +41,8 @@ char * api_param(struct ccx_s_options* api_options, int 
count);
+ #endif
+ 
+ 
+-struct ccx_s_options ccx_options;
+-struct lib_ccx_ctx *signal_ctx;
++extern struct ccx_s_options ccx_options;
++extern struct lib_ccx_ctx *signal_ctx;
+ //volatile int terminate_asap = 0;
+ 
+ struct ccx_s_options* api_init_options();
+diff --git a/lib_ccx/ccx_decoders_708.h b/lib_ccx/ccx_decoders_708.h
+index 324f3890d..df52c6002 100644
+--- a/lib_ccx/ccx_decoders_708.h
++++ b/lib_ccx/ccx_decoders_708.h
+@@ -371,7 +371,7 @@ void ccx_dtvcc_process_service_block(ccx_dtvcc_ctx *dtvcc,
+                                                                        
unsigned char *data,
+                                                                        int 
data_length);
+ 
+-ccx_dtvcc_pen_color ccx_dtvcc_default_pen_color;
+-ccx_dtvcc_pen_attribs ccx_dtvcc_default_pen_attribs;
++extern ccx_dtvcc_pen_color ccx_dtvcc_default_pen_color;
++extern ccx_dtvcc_pen_attribs ccx_dtvcc_default_pen_attribs;
+ 
+ #endif

diff --git a/media-video/ccextractor/files/ccextractor-0.88-libdir.patch 
b/media-video/ccextractor/files/ccextractor-0.88-libdir.patch
new file mode 100644
index 00000000000..bb22a4b8a35
--- /dev/null
+++ b/media-video/ccextractor/files/ccextractor-0.88-libdir.patch
@@ -0,0 +1,12 @@
+diff --git a/lib_ccx/CMakeLists.txt b/lib_ccx/CMakeLists.txt
+index 5a784a9..172ef42 100644
+--- a/lib_ccx/CMakeLists.txt
++++ b/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