[vlc-commits] [Git][videolan/vlc][3.0.x] 3 commits: contrib: protobuf: prioritize internal include path over zlib include

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Aug 21 18:37:26 UTC 2026



Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
9337f471 by Pierre Lamot at 2026-08-21T17:22:20+00:00
contrib: protobuf: prioritize internal include path over zlib include
directories

(cherry picked from commit b43e610586f8d20ea007ea5d963e50a2fd3bc8ed)

- - - - -
3fd22f85 by Pierre Lamot at 2026-08-21T17:22:20+00:00
snap: upgrade snap to core24 and make it compatible with snapcraft8

(cherry picked from eee199bd1c55e0b680d91b78d247ef72b6df9a97)

- - - - -
11065a7e by Pierre Lamot at 2026-08-21T17:22:20+00:00
ci: bring back snap building

same policies as in 4.0, build are disabled for MR, enabled for nightly and releases

- - - - -


7 changed files:

- + contrib/src/protobuf/0001-prioritize-internal-include-path-over-zlib-include-d.patch
- contrib/src/protobuf/rules.mak
- extras/ci/gitlab-ci.yml
- + extras/package/snap/build.sh
- − extras/package/snap/package.mak
- extras/package/snap/snapcraft.yaml
- extras/package/snap/vlc-snap-wrapper.sh


Changes:

=====================================
contrib/src/protobuf/0001-prioritize-internal-include-path-over-zlib-include-d.patch
=====================================
@@ -0,0 +1,31 @@
+From b3915bd136b5f1cb1694819d26248a65818ed3a1 Mon Sep 17 00:00:00 2001
+From: Pierre Lamot <pierre at videolabs.io>
+Date: Thu, 20 Aug 2026 11:46:42 +0200
+Subject: [PATCH] prioritize internal include path over zlib include
+ directories
+
+this fix compilation when older protobuf headers are present in zlib include
+path
+---
+ cmake/CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
+index 7618ba2..889a6fa 100644
+--- a/cmake/CMakeLists.txt
++++ b/cmake/CMakeLists.txt
+@@ -146,9 +146,9 @@ endif (MSVC)
+ get_filename_component(protobuf_source_dir ${protobuf_SOURCE_DIR} PATH)
+ 
+ include_directories(
+-  ${ZLIB_INCLUDE_DIRECTORIES}
+   ${protobuf_BINARY_DIR}
+-  ${protobuf_source_dir}/src)
++  ${protobuf_source_dir}/src
++  ${ZLIB_INCLUDE_DIRECTORIES})
+ 
+ if (MSVC)
+   # Add the "lib" prefix for generated .lib outputs.
+-- 
+2.43.0
+


=====================================
contrib/src/protobuf/rules.mak
=====================================
@@ -23,7 +23,8 @@ protobuf: protobuf-$(PROTOBUF_VERSION)-cpp.tar.gz .sum-protobuf
 	mv protobuf-$(PROTOBUF_VERSION) protobuf-$(PROTOBUF_VERSION)-cpp
 	$(APPLY) $(SRC)/protobuf/0001-don-t-build-and-install-protoc-libprotoc.patch
 	$(APPLY) $(SRC)/protobuf/missing-includes.patch
-	# don't build libprotoc
+	$(APPLY) $(SRC)/protobuf/0001-prioritize-internal-include-path-over-zlib-include-d.patch
+    # don't build libprotoc
 	sed -i.orig -e 's,include(libprotoc,#include(libprotoc,' $(UNPACK_DIR)/cmake/CMakeLists.txt
 	# don't build protoc
 	sed -i.orig -e 's,include(protoc,#include(protoc,' $(UNPACK_DIR)/cmake/CMakeLists.txt


=====================================
extras/ci/gitlab-ci.yml
=====================================
@@ -24,6 +24,7 @@ variables:
     VLC_ANDROID_IMAGE: registry.videolan.org/vlc-debian-android-3.0:20260701183656
     VLC_ANDROID4_IMAGE: registry.videolan.org/vlc-debian-android:20260611225331
     VLC_FLATPAK_IMAGE: registry.videolan.org/vlc-flatpak:20260516184439
