DISTS: Update snapcraft recipe

This commit is contained in:
Lothar Serra Mari 2020-11-17 20:25:27 +01:00
parent bc1d661cf8
commit a26c016132
3 changed files with 56 additions and 62 deletions

View File

@ -1,5 +1,13 @@
#!/bin/sh
#!/bin/bash
# By default, we set SDL_VIDEODRIVER to 'wayland'.
if [ -O "$XDG_RUNTIME_DIR/${WAYLAND_DISPLAY:-wayland-0}" ] && [ -e $SNAP_COMMON/wayland.connected ]; then export SDL_VIDEODRIVER=wayland; fi
# Since GNOME doesn't have support for server-side decorations,
# we check if we are running from within a GNOME session, we
# enforce using the x11 backend for XWayland fallback support.
if [[ "$XDG_CURRENT_DESKTOP" =~ "GNOME" ]]; then
export SDL_VIDEODRIVER=x11
fi
exec "$@"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 45 KiB

View File

@ -21,22 +21,11 @@ description: |
confinement: strict
grade: stable
# **Workaround** The following are duplicated for "daemon" (putting them at the top level doesn't work in *this* snap)
plugs:
wayland:
opengl:
alsa:
audio-playback:
network:
network-bind:
removable-media:
joystick:
apps:
scummvm:
command-chain: ["snap/command-chain/alsa-launch"]
extensions: [gnome-3-28]
command: desktop-launch $SNAP/bin/wayland-if-possible.sh $SNAP/bin/scummvm-launch.sh
command: snap/command-chain/desktop-launch $SNAP/bin/wayland-if-possible.sh $SNAP/bin/scummvm-launch.sh
plugs:
- wayland
- x11
@ -60,12 +49,11 @@ apps:
DBUS_FATAL_WARNINGS: 0
daemon:
command: daemon-start.sh $SNAP/bin/scummvm-launch.sh -f
command: bin/daemon-start.sh $SNAP/bin/scummvm-launch.sh -f
daemon: simple
restart-condition: always
plugs:
- pulseaudio
# **Workaround** The following are duplicated for "daemon" (putting them at the top level doesn't work in *this* snap)
- wayland
- opengl
- alsa
@ -97,7 +85,7 @@ layout:
parts:
scummvm:
after: [alsa-mixin, discord-rpc]
after: [alsa-mixin]
source: https://github.com/scummvm/scummvm.git
build-environment:
- CXXFLAGS: "$CXXFLAGS -fuse-ld=gold -flto=$(nproc) -ffunction-sections -fdata-sections"
@ -109,13 +97,16 @@ parts:
last_released_tag="$(snap info scummvm | awk '$1 == "latest/beta:" { print $2 }')"
# If the latest tag from the upstream project has not been released to
# beta, build that tag instead of master.
if [ "${trimmed_tag}" != "${last_released_tag}" ]; then
#if [ "${trimmed_tag}" != "${last_released_tag}" ]; then
git fetch
git checkout -f "${last_committed_tag}"
snapcraftctl set-version $(git -C ../src tag --list | tac | head -n1 | sed 's/desc\///' | sed 's/git//' | sed 's/^v//')
else
snapcraftctl set-version $(git describe | sed 's/desc\///')
fi
# git checkout -f "${last_committed_tag}"
git checkout -f v2.2.0
# snapcraftctl set-version $(git -C ../src tag --list | tac | head -n1 | sed 's/desc\///' | sed 's/git//' | sed 's/^v//')
snapcraftctl set-version 2.2.0
#else
# git checkout master
# snapcraftctl set-version $(git describe | sed 's/desc\///')
#fi
snapcraftctl build
strip --strip-all $SNAPCRAFT_PART_INSTALL/bin/scummvm
@ -124,42 +115,50 @@ parts:
- --enable-release
- --enable-tts
- --enable-opl2lpt
- --enable-discord
- --enable-c++11
- --disable-debug
build-packages:
- libsdl2-dev
- libgtk-3-dev
- libjpeg62-dev
- libmpeg2-4-dev
- liba52-0.7.4-dev
- libogg-dev
- libvorbis-dev
- libflac-dev
- libmad0-dev
- libpng-dev
- libtheora-dev
- libcurl4-openssl-dev
- libfaad-dev
- libflac-dev
- libfluidsynth-dev
- libfreetype6-dev
- libfribidi-dev
- zlib1g-dev
- libunity-dev
- libcurl4-openssl-dev
- libsdl2-net-dev
- libglew-dev
- libgtk-3-dev
- libieee1284-3-dev
- libjpeg62-dev
- libmad0-dev
- libmpeg2-4-dev
- libogg-dev
- libpng-dev
- libsdl2-dev
- libsdl2-net-dev
- libspeechd-dev
- libtheora-dev
- libunity-dev
- libvorbis-dev
- zlib1g-dev
stage-packages:
- libicu60
- espeak-ng
- espeak-ng-data
- freeglut3
- liba52-0.7.4
- libcurl4
- libdbusmenu-glib4
- libdee-1.0-4
- libfaad2
- libflac8
- libfluidsynth1
- libfribidi0
- libgl1-mesa-dri
- libgl1-mesa-glx
- libglew2.0
- libglu1-mesa
- libwayland-egl1-mesa
- libicu60
- libieee1284-3
- libjpeg62
- libjpeg8
- libmad0
@ -168,29 +167,22 @@ parts:
- libpng16-16
- libpulse0
- libsdl2-2.0-0
- libsdl2-net-2.0-0
- libslang2
- libsndio6.1
- libspeechd2
- libtheora0
- libunity9
- libunity-protocol-private0
- libvorbis0a
- libvorbisfile3
- zlib1g
- libdbusmenu-glib4
- libdee-1.0-4
- libslang2
- libunity-protocol-private0
- libunity9
- freeglut3
- libcurl4
- libsdl2-net-2.0-0
- liba52-0.7.4
- libieee1284-3
- libwayland-egl1-mesa
- locales-all
- ttf-ubuntu-font-family
- espeak-ng
- espeak-ng-data
- libspeechd2
- speech-dispatcher
- speech-dispatcher-audio-plugins
- speech-dispatcher-espeak-ng
- ttf-ubuntu-font-family
- zlib1g
alsa-mixin:
plugin: nil
@ -249,12 +241,6 @@ parts:
- libasound2
- libasound2-plugins
discord-rpc:
plugin: cmake
source: https://github.com/discord/discord-rpc.git
configflags:
- -DBUILD_SHARED_LIBS=ON
scripts:
plugin: dump
source: scripts