Skip to content

Commit f3de7e6

Browse files
Merge #9
9: Update to use the latest techniques r=wmww a=AlanGriffiths * Drop obsolete interfaces * Use graphics-core20 for drivers Co-authored-by: Alan Griffiths <[email protected]>
2 parents 4966ed1 + 75a56a6 commit f3de7e6

File tree

1 file changed

+26
-9
lines changed

1 file changed

+26
-9
lines changed

snap/snapcraft.yaml

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ architectures:
1515
environment:
1616
SHELL: bash
1717
LC_ALL: C.UTF-8
18-
LD_LIBRARY_PATH: ${LD_LIBRARY_PATH}:${SNAP}/usr/lib/:${SNAP}/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/:${SNAP}/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/pulseaudio
1918
PATH: $SNAP/bin/:$SNAP/usr/bin/:${SNAP}/usr/games:${PATH}
2019
# XDG config
2120
XDG_CACHE_HOME: $SNAP_USER_COMMON/.cache
2221
XDG_CONFIG_DIRS: ${SNAP}/etc/xdg:$XDG_CONFIG_DIRS
2322
XDG_CONFIG_HOME: $SNAP_USER_DATA/.config
2423
# Prep EGL
25-
__EGL_VENDOR_LIBRARY_DIRS: $SNAP/etc/glvnd/egl_vendor.d:$SNAP/usr/share/glvnd/egl_vendor.d
26-
LIBGL_DRIVERS_PATH: ${SNAP}/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/dri
27-
LIBVA_DRIVERS_PATH: ${SNAP}/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/dri
24+
LD_LIBRARY_PATH: $SNAP/graphics/lib
25+
__EGL_VENDOR_LIBRARY_DIRS: $SNAP/graphics/glvnd/egl_vendor.d
26+
LIBGL_DRIVERS_PATH: $SNAP/graphics/dri
27+
LIBVA_DRIVERS_PATH: $SNAP/graphics/dri
2828
# Prep SDL
2929
SDL_VIDEODRIVER: wayland
3030

@@ -35,13 +35,17 @@ layout:
3535
bind: $SNAP/etc/fonts
3636
/usr/games:
3737
bind: $SNAP/usr/games
38+
/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/pulseaudio:
39+
bind: $SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/pulseaudio
3840

3941
plugs:
4042
wayland:
4143
opengl:
4244
audio-playback:
43-
pulseaudio:
44-
alsa:
45+
graphics-core20:
46+
interface: content
47+
target: $SNAP/graphics
48+
default-provider: mesa-core20
4549

4650
apps:
4751
daemon:
@@ -77,7 +81,7 @@ parts:
7781
mir-kiosk-snap-launch:
7882
plugin: dump
7983
source: https://github.com/MirServer/mir-kiosk-snap-launch.git
80-
override-build: $SNAPCRAFT_PART_BUILD/build-with-plugs.sh opengl audio-playback pulseaudio alsa wayland
84+
override-build: $SNAPCRAFT_PART_BUILD/build-with-plugs.sh opengl wayland graphics-core20 audio-playback
8185
stage-packages:
8286
- inotify-tools
8387

@@ -107,14 +111,27 @@ parts:
107111
- libsdl2-mixer-2.0-0
108112
- libsdl2-net-2.0-0
109113

114+
# scummvm needs libGLU which mesa supplies. But it isn't included in graphics-core20.
110115
mesa:
111116
plugin: nil
112117
stage-packages:
113-
- libgl1-mesa-dri
114-
- libwayland-egl1-mesa
115118
- libglu1-mesa
116119

117120
wayland:
118121
plugin: nil
119122
stage-packages:
120123
- libwayland-client0
124+
- libwayland-egl1
125+
126+
cleanup:
127+
after: [scummvm, mir-kiosk-snap-launch, sdl2, wayland, glue, icons, mesa]
128+
plugin: nil
129+
build-snaps: [ mesa-core20 ]
130+
override-prime: |
131+
set -eux
132+
cd /snap/mesa-core20/current/egl/lib
133+
find . -type f,l -exec rm -f $SNAPCRAFT_PRIME/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/{} \;
134+
rm -fr "$SNAPCRAFT_PRIME/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/dri"
135+
for CRUFT in bug lintian man; do
136+
rm -rf "$SNAPCRAFT_PRIME/usr/share/$CRUFT"
137+
done

0 commit comments

Comments
 (0)