forked from flathub/org.widelands.Widelands
-
Notifications
You must be signed in to change notification settings - Fork 0
/
org.widelands.Widelands.yaml
84 lines (76 loc) · 2.5 KB
/
org.widelands.Widelands.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
app-id: org.widelands.Widelands
runtime: org.freedesktop.Platform
# version 22.08 has too many problems for Widelands
runtime-version: '21.08'
sdk: org.freedesktop.Sdk
command: widelands
finish-args:
# X11 + XShm access
- --share=ipc
- --socket=x11
# Play sounds
- --socket=pulseaudio
# Needs to talk to the network
- --share=network
- --persist=.widelands
# OpenGL access
- --device=dri
cleanup:
- /include
- /lib/pkgconfig
- /share/man
- '*.la'
- '*.a'
modules:
- shared-modules/glu/glu-9.json
- shared-modules/glew/glew.json
- name: asio
sources:
- type: archive
url: https://downloads.sourceforge.net/project/asio/asio/1.24.0%20%28Stable%29/asio-1.24.0.tar.bz2
sha256: 8976812c24a118600f6fcf071a20606630a69afe4c0abee3b0dea528e682c585
# This is to skip the 'make' step (building the examples), because
# I couldn't figure out how to do it using the default buildsystem
buildsystem: simple
build-commands:
- |
# This all could be just a 'cp -a', but let's have the advanced
# error handling of GNU 'install'
./configure --prefix=${FLATPAK_DEST}
make install-data
####### Widelands #######
- name: Widelands
sources:
- type: archive
url: https://github.com/widelands/widelands/archive/refs/tags/v1.1.tar.gz
sha256: 6853fcf3daec9b66005691e5bcb00326634baf0985ad89a7e6511502612f6412
- type: shell
commands:
- |
# Modify xdg/org.widelands.Widelands.appdata.xml.stub:
# * Remove the binary from provides, because flatpak doesn't export it
ed xdg/org.widelands.Widelands.appdata.xml.stub <<EOF
/<binary>/d
wq
EOF
# Regenerate appdata.xml with the changes
utils/update_appdata.py
buildsystem: cmake-ninja
builddir: true
config-opts:
- -DCMAKE_BUILD_TYPE=Release
- -DOPTION_BUILD_WEBSITE_TOOLS=OFF
- -DCMAKE_INSTALL_PREFIX=/app
- -DWL_INSTALL_BINDIR=/app/bin
- -DWL_INSTALL_BASEDIR=/app/share/widelands
- -DWL_INSTALL_DATADIR=/app/share/widelands
- -DGLEW_ROOT=/app
- -DGLEW_INCLUDE_DIR=/app/include/GL
# Fix an issue with linking libs
# https://www.widelands.org/forum/topic/1343/?page=3#post-9857
- -DGLEW_LIBRARY:FILEPATH=/app/lib/libGLEW.a
# cmake ignores CPLUS_INCLUDE_PATH where Asio is installed
- -DCMAKE_INCLUDE_PATH=/app/include
- -DOPENGL_glu_LIBRARY=/app/lib/libGLU.a
build-options:
ldflags: -lGL