Snapping SuperTux

SuperTux https://www.supertux.org/index.html
https://www.supertux.org/download.html

I had a go at this, and it fails to build for some reason…

Scanning dependencies of target supertux2_lib
[ 10%] Building CXX object CMakeFiles/supertux2_lib.dir/src/addon/addon.cpp.o
[ 10%] Building CXX object CMakeFiles/supertux2_lib.dir/src/addon/addon_manager.cpp.o
[ 10%] Building CXX object CMakeFiles/supertux2_lib.dir/src/addon/md5.cpp.o
[ 10%] Building CXX object CMakeFiles/supertux2_lib.dir/src/addon/downloader.cpp.o
[ 11%] Building CXX object CMakeFiles/supertux2_lib.dir/src/audio/dummy_sound_source.cpp.o
[ 11%] Building CXX object CMakeFiles/supertux2_lib.dir/src/audio/ogg_sound_file.cpp.o
[ 11%] Building CXX object CMakeFiles/supertux2_lib.dir/src/audio/openal_sound_source.cpp.o
[ 11%] Building CXX object CMakeFiles/supertux2_lib.dir/src/audio/sound_error.cpp.o
[ 11%] Building CXX object CMakeFiles/supertux2_lib.dir/src/audio/sound_file.cpp.o
In file included from /root/parts/supertux/src/src/addon/addon_manager.cpp:27:0:
/root/parts/supertux/src/src/util/gettext.hpp:20:10: fatal error: tinygettext/tinygettext.hpp: No such file or directory
 #include <tinygettext/tinygettext.hpp>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
CMakeFiles/supertux2_lib.dir/build.make:87: recipe for target 'CMakeFiles/supertux2_lib.dir/src/addon/addon_manager.cpp.o' failed
make[2]: *** [CMakeFiles/supertux2_lib.dir/src/addon/addon_manager.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:258: recipe for target 'CMakeFiles/supertux2_lib.dir/all' failed
make[1]: *** [CMakeFiles/supertux2_lib.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2
Failed to run 'cmake --build . -- -j4' for 'supertux': Exited with code 2.
Verify that the part is using the correct parameters and try again.

Here’s the yaml

name: supertux
base: core18
version: '0.6.1'
summary: SuperTux
description: |
   SuperTux is a open-source classic 2D jump'n run sidescroller game in a style similar to the original Super Mario games.

grade: stable
confinement: strict

parts:
  supertux:
    plugin: cmake
    configflags: ["-DBUILD_SHARED_LIBS=OFF", "-DENABLE_BOOST_STATIC_LIBS=OFF"]
    source: https://github.com/supertux/supertux.git
    source-tag: v$SNAPCRAFT_PROJECT_VERSION
    build-packages:
      - libsdl2-dev
      - libphysfs-dev
      - libopenal-dev
      - libvorbis-dev
      - libfreetype6-dev
      - libboost-date-time-dev
      - libboost-filesystem-dev
      - libboost-locale-dev
      - libboost-system-dev
      - libcurl4-gnutls-dev
      - libglew-dev
      - libpng-dev
      - libraqm-dev
      - libsdl2-image-dev
      - libharfbuzz-dev
      - libfribidi-dev
      - gettext
      - pkg-config
1 Like

You need to add this location to your path, so add this to the supertux part:

build-environment:
    - PATH: $SNAPCRAFT_PART_INSTALL/src/external/tinygettext/include/tinygettext:$PATH

@popey you’re also missing an apps section, which will prevent the app from running…

1 Like

Thanks. Sadly that didn’t help.

[ 11%] Building CXX object CMakeFiles/supertux2_lib.dir/src/audio/sound_file.cpp.o                                                                                                                           
[ 12%] Building CXX object CMakeFiles/supertux2_lib.dir/src/audio/sound_manager.cpp.o                                                                                                                        
In file included from /root/parts/supertux/src/src/addon/addon_manager.cpp:27:0:                                                                                                                             
/root/parts/supertux/src/src/util/gettext.hpp:20:10: fatal error: tinygettext/tinygettext.hpp: No such file or directory                                                                                     
 #include <tinygettext/tinygettext.hpp>            
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~            
compilation terminated.
CMakeFiles/supertux2_lib.dir/build.make:87: recipe for target 'CMakeFiles/supertux2_lib.dir/src/addon/addon_manager.cpp.o' failed
make[2]: *** [CMakeFiles/supertux2_lib.dir/src/addon/addon_manager.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:258: recipe for target 'CMakeFiles/supertux2_lib.dir/all' failed
make[1]: *** [CMakeFiles/supertux2_lib.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2

I tend to add the apps stanza once I actually get a binary out :smiley: