From a8430d8ecf52820db4af881566ee250df8f2a6dc Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sat, 9 Aug 2025 07:36:30 +0000 Subject: [PATCH] Self-build openh264 in snap for lesser package size --- snap/snapcraft.yaml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index fe56b47024..be96318fcd 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -92,13 +92,11 @@ parts: plugin: nil stage-packages: - libgeoclue-2-0 - - libopenh264-7 - libxcb-cursor0 - libxcb-record0 - libxcb-screensaver0 stage: - ./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libgeoclue-2.so* - - ./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libopenh264.so* - ./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libxcb-cursor.so* - ./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libxcb-record.so* - ./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libxcb-screensaver.so* @@ -153,7 +151,6 @@ parts: build-packages: - nasm - libdav1d-dev - - libopenh264-dev - libopus-dev - libvdpau-dev - libvpx-dev @@ -163,6 +160,7 @@ parts: - --libdir=/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR - --extra-cflags="-DCONFIG_SAFE_BITSTREAM_READER=1" - --extra-cxxflags="-DCONFIG_SAFE_BITSTREAM_READER=1" + - --extra-ldflags="-Wl,--push-state,--no-as-needed,-lstdc++,--pop-state" - --disable-debug - --disable-programs - --disable-doc @@ -301,6 +299,7 @@ parts: prime: [-./*] after: - nv-codec-headers + - openh264 jpegli: source: https://github.com/libjxl/libjxl.git @@ -369,6 +368,19 @@ parts: - LIBDIR=lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR prime: [-./*] + openh264: + source: https://github.com/cisco/openh264.git + source-depth: 1 + source-tag: v2.6.0 + plugin: meson + build-packages: + - meson + meson-parameters: + - --prefix=/usr + - --buildtype=release + - --default-library=static + prime: [-./*] + protobuf: source: https://github.com/protocolbuffers/protobuf.git source-depth: 1 @@ -472,7 +484,6 @@ parts: source-commit: 62321fd7128ab2650b459d4195781af8185e46b5 plugin: cmake build-packages: - - libopenh264-dev - libopus-dev - libpipewire-0.3-dev - libssl-dev @@ -485,3 +496,4 @@ parts: after: - ffmpeg - jpegli + - openh264