# Template file for 'ccextractor' pkgname=ccextractor version=0.96.5 revision=1 build_wrksrc="linux" build_style=gnu-configure build_helper=rust configure_args="--enable-ocr --enable-hardsubx" hostmakedepends="automake cargo clang pkg-config tesseract-ocr-devel" makedepends="ffmpeg6-devel freetype-devel leptonica-devel libgpac-devel libpng-devel libutf8proc-devel rust-std tesseract-ocr-devel zlib-devel" short_desc="Extract subtitles from video streams" maintainer="newbluemoon " license="GPL-2.0-or-later" homepage="https://www.ccextractor.org/" changelog="https://raw.githubusercontent.com/CCExtractor/ccextractor/master/docs/CHANGES.TXT" distfiles="https://github.com/CCExtractor/${pkgname}/archive/v${version}.tar.gz" checksum=821614d7b31d47bf3bf6217a66464b826c0f86d2bcde070b6fba74f54dff55ff CFLAGS="-DPNG_POWERPC_VSX_OPT=0" pre_configure() { vsed -i configure.ac -e "s;tesseract --version;tesseract-ocr --version;g" vsed -i Makefile.am -e "s;@@XBPS_CROSS_BASE@@;${XBPS_CROSS_BASE};g" # in cross builds the path to the rust output is prefixed with the cross triplet, # make the linker find it if [ "$CROSS_BUILD" ]; then vsed -i Makefile.am -e "s;@RUST_TARGET_SUBDIR@;${XBPS_CROSS_RUST_TARGET}/&;g" fi ./autogen.sh } post_install() { vinstall ../docs/ccextractor.cnf.sample 644 usr/share/examples/ccextractor }