72 lines
2.3 KiB
Bash
72 lines
2.3 KiB
Bash
# Template file for 'mame'
|
|
pkgname=mame
|
|
version=0162
|
|
revision=3
|
|
wrksrc="mame-${version}s"
|
|
homepage="http://mamedev.org"
|
|
distfiles="https://github.com/mamedev/$pkgname/releases/download/${pkgname}${version}/${pkgname}${version}s.zip"
|
|
short_desc="The Multiple Arcade Machine Emulator"
|
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
|
license="mame"
|
|
checksum=8342af35ab8cc9498d3ade5947bf2376bbfdd40883a532cae9b09c63ace99d7e
|
|
|
|
hostmakedepends="unzip perl pkg-config python automoc4"
|
|
makedepends="SDL2_ttf-devel fontconfig-devel libXinerama-devel qt-devel alsa-lib-devel lua-devel"
|
|
depends="liberation-fonts-ttf"
|
|
nocross=yes
|
|
repository="nonfree"
|
|
replaces="sdlmame>=0 sdlmess>=0"
|
|
|
|
do_extract() {
|
|
# mame source code is double-zipped to save space.
|
|
cd ${wrksrc}
|
|
unzip -q ${XBPS_SRCDISTDIR}/${pkgname}-${version}/$(basename $distfiles)
|
|
unzip -q mame.zip
|
|
rm -f mame.zip
|
|
find . -type f -not -name \*.png -print0 | xargs -0 perl -pi -e 's/\r\n?/\n/g'
|
|
}
|
|
do_build() {
|
|
local opts="REGENIE=1 NOWERROR=1 TOOLS=1 OPTIMIZE=3"
|
|
if [ "${CROSS_BUILD}" ]; then
|
|
# Doesn't work yet because of qt (which can't be cross compiled ?)
|
|
opts+=" CROSS_BUILD=1 OVERRIDE_CC=${CC} OVERRIDE_CXX=${CXX} OVERRIDE_LD=${CC}"
|
|
fi
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
*-musl) opts+=" NO_MEM_TRACKING=1" ;;
|
|
esac
|
|
make ${opts} ${makejobs}
|
|
}
|
|
do_install() {
|
|
# Install the mame script
|
|
vbin ${FILESDIR}/${pkgname}.sh ${pkgname}
|
|
|
|
# Install the applications and the UI font in /usr/share
|
|
if [ -r mame64 ]; then
|
|
vinstall mame64 755 usr/share/${pkgname} ${pkgname}
|
|
else
|
|
vinstall mame 755 usr/share/${pkgname} ${pkgname}
|
|
fi
|
|
|
|
for f in chdman jedutil regrep romcmp testkeys src2html srcclean \
|
|
ldverify ldresample unidasm castool floptool imgtool; do
|
|
vinstall ${f} 755 usr/share/${pkgname}
|
|
if [ -f src/osd/sdl/man/${f}.1 ]; then
|
|
vman src/osd/sdl/man/${f}.1
|
|
fi
|
|
done
|
|
vman src/osd/sdl/man/mame.6
|
|
# Currently mess.6 still exists, so install it as well
|
|
vman src/osd/sdl/man/mess.6
|
|
|
|
# Install the extra bits
|
|
install -d ${DESTDIR}/usr/share/${pkgname}/{artwork,ctrlr,keymaps,shader}
|
|
install -m644 src/osd/modules/opengl/shader/glsl*.*h \
|
|
${DESTDIR}/usr/share/${pkgname}/shader
|
|
|
|
install -m644 artwork/* ${DESTDIR}/usr/share/${pkgname}/artwork
|
|
install -m644 src/osd/sdl/keymaps/* \
|
|
${DESTDIR}/usr/share/${pkgname}/keymaps
|
|
|
|
# Include the license
|
|
vlicense docs/mamelicense.txt LICENSE
|
|
}
|