@@ -23,13 +23,17 @@ function _get_branch_mame() {
23
23
24
24
function depends_mame() {
25
25
if [[ " $__gcc_version " -lt 7 ]]; then
26
- md_ret_errors+=(" Sorry, you need an OS with gcc 7 or newer to compile $md_id " )
26
+ md_ret_errors+=(" Sorry, you need an OS with gcc 7.2 or newer to compile $md_id " )
27
27
return 1
28
28
fi
29
29
30
30
# Install required libraries required for compilation and running
31
31
# Note: libxi-dev is required as of v0.210, because of flag changes for XInput
32
- getDepends libfontconfig1-dev qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libsdl2-ttf-dev libxinerama-dev libxi-dev libpulse-dev
32
+ local depends=(libfontconfig1-dev libsdl2-ttf-dev libflac-dev libxinerama-dev libxi-dev libpulse-dev libzstd-dev)
33
+ # build the MAME debugger only on X11 (desktop) platforms
34
+ isPlatform " x11" && depends+=(qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools)
35
+
36
+ getDepends " ${depends[@]} "
33
37
}
34
38
35
39
function sources_mame() {
@@ -41,24 +45,26 @@ function sources_mame() {
41
45
function build_mame() {
42
46
# More memory is required for 64bit platforms
43
47
if isPlatform " 64bit" ; then
44
- rpSwap on 8192
48
+ rpSwap on 10240
45
49
else
46
- rpSwap on 4096
50
+ rpSwap on 8192
47
51
fi
48
52
49
- local params=(NOWERROR=1 ARCHOPTS=-U_FORTIFY_SOURCE PYTHON_EXECUTABLE=python3)
53
+ local params=(NOWERROR=1 ARCHOPTS=-U_FORTIFY_SOURCE PYTHON_EXECUTABLE=python3 OPTIMIZE=2 USE_SYSTEM_LIB_FLAC=1 USE_SYSTEM_LIB_ZSTD=1)
54
+ isPlatform " x11" && params+=(USE_QTDEBUG=1) || params+=(USE_QTDEBUG=0)
50
55
# when building on ARM enable 'fsigned-char' for compiled code, fixes crashes in a few drivers
51
56
isPlatform " arm" || isPlatform " aarch64" && params+=(ARCHOPTS_CXX=-fsigned-char)
52
57
58
+ # tell the linker to remove debugging info
59
+ LDFLAGS+=" -s"
60
+
53
61
# workaround for linker crash on bullseye (use gold linker)
54
62
if [[ " $__os_debian_ver " -eq 11 ]] && isPlatform " arm" ; then
55
- QT_SELECT=5 LDFLAGS+=" -fuse-ld=gold -Wl,--long-plt" make " ${params[@]} "
63
+ LDFLAGS+=" -fuse-ld=gold -Wl,--long-plt" make " ${params[@]} "
56
64
else
57
65
QT_SELECT=5 make " ${params[@]} "
58
66
fi
59
67
60
- strip mame
61
-
62
68
rpSwap off
63
69
md_ret_require=" $md_build /mame"
64
70
}
0 commit comments