blob: 314638cd16de6b5ed17e00f232fc84ad1d40ab4c (
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
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
|
# Contributor: Taner Tas <taner76@gmail.com>
# Maintainer: Taner Tas <taner76@gmail.com>
pkgname=mame
pkgver=0.201
_pkgver=${pkgver/.}
pkgrel=0
pkgdesc="Multi Arcade Machine Emulator with GroovyMAME/Switchres/No-nag patchset."
url="https://mamedev.org"
arch="all"
license="GPL-2.0-or-later"
depends="$pkgname-common"
makedepends="
alsa-lib-dev
asio-dev
clang-dev
coreutils
dos2unix
expat-dev
flac-dev
fontconfig-dev
glm-dev
libjpeg-turbo-dev
libxinerama-dev
libxrandr-dev
lua5.3-dev
mesa-dev
nasm
portaudio-dev
portmidi-dev
python2-dev
py3-sphinx
rapidjson-dev
sdl2-dev
sdl2_ttf-dev
sqlite-dev
zlib-dev
"
subpackages="
$pkgname-common::noarch
$pkgname-arcade
$pkgname-mess
$pkgname-data::noarch
$pkgname-doc
$pkgname-lang
$pkgname-tools
$pkgname-plugins::noarch
"
_groovymame_patch=groovymame-$pkgver.diff
source="
https://github.com/mamedev/mame/archive/$pkgname$_pkgver.tar.gz
$_groovymame_patch::https://drive.google.com/uc?export=download&id=1ruDLYXbD8Y1lSUZ4ZNZlzbWWqw0-Zi1O
mame.ini
midi.conf
fix-musl.patch
m68000_archopts.patch
nonag.patch
SubtargetArcade_0200u0.diff
"
options="!check" # No test suite
builddir="$srcdir"/$pkgname-$pkgname${pkgver/.}
prepare() {
cd "$builddir"
#clang workaraound
sed -i -e 's/-flifetime-dse=1//g' scripts/genie.lua
default_prepare
cp "$srcdir"/$_groovymame_patch . && dos2unix $_groovymame_patch
patch -p0 < $_groovymame_patch
}
build() {
#clang builds have better benchmark score and smaller size
export OVERRIDE_CC=clang
export OVERRIDE_CXX=clang++
export CFLAGS="$CFLAGS -I/usr/include/lua5.3 -DBX_CRT_MUSL -Wno-everything"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="$LDFLAGS -L/usr/lib/lua5.3"
case "$CARCH" in
x86|armhf) _PTR64=0 _SYMBOLS=0;;
*) _PTR64=1 _SYMBOLS=1;;
esac
case "$CARCH" in
x86_64|x86) _NOASM=0 ;;
*) _NOASM=1 ;;
esac
case "$CARCH" in
s390x) _BIGENDIAN=1 ;;
*) _BIGENDIAN=0 ;;
esac
_build="make
TARGETOS=linux
NOWERROR=1
DEBUG=0
USE_QTDEBUG=0
VERBOSE=1
REGENIE=1
OSD=sdl
SYMBOLS=$_SYMBOLS
FORCE_DRC_C_BACKEND=
PTR64=$_PTR64
NOASM=$_NOASM
BIGENDIAN=$_BIGENDIAN
TOOLS=
SDL_INI_PATH=/etc/mame
USE_SYSTEM_LIB_EXPAT=1
USE_SYSTEM_LIB_ZLIB=1
USE_SYSTEM_LIB_JPEG=1
USE_SYSTEM_LIB_FLAC=1
USE_SYSTEM_LIB_LUA=1
USE_SYSTEM_LIB_SQLITE3=1
USE_SYSTEM_LIB_PORTAUDIO=1
USE_SYSTEM_LIB_UV=1
USE_SYSTEM_LIB_GLM=1
USE_SYSTEM_LIB_RAPIDJSON=1
USE_SYSTEM_LIB_PORTMIDI=1
USE_SYSTEM_LIB_ASIO=1"
cd "$builddir"
[ -f mame ] || [ -f mame64 ] || $_build TOOLS=1 SUBTARGET=mame
[ -f mamearcade ] || [ -f mamearcade64 ] || $_build SUBTARGET=arcade
[ -f mess ] || [ -f mess64 ] || $_build SUBTARGET=mess
}
package() {
cd "$builddir"
install -D -m755 mame "$pkgdir"/usr/bin/mame || \
install -D -m755 mame64 "$pkgdir"/usr/bin/mame
install -D -m644 docs/man/mame.6 "$pkgdir"/usr/share/man/man6/mame.6
for i in castool.1 \
chdman.1 \
floptool.1 \
imgtool.1 \
jedutil.1 \
ldresample.1 \
ldverify.1 \
romcmp.1
do
install -D -m644 docs/man/"$i" "$pkgdir"/usr/share/man/man1/"$i"
done
}
common() {
cd "$builddir"
pkgdesc="MAME - Common configuration files"
install -D -m644 "$srcdir"/mame.ini "$subpkgdir"/etc/mame/mame.ini
install -D -m644 "$srcdir"/midi.conf "$subpkgdir"/etc/modules-load.d/midi.conf
install -d -m755 "$subpkgdir"/usr/share/$pkgname/roms
}
arcade() {
pkgdesc="Multi Arcade Machine Emulator - Arcade specific build."
cd "$builddir"
install -D -m755 mamearcade "$subpkgdir"/usr/bin/mamearcade || \
install -D -m755 mamearcade64 "$subpkgdir"/usr/bin/mamearcade
ln -s mamearcade "$subpkgdir"/usr/bin/arcade
}
mess() {
pkgdesc="Multi Arcade Machine Emulator - Mess specific build."
cd "$builddir"
install -D -m755 mess "$subpkgdir"/usr/bin/mess || \
install -D -m755 mess64 "$subpkgdir"/usr/bin/mess
}
data() {
pkgdesc="Distribution data files for MAME"
cd "$builddir"
mkdir -p "$subpkgdir"/usr/share/$pkgname
for i in artwork \
bgfx \
hash \
hlsl \
ini \
keymaps \
samples
do
cp -r "$i" "$subpkgdir"/usr/share/$pkgname
done
rm -rf "$subpkgdir"/usr/share/$pkgname/bgfx/shaders/dx11
rm -rf "$subpkgdir"/usr/share/$pkgname/bgfx/shaders/dx9
rm -rf "$subpkgdir"/usr/share/$pkgname/bgfx/shaders/metal
}
plugins() {
pkgdesc="Distribution plugins for MAME"
cd "$builddir"
mkdir -p "$subpkgdir"/usr/share/$pkgname
cp -r plugins "$subpkgdir"/usr/share/$pkgname/
}
tools() {
pkgdesc="Tools for MAME"
cd "$builddir"
mkdir -p "$subpkgdir"/usr/bin
for i in castool \
chdman \
floptool \
imgtool \
jedutil \
ldresample \
ldverify \
romcmp
do
install -sm755 "$i" "$subpkgdir"/usr/bin
done
}
lang() {
pkgdesc="Localization files for MAME"
cd "$builddir"
mkdir -p "$subpkgdir"/usr/share/$pkgname
cp -r language "$subpkgdir"/usr/share/$pkgname/
}
sha512sums="e82ce0f3b52db88a2efc5a93f6da3174304b6549f19ffb5dd293d97b5630c8f89bb3def7e62cbebf2f75ecab8b5d4c21242775ed094a765207081cbe52636b2d mame0201.tar.gz
a9900699c3c28930d6bb7f8f72b79b25456907e5a59abef4daab87ffd0bbae0e611fe3ed9f414516daf4e9773b15b459d00056860fe21f908dab9bc79da3ad65 groovymame-0.201.diff
dc008245cbea0b94f58d83e09bf5fd3fff04ac0e2f3a36b910a8b7633c5377419fc67a1fd366ef268e283f744d9a8d29928cfacf456b3edaa2d0b1a11d46a701 mame.ini
8f83ff5a916f4ff8e86c5afbdfe4475f7780bb36c20c78d6d029d0eb0dafd77b3471faa538aca384001d2049dc94c4df3429c67d743adde9fd6329c91e6d19a2 midi.conf
75bba366aebb37de7758368fbf7418194a18d535e61c1768e6c2c5cf4b3b7a2f625ef687cb8278c03daa9e308951df4c0bdcc944dfcc4ce5305f5ac83e5e049b fix-musl.patch
a4d628d4648d28b9ae95f27ecba4a70b999ef11ffde31b31ca3ce2ed2fd4cfcab82ec78e2602309952518fac8c549d0b8b4294f6aa34c1acaa77f012ea13de9e m68000_archopts.patch
864816a55f35f9d485ccd143a1e0acd76d47239a6d5344be2a76b50fd4efbdfb4f3e45318d7dfda67faa63c0a52022f2e8313f058965a1eba60e6ca4677a519b nonag.patch
3796c725efb886f953c372b947a84dd6e09d59d0be9abc3c3c73625beeb7f3bdcc6e8c8057c3f59e297ed92fd5077b52a69a2de6dacb005b21cf552e4e641a4a SubtargetArcade_0200u0.diff"
|