@@ -15,16 +15,16 @@ architectures:
15
15
environment :
16
16
SHELL : bash
17
17
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
19
18
PATH : $SNAP/bin/:$SNAP/usr/bin/:${SNAP}/usr/games:${PATH}
20
19
# XDG config
21
20
XDG_CACHE_HOME : $SNAP_USER_COMMON/.cache
22
21
XDG_CONFIG_DIRS : ${SNAP}/etc/xdg:$XDG_CONFIG_DIRS
23
22
XDG_CONFIG_HOME : $SNAP_USER_DATA/.config
24
23
# 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
28
28
# Prep SDL
29
29
SDL_VIDEODRIVER : wayland
30
30
@@ -35,13 +35,17 @@ layout:
35
35
bind : $SNAP/etc/fonts
36
36
/usr/games :
37
37
bind : $SNAP/usr/games
38
+ /usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/pulseaudio :
39
+ bind : $SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/pulseaudio
38
40
39
41
plugs :
40
42
wayland :
41
43
opengl :
42
44
audio-playback :
43
- pulseaudio :
44
- alsa :
45
+ graphics-core20 :
46
+ interface : content
47
+ target : $SNAP/graphics
48
+ default-provider : mesa-core20
45
49
46
50
apps :
47
51
daemon :
77
81
mir-kiosk-snap-launch :
78
82
plugin : dump
79
83
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
81
85
stage-packages :
82
86
- inotify-tools
83
87
@@ -107,14 +111,27 @@ parts:
107
111
- libsdl2-mixer-2.0-0
108
112
- libsdl2-net-2.0-0
109
113
114
+ # scummvm needs libGLU which mesa supplies. But it isn't included in graphics-core20.
110
115
mesa :
111
116
plugin : nil
112
117
stage-packages :
113
- - libgl1-mesa-dri
114
- - libwayland-egl1-mesa
115
118
- libglu1-mesa
116
119
117
120
wayland :
118
121
plugin : nil
119
122
stage-packages :
120
123
- 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