+    VLC_SNAP_IMAGE: registry.videolan.org/vlc-ubuntu-snap:20260715210239
 
 .variables-debian: &variables-debian
         HOST_ARCH: x86_64
@@ -80,6 +81,10 @@ variables:
         ANDROID_ARCH: x86_64
         TRIPLET: x86_64-linux-android
 
+.variables-snap: &variables-snap
+        HOST_ARCH: x86_64
+        TRIPLET: $HOST_ARCH-linux-gnu
+
 # Common rules
 .base-template:
     stage: build
@@ -441,6 +446,58 @@ flatpak-repo:
     dependencies:
       - release-flatpak-x86_64
 
+#
+# Snap builds
+#
+.snap-common:
+    extends: .docker-template
+    image:
+        name: $VLC_SNAP_IMAGE
+        entrypoint: [""]
+    script:
+        - git config --global --add safe.directory ${CI_PROJECT_DIR}/.git
+        # snapcraft need to have an up to date apt cache to be able to download its dependencies
+        - apt update
+        - extras/package/snap/build.sh -p
+    allow_failure: true
+    variables: *variables-snap
+
+snap:
+  extends: .snap-common
+  when: manual # disabled
+  rules:
+    - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
+      changes:
+        - extras/package/snap/*
+
+nightly-snap:
+    extends: .snap-common
+    rules:
+        - if: '$CI_PIPELINE_SOURCE == "schedule"'
+    after_script:
+        - if [ "$CI_PROJECT_NAMESPACE" = "videolan" ]; then /bin/true; else exit 0; fi
+        - mkdir nightlies
+        - mv vlc_*.snap nightlies/
+        - snapcraft upload --release beta nightlies/vlc_*.snap
+        - cd nightlies && find . -maxdepth 1 -type f -not -name SHA512SUM | xargs shasum -a 512 | tee SHA512SUM
+    artifacts:
+        paths:
+           - nightlies/*
+
+release-snap:
+    extends: .snap-common
+    rules:
+        - if: '$CI_COMMIT_TAG'
+    after_script:
+        - if [ "$CI_PROJECT_NAMESPACE" = "videolan" ]; then /bin/true; else exit 0; fi
+        - mkdir release
+        - mv vlc_*.snap release/
+        - snapcraft upload --release candidate release/vlc_*.snap
+        - cd release && find . -maxdepth 1 -type f -not -name SHA512SUM | xargs shasum -a 512 | tee SHA512SUM
+    artifacts:
+        paths:
+           - release/*
+
 #
 # macOS
 #


=====================================
extras/package/snap/build.sh
=====================================
@@ -0,0 +1,51 @@
+#! /bin/sh
+set -e
+
+SCRIPT_PATH="$( cd "$(dirname "$0")" ; pwd -P )"
+ROOT_DIR="${SCRIPT_PATH}/../../.."
+
+usage()
+{
+cat << EOF
+usage: $0 [options]
+
+Build vlc snap package
+
+OPTIONS:
+   -h            Show some help
+   -p            Generate prebuilt contrib package
+EOF
+}
+
+SAVE_PREBUILT=""
+while getopts "hp" OPTION
+do
+    case $OPTION in
+        p)
+            SAVE_PREBUIT="yes"
+        ;;
+        h)
+            usage
+            exit 1
+        ;;
+    esac
+done
+
+if [ "$SAVE_PREBUIT" = "yes" ]; then
+    touch ${ROOT_DIR}/snap-save-prebuilt
+else
+    if [ -e ${ROOT_DIR}/snap-save-prebuilt ]; then
+        rm ${ROOT_DIR}/snap-save-prebuilt
+    fi
+fi
+
+export SNAPCRAFT_BUILD_INFO=1
+
+# snapcraft only support to be called from project root
+cd ${ROOT_DIR}
+# snapcraft need to have its yaml file in the project root directory
+if [ ! -e .snapcraft.yaml ]; then
+    ln -s -f extras/package/snap/snapcraft.yaml .snapcraft.yaml
+fi
+
+snapcraft pack


=====================================
extras/package/snap/package.mak deleted
=====================================
@@ -1,7 +0,0 @@
-snap:
-	snapcraft prime
-	snapcraft snap
-
-snap-clean:
-	snapcraft clean
-	rm -rf snap


=====================================
extras/package/snap/snapcraft.yaml
=====================================
@@ -1,8 +1,8 @@
 name: vlc
-version-script: cat $SNAPCRAFT_STAGE/version
+adopt-info: vlc
 version: "daily"
 grade: stable
-base: core18
+base: core24
 summary: Read, capture, broadcast your multimedia streams
 description: |
   VLC is a free and open source cross-platform multimedia player and
@@ -10,137 +10,243 @@ description: |
   VCDs, and various streaming protocols.
   NOTE. This snap contains an untested daily build of VLC
 confinement: strict
-
+compression: lzo
+plugs:
+  desktop:
+    mount-host-font-cache: false
+  dot-config-aacs:
+    interface: personal-files
+    read:
+    - $HOME/.config/aacs
+hooks:
+  configure:
+    plugs:
+      - desktop
 apps:
   vlc:
-    desktop: usr/share/applications/vlc.desktop
-    command: desktop-launch $SNAP/bin/vlc-snap-wrapper.sh
+    desktop: vlc.desktop
+    command: usr/bin/vlc-snap-wrapper.sh
+    extensions:
+      - kde-neon-6
     common-id: org.videolan.vlc
     plugs:
-      - unity7
-      - network
-      - network-bind
+      - audio-playback
+      - audio-record
+      - avahi-control
+      - avahi-observe
+      - camera
+      - dot-config-aacs
+      - dvb
+      - hardware-observe
       - home
-      - opengl
-      - pulseaudio
       - mount-observe
+      - media-control
       - optical-drive
-      - camera
       - removable-media
       - screen-inhibit-control
-      - x11
-      - desktop
-      - desktop-legacy
-      - dvb
-      - audio-playback
-      - audio-record
-      - jack1
-      - avahi-control
+      - udisks2
     slots:
       - mpris
-
 parts:
-  desktop-qt5-vlc:
-    source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
-    source-commit: 622e2aa7a840b3a7dbb6ea4d432d687d5cc2e8ef
-    source-subdir: qt/
-    plugin: make
-    make-parameters: ["FLAVOR=qt5"]
-    build-packages:
-      - qtbase5-dev
-      - dpkg-dev
-    stage-packages:
-      - libxkbcommon0
-      - ttf-ubuntu-font-family
-      - dmz-cursor-theme
-      - light-themes
-      - shared-mime-info
-      - libqt5gui5
-      - libgdk-pixbuf2.0-0
-      - libqt5svg5
-      - locales-all
   vlc:
-    after: [desktop-qt5-vlc]
-    source: ../../../
+    source: .
     source-type: git
-    plugin: autotools
+    # We should be able to use the autotools plugin, but `kde-neon-6` override
+    # and prepend the `build-environment` variables with its own paths,
+    # and kde-qt6-core24-sdk already ships vlc which will create some linker issues
+    # when craftctl is called, this environment will be reseted even if we change the
+    # PATH/LD_LIBRARY_PATH in the override-build
+    plugin: nil
+
+    build-environment:
+      # setup our build environment to use the packages/libraries provided by the base snap packages
+      #be sure to have qmake and others in our path
+      - PATH: /snap/kde-qt6-core24-sdk/current/usr/bin/qt6:/snap/kf6-core24-sdk/current/usr/lib/qt6/libexec/${PATH:+:$PATH}
+
+    override-pull: |
+      craftctl default
+      craftctl set version=$(git describe --always HEAD)
     override-build: |
-      sed -i 's|0\.19\.8|0\.19\.7|'  configure.ac
       cd extras/tools
-      NEEDED="ninja" ./bootstrap
-      make -j $(getconf _NPROCESSORS_ONLN)
+      ./bootstrap
+      make -j ${CRAFT_PARALLEL_BUILD_COUNT} all
       cd ../../
-      export PATH=$PWD/extras/tools/build/bin:$PATH
+      #kde-neon-6 extension override the paths (PATH/LD_LIBRARY_PATH/...) with kf6-core24-sdk paths so we can't set these in the environment
+      #kf6-core24-sdk already ships VLC, make sure that the one we're building will be used when linking vlc
+      export PATH=$PWD/extras/tools/build/bin:${PATH}
+      export LD_LIBRARY_PATH=$(pwd)/src/.libs/:$(pwd)/lib/.libs/:${LD_LIBRARY_PATH}
+      export VLC_CONTRIB_SHA="$(extras/ci/get-contrib-sha.sh)"
+      export VLC_PREBUILT_CONTRIBS_URL="https://artifacts.videolan.org/vlc-3.0/snap/vlc-contrib-${CRAFT_ARCH_TRIPLET_BUILD_FOR}-${VLC_CONTRIB_SHA}.tar.zst"
+      if ! extras/ci/check-url.sh "$VLC_PREBUILT_CONTRIBS_URL"; then unset VLC_PREBUILT_CONTRIBS_URL; fi
       cd contrib && mkdir linux && cd linux
       ../bootstrap \
-          --host=$TRIPLET \
+          --host=${CRAFT_ARCH_TRIPLET_BUILD_FOR} \
           --enable-libdsm \
-          --enable-dvdcss \
-          --disable-chromaprint
-      if [ -n "$VLC_PREBUILT_CONTRIBS_URL" ]; then
+          --enable-dvdcss
+      if [ -v VLC_PREBUILT_CONTRIBS_URL ]; then
           make prebuilt PREBUILT_URL="$VLC_PREBUILT_CONTRIBS_URL"
+          make -j ${CRAFT_PARALLEL_BUILD_COUNT} tools
       else
           make list
-          make -j $(getconf _NPROCESSORS_ONLN) fetch
-          make -j $(getconf _NPROCESSORS_ONLN) -k install || make -j1
-          make package
+          make -j ${CRAFT_PARALLEL_BUILD_COUNT} fetch
+          make -j ${CRAFT_PARALLEL_BUILD_COUNT} -k || make -j1
+          #export prebuilt for CI jobs
+          if [ -f "$CRAFT_PROJECT_DIR/snap-save-prebuilt" ]; then
+              make package
+              mv ../vlc-contrib-*.tar.zst $CRAFT_PROJECT_DIR/contrib || true
+          fi
       fi
-      cd ../../
-      export NOCONFIGURE=1
-      autoreconf -fi
+      cd ../..
+
+      #craftctl default
+      ./bootstrap
       ./configure \
-          --prefix=$SNAPCRAFT_PART_INSTALL/usr \
-          --disable-wayland \
-          --enable-merge-ffmpeg
-      make -j $(getconf _NPROCESSORS_ONLN)
-      echo $(git describe --always HEAD) > $SNAPCRAFT_STAGE/version
-      make install
-      sed -i 's|Icon=vlc|Icon=/usr/share/icons/hicolor/256x256/apps/vlc\.png|' $SNAPCRAFT_PART_INSTALL/usr/share/applications/vlc.desktop
-      sed -i 's|TryExec=.*|TryExec=/snap/bin/vlc|' $SNAPCRAFT_PART_INSTALL/usr/share/applications/vlc.desktop
+         --host=${CRAFT_ARCH_TRIPLET_BUILD_FOR} \
+         --prefix=/usr \
+         --enable-merge-ffmpeg \
+         --enable-extra-checks \
+         --disable-qt-qml-cache \
+         --disable-pipewire
+
+      make -j ${CRAFT_PARALLEL_BUILD_COUNT}
+      make install DESTDIR="${CRAFT_PART_INSTALL}"
+
+      find ${CRAFT_PART_INSTALL}/usr/lib -name "*.la" -delete
+
+      cp ${CRAFT_PART_INSTALL}/usr/share/icons/hicolor/256x256/apps/vlc.png ${CRAFT_PART_INSTALL}/vlc.png
+      cp ${CRAFT_PART_INSTALL}/usr/share/applications/vlc.desktop ${CRAFT_PART_INSTALL}/vlc.desktop
+      sed -i 's/\(^Icon=\).*$/\1\/vlc.png/' ${CRAFT_PART_INSTALL}/vlc.desktop
+      sed -i 's|TryExec=.*|TryExec=/snap/bin/vlc|' ${CRAFT_PART_INSTALL}/vlc.desktop
     build-packages:
+      # build tools
       - ant
+      - autopoint
       - git
       - g++
+      - gperf
+      - nasm
       - make
-      - yasm
       - autoconf
       - libtool
       - libtool-bin
       - cmake
       - automake
       - build-essential
+      - curl
+      - gettext
+      - openjdk-11-jdk-headless
+      - python3
+      - python3-pip
+      - python3-venv
+      - python3-jinja2
+      - lua5.2
+      - pkg-config
+      - xz-utils
+      - zlib1g-dev
+      - bison
+      - flex
+
+      ##
+      - glslang-dev
+      - libaom-dev
+      - libarchive-dev
+      - libaribb24-dev
+      - libasound2-dev
+      - libass-dev
+      - libavcodec-dev
+      - libavdevice-dev
+      - libavfilter-dev
+      - libavformat-dev
+      - libavutil-dev
+      - libbluray-dev
+      - libcaca-dev
+      - libchromaprint-dev
+      - libdav1d-dev
+      - libdca-dev
+      - libdvbpsi-dev
+      - libdvbcsa-dev
+      - libdvdnav-dev
+      - libdvdread-dev
+      - libebur128-dev
+      - libfaad-dev
+      - libffi-dev
+      - libflac-dev
+      - libfluidsynth-dev
+      - libgmp-dev
+      - libgsm1-dev
+      - libjack-dev
+      - libjpeg-turbo8-dev
+      - libkate-dev
+      - libmad0-dev
+      - libmatroska-dev
+      - libmodplug-dev
+      - libmpeg2-4-dev
+      - libmpcdec-dev
+      - libmpg123-dev
+      - libmysofa-dev
+      - libnfs-dev
+      - libogg-dev
+      - liborc-0.4-dev
+      - libplacebo-dev
+      - libpango1.0-dev
+      - libpostproc-dev
+      - libsamplerate0-dev
+      - libshout-dev
+      - libsidplay2-dev
+      - libsoxr-dev
+      - libspatialaudio-dev
+      - libspeex-dev
+      - libspeexdsp-dev
+      - libsrt-gnutls-dev
+      - libssh2-1-dev
+      - libswresample-dev
+      - libswscale-dev
+      - libtag1-dev
+      - libtheora-dev
+      - libtwolame-dev
+      - libupnp-dev
+      - libvncserver-dev
+      - libvorbis-dev
+      - libvpx-dev
+      - libx264-dev
+      - libx265-dev
+      - libxcb1-dev
       - libxcb-xfixes0-dev
-      - libqt5svg5-dev
       - libasound2-dev
       - libavahi-client-dev
       - libcdio-dev
       - libdbus-1-dev
       - libdirectfb-dev
+      - libdrm-dev
       - libegl1-mesa-dev
-      - libfreerdp-dev
-      - libfreetype6-dev
+      - libfreetype-dev
       - libfribidi-dev
+      - libgbm-dev
       - libgles2-mesa-dev
       - libgnutls28-dev
-      - libgtk2.0-dev
-      - libidn11-dev
+      - libglib2.0-dev
+      - libgme-dev
+      - libgtk-3-dev
+      - libidn-dev
       - libjack-dev
-      - liblircclient-dev
+      - liblirc-dev
       - liblua5.2-dev
       - libmtp-dev
-      - libncursesw5-dev
+      - libncurses-dev
       - libpng-dev
+      - libprotobuf-dev
       - libpulse-dev
-      - libqt5x11extras5-dev
-      - qtbase5-private-dev
+      - librist-dev
       - librsvg2-dev
       - libsecret-1-dev
+      - libsqlite3-dev
       - libudev-dev
       - libv4l-dev
       - libva-dev
       - libvdpau-dev
       - libx11-dev
       - libxcb-composite0-dev
+      - libxcb-damage0-dev
       - libxcb-keysyms1-dev
       - libxcb-randr0-dev
       - libxcb-shm0-dev
@@ -153,93 +259,136 @@ parts:
       - libxml2-dev
       - libxpm-dev
       - libzvbi-dev
-      - lua5.2
-      - pkg-config
-      - qtbase5-dev
-      - xz-utils
-      - zlib1g-dev
-      - bison
-      - flex
       - libvulkan-dev
+      - libgcrypt20-dev
+      - libsystemd-dev
+      - wayland-protocols
+
     stage-packages:
-      - fonts-freefont-ttf
       - dbus-x11
-      - libegl1-mesa
-      - libfreerdp-client1.1
-      - libfreerdp-core1.1
-      - libfreerdp-gdi1.1
+      - fonts-freefont-ttf
+      - libaacs0
+      - libaom3
+      - libarchive13
+      - libaribb24-0
+      - libasound2t64
+      - libass9
+      - libatk1.0-0
+      - libavcodec60
+      - libavformat60
+      - libavutil58
+      - libbluray2
+      - libcaca0
+      - libchromaprint1
+      - libdav1d7
+      - libdb5.3
+      - libdca0
+      - libdvbpsi10
+      - libdvbcsa1
+      - libdvdnav4
+      - libdvdread8t64
+      - libebur128-1
+      - libfluidsynth3
       - libfreetype6
       - libfribidi0
-      - libdb5.3
       - libgcc1
-      - libgl1-mesa-glx
-      - libgles2-mesa
+      - libgcrypt20
       - libglib2.0-0
+      - libgme0
+      - libgtk-3-0
+      - libidn12
+      - libjack0
+      - libkate1
+      - liblua5.2-0
+      - libmad0
+      - libmatroska7
+      - libmodplug1
+      - libmp3lame0
+      - libmpeg2-4
+      - libmpcdec6
+      - libmpg123-0
+      - libmtp9
+      - libmysofa1
+      - libnfs14
+      - libnotify4
+      - libopenjp2-7
+      - liborc-0.4-0
+      - libpango-1.0-0
+      - libplacebo338
+      - libpostproc57
+      - libprotobuf-lite32t64
       - libpulse0
-      - libqt5core5a
-      - libqt5gui5
+      - librist4
       - librsvg2-2
+      - libsamplerate0
       - libsecret-1-0
-      - libva-drm2
-      - libva-x11-2
-      - libva2
-      - libvdpau1
-      - libx11-6
+      - libshout3
+      - libsndio7.0
+      - libsoxr0
+      - libspatialaudio0
+      - libspeex1
+      - libspeexdsp1
+      - libsqlite3-0
+      - libsrt1.5-gnutls
+      - libssh2-1
+      - libswresample4
+      - libswscale7
+      - libtag1v5-vanilla
+      - libtheora0
+      - libtwolame0
+      - libupnp17t64
+      - libvncclient1
+      - libvorbisfile3
+      - libvpx9
+      - libx264-164
+      - libx265-199
       - libxcb-composite0
+      - libxcb-damage0
       - libxcb-keysyms1
       - libxcb-randr0
-      - libxcb-shm0
-      - libxcb-xv0
-      - libxcb1
+      - libxcomposite1
+      - libxcursor1
       - libxext6
       - libxi6
       - libxinerama1
       - libxkbcommon-x11-0
       - libxpm4
-      - vdpau-va-driver
-      - i965-va-driver
-      - mesa-utils
-      - mesa-vdpau-drivers
-      - zlib1g
-      - kde-style-breeze
-      - breeze-icon-theme
-      - frameworkintegration
-      - plasma-integration
-      - phonon4qt5-backend-null
-      - libjack0
-      - libasound2
-      - libgtk-3-0
-      - liblua5.2-0
-      - libmtp9
+      - libxrandr2
       - libzvbi0
-      - libnotify4
-      - libvulkan1
-      - libaacs0
-      - mesa-vulkan-drivers
-      - libvulkan-dev
       - openjdk-8-jdk
-    filesets:
-      exclusion:
+      - zlib1g
+    prime:
+      #excluded
       - "-usr/lib/*/cmake/*"
       - "-usr/include/*"
       - "-usr/share/ECM/*"
       - "-usr/share/doc/*"
       - "-usr/share/man/*"
+      - "-usr/share/icons/breeze-dark*"
       - "-usr/bin/X11"
-      - "-usr/lib/gcc/x86_64-linux-gnu/6.0.0"
+      - "-usr/lib/gcc/${CRAFT_ARCH_TRIPLET_BUILD_FOR}/6.0.0"
       - "-usr/lib/aspell/*"
-    prime:
-      - "$exclusion"
+      - "-usr/share/lintain"
 
   wrapper:
     plugin: dump
     after: [vlc]
-    source: .
+    source: extras/package/snap
     organize:
-      vlc-snap-wrapper.sh: bin/vlc-snap-wrapper.sh
+      vlc-snap-wrapper.sh: usr/bin/vlc-snap-wrapper.sh
 
-  fixup-vulkan-icd-paths:
+  cleanup:
+    after:
+      - wrapper
     plugin: nil
-    after: [wrapper]
-    override-build: |
-      sed -i -E 's,(^.+"library_path": ")/.*/,\1,' $SNAPCRAFT_STAGE/usr/share/vulkan/icd.d/*.json
+    build-snaps:
+      - core24
+      - kf6-core24
+    # remove libraries already present in base snap pacakges
+    # kf6-core24 already ships vlc, make sure to not delete our own files
+    override-prime: |
+      set -eux
+      for snap in "core24" "kf6-core24"
+      do
+        cd "/snap/$snap/current" && find . -type f,l -a ! -path "*vlc*" -exec rm -rf "{$CRAFT_PRIME}/{}" \;
+      done


