aboutsummaryrefslogtreecommitdiff
path: root/community/godot3/build
blob: a5518bdb4c6e4d3b184ad8e53ee73e59ccec68e8 (plain)
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
#!/bin/sh -e

# Temporarily install scons to build godot
(
    cd scons

    python3 setup.py build
    python3 setup.py install \
        --prefix=/usr \
        --root="$PWD/dist"

)

PYTHONPATH=$(./pythonpath)
PATH=$PWD/scons/dist/usr/bin:$PATH

export PYTHONPATH PATH

clsed 's/#ifdef CRASH_HANDLER_ENABLED/#if defined(CRASH_HANDLER_ENABLED) \&\& defined(__GLIBC__)/' \
      platform/x11/crash_handler_x11.cpp

# Fix build with GCC13
clsed '/^#define/a#include <cstdint>' \
    modules/fbx/fbx_parser/FBXCommon.h \
    thirdparty/vhacd/inc/vhacdManifoldMesh.h

scons \
    platform=x11 \
    target=release_debug \
    tools=yes \
    dev=no \
    progress=yes \
    arch=x64 \
    builtin_libwebp=false \
    builtin_zlib=false \
    builtin_freetype=false \
    builtin_libvorbis=false \
    builtin_libogg=false \
    builtin_opus=false \
    builtin_libtheora=false

clinst -Dm755 bin/godot.x11.opt.tools.x64 "$1/usr/bin/godot3"
clinst -Dm644 icon.png                    "$1/usr/share/pixmaps/godot.png"
clinst -Dm644 godot3.desktop              "$1/usr/share/applications/godot3.desktop"
ln -s godot3 "$1/usr/bin/godot"