diff options
Diffstat (limited to 'multimedia/ccextractor')
| -rw-r--r-- | multimedia/ccextractor/Makefile | 41 | ||||
| -rw-r--r-- | multimedia/ccextractor/Makefile.crates | 41 | ||||
| -rw-r--r-- | multimedia/ccextractor/Makefile.master | 54 | ||||
| -rw-r--r-- | multimedia/ccextractor/distinfo | 85 | ||||
| -rw-r--r-- | multimedia/ccextractor/files/patch-linux_Makefile.am | 238 | ||||
| -rw-r--r-- | multimedia/ccextractor/files/patch-linux_configure.ac | 20 | ||||
| -rw-r--r-- | multimedia/ccextractor/files/patch-src_GUI_file__browser.c | 26 | ||||
| -rw-r--r-- | multimedia/ccextractor/files/patch-src_GUI_save__load__data.c | 8 | ||||
| -rw-r--r-- | multimedia/ccextractor/files/patch-src_lib__ccx_configuration.c | 11 | ||||
| -rw-r--r-- | multimedia/ccextractor/files/patch-src_lib__ccx_params.c | 27 | ||||
| -rw-r--r-- | multimedia/ccextractor/pkg-descr | 7 |
11 files changed, 558 insertions, 0 deletions
diff --git a/multimedia/ccextractor/Makefile b/multimedia/ccextractor/Makefile new file mode 100644 index 000000000000..5c505748b9eb --- /dev/null +++ b/multimedia/ccextractor/Makefile @@ -0,0 +1,41 @@ +PORTREVISION= 2 + +COMMENT= Subtitle extractor + +LIB_DEPENDS= libfreetype.so:print/freetype2 \ + libgpac.so:multimedia/gpac-libgpac \ + libpng.so:graphics/png \ + libprotobuf-c.so:devel/protobuf-c \ + libutf8proc.so:textproc/utf8proc + +ALL_TARGET= ccextractor +CFLAGS+= -I${LOCALBASE}/include/freetype2 \ + -I${LOCALBASE}/include/protobuf-c +LIBS+= -lfreetype -lgpac -lmd -lpng -lprotobuf-c -lutf8proc -lz + +# OCR broken with leptonica >= 1.83 +# probably fixed in next version +OPTIONS_DEFINE= HARDSUBX OCR RUST +OPTIONS_DEFAULT= RUST +HARDSUBX_DESC= Extraction of burnt subtitles (hard subtitles) +OCR_DESC= Optical Character Recognition +RUST_DESC= Build Rust-based components + +HARDSUBX_IMPLIES= OCR +HARDSUBX_LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg4 +HARDSUBX_CONFIGURE_ENABLE= ffmpeg hardsubx +HARDSUBX_CFLAGS= -I${LOCALBASE}/ffmpeg4/include +HARDSUBX_LDFLAGS= -L${LOCALBASE}/ffmpeg4/lib + +OCR_LIB_DEPENDS= libtesseract.so:graphics/tesseract \ + libleptonica.so:graphics/leptonica \ + libarchive.so:archivers/libarchive \ + libcurl.so:ftp/curl +OCR_CONFIGURE_ENABLE= ocr + +RUST_USES= cargo llvm +RUST_CONFIGURE_WITH= rust +CARGO_SRC_SUBDIR= ../src/rust +CARGO_TARGET_DIR= ${WRKSRC}/rust + +.include "Makefile.master" diff --git a/multimedia/ccextractor/Makefile.crates b/multimedia/ccextractor/Makefile.crates new file mode 100644 index 000000000000..87c0bcdb6654 --- /dev/null +++ b/multimedia/ccextractor/Makefile.crates @@ -0,0 +1,41 @@ +CARGO_CRATES= aho-corasick-0.7.18 \ + ansi_term-0.11.0 \ + atty-0.2.14 \ + bindgen-0.58.1 \ + bitflags-1.2.1 \ + cexpr-0.4.0 \ + cfg-if-1.0.0 \ + clang-sys-1.2.0 \ + clap-2.33.3 \ + dyn_buf-0.1.0 \ + env_logger-0.8.4 \ + glob-0.3.0 \ + hermit-abi-0.1.18 \ + humantime-2.1.0 \ + iconv-0.1.1 \ + lazy_static-1.4.0 \ + lazycell-1.3.0 \ + libc-0.2.98 \ + libloading-0.7.0 \ + log-0.4.14 \ + memchr-2.4.0 \ + nom-5.1.2 \ + peeking_take_while-0.1.2 \ + proc-macro2-1.0.27 \ + quote-1.0.9 \ + regex-1.5.4 \ + regex-syntax-0.6.25 \ + rustc-hash-1.1.0 \ + shlex-1.0.0 \ + strsim-0.8.0 \ + termcolor-1.1.2 \ + textwrap-0.11.0 \ + unicode-width-0.1.8 \ + unicode-xid-0.2.2 \ + vec_map-0.8.2 \ + version_check-0.9.3 \ + which-3.1.1 \ + winapi-0.3.9 \ + winapi-i686-pc-windows-gnu-0.4.0 \ + winapi-util-0.1.5 \ + winapi-x86_64-pc-windows-gnu-0.4.0 diff --git a/multimedia/ccextractor/Makefile.master b/multimedia/ccextractor/Makefile.master new file mode 100644 index 000000000000..81d4902642a0 --- /dev/null +++ b/multimedia/ccextractor/Makefile.master @@ -0,0 +1,54 @@ +PORTNAME= ccextractor +DISTVERSION= 0.94 +CATEGORIES= multimedia converters +MASTER_SITES= https://github.com/CCExtractor/ccextractor/releases/download/v${DISTVERSION}/ +DISTFILES= ccextractor_minimal.tar.gz +DIST_SUBDIR= ccextractor-${DISTVERSION} + +MAINTAINER= fuz@FreeBSD.org +WWW= https://ccextractor.org/ + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/../LICENSE.txt + +# needs libiconv_open() +USES+= autoreconf iconv:translit localbase:ldflags pkgconfig +GNU_CONFIGURE= yes + +CFLAGS+= -fcommon -DUNIX +LIBS+= ${ICONV_LIB} + +PATCH_WRKSRC= ${WRKDIR}/ccextractor +WRKSRC= ${PATCH_WRKSRC}/linux +PLIST_FILES= bin/${ALL_TARGET} + +.include <bsd.port.options.mk> +.include "${.CURDIR}/../ffmpeg4/override.mk" + +# ensure we do not bundle any dependencies by accident +post-extract: + ${RM} -r ${PATCH_WRKSRC}/src/thirdparty + +pre-configure: + ${REINPLACE_CMD} -e 's,\./ccextractor,${LOCALBASE}/bin/ccextractor,' \ + ${PATCH_WRKSRC}/src/GUI/command_builder.c + +pre-build: + (cd ${WRKSRC}/../src/lib_ccx && \ + echo "#ifndef CCX_CCEXTRACTOR_COMPILE_REAL_H" >compile_info_real.h ;\ + echo "#define CCX_CCEXTRACTOR_COMPILE_REAL_H" >>compile_info_real.h ;\ + echo "#define GIT_COMMIT \"${PKGVERSION} (FreeBSD ports)\"" >>compile_info_real.h ;\ + echo "#define COMPILE_DATE \"$$(date -u +%Y-%m-%d)\"" >>compile_info_real.h ;\ + echo "#endif" >>compile_info_real.h) + +pre-build-RUST-on: + ${CARGO_CARGO_RUN} build \ + --manifest-path ${CARGO_CARGOTOML} \ + --verbose \ + --verbose \ + ${CARGO_BUILD_ARGS} + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/${ALL_TARGET} ${STAGEDIR}${PREFIX}/bin + +.include <bsd.port.mk> diff --git a/multimedia/ccextractor/distinfo b/multimedia/ccextractor/distinfo new file mode 100644 index 000000000000..ff268c8afbc5 --- /dev/null +++ b/multimedia/ccextractor/distinfo @@ -0,0 +1,85 @@ +TIMESTAMP = 1761560433 +SHA256 (ccextractor-0.94/ccextractor_minimal.tar.gz) = 1fe020bf5b45fcfa564958381a7fce5f09d6f3a888de7a80a6745c2f3bfdb324 +SIZE (ccextractor-0.94/ccextractor_minimal.tar.gz) = 6725906 +SHA256 (ccextractor-0.94/rust/crates/aho-corasick-0.7.18.crate) = 1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f +SIZE (ccextractor-0.94/rust/crates/aho-corasick-0.7.18.crate) = 112923 +SHA256 (ccextractor-0.94/rust/crates/ansi_term-0.11.0.crate) = ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b +SIZE (ccextractor-0.94/rust/crates/ansi_term-0.11.0.crate) = 17087 +SHA256 (ccextractor-0.94/rust/crates/atty-0.2.14.crate) = d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8 +SIZE (ccextractor-0.94/rust/crates/atty-0.2.14.crate) = 5470 +SHA256 (ccextractor-0.94/rust/crates/bindgen-0.58.1.crate) = 0f8523b410d7187a43085e7e064416ea32ded16bd0a4e6fc025e21616d01258f +SIZE (ccextractor-0.94/rust/crates/bindgen-0.58.1.crate) = 201394 +SHA256 (ccextractor-0.94/rust/crates/bitflags-1.2.1.crate) = cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693 +SIZE (ccextractor-0.94/rust/crates/bitflags-1.2.1.crate) = 16745 +SHA256 (ccextractor-0.94/rust/crates/cexpr-0.4.0.crate) = f4aedb84272dbe89af497cf81375129abda4fc0a9e7c5d317498c15cc30c0d27 +SIZE (ccextractor-0.94/rust/crates/cexpr-0.4.0.crate) = 18023 +SHA256 (ccextractor-0.94/rust/crates/cfg-if-1.0.0.crate) = baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd +SIZE (ccextractor-0.94/rust/crates/cfg-if-1.0.0.crate) = 7934 +SHA256 (ccextractor-0.94/rust/crates/clang-sys-1.2.0.crate) = 853eda514c284c2287f4bf20ae614f8781f40a81d32ecda6e91449304dfe077c +SIZE (ccextractor-0.94/rust/crates/clang-sys-1.2.0.crate) = 36874 +SHA256 (ccextractor-0.94/rust/crates/clap-2.33.3.crate) = 37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002 +SIZE (ccextractor-0.94/rust/crates/clap-2.33.3.crate) = 201925 +SHA256 (ccextractor-0.94/rust/crates/dyn_buf-0.1.0.crate) = 74c57ab96715773d9cb9789b38eb7cbf04b3c6f5624a9d98f51761603376767c +SIZE (ccextractor-0.94/rust/crates/dyn_buf-0.1.0.crate) = 3625 +SHA256 (ccextractor-0.94/rust/crates/env_logger-0.8.4.crate) = a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3 +SIZE (ccextractor-0.94/rust/crates/env_logger-0.8.4.crate) = 33342 +SHA256 (ccextractor-0.94/rust/crates/glob-0.3.0.crate) = 9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574 +SIZE (ccextractor-0.94/rust/crates/glob-0.3.0.crate) = 18724 +SHA256 (ccextractor-0.94/rust/crates/hermit-abi-0.1.18.crate) = 322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c +SIZE (ccextractor-0.94/rust/crates/hermit-abi-0.1.18.crate) = 9936 +SHA256 (ccextractor-0.94/rust/crates/humantime-2.1.0.crate) = 9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4 +SIZE (ccextractor-0.94/rust/crates/humantime-2.1.0.crate) = 16749 +SHA256 (ccextractor-0.94/rust/crates/iconv-0.1.1.crate) = 07e6a7db0df823ef299ef75b6951975c7a1f9019910b3665614bac4161bab1a9 +SIZE (ccextractor-0.94/rust/crates/iconv-0.1.1.crate) = 10626 +SHA256 (ccextractor-0.94/rust/crates/lazy_static-1.4.0.crate) = e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646 +SIZE (ccextractor-0.94/rust/crates/lazy_static-1.4.0.crate) = 10443 +SHA256 (ccextractor-0.94/rust/crates/lazycell-1.3.0.crate) = 830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55 +SIZE (ccextractor-0.94/rust/crates/lazycell-1.3.0.crate) = 12502 +SHA256 (ccextractor-0.94/rust/crates/libc-0.2.98.crate) = 320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790 +SIZE (ccextractor-0.94/rust/crates/libc-0.2.98.crate) = 522087 +SHA256 (ccextractor-0.94/rust/crates/libloading-0.7.0.crate) = 6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a +SIZE (ccextractor-0.94/rust/crates/libloading-0.7.0.crate) = 26216 +SHA256 (ccextractor-0.94/rust/crates/log-0.4.14.crate) = 51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710 +SIZE (ccextractor-0.94/rust/crates/log-0.4.14.crate) = 34582 +SHA256 (ccextractor-0.94/rust/crates/memchr-2.4.0.crate) = b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc +SIZE (ccextractor-0.94/rust/crates/memchr-2.4.0.crate) = 63392 +SHA256 (ccextractor-0.94/rust/crates/nom-5.1.2.crate) = ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af +SIZE (ccextractor-0.94/rust/crates/nom-5.1.2.crate) = 136174 +SHA256 (ccextractor-0.94/rust/crates/peeking_take_while-0.1.2.crate) = 19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099 +SIZE (ccextractor-0.94/rust/crates/peeking_take_while-0.1.2.crate) = 6697 +SHA256 (ccextractor-0.94/rust/crates/proc-macro2-1.0.27.crate) = f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038 +SIZE (ccextractor-0.94/rust/crates/proc-macro2-1.0.27.crate) = 38625 +SHA256 (ccextractor-0.94/rust/crates/quote-1.0.9.crate) = c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7 +SIZE (ccextractor-0.94/rust/crates/quote-1.0.9.crate) = 25042 +SHA256 (ccextractor-0.94/rust/crates/regex-1.5.4.crate) = d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461 +SIZE (ccextractor-0.94/rust/crates/regex-1.5.4.crate) = 236581 +SHA256 (ccextractor-0.94/rust/crates/regex-syntax-0.6.25.crate) = f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b +SIZE (ccextractor-0.94/rust/crates/regex-syntax-0.6.25.crate) = 293293 +SHA256 (ccextractor-0.94/rust/crates/rustc-hash-1.1.0.crate) = 08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2 +SIZE (ccextractor-0.94/rust/crates/rustc-hash-1.1.0.crate) = 9331 +SHA256 (ccextractor-0.94/rust/crates/shlex-1.0.0.crate) = 42a568c8f2cd051a4d283bd6eb0343ac214c1b0f1ac19f93e1175b2dee38c73d +SIZE (ccextractor-0.94/rust/crates/shlex-1.0.0.crate) = 4555 +SHA256 (ccextractor-0.94/rust/crates/strsim-0.8.0.crate) = 8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a +SIZE (ccextractor-0.94/rust/crates/strsim-0.8.0.crate) = 9309 +SHA256 (ccextractor-0.94/rust/crates/termcolor-1.1.2.crate) = 2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4 +SIZE (ccextractor-0.94/rust/crates/termcolor-1.1.2.crate) = 17287 +SHA256 (ccextractor-0.94/rust/crates/textwrap-0.11.0.crate) = d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060 +SIZE (ccextractor-0.94/rust/crates/textwrap-0.11.0.crate) = 17322 +SHA256 (ccextractor-0.94/rust/crates/unicode-width-0.1.8.crate) = 9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3 +SIZE (ccextractor-0.94/rust/crates/unicode-width-0.1.8.crate) = 16732 +SHA256 (ccextractor-0.94/rust/crates/unicode-xid-0.2.2.crate) = 8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3 +SIZE (ccextractor-0.94/rust/crates/unicode-xid-0.2.2.crate) = 14955 +SHA256 (ccextractor-0.94/rust/crates/vec_map-0.8.2.crate) = f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191 +SIZE (ccextractor-0.94/rust/crates/vec_map-0.8.2.crate) = 14466 +SHA256 (ccextractor-0.94/rust/crates/version_check-0.9.3.crate) = 5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe +SIZE (ccextractor-0.94/rust/crates/version_check-0.9.3.crate) = 12547 +SHA256 (ccextractor-0.94/rust/crates/which-3.1.1.crate) = d011071ae14a2f6671d0b74080ae0cd8ebf3a6f8c9589a2cd45f23126fe29724 +SIZE (ccextractor-0.94/rust/crates/which-3.1.1.crate) = 8071 +SHA256 (ccextractor-0.94/rust/crates/winapi-0.3.9.crate) = 5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419 +SIZE (ccextractor-0.94/rust/crates/winapi-0.3.9.crate) = 1200382 +SHA256 (ccextractor-0.94/rust/crates/winapi-i686-pc-windows-gnu-0.4.0.crate) = ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6 +SIZE (ccextractor-0.94/rust/crates/winapi-i686-pc-windows-gnu-0.4.0.crate) = 2918815 +SHA256 (ccextractor-0.94/rust/crates/winapi-util-0.1.5.crate) = 70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178 +SIZE (ccextractor-0.94/rust/crates/winapi-util-0.1.5.crate) = 10164 +SHA256 (ccextractor-0.94/rust/crates/winapi-x86_64-pc-windows-gnu-0.4.0.crate) = 712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f +SIZE (ccextractor-0.94/rust/crates/winapi-x86_64-pc-windows-gnu-0.4.0.crate) = 2947998 diff --git a/multimedia/ccextractor/files/patch-linux_Makefile.am b/multimedia/ccextractor/files/patch-linux_Makefile.am new file mode 100644 index 000000000000..4cb504238ec6 --- /dev/null +++ b/multimedia/ccextractor/files/patch-linux_Makefile.am @@ -0,0 +1,238 @@ +--- linux/Makefile.am.orig 2021-12-15 17:05:37 UTC ++++ linux/Makefile.am +@@ -5,110 +5,6 @@ ccextractor_SOURCES = \ + ccextractor_SOURCES = \ + ../src/ccextractor.c \ + ../src/ccextractor.h \ +- ../src/thirdparty/gpacmp4/avc_ext.c \ +- ../src/thirdparty/gpacmp4/avilib.c \ +- ../src/thirdparty/gpacmp4/av_parsers.c \ +- ../src/thirdparty/gpacmp4/base_encoding.c \ +- ../src/thirdparty/gpacmp4/bitstream.c \ +- ../src/thirdparty/gpacmp4/box_code_3gpp.c \ +- ../src/thirdparty/gpacmp4/box_code_adobe.c \ +- ../src/thirdparty/gpacmp4/box_code_apple.c \ +- ../src/thirdparty/gpacmp4/box_code_base.c \ +- ../src/thirdparty/gpacmp4/box_code_drm.c \ +- ../src/thirdparty/gpacmp4/box_dump.c \ +- ../src/thirdparty/gpacmp4/box_code_meta.c \ +- ../src/thirdparty/gpacmp4/box_funcs.c \ +- ../src/thirdparty/gpacmp4/color.c \ +- ../src/thirdparty/gpacmp4/configfile.c \ +- ../src/thirdparty/gpacmp4/data_map.c \ +- ../src/thirdparty/gpacmp4/desc_private.c \ +- ../src/thirdparty/gpacmp4/descriptors.c \ +- ../src/thirdparty/gpacmp4/drm_sample.c \ +- ../src/thirdparty/gpacmp4/error.c \ +- ../src/thirdparty/gpacmp4/gpac_ogg.c \ +- ../src/thirdparty/gpacmp4/hint_track.c \ +- ../src/thirdparty/gpacmp4/hinting.c \ +- ../src/thirdparty/gpacmp4/ipmpx_code.c \ +- ../src/thirdparty/gpacmp4/ipmpx_parse.c \ +- ../src/thirdparty/gpacmp4/isom_intern.c \ +- ../src/thirdparty/gpacmp4/isom_read.c \ +- ../src/thirdparty/gpacmp4/isom_store.c \ +- ../src/thirdparty/gpacmp4/isom_write.c \ +- ../src/thirdparty/gpacmp4/list.c \ +- ../src/thirdparty/gpacmp4/math.c \ +- ../src/thirdparty/gpacmp4/media.c \ +- ../src/thirdparty/gpacmp4/media_odf.c \ +- ../src/thirdparty/gpacmp4/meta.c \ +- ../src/thirdparty/gpacmp4/movie_fragments.c \ +- ../src/thirdparty/gpacmp4/odf_code.c \ +- ../src/thirdparty/gpacmp4/odf_codec.c \ +- ../src/thirdparty/gpacmp4/odf_command.c \ +- ../src/thirdparty/gpacmp4/os_config_init.c \ +- ../src/thirdparty/gpacmp4/os_divers.c \ +- ../src/thirdparty/gpacmp4/os_file.c \ +- ../src/thirdparty/gpacmp4/qos.c \ +- ../src/thirdparty/gpacmp4/sample_descs.c \ +- ../src/thirdparty/gpacmp4/slc.c \ +- ../src/thirdparty/gpacmp4/stbl_read.c \ +- ../src/thirdparty/gpacmp4/stbl_write.c \ +- ../src/thirdparty/gpacmp4/track.c \ +- ../src/thirdparty/gpacmp4/tx3g.c \ +- ../src/thirdparty/gpacmp4/url.c \ +- ../src/thirdparty/gpacmp4/utf.c \ +- ../src/thirdparty/gpacmp4/os_thread.c \ +- ../src/thirdparty/gpacmp4/module.c \ +- ../src/thirdparty/gpacmp4/os_module.c \ +- ../src/thirdparty/gpacmp4/xml_parser.c \ +- ../src/thirdparty/gpacmp4/constants.c \ +- ../src/thirdparty/gpacmp4/gpac/avparse.h \ +- ../src/thirdparty/gpacmp4/gpac/base_coding.h \ +- ../src/thirdparty/gpacmp4/gpac/bitstream.h \ +- ../src/thirdparty/gpacmp4/gpac/color.h \ +- ../src/thirdparty/gpacmp4/gpac/config_file.h \ +- ../src/thirdparty/gpacmp4/gpac/configuration.h \ +- ../src/thirdparty/gpacmp4/gpac/constants.h \ +- ../src/thirdparty/gpacmp4/gpac/events_constants.h \ +- ../src/thirdparty/gpacmp4/gpac/ietf.h \ +- ../src/thirdparty/gpacmp4/gpac/isomedia.h \ +- ../src/thirdparty/gpacmp4/gpac/list.h \ +- ../src/thirdparty/gpacmp4/gpac/maths.h \ +- ../src/thirdparty/gpacmp4/gpac/media_tools.h \ +- ../src/thirdparty/gpacmp4/gpac/mpeg4_odf.h \ +- ../src/thirdparty/gpacmp4/gpac/network.h \ +- ../src/thirdparty/gpacmp4/gpac/revision.h \ +- ../src/thirdparty/gpacmp4/gpac/setup.h \ +- ../src/thirdparty/gpacmp4/gpac/tools.h \ +- ../src/thirdparty/gpacmp4/gpac/utf.h \ +- ../src/thirdparty/gpacmp4/gpac/version.h \ +- ../src/thirdparty/gpacmp4/gpac/iso639.h \ +- ../src/thirdparty/gpacmp4/gpac/internal/avilib.h \ +- ../src/thirdparty/gpacmp4/gpac/internal/isomedia_dev.h \ +- ../src/thirdparty/gpacmp4/gpac/internal/media_dev.h \ +- ../src/thirdparty/gpacmp4/gpac/internal/odf_dev.h \ +- ../src/thirdparty/gpacmp4/gpac/internal/odf_parse_common.h \ +- ../src/thirdparty/gpacmp4/gpac/internal/ogg.h \ +- ../src/thirdparty/libpng/pngstruct.h \ +- ../src/thirdparty/libpng/pngpriv.h \ +- ../src/thirdparty/libpng/pnginfo.h \ +- ../src/thirdparty/libpng/pnglibconf.h \ +- ../src/thirdparty/libpng/pngconf.h \ +- ../src/thirdparty/libpng/pngdebug.h \ +- ../src/thirdparty/libpng/png.h \ +- ../src/thirdparty/libpng/png.c \ +- ../src/thirdparty/libpng/pngerror.c \ +- ../src/thirdparty/libpng/pngget.c \ +- ../src/thirdparty/libpng/pngmem.c \ +- ../src/thirdparty/libpng/pngpread.c \ +- ../src/thirdparty/libpng/pngread.c \ +- ../src/thirdparty/libpng/pngrio.c \ +- ../src/thirdparty/libpng/pngrtran.c \ +- ../src/thirdparty/libpng/pngrutil.c \ +- ../src/thirdparty/libpng/pngset.c \ +- ../src/thirdparty/libpng/pngtrans.c \ +- ../src/thirdparty/libpng/pngwio.c \ +- ../src/thirdparty/libpng/pngwrite.c \ +- ../src/thirdparty/libpng/pngwtran.c \ +- ../src/thirdparty/libpng/pngwutil.c \ + ../src/lib_ccx/ccx_common_common.h \ + ../src/lib_ccx/ccx_common_option.h \ + ../src/lib_ccx/utility.h \ +@@ -230,38 +126,6 @@ ccextractor_SOURCES = \ + ../src/lib_ccx/ts_tables_epg.c \ + ../src/lib_ccx/wtv_constants.h \ + ../src/lib_ccx/wtv_functions.c \ +- ../src/thirdparty/zlib/adler32.c \ +- ../src/thirdparty/zlib/compress.c \ +- ../src/thirdparty/zlib/crc32.c \ +- ../src/thirdparty/zlib/crc32.h \ +- ../src/thirdparty/zlib/deflate.c \ +- ../src/thirdparty/zlib/deflate.h \ +- ../src/thirdparty/zlib/gzclose.c \ +- ../src/thirdparty/zlib/gzguts.h \ +- ../src/thirdparty/zlib/gzlib.c \ +- ../src/thirdparty/zlib/gzread.c \ +- ../src/thirdparty/zlib/gzwrite.c \ +- ../src/thirdparty/zlib/infback.c \ +- ../src/thirdparty/zlib/inffast.c \ +- ../src/thirdparty/zlib/inffast.h \ +- ../src/thirdparty/zlib/inffixed.h \ +- ../src/thirdparty/zlib/inflate.c \ +- ../src/thirdparty/zlib/inflate.h \ +- ../src/thirdparty/zlib/inftrees.c \ +- ../src/thirdparty/zlib/inftrees.h \ +- ../src/thirdparty/zlib/trees.c \ +- ../src/thirdparty/zlib/trees.h \ +- ../src/thirdparty/zlib/uncompr.c \ +- ../src/thirdparty/zlib/zconf.h \ +- ../src/thirdparty/zlib/zlib.h \ +- ../src/thirdparty/zlib/zutil.c \ +- ../src/thirdparty/zlib/zutil.h \ +- ../src/thirdparty/utf8proc/utf8proc.c \ +- ../src/thirdparty/utf8proc/utf8proc.h \ +- ../src/thirdparty/lib_hash/sha2.c \ +- ../src/thirdparty/lib_hash/sha2.h \ +- ../src/thirdparty/protobuf-c/protobuf-c.c \ +- ../src/thirdparty/protobuf-c/protobuf-c.h \ + ../src/lib_ccx/zvbi/bcd.h \ + ../src/lib_ccx/zvbi/bit_slicer.c \ + ../src/lib_ccx/zvbi/bit_slicer.h \ +@@ -274,61 +138,13 @@ ccextractor_SOURCES = \ + ../src/lib_ccx/zvbi/sampling_par.h \ + ../src/lib_ccx/zvbi/sliced.h \ + ../src/lib_ccx/zvbi/zvbi_decoder.h \ +- ../src/freetype/* \ +- ../src/thirdparty/freetype/autofit/autofit.c \ +- ../src/thirdparty/freetype/base/ftbase.c \ +- ../src/thirdparty/freetype/base/ftbbox.c \ +- ../src/thirdparty/freetype/base/ftbdf.c \ +- ../src/thirdparty/freetype/base/ftbitmap.c \ +- ../src/thirdparty/freetype/base/ftcid.c \ +- ../src/thirdparty/freetype/base/ftfntfmt.c \ +- ../src/thirdparty/freetype/base/ftfstype.c \ +- ../src/thirdparty/freetype/base/ftgasp.c \ +- ../src/thirdparty/freetype/base/ftglyph.c \ +- ../src/thirdparty/freetype/base/ftgxval.c \ +- ../src/thirdparty/freetype/base/ftinit.c \ +- ../src/thirdparty/freetype/base/ftlcdfil.c \ +- ../src/thirdparty/freetype/base/ftmm.c \ +- ../src/thirdparty/freetype/base/ftotval.c \ +- ../src/thirdparty/freetype/base/ftpatent.c \ +- ../src/thirdparty/freetype/base/ftpfr.c \ +- ../src/thirdparty/freetype/base/ftstroke.c \ +- ../src/thirdparty/freetype/base/ftsynth.c \ +- ../src/thirdparty/freetype/base/ftsystem.c \ +- ../src/thirdparty/freetype/base/fttype1.c \ +- ../src/thirdparty/freetype/base/ftwinfnt.c \ +- ../src/thirdparty/freetype/bdf/bdf.c \ +- ../src/thirdparty/freetype/bzip2/ftbzip2.c \ +- ../src/thirdparty/freetype/cache/ftcache.c \ +- ../src/thirdparty/freetype/cff/cff.c \ +- ../src/thirdparty/freetype/cid/type1cid.c \ +- ../src/thirdparty/freetype/gzip/ftgzip.c \ +- ../src/thirdparty/freetype/include/ft2build.h \ +- ../src/thirdparty/freetype/lzw/ftlzw.c \ +- ../src/thirdparty/freetype/pcf/pcf.c \ +- ../src/thirdparty/freetype/pfr/pfr.c \ +- ../src/thirdparty/freetype/psaux/psaux.c \ +- ../src/thirdparty/freetype/pshinter/pshinter.c \ +- ../src/thirdparty/freetype/psnames/psnames.c \ +- ../src/thirdparty/freetype/raster/raster.c \ +- ../src/thirdparty/freetype/sfnt/sfnt.c \ +- ../src/thirdparty/freetype/smooth/smooth.c \ +- ../src/thirdparty/freetype/truetype/truetype.c \ +- ../src/thirdparty/freetype/type1/type1.c \ +- ../src/thirdparty/freetype/type42/type42.c \ +- ../src/thirdparty/freetype/winfonts/winfnt.c ++ ../src/freetype/* + +-if SYS_IS_APPLE_SILICON +-ccextractor_SOURCES += ../src/thirdparty/libpng/arm/arm_init.c \ +- ../src/thirdparty/libpng/arm/filter_neon_intrinsics.c \ +- ../src/thirdparty/libpng/arm/palette_neon_intrinsics.c +-endif ++ccextractor_CFLAGS = -std=gnu99 -Wno-write-strings -Wno-pointer-sign -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT -DFT2_BUILD_LIBRARY -DGPAC_DISABLE_VTT -DGPAC_DISABLE_OD_DUMP -DGPAC_DISABLE_REMOTERY -DNO_GZIP + +-ccextractor_CFLAGS = -std=gnu99 -Wno-write-strings -Wno-pointer-sign -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT -DFT2_BUILD_LIBRARY -DGPAC_DISABLE_VTT -DGPAC_DISABLE_OD_DUMP -DGPAC_DISABLE_REMOTERY -DNO_GZIP -DGPAC_HAVE_CONFIG_H ++ccextractor_CPPFLAGS =-I../src/lib_ccx/ -I../src/lib_ccx/zvbi/ -I../src/ + +-ccextractor_CPPFLAGS =-I../src/lib_ccx/ -I../src/thirdparty/gpacmp4/ -I../src/thirdparty/libpng/ -I../src/thirdparty/zlib/ -I../src/lib_ccx/zvbi/ -I../src/thirdparty/lib_hash/ -I../src/thirdparty/protobuf-c/ -I../src/thirdparty -I../src/ -I../src/thirdparty/freetype/include/ + +- + ccextractor_LDADD=-lm -lpthread -ldl + + if WITH_RUST +@@ -434,20 +250,10 @@ ccextractorGUI_LDADD = ${glfw3_LIBS} + ccextractorGUI_LDADD = ${glfw3_LIBS} + + +-if SYS_IS_LINUX + ccextractorGUI_CFLAGS += -s -O3 -DUNIX + ccextractorGUI_CFLAGS += ${glew_CFLAGS} + ccextractorGUI_LDADD += ${glew_LIBS} + ccextractorGUI_LDADD += -lX11 -lXinerama -lXcursor -lXi -lXrandr -lXxf86vm -lm -ldl -lpthread +-endif +- +-if SYS_IS_MAC +-ccextractorGUI_CFLAGS += -O3 -DUNIX +-ccextractorGUI_CFLAGS += ${glew_CFLAGS} +-ccextractorGUI_LDADD += ${glew_LIBS} +-ccextractorGUI_LDFLAGS = -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo +-ccextractorGUI_LDADD += -lglfw -lm -L/usr/local/lib -lpthread +-endif + + if HARDSUBX_IS_ENABLED + if OCR_IS_ENABLED diff --git a/multimedia/ccextractor/files/patch-linux_configure.ac b/multimedia/ccextractor/files/patch-linux_configure.ac new file mode 100644 index 000000000000..0fcb05792805 --- /dev/null +++ b/multimedia/ccextractor/files/patch-linux_configure.ac @@ -0,0 +1,20 @@ +--- linux/configure.ac.orig 2021-12-15 17:05:37 UTC ++++ linux/configure.ac +@@ -25,7 +25,7 @@ AC_CHECK_LIB([m], [sin], [], [AC_MSG_ERROR(Math librar + + # Checks for libraries. + AC_CHECK_LIB([m], [sin], [], [AC_MSG_ERROR(Math library not installed. Install it before proceeding.)]) +-AC_CHECK_LIB([lept], [getLeptonicaVersion], [HAS_LEPT=1 && PKG_CHECK_MODULES([lept], [lept])], [HAS_LEPT=0]) ++AC_CHECK_LIB([leptonica], [getLeptonicaVersion], [HAS_LEPT=1 && PKG_CHECK_MODULES([lept], [lept])], [HAS_LEPT=0]) + AC_CHECK_LIB([tesseract], [TessVersion], [HAS_TESSERACT=1 && PKG_CHECK_MODULES([tesseract], [tesseract])], [HAS_TESSERACT=0]) + AC_CHECK_LIB([avcodec], [avcodec_version], [HAS_AVCODEC=1 && PKG_CHECK_MODULES([libavcodec], [libavcodec])], [HAS_AVCODEC=0]) + AC_CHECK_LIB([avformat], [avformat_version], [HAS_AVFORMAT=1 && PKG_CHECK_MODULES([libavformat], [libavformat])], [HAS_AVFORMAT=0]) +@@ -154,7 +154,7 @@ AM_CONDITIONAL(FFMPEG_IS_ENABLED, [ test x$ffmpeg = xt + AM_CONDITIONAL(HARDSUBX_IS_ENABLED, [ test x$hardsubx = xtrue ]) + AM_CONDITIONAL(OCR_IS_ENABLED, [ test x$ocr = xtrue || test x$hardsubx = xtrue ]) + AM_CONDITIONAL(FFMPEG_IS_ENABLED, [ test x$ffmpeg = xtrue ]) +-AM_CONDITIONAL(TESSERACT_PRESENT, [ test ! -z `pkg-config --libs-only-l --silence-errors tesseract` ]) ++AM_CONDITIONAL(TESSERACT_PRESENT, [ test ! -z "`pkg-config --libs-only-l --silence-errors tesseract`" ]) + AM_CONDITIONAL(TESSERACT_PRESENT_RPI, [ test -d "/usr/include/tesseract" && test `ls -A /usr/include/tesseract | wc -l` -gt 0 ]) + AM_CONDITIONAL(SYS_IS_LINUX, [ test `uname -s` = "Linux"]) + AM_CONDITIONAL(SYS_IS_MAC, [ test `uname -s` = "Darwin"]) diff --git a/multimedia/ccextractor/files/patch-src_GUI_file__browser.c b/multimedia/ccextractor/files/patch-src_GUI_file__browser.c new file mode 100644 index 000000000000..e05caf87e0fa --- /dev/null +++ b/multimedia/ccextractor/files/patch-src_GUI_file__browser.c @@ -0,0 +1,26 @@ +--- src/GUI/file_browser.c.orig 2021-12-15 17:05:37 UTC ++++ src/GUI/file_browser.c +@@ -13,6 +13,7 @@ + #endif + #if UNIX + #include <unistd.h> ++#include <pwd.h> + #endif + #include <GL/glew.h> + #include <string.h> +@@ -325,8 +326,13 @@ void file_browser_init(struct file_browser *browser, s + if (!home) + home = getenv("USERPROFILE"); + #else +- if (!home) +- home = getpwuid(getuid()); ++ if (!home) { ++ struct passwd *pwd; ++ ++ pwd = getpwuid(getuid()); ++ if (pwd != NULL) ++ home = pwd->pw_dir; ++ } + #endif + { + size_t l; diff --git a/multimedia/ccextractor/files/patch-src_GUI_save__load__data.c b/multimedia/ccextractor/files/patch-src_GUI_save__load__data.c new file mode 100644 index 000000000000..7dae94c96bcf --- /dev/null +++ b/multimedia/ccextractor/files/patch-src_GUI_save__load__data.c @@ -0,0 +1,8 @@ +--- src/GUI/save_load_data.c.orig 2025-10-28 12:56:02 UTC ++++ src/GUI/save_load_data.c +@@ -1,3 +1,5 @@ ++#include <string.h> ++ + #include "save_load_data.h" + #include "ccextractorGUI.h" + #include "tabs.h" diff --git a/multimedia/ccextractor/files/patch-src_lib__ccx_configuration.c b/multimedia/ccextractor/files/patch-src_lib__ccx_configuration.c new file mode 100644 index 000000000000..6f6dbc4b094f --- /dev/null +++ b/multimedia/ccextractor/files/patch-src_lib__ccx_configuration.c @@ -0,0 +1,11 @@ +--- src/lib_ccx/configuration.c.orig 2025-10-28 13:57:45 UTC ++++ src/lib_ccx/configuration.c +@@ -91,7 +91,7 @@ static void parse_file(FILE *f, struct ccx_s_options * + static void parse_file(FILE *f, struct ccx_s_options *opt) + { + char *str = (char *)malloc(128); +- char c = '\0'; ++ int c = '\0'; + int comments = 0; + int i = 0; + int ret = 0; diff --git a/multimedia/ccextractor/files/patch-src_lib__ccx_params.c b/multimedia/ccextractor/files/patch-src_lib__ccx_params.c new file mode 100644 index 000000000000..6b07cdd4c837 --- /dev/null +++ b/multimedia/ccextractor/files/patch-src_lib__ccx_params.c @@ -0,0 +1,27 @@ +--- src/lib_ccx/params.c.orig 2021-12-15 17:05:37 UTC ++++ src/lib_ccx/params.c +@@ -1,7 +1,7 @@ +-#include "png.h" +-#include "protobuf-c.h" +-#include "zlib.h" +-#include "gpac/version.h" ++#include <png.h> ++#include <protobuf-c.h> ++#include <zlib.h> ++#include <gpac/version.h> + #include "lib_ccx.h" + #include "ccx_common_option.h" + #include "utility.h" +@@ -10,10 +10,10 @@ + #include "ccx_common_common.h" + #include "ccx_decoders_708.h" + #include "compile_info.h" +-#include "../lib_hash/sha2.h" ++#include <sha256.h> + #include <string.h> + #include <stdio.h> +-#include <utf8proc/utf8proc.h> ++#include <utf8proc.h> + + #ifdef ENABLE_OCR + #include <tesseract/capi.h> diff --git a/multimedia/ccextractor/pkg-descr b/multimedia/ccextractor/pkg-descr new file mode 100644 index 000000000000..48547b08f219 --- /dev/null +++ b/multimedia/ccextractor/pkg-descr @@ -0,0 +1,7 @@ +CCExtractor is the de-facto open source standard for closed captions / +subtitles extraction from any media file. While the software itself +belong to the niche category (main users being universities, media +companies and enthusiasts) its output (meaning the .srt files it +generates) is used by millions. If you've ever downloaded an external +subtitle file for a TV show - most likely the original file came from +CCExtractor. |
