@@ -15,16 +15,16 @@ architectures:
15
15
environment :
16
16
SHELL : bash
17
17
LC_ALL : C.UTF-8
18
- LD_LIBRARY_PATH : ${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,11 +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 :
45
+ graphics-core20 :
46
+ interface : content
47
+ target : $SNAP/graphics
48
+ default-provider : mesa-core20
43
49
44
50
apps :
45
51
daemon :
75
81
mir-kiosk-snap-launch :
76
82
plugin : dump
77
83
source : https://github.com/MirServer/mir-kiosk-snap-launch.git
78
- override-build : $SNAPCRAFT_PART_BUILD/build-with-plugs.sh opengl wayland audio-playback
84
+ override-build : $SNAPCRAFT_PART_BUILD/build-with-plugs.sh opengl wayland graphics-core20 audio-playback
79
85
stage-packages :
80
86
- inotify-tools
81
87
@@ -105,14 +111,27 @@ parts:
105
111
- libsdl2-mixer-2.0-0
106
112
- libsdl2-net-2.0-0
107
113
114
+ # scummvm needs libGLU which mesa supplies. But is isn't included in graphics-core20.
108
115
mesa :
109
116
plugin : nil
110
117
stage-packages :
111
- - libgl1-mesa-dri
112
- - libwayland-egl1-mesa
113
118
- libglu1-mesa
114
119
115
120
wayland :
116
121
plugin : nil
117
122
stage-packages :
118
123
- libwayland-client0
124
+ - libwayland-egl1
125
+
126
+ cleanup :
127
+ after : [scummvm, mir-kiosk-snap-launch, sdl2, wayland, glue, icons]
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