New package: sdlmame-0143s.

This commit is contained in:
Juan RP 2011-10-26 00:39:43 +02:00
parent 1e1f4be6a7
commit 9f65b80448
2 changed files with 160 additions and 0 deletions

View File

@ -0,0 +1,46 @@
#!/bin/sh
exec_make() {
/usr/share/sdlmame/sdlmame \
-artpath "$HOME/.mame/artwork;artwork" \
-ctrlrpath "$HOME/.mame/ctrlr;ctrlr" \
-inipath $HOME/.mame/ini \
-rompath $HOME/.mame/roms \
-samplepath $HOME/.mame/samples \
-cfg_directory $HOME/.mame/cfg \
-comment_directory $HOME/.mame/comments \
-diff_directory $HOME/.mame/diff \
-input_directory $HOME/.mame/inp \
-memcard_directory $HOME/.mame/memcard \
-nvram_directory $HOME/.mame/nvram \
-snapshot_directory $HOME/.mame/snap \
-state_directory $HOME/.mame/sta \
-video opengl \
-createconfig
}
if [ "$1" = "--newini" ]; then
echo "Rebuilding the ini file at $HOME/.mame/sdlmame.ini"
echo "Modify this file for permanent changes to your SDLMAME"
echo "options and paths before running SDLMAME again."
cd $HOME/.mame
if [ -e sdlmame.ini ]; then
echo "Your old ini file has been renamed to sdlmameini.bak"
mv sdlmame.ini sdlmameini.bak
fi
exec_make
elif [ ! -e $HOME/.mame ]; then
echo "Running SDLMAME for the first time..."
echo "Creating an ini file for SDLMAME at $HOME/.mame/sdlmame.ini"
echo "Modify this file for permanent changes to your SDLMAME"
echo "options and paths before running SDLMAME again."
mkdir $HOME/.mame
for f in artwork cfg comments ctrlr diff ini ip memcard nvram \
samples snap sta roms; do
mkdir $HOME/.mame/${f}
done
cd $HOME/.mame && exec_mame
else
cd /usr/share/sdlmame
./sdlmame "$@"
fi

114
srcpkgs/sdlmame/template Normal file
View File

@ -0,0 +1,114 @@
# Template file for 'mame'
pkgname=sdlmame
_distver=0143
# _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=677f04756ed7bc00e1adc6e68bbb174f89845887758dc287c7244a58e6ac266f
long_desc="
A port of the popular Multiple Arcade Machine Emulator using SDL with
OpenGL support."
noextract=yes
Add_dependency run libgcc
Add_dependency run glibc
Add_dependency run libstdc++
Add_dependency run atk
Add_dependency run glib
Add_dependency run pango
Add_dependency run gdk-pixbuf
Add_dependency run cairo
Add_dependency run freetype
Add_dependency run fontconfig
Add_dependency run libX11
Add_dependency run libXinerama
Add_dependency run gtk+
Add_dependency run SDL
Add_dependency run SDL_ttf
Add_dependency run GConf
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}
}