forked from flathub/org.widelands.Widelands
-
Notifications
You must be signed in to change notification settings - Fork 1
/
org.widelands.Widelands.yaml
108 lines (105 loc) · 3.65 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
app-id: org.widelands.Widelands
runtime: org.freedesktop.Platform
runtime-version: '19.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:
- /bin/pip*
- /bin/python*
- /bin/smtpd.py
- /include
- /lib/debug/source/python*
- /lib/libpython*
- /lib/pkgconfig
- /lib/python*
- /share/man
- '*.la'
- '*.a'
modules:
- shared-modules/lua5.3/lua-5.3.5.json
- shared-modules/glu/glu-9.json
- shared-modules/glew/glew.json
- shared-modules/python2.7/python-2.7.json
- name: boost
buildsystem: simple
sources:
# Boost >= 1.70 is not supported yet
# https://www.widelands.org/forum/topic/4513/?page=1#post-27901
# wl_include_system_directories Function invoked with incorrect arguments for function named: wl_include_system_directories
- type: archive
url: https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.bz2
sha256: 8f32d4617390d1c2d16f26a27ab60d97807b35440d45891fa340fc2648b04406
build-commands:
- ./bootstrap.sh --prefix="${FLATPAK_DEST}" --with-libraries=system,regex,test;
- ./b2 -j"${FLATPAK_BUILDER_N_JOBS}" install;
- name: xmlstarlet
config-opts:
- --disable-static-libs
- --with-libxml-libs-prefix=/usr/lib
- --with-libxml-include-prefix=/usr/include/libxml2
sources:
- type: archive
url: https://downloads.sourceforge.net/xmlstar/xmlstarlet-1.6.1.tar.gz
sha256: 15d838c4f3375332fd95554619179b69e4ec91418a3a5296e7c631b7ed19e7ca
- type: shell
commands:
- cp -p /usr/share/automake-*/config.{sub,guess} .;
- autoreconf -vfi;
post-install:
- ln -s "xml" "${FLATPAK_DEST}/bin/xmlstarlet" ||:;
cleanup: ["*"]
- name: Widelands
buildsystem: cmake-ninja
builddir: true
config-opts:
- -DCMAKE_BUILD_TYPE=Release
- -DCMAKE_INSTALL_PREFIX=/app/bin
- -DWL_INSTALL_BASEDIR=/app/share/widelands
- -DWL_INSTALL_DATADIR=/app/share/widelands
- -DBOOST_ROOT=/app
- -DGLEW_ROOT=/app
- -DGLEW_INCLUDE_DIR=/app/include/GL
# https://wl.widelands.org/forum/topic/1343/?page=3 & https://wl.widelands.org/forum/post/9857/
- -DGLEW_LIBRARY:FILEPATH=/app/lib/libGLEW.a
- -DOPENGL_glu_LIBRARY=/app/lib/libGLU.a
- -DOPTION_BUILD_WEBSITE_TOOLS=OFF
build-options:
ldflags: -lGL
sources:
- type: archive
url: https://launchpad.net/widelands/build20/build20/+download/widelands-build20.tar.bz2
sha256: 38594d98c74f357d4c31dd8ee2b056bfe921f42935935af915d11b792677bcb2
git-init: true
- type: patch
path: widelands-build20-gcc.patch
# https://bugs.launchpad.net/widelands/+bug/1836107
# undefined reference to `glReadPixels'
- type: patch
path: widelands-build20-gl.patch
# Update translations
- type: patch
path: widelands-build20-xdg-translations.patch
use-git: true
# Move XDG-related stuff from debian/rules to xdg/CMakeLists.txt
# https://github.com/widelands/widelands/pull/3547
- type: patch
path: widelands-build20-xdg-cmake.patch
use-git: true
post-install:
# https://github.com/hughsie/appstream-glib/pull/272#issuecomment-439812546
# https://bugs.launchpad.net/widelands/+bug/1807625
- |
for f in "${FLATPAK_DEST}/share/metainfo/${FLATPAK_ID}.appdata.xml"; do
xmlstarlet ed --inplace -d '/component/releases/release[position()>1]' "${f}";
done;