void-packages/srcpkgs/sdlmame/template

74 lines
2.2 KiB
Text
Raw Normal View History

2011-10-25 22:39:43 +00:00
# Template file for 'mame'
pkgname=sdlmame
2014-11-27 15:40:23 +00:00
_distver=0156
2013-01-14 10:49:05 +00:00
_patchver=0
2012-07-03 13:15:09 +00:00
version=${_distver}u${_patchver}
2014-11-27 15:40:23 +00:00
revision=1
2011-10-25 22:39:43 +00:00
wrksrc=mame-${_distver}s
homepage="http://mamedev.org"
distfiles="${homepage}/downloader.php?file=releases/mame${_distver}s.zip"
2013-01-14 10:49:05 +00:00
short_desc="A port of the popular Multiple Arcade Machine Emulator using SDL with OpenGL support"
2011-10-25 22:39:43 +00:00
maintainer="Juan RP <xtraeme@gmail.com>"
license="mame"
2014-11-27 15:40:23 +00:00
checksum=9d7b63f3484583c5dbb46f610508b35195f61f0d395e5d4a4bf005f313a140c2
2011-10-25 22:39:43 +00:00
2014-11-27 15:42:10 +00:00
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
2011-10-25 22:39:43 +00:00
do_extract() {
# mame source code is double-zipped to save space.
cd ${wrksrc}
unzip -q ${XBPS_SRCDISTDIR}/${pkgname}-${version}/$(basename $distfiles)
2011-10-25 22:39:43 +00:00
unzip -q mame.zip
rm -f mame.zip
2012-01-09 16:49:26 +00:00
find . -type f -not -name \*.png | xargs perl -pi -e 's/\r\n?/\n/g'
2011-10-25 22:39:43 +00:00
# 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
2011-10-25 22:39:43 +00:00
rm -f ${_patch}_diff
done
}
do_build() {
2012-07-31 12:44:25 +00:00
make NOWERROR=1 ${makejobs}
make NOWERROR=1 ${makejobs} tools
2011-10-25 22:39:43 +00:00
}
do_install() {
# Install the sdlmame script
2014-11-27 15:40:23 +00:00
vbin ${FILESDIR}/${pkgname}.sh ${pkgname}
2011-10-25 22:39:43 +00:00
# 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/sdl/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
2014-10-26 10:40:10 +00:00
vlicense docs/license.txt LICENSE
2011-10-25 22:39:43 +00:00
}