=====================================
extras/package/snap/vlc-snap-wrapper.sh
=====================================
@@ -1,34 +1,21 @@
 #!/bin/bash
-case "$SNAP_ARCH" in
-	"amd64") ARCH='x86_64-linux-gnu'
-	;;
-	"i386") ARCH='i386-linux-gnu'
-	;;
-	*)
-		echo "Unsupported architecture for this app build"
-		exit 1
-	;;
-esac
-
-VENDOR=$(glxinfo | grep "OpenGL vendor")
-
-if [[ $VENDOR == *"Intel"* ]]; then
-  export VDPAU_DRIVER_PATH="$SNAP/usr/lib/$ARCH/dri"
-  export LIBVA_DRIVERS_PATH="$SNAP/usr/lib/$ARCH/dri"
-fi
-
-if [[ $VENDOR == *"NVIDIA"* ]]; then
-  export VDPAU_DRIVER_PATH="/var/lib/snapd/lib/gl/vdpau"
-elif [[ $VENDOR == *"X.Org"* ]]; then
-  export VDPAU_DRIVER_PATH="/usr/lib/$ARCH/vdpau/"
-fi
-
-export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/usr/lib/vlc"
+#KF6 already ships VLC and set the pluging path
+#ensure we don't use their libraries
+export LD_LIBRARY_PATH="$SNAP/usr/lib:$SNAP/usr/lib/vlc:$LD_LIBRARY_PATH"
+unset VLC_PLUGIN_PATH
 
 # KDE specific
 ## Do not start slaves through klauncher but fork them directly.
 export KDE_FORK_SLAVES=1
 ## Neon PATCH! make KIO look for slaves in a dynamic location depending on $SNAP
-export KF5_LIBEXEC_DIR=$SNAP/usr/lib/$ARCH/libexec/kf5
+#export KF5_LIBEXEC_DIR=$SNAP/usr/lib/$ARCH/libexec/kf5
+
+#libva+wayland is broken with gpu2404 base snap, force X11
+export QT_QPA_PLATFORM=xcb
+
+# Link the aacs directory from $HOME #28017
+if [ ! -L "$HOME/.config/aacs" ]; then
+    ln -s $SNAP_REAL_HOME/.config/aacs $HOME/.config/aacs
+fi
 
 exec $SNAP/usr/bin/vlc --config=$SNAP_USER_COMMON/vlcrc "$@"



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/58c0b80dab21ee7203d998066520772a3fc8c1d4...11065a7e6d33bdd7cb302d49d46c8a0391c7d4ed

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/58c0b80dab21ee7203d998066520772a3fc8c1d4...11065a7e6d33bdd7cb302d49d46c8a0391c7d4ed
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list