void-packages/srcpkgs/sdlmame/template
2011-11-15 18:21:10 +01:00

97 lines
2.6 KiB
Text

# Template file for 'mame'
pkgname=sdlmame
_distver=0144
# _patchver=8
if [ -n "${_patchver}" ]; then
version=${_distver}u${_patchver}
else
version=${_distver}s
fi
wrksrc=mame-${_distver}s
homepage="http://mamedev.org"
distfiles="${homepage}/downloader.php?file=releases/mame${_distver}s.zip"
short_desc="Multiple Arcade Machine Emulator"
maintainer="Juan RP <xtraeme@gmail.com>"
license="mame"
checksum=8f0191b40f80f8a3393d341f411c5f02aca6933d6a9f347bec0d2f7206c38e06
long_desc="
A port of the popular Multiple Arcade Machine Emulator using SDL with
OpenGL support."
noextract=yes
Add_dependency build pkg-config
Add_dependency build SDL-devel
Add_dependency build SDL_ttf-devel
Add_dependency build libXinerama-devel
Add_dependency build gtk+-devel
Add_dependency build GConf-devel
Add_dependency full liberation-fonts-ttf
do_extract() {
# mame source code is double-zipped to save space.
cd ${wrksrc}
unzip -q ${XBPS_SRCDISTDIR}/$(basename $distfiles)
unzip -q mame.zip
rm -f mame.zip
# XXX disabled, patches can't be applied?
# Download and apply released patches.
if false; then
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
fi
}
do_build() {
sed -i 's/-Werror//' makefile
sed -i 's/\(LDFLAGS = -Wl,--warn-common\)/\1 -Wl,-zmuldefs/' makefile
if [ "$XBPS_MACHINE" = "x86_64" ]; then
makeargs="AMD64=1 PTR64=1"
else
makeargs="I686=1"
fi
make ${makeargs} ${makejobs}
make ${makeargs} ${makejobs} tools
}
do_install() {
# Install the sdlmame script
vinstall ${FILESDIR}/${pkgname}.sh 755 usr/bin ${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/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
vinstall docs/license.txt 644 usr/share/licenses/${pkgname}
}