74 lines
2.3 KiB
Bash
74 lines
2.3 KiB
Bash
# Template file for 'mame'
|
|
pkgname=sdlmame
|
|
_distver=0160
|
|
_patchver=0
|
|
version=${_distver}u${_patchver}
|
|
revision=1
|
|
wrksrc="mame-${_distver}s"
|
|
homepage="http://mamedev.org"
|
|
distfiles="${homepage}/downloader.php?file=releases/mame${_distver}s.zip"
|
|
short_desc="A port of the popular Multiple Arcade Machine Emulator using SDL with OpenGL support"
|
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
|
license="mame"
|
|
checksum=6582dfad7e12b360d2931444dbb286a9f3aee8790b38bdf79e32cbee7011dcb5
|
|
|
|
hostmakedepends="unzip perl pkg-config python automoc4"
|
|
makedepends="SDL2_ttf-devel fontconfig-devel libXinerama-devel qt-devel alsa-lib-devel"
|
|
depends="liberation-fonts-ttf"
|
|
repository="nonfree"
|
|
nocross=yes
|
|
|
|
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 | xargs perl -pi -e 's/\r\n?/\n/g'
|
|
|
|
# Download and apply released patches.
|
|
for p in $(seq -w 1 ${_patchver}); do
|
|
_patch=${_distver}u${p}
|
|
msg_normal "Fetching patch: ${_patch} ...\n"
|
|
${XBPS_FETCH_CMD} ${homepage}/updates/${_patch}_diff.zip
|
|
msg_normal "Applying patch: ${_patch} ...\n"
|
|
unzip -q ${_patch}_diff.zip
|
|
patch -p0 -E -i ${_patch}.diff
|
|
rm -f ${_patch}_diff
|
|
done
|
|
}
|
|
do_build() {
|
|
make NOWERROR=1 ${makejobs}
|
|
make NOWERROR=1 ${makejobs} tools
|
|
}
|
|
do_install() {
|
|
# Install the sdlmame 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; do
|
|
vinstall ${f} 755 usr/share/${pkgname}
|
|
done
|
|
|
|
# Install the extra bits
|
|
install -d ${DESTDIR}/usr/share/${pkgname}/{artwork,ctrlr,keymaps,shader}
|
|
install -d ${DESTDIR}/usr/share/man/man1
|
|
install -m644 src/osd/modules/opengl/shader/glsl*.*h \
|
|
${DESTDIR}/usr/share/${pkgname}/shader
|
|
install -m644 src/osd/sdl/man/* ${DESTDIR}/usr/share/man/man1
|
|
|
|
install -m644 artwork/* ${DESTDIR}/usr/share/${pkgname}/artwork
|
|
install -m644 src/osd/sdl/keymaps/* \
|
|
${DESTDIR}/usr/share/${pkgname}/keymaps
|
|
|
|
# Include the license
|
|
vlicense docs/license.txt LICENSE
|
|
}
|