# Maintainer: Antonio Rojas # Contributor: Sergej Pupykin # Contributor: robb_force # Contributor: JJDaNiMoTh # ALARM: Kevin Mihelich # - install 'mame' instead of 'mame64' highmem=1 pkgname=mame pkgver=0.211 pkgrel=1 pkgdesc="A port of the popular Multiple Arcade Machine Emulator using SDL with OpenGL support." url="https://mamedev.org/" license=(GPL2) arch=(x86_64) depends=(sdl2_ttf qt5-base lua libutf8proc pugixml portmidi portaudio) makedepends=(nasm python asio rapidjson glm libxinerama) conflicts=(sdlmame) replaces=(sdlmame) source=("https://github.com/mamedev/mame/archive/mame${pkgver/./}.tar.gz" mame.sh) sha256sums=('427eacd8f3a1077fa504aacf9d004c2d709a44dc79defb9247fa6f7bb736134b' 'ee1c59bafc5e5441e99fa4c58108a3e18048e60672f34de865c8a5a976094dba') prepare() { cd mame-mame${pkgver/./} # Use system libraries sed -e 's|\# USE_SYSTEM_LIB|USE_SYSTEM_LIB|g' -i makefile } build() { cd mame-mame${pkgver/./} make \ NOWERROR=1 \ OPTIMIZE=2 \ TOOLS=1 \ ARCHOPTS=-flifetime-dse=1 } package() { cd mame-mame${pkgver/./} # Install the mame script install -Dm755 "$srcdir"/$pkgname.sh "$pkgdir"/usr/bin/$pkgname # Install the binaries install -Dm755 mame "$pkgdir"/usr/lib/mame/mame for _i in castool chdman imgtool jedutil nltool nlwav pngcmp regrep romcmp src2html \ split srcclean ldverify ldresample; do install -m755 $_i -t "$pkgdir"/usr/lib/mame ln -s /usr/lib/mame/$_i "$pkgdir"/usr/bin/mame-$_i done # Install the extra bits install -Dm644 src/osd/modules/opengl/shader/glsl*.*h -t "$pkgdir"/usr/lib/$pkgname/shader/ cp -ar {artwork,bgfx,plugins,language,ctrlr,keymaps,hash} "$pkgdir"/usr/lib/$pkgname/ # Include the license install -Dm644 docs/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE # FS#28203 sed -i 's|KEYCODE_2_PAD|KEYCODE_2PAD|' "$pkgdir"/usr/lib/mame/ctrlr/*.cfg sed -i 's|KEYCODE_4_PAD|KEYCODE_4PAD|' "$pkgdir"/usr/lib/mame/ctrlr/*.cfg sed -i 's|KEYCODE_6_PAD|KEYCODE_6PAD|' "$pkgdir"/usr/lib/mame/ctrlr/*.cfg sed -i 's|KEYCODE_8_PAD|KEYCODE_8PAD|' "$pkgdir"/usr/lib/mame/ctrlr/*.cfg # documentation install -dm0755 "$pkgdir"/usr/share/doc cp -a docs "$pkgdir"/usr/share/doc/$pkgname rm -r "$pkgdir"/usr/share/doc/$pkgname/man install -d "$pkgdir"/usr/share/man/man{1,6} install -m644 docs/man/*.1* "$pkgdir"/usr/share/man/man1/ install -m644 docs/man/*.6* "$pkgdir"/usr/share/man/man6/ }