[Scummvm-git-logs] scummvm master -> 499f06b8a89e2a54cd883676eb73e01aa7b45d92

lotharsm mail at serra.me
Sun Sep 27 10:24:35 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
499f06b8a8 DISTS: SNAP: Sync with Snapcrafters' repository


Commit: 499f06b8a89e2a54cd883676eb73e01aa7b45d92
    https://github.com/scummvm/scummvm/commit/499f06b8a89e2a54cd883676eb73e01aa7b45d92
Author: Lothar Serra Mari (mail at serra.me)
Date: 2020-09-27T12:24:14+02:00

Commit Message:
DISTS: SNAP: Sync with Snapcrafters' repository

Changed paths:
  A dists/snap/LICENSE
    dists/snap/scripts/bin/scummvm-launch.sh
    dists/snap/snap/snapcraft.yaml


diff --git a/dists/snap/LICENSE b/dists/snap/LICENSE
new file mode 100644
index 0000000000..81802d6194
--- /dev/null
+++ b/dists/snap/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2017 Snapcrafters
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/dists/snap/scripts/bin/scummvm-launch.sh b/dists/snap/scripts/bin/scummvm-launch.sh
index bc7c996ec9..d4164b1711 100755
--- a/dists/snap/scripts/bin/scummvm-launch.sh
+++ b/dists/snap/scripts/bin/scummvm-launch.sh
@@ -14,19 +14,22 @@ fi
 mkdir -p $XDG_RUNTIME_DIR/speech-dispatcher
 $SNAP/usr/bin/speech-dispatcher -d -C "$SNAP/etc/speech-dispatcher" -S "$XDG_RUNTIME_DIR/speech-dispatcher/speechd.sock" -m "$SNAP/usr/lib/speech-dispatcher-modules" -t 30
 
+# Initial setup
+if [ ! -f "${XDG_CONFIG_HOME}/scummvm/scummvm.ini" ]; then
+  mkdir -p ${XDG_CONFIG_HOME}/scummvm/
+  echo "[scummvm]\naspect_ratio=true\n"                                             >> ${XDG_CONFIG_HOME}/scummvm/scummvm.ini
+  echo "[cloud]\nrootpath=/home/${USER}/snap/scummvm/current/.local/share/scummvm"  >> ${XDG_CONFIG_HOME}/scummvm/scummvm.ini
+fi
+
 # We need to do this for the user that launches scummvm, so
 # it can't be done on installation
-while [ ! -f "${XDG_CONFIG_HOME}/scummvm/.added-games-bundle" ]
-do
-  mkdir -p ${XDG_CONFIG_HOME}/scummvm/
+if [ ! -f "${XDG_CONFIG_HOME}/scummvm/.added-games-bundle" ]; then
   touch ${XDG_CONFIG_HOME}/scummvm/.added-games-bundle
   if ! grep -E "comi|drascula|dreamweb|lure|myst|queen|sky|sword" ${XDG_CONFIG_HOME}/scummvm/scummvm.ini
   then
-  # Register the bundled games. We use a "while" loop as we can't easily
-  # tell when scummvm is finished.
+  # Register the bundled games.
   $SNAP/bin/scummvm -p /usr/share/scummvm/ --recursive --add
-  sleep 1
   fi
-done
+fi
 
 exec $SNAP/bin/scummvm "$@"
\ No newline at end of file
diff --git a/dists/snap/snap/snapcraft.yaml b/dists/snap/snap/snapcraft.yaml
index c7e2a4566f..38ae8f6ee8 100644
--- a/dists/snap/snap/snapcraft.yaml
+++ b/dists/snap/snap/snapcraft.yaml
@@ -30,6 +30,7 @@ plugs:
   network:
   network-bind:
   removable-media:
+  joystick:
 
 apps:
   scummvm:
@@ -50,6 +51,9 @@ apps:
       - home
       - gsettings
       - mount-observe
+      - system-observe
+      - network-observe
+      - joystick
     environment:
       LD_LIBRARY_PATH: "$LD_LIBRARY_PATH:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/libunity/:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/pulseaudio/:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/speech-dispatcher/"
       ESPEAK_DATA_PATH: "$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/espeak-ng-data"
@@ -69,6 +73,7 @@ apps:
       - network
       - network-bind
       - removable-media
+      - joystick
     environment:
       SDL_VIDEODRIVER: wayland
       LD_LIBRARY_PATH: "$LD_LIBRARY_PATH:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/libunity/:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/pulseaudio/:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/speech-dispatcher/"
@@ -92,8 +97,12 @@ layout:
 
 parts:
   scummvm:
-    after: [alsa-mixin]
+    after: [alsa-mixin, discord-rpc]
     source: https://github.com/scummvm/scummvm.git
+    build-environment:
+      - CXXFLAGS: "$CXXFLAGS -fuse-ld=gold -flto=$(nproc) -ffunction-sections -fdata-sections"
+      - LDFLAGS:  "$LDFLAGS  -fuse-ld=gold -flto=$(nproc) -Wl,--gc-sections"
+
     override-build: |
       last_committed_tag="$(git tag --list | tac | head -n1)"
       trimmed_tag="$(echo $last_committed_tag | sed 's/desc\///' | sed 's/git//' | sed 's/^v//')"
@@ -102,18 +111,20 @@ parts:
       # beta, build that tag instead of master.
       if [ "${trimmed_tag}" != "${last_released_tag}" ]; then
         git fetch
-        git checkout "${last_committed_tag}"
+        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 -C ../src describe | sed 's/desc\///')
-      fi    
+        snapcraftctl set-version $(git describe | sed 's/desc\///')
+      fi
       snapcraftctl build
+      strip --strip-all $SNAPCRAFT_PART_INSTALL/bin/scummvm
       
     plugin: autotools
     configflags:
       - --enable-release
       - --enable-tts
       - --enable-opl2lpt
+      - --enable-discord
       - --enable-c++11
       - --disable-debug
 
@@ -122,7 +133,7 @@ parts:
       - libgtk-3-dev
       - libjpeg62-dev
       - libmpeg2-4-dev
-      - liba52-dev
+      - liba52-0.7.4-dev
       - libogg-dev
       - libvorbis-dev
       - libflac-dev
@@ -238,6 +249,12 @@ 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




More information about the Scummvm-git-logs mailing list