[snap] Fix snapcraft build for core20

This commit is contained in:
Fabrice de Gans 2022-09-03 15:41:16 -07:00 committed by Zach Bacon
parent e140ba816c
commit 3eb9fbdb7e
1 changed files with 7 additions and 25 deletions

View File

@ -25,28 +25,7 @@ plugs:
x11: x11:
parts: parts:
wxwidgets-sdk:
plugin: nil
stage-snaps:
- wxwidgets-sdk-gtk3
stage-packages:
# Crash dialog support
- binutils
filesets:
crash-dialog-support:
- usr/bin/*addr2line
library-shared:
- '**/lib/**/*.so*'
prime:
- $crash-dialog-support
- $library-shared
vbam: vbam:
after:
- wxwidgets-sdk
build-environment:
- CFLAGS: -I$SNAPCRAFT_STAGE/lib/wx/include/gtk3-unicode-3.0
- CXXFLAGS: -I$SNAPCRAFT_STAGE/lib/wx/include/gtk3-unicode-3.0
source: https://github.com/visualboyadvance-m/visualboyadvance-m.git source: https://github.com/visualboyadvance-m/visualboyadvance-m.git
override-pull: | override-pull: |
snapcraftctl pull snapcraftctl pull
@ -54,10 +33,11 @@ parts:
snapcraftctl set-version "${last_commit}" snapcraftctl set-version "${last_commit}"
sed -i.bak -e 's|Icon=visualboyadvance-m|Icon=/usr/share/icons/hicolor/scalable/apps/visualboyadvance-m.svg|g' src/wx/visualboyadvance-m.desktop sed -i.bak -e 's|Icon=visualboyadvance-m|Icon=/usr/share/icons/hicolor/scalable/apps/visualboyadvance-m.svg|g' src/wx/visualboyadvance-m.desktop
plugin: cmake plugin: cmake
cmake-generator: Ninja
stage-packages: stage-packages:
- libsdl2-2.0-0 - libsdl2-2.0-0
- libsfml-network2.4 - libsfml-network2.5
- libsfml-system2.4 - libsfml-system2.5
- libnotify4 - libnotify4
- libsm6 - libsm6
- libopenal1 - libopenal1
@ -69,6 +49,7 @@ parts:
- libglvnd0 - libglvnd0
- libglx0 - libglx0
- libopengl0 - libopengl0
- libwxgtk3.0-gtk3-0v5
build-packages: build-packages:
- g++ - g++
@ -85,7 +66,8 @@ parts:
- libsfml-dev - libsfml-dev
- libgtk-3-dev - libgtk-3-dev
- libopenal-dev - libopenal-dev
configflags: - libwxgtk3.0-gtk3-dev
cmake-parameters:
- -DENABLE_OPENAL=ON - -DENABLE_OPENAL=ON
- -DENABLE_SDL=OFF - -DENABLE_SDL=OFF
- -DCMAKE_INSTALL_PREFIX=/usr - -DCMAKE_INSTALL_PREFIX=/usr
@ -94,6 +76,6 @@ apps:
visualboyadvance-m: visualboyadvance-m:
command: usr/bin/visualboyadvance-m command: usr/bin/visualboyadvance-m
desktop: usr/share/applications/visualboyadvance-m.desktop desktop: usr/share/applications/visualboyadvance-m.desktop
extensions: [gnome-3-28] extensions: [gnome-3-38]
environment: environment:
LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio