From 09f21f64e4502f573b398a2c6bf75b78ccddfb4b Mon Sep 17 00:00:00 2001 From: Chandragupt Singh Date: Fri, 23 Jan 2026 15:23:33 +0530 Subject: [PATCH] fix(snap): resolve GPAC dependency and runtime issues in core22 snap --- docs/CHANGES.TXT | 11 +++++++++- snap/local/run-ccextractor.sh | 8 +++---- snap/snapcraft.yaml | 40 +++++++++++++++++++++++------------ 3 files changed, 40 insertions(+), 19 deletions(-) diff --git a/docs/CHANGES.TXT b/docs/CHANGES.TXT index f5a603da..f30d9d7b 100644 --- a/docs/CHANGES.TXT +++ b/docs/CHANGES.TXT @@ -1,6 +1,15 @@ -0.96.5 (2026-01-05) +0.96.6 (unreleased) ------------------- - New: Add Snap packaging support with Snapcraft configuration and GitHub Actions CI workflow. +- Fix: Clear status line output on Linux/WSL to prevent text artifacts (#2017) +- Fix: Prevent infinite loop on truncated MKV files +- Fix: Various memory safety and stability fixes in demuxers (MP4, PS, MKV, DVB) +- Fix: Delete empty output files instead of leaving 0-byte files (#1282) +- Fix: --mkvlang now supports BCP 47 language tags (e.g., en-US, zh-Hans-CN) and multiple codes + +0.96.5 (2026-01-05) +------------------- +- New: CCExtractor is available again via Homebrew on macOS and Linux. - New: Add support for raw CDP (Caption Distribution Packet) files (#1406) - New: Add --scc-accurate-timing option for bandwidth-aware SCC output (#1120) - Fix: MXF files containing CEA-708 captions not being detected/extracted (#1647) diff --git a/snap/local/run-ccextractor.sh b/snap/local/run-ccextractor.sh index d97953d5..e318a16b 100755 --- a/snap/local/run-ccextractor.sh +++ b/snap/local/run-ccextractor.sh @@ -1,9 +1,7 @@ #!/bin/sh set -e - -# Default fallback +# Default fallback LIB_TRIPLET="x86_64-linux-gnu" - # Detect multiarch directory if present for d in "$SNAP/usr/lib/"*-linux-gnu; do if [ -d "$d" ]; then @@ -11,8 +9,8 @@ for d in "$SNAP/usr/lib/"*-linux-gnu; do break fi done - -export LD_LIBRARY_PATH="$SNAP/usr/lib/$LIB_TRIPLET:\ +export LD_LIBRARY_PATH="$SNAP/usr/lib:\ +$SNAP/usr/lib/$LIB_TRIPLET:\ $SNAP/usr/lib/$LIB_TRIPLET/blas:\ $SNAP/usr/lib/$LIB_TRIPLET/lapack:\ $SNAP/usr/lib/$LIB_TRIPLET/pulseaudio:\ diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 571dc7b9..f124e122 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,12 +1,11 @@ name: ccextractor base: core22 -version: git +version: '0.96.5' summary: Closed Caption Extractor description: | CCExtractor is a tool for extracting closed captions from video files. website: https://www.ccextractor.org source-code: https://github.com/CCExtractor/ccextractor - confinement: classic apps: @@ -18,15 +17,39 @@ apps: - home parts: + gpac: + plugin: make + source: https://github.com/gpac/gpac.git + source-tag: abi-16.4 + build-packages: + - build-essential + - pkg-config + - zlib1g-dev + - libssl-dev + - libfreetype6-dev + - libjpeg-dev + - libpng-dev + override-build: | + set -eux + ./configure --prefix=/usr + make -j$(nproc) + make DESTDIR=$SNAPCRAFT_PART_INSTALL install-lib + sed -i "s|^prefix=.*|prefix=$SNAPCRAFT_STAGE/usr|" $SNAPCRAFT_PART_INSTALL/usr/lib/pkgconfig/gpac.pc + stage: + - usr/lib/libgpac* + - usr/lib/pkgconfig/gpac.pc + - usr/include/gpac + ccextractor: + after: [gpac] plugin: cmake source: . source-subdir: src - + build-environment: + - PKG_CONFIG_PATH: "$SNAPCRAFT_STAGE/usr/lib/pkgconfig:$PKG_CONFIG_PATH" build-snaps: - cmake/latest/stable - rustup/latest/stable - build-packages: - build-essential - pkg-config @@ -34,7 +57,6 @@ parts: - llvm-dev - libclang-dev - libzvbi-dev - - libgpac-dev - libtesseract-dev - libavcodec-dev - libavformat-dev @@ -48,10 +70,7 @@ parts: - zlib1g-dev - libblas3 - liblapack3 - - stage-packages: - - libgpac11 - libzvbi0 - libfreetype6 - libpng16-16 @@ -74,17 +93,12 @@ parts: - liba52-0.7.4 - libpulse0 - pulseaudio-utils - override-build: | set -eux - rustup toolchain install stable rustup default stable export PATH="$HOME/.cargo/bin:$PATH" - snapcraftctl build - - # Install runtime wrapper for command-chain install -D -m 0755 \ $SNAPCRAFT_PROJECT_DIR/snap/local/run-ccextractor.sh \ $SNAPCRAFT_PART_INSTALL/local/run-ccextractor.sh