[multimedia/kdenlive/release/26.04] packaging/snap: snapcraft: Build ffmpeg ourselves so we can control what is supported, like libass.
Scarlett Moore <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit ed6d3b60502bdf0fa1db5d4dc804277e52e06cb9 by Scarlett Moore, on behalf of Scarlett Moore.
Committed on 17/07/2026 at 15:11.
Pushed by scarlettmoore into branch 'release/26.04'.
snapcraft: Build ffmpeg ourselves so we can control what is supported, like libass.
M +63 -11 packaging/snap/snapcraft.yaml
https://invent.kde.org/multimedia/kdenlive/-/commit/ed6d3b60502bdf0fa1db5d4dc804277e52e06cb9
diff --git a/packaging/snap/snapcraft.yaml b/packaging/snap/snapcraft.yaml
index 43c3cf6d3d..968a607963 100644
--- a/packaging/snap/snapcraft.yaml
+++ b/packaging/snap/snapcraft.yaml
@@ -34,7 +34,6 @@ apps:
MLT_PROFILES_PATH: "$SNAP/usr/share/mlt-7/profiles/"
MLT_PRESETS_PATH: "$SNAP/usr/share/mlt-7/presets/"
ALSA_CONFIG_PATH: "$SNAP/kf6/etc/asound.conf"
- LD_LIBRARY_PATH: "$SNAP/kf6/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR:$SNAP/ffmpeg-platform/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR:$LD_LIBRARY_PATH"
PATH: $SNAP/ffmpeg-platform/usr/bin:$SNAP/usr/local/bin/:$PATH
QT_PLUGIN_PATH: "$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/plugins:/snap/kf6-core24/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/plugins"
QML_IMPORT_PATH: "$SNAP/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/qml:$SNAP//snap/kdenlive/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/qt6/qml:/snap/kf6-core24/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/qml"
@@ -48,11 +47,6 @@ package-repositories:
key-id: 444DABCF3667D0283F894EDDE6D4736255751E5D
url: http://origin.archive.neon.kde.org/user
key-server: keyserver.ubuntu.com
-plugs:
- ffmpeg-2404:
- interface: content
- target: ffmpeg-platform # the folder where this content snap will be mounted
- default-provider: ffmpeg-2404
slots:
session-dbus-interface:
interface: dbus
@@ -70,9 +64,70 @@ parts:
- vosk
stage:
- "-pyvenv.cfg"
+ ffmpeg:
+ plugin: autotools # or nil, depending on your build system setup
+ source: https://ffmpeg.org # Use your desired version
+ build-packages:
+ - yasm
+ - pkg-config
+ # Core Audio & Subtitles
+ - libass-dev
+ - libmp3lame-dev
+ - libopus-dev
+ - libvorbis-dev
+ - libsoxr-dev
+ # Core Video Codecs
+ - libx264-dev
+ - libx265-dev
+ - libvpx-dev
+ - libaom-dev
+ - libdav1d-dev
+ # Hardware Acceleration & System
+ - libva-dev
+ - libvdpau-dev
+ - libdrm-dev
+ - libasound2-dev
+ override-build: |
+ ./configure \
+ --prefix=/usr \
+ --enable-shared \
+ --disable-static \
+ --disable-doc \
+ --enable-gpl \
+ --enable-nonfree \
+ --enable-version3 \
+ --enable-pthreads \
+ --enable-pic \
+ \
+ # Fonts, Metadata, and Audio Enhancements
+ --enable-libass \
+ --enable-fontconfig \
+ --enable-libsoxr \
+ \
+ # Essential Video Codecs for Kdenlive Timeline & Rendering
+ --enable-libx264 \
+ --enable-libx265 \
+ --enable-libvpx \
+ --enable-libaom \
+ --enable-libdav1d \
+ \
+ # Essential Audio Codecs
+ --enable-libmp3lame \
+ --enable-libopus \
+ --enable-libvorbis \
+ \
+ # Hardware Acceleration (VAAPI/VDPAU)
+ --enable-vaapi \
+ --enable-vdpau \
+ --enable-libdrm
+
+ make -j$(nproc)
+ make install DESTDIR=$CRAFT_PART_INSTALL
+
kdenlive:
after:
- python-deps
+ - ffmpeg
parse-info:
- usr/share/metainfo/org.kde.kdenlive.appdata.xml
plugin: cmake
@@ -126,14 +181,12 @@ parts:
- -DQT_MAJOR_VERSION=6
- -DBUILD_WITH_QT6=ON
- -DBUILD_TESTING=OFF
- - -DCMAKE_FIND_ROOT_PATH="$CRAFT_STAGE;/snap/ffmpeg-2404-sdk/current;/snap/kde-qt6-core24-sdk/current;/snap/kf6-core24-sdk/current"
+ - -DCMAKE_FIND_ROOT_PATH="$CRAFT_STAGE;/snap/kde-qt6-core24-sdk/current;/snap/kf6-core24-sdk/current"
build-environment:
- LIBCLANG_LIBDIR: /snap/kde-qt6-core24-sdk/current/usr/lib/llvm-19/lib
- LIBCLANG_PATH: /snap/kde-qt6-core24-sdk/current/usr/lib/llvm-19/bin
- LLVM_INSTALL_DIR: /snap/kde-qt6-core24-sdk/current/usr/lib/llvm-19
- PATH: /snap/kde-qt6-core24-sdk/current/usr/bin:/snap/kde-qt6-core24-sdk/current/usr/lib/llvm-19/bin:/snap/kde-pyside6-core24-sdk/current/usr/bin${PATH:+:$PATH}
- - PKG_CONFIG_PATH: "/snap/ffmpeg-2404-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/pkgconfig"
- - LD_LIBRARY_PATH: "${LD_LIBRARY_PATH}:/snap/ffmpeg-2404-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR"
- LDFLAGS: "-Wl,-Bdynamic"
- QT_PLUGIN_PATH: "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/plugins:/snap/kf6-core24-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/plugins:/snap/kde-qt6-core24-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/plugins"
- QML_IMPORT_PATH: "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/qml:/snap/kf6-core24-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/qml:/snap/kde-qt6-core24-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/qml"
@@ -171,10 +224,9 @@ parts:
build-snaps:
- core24
- kf6-core24
- - ffmpeg-2404
override-prime: |
set -eux
- for snap in "core24" "kf6-core24" "ffmpeg-2404"; do
+ for snap in "core24" "kf6-core24"; do
cd "/snap/$snap/current" && find . -type f,l -exec rm -rf "${CRAFT_PRIME}/{}" \;
done