diff --git a/srcpkgs/sdlmame/files/sdlmess.sh b/srcpkgs/sdlmame/files/sdlmess.sh new file mode 100644 index 00000000000..77e609ab1c2 --- /dev/null +++ b/srcpkgs/sdlmame/files/sdlmess.sh @@ -0,0 +1,45 @@ +#!/bin/sh + +exec_mess() { + /usr/share/sdlmess/sdlmess \ + -artpath "$HOME/.mess/artwork;artwork" \ + -ctrlrpath "$HOME/.mess/ctrlr;ctrlr" \ + -inipath $HOME/.mess/ini \ + -rompath $HOME/.mess/roms \ + -samplepath $HOME/.mess/samples \ + -cfg_directory $HOME/.mess/cfg \ + -comment_directory $HOME/.mess/comments \ + -diff_directory $HOME/.mess/diff \ + -input_directory $HOME/.mess/inp \ + -nvram_directory $HOME/.mess/nvram \ + -snapshot_directory $HOME/.mess/snap \ + -state_directory $HOME/.mess/sta \ + -video opengl \ + -createconfig +} + +if [ "$1" = "--newini" ]; then + echo "Rebuilding the ini file at $HOME/.mess/sdlmess.ini" + echo "Modify this file for permanent changes to your SDLMESS" + echo "options and paths before running SDLMESS again." + cd $HOME/.mess + if [ -e mess.ini ]; then + echo "Your old ini file has been renamed to mess.ini.bak" + mv mess.ini mess.ini.bak + fi + exec_mess +elif [ ! -e $HOME/.mess ]; then + echo "Running SDLMESS for the first time..." + echo "Creating an ini file for SDLMESS at $HOME/.mess/mess.ini" + echo "Modify this file for permanent changes to your SDLMESS" + echo "options and paths before running SDLMESS again." + mkdir $HOME/.mess + for f in artwork cfg comments ctrlr diff ini ip nvram \ + samples snap sta roms; do + mkdir $HOME/.mess/${f} + done + cd $HOME/.mess && exec_mess +else + cd /usr/share/sdlmess + ./sdlmess "$@" +fi diff --git a/srcpkgs/sdlmame/template b/srcpkgs/sdlmame/template index 56561419d19..8bdf302010b 100644 --- a/srcpkgs/sdlmame/template +++ b/srcpkgs/sdlmame/template @@ -1,19 +1,19 @@ # Template file for 'mame' pkgname=sdlmame -_distver=0160 +_distver=0161 _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" +short_desc="The Multiple Arcade Machine Emulator with SDL+OpenGL support" maintainer="Juan RP " license="mame" -checksum=6582dfad7e12b360d2931444dbb286a9f3aee8790b38bdf79e32cbee7011dcb5 +checksum=c0ba4c8e6ea7a491cbf7b317221d03c916dee53ca3cde4ff26adbc478a395a0f hostmakedepends="unzip perl pkg-config python automoc4" -makedepends="SDL2_ttf-devel fontconfig-devel libXinerama-devel qt-devel alsa-lib-devel" +makedepends="SDL2_ttf-devel fontconfig-devel libXinerama-devel qt-devel alsa-lib-devel lua-devel" depends="liberation-fonts-ttf" repository="nonfree" nocross=yes @@ -24,7 +24,7 @@ do_extract() { 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' + find . -type f -not -name \*.png -print0 | xargs -0 perl -pi -e 's/\r\n?/\n/g' # Download and apply released patches. for p in $(seq -w 1 ${_patchver}); do @@ -38,8 +38,9 @@ do_extract() { done } do_build() { - make NOWERROR=1 ${makejobs} - make NOWERROR=1 ${makejobs} tools + # REGENIE=1 rebuild genie binary and dependencies + # TOOLS=1 replaces target tools + make REGENIE=1 NOWERROR=1 TOOLS=1 ${makejobs} } do_install() { # Install the sdlmame script @@ -53,16 +54,18 @@ do_install() { fi for f in chdman jedutil regrep romcmp testkeys src2html srcclean \ - ldverify ldresample; do + ldverify ldresample unidasm; 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 # 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/* \ @@ -71,3 +74,26 @@ do_install() { # Include the license vlicense docs/license.txt LICENSE } + +sdlmess_package() { + depends="sdlmame-${version}_${revision}" + short_desc+=" - Multi Emulator Super System (MESS) package" + pkg_install() { + make TARGET=mess NOWERROR=1 TOOLS=1 ${makejobs} + # Install the application + vmkdir usr/share/${pkgname} + if [ -r mess64 ]; then + vinstall mess64 755 usr/share/${pkgname} ${pkgname} + else + vinstall mess 755 usr/share/${pkgname} ${pkgname} + fi + # Install MESS specific tools and man pages + for f in castool floptool imgtool; do + vinstall $f 755 usr/share/${pkgname} + vman src/osd/sdl/man/$f.1 + done + vman src/osd/sdl/man/mess.6 + # Install the sdlmess script + vbin ${FILESDIR}/${pkgname}.sh ${pkgname} + } +} diff --git a/srcpkgs/sdlmess b/srcpkgs/sdlmess new file mode 120000 index 00000000000..417c6e1b091 --- /dev/null +++ b/srcpkgs/sdlmess @@ -0,0 +1 @@ +sdlmame \ No newline at end of file