From e533172819b8a592bbad459c03930d64ef5d9142 Mon Sep 17 00:00:00 2001 From: jbu Date: Wed, 27 May 2015 17:35:57 +0200 Subject: [PATCH] mame: update to 0.162 and rename from sdlmame - rename sdlmame -> mame - remove handling of (no longer to be expected) 'u' patch versions - now contains all mame and mess drivers in one binary - replaces sdlmame and sdlmess - the license did not change yet; plans are to move to GPL with next release --- .../files/sdlmame.sh => mame/files/mame.sh} | 8 +-- srcpkgs/{sdlmame => mame}/template | 68 ++++++------------- srcpkgs/sdlmame/files/sdlmess.sh | 45 ------------ srcpkgs/sdlmess | 1 - 4 files changed, 23 insertions(+), 99 deletions(-) rename srcpkgs/{sdlmame/files/sdlmame.sh => mame/files/mame.sh} (90%) rename srcpkgs/{sdlmame => mame}/template (50%) delete mode 100644 srcpkgs/sdlmame/files/sdlmess.sh delete mode 120000 srcpkgs/sdlmess diff --git a/srcpkgs/sdlmame/files/sdlmame.sh b/srcpkgs/mame/files/mame.sh similarity index 90% rename from srcpkgs/sdlmame/files/sdlmame.sh rename to srcpkgs/mame/files/mame.sh index c73459188e..de418a3685 100644 --- a/srcpkgs/sdlmame/files/sdlmame.sh +++ b/srcpkgs/mame/files/mame.sh @@ -1,7 +1,7 @@ #!/bin/sh exec_mame() { - /usr/share/sdlmame/sdlmame \ + /usr/share/mame/mame \ -artpath "$HOME/.mame/artwork;artwork" \ -ctrlrpath "$HOME/.mame/ctrlr;ctrlr" \ -inipath $HOME/.mame/ini \ @@ -19,7 +19,7 @@ exec_mame() { } if [ "$1" = "--newini" ]; then - echo "Rebuilding the ini file at $HOME/.mame/sdlmame.ini" + echo "Rebuilding the ini file at $HOME/.mame/mame.ini" echo "Modify this file for permanent changes to your SDLMAME" echo "options and paths before running SDLMAME again." cd $HOME/.mame @@ -40,6 +40,6 @@ elif [ ! -e $HOME/.mame ]; then done cd $HOME/.mame && exec_mame else - cd /usr/share/sdlmame - ./sdlmame "$@" + cd /usr/share/mame + ./mame "$@" fi diff --git a/srcpkgs/sdlmame/template b/srcpkgs/mame/template similarity index 50% rename from srcpkgs/sdlmame/template rename to srcpkgs/mame/template index 69909c5742..88502e3b50 100644 --- a/srcpkgs/sdlmame/template +++ b/srcpkgs/mame/template @@ -1,22 +1,21 @@ # Template file for 'mame' -pkgname=sdlmame -_distver=0161 -_patchver=0 -version=${_distver}u${_patchver} -revision=2 -wrksrc="mame-${_distver}s" +pkgname=mame +version=0162 +revision=1 +wrksrc="mame-${version}s" homepage="http://mamedev.org" -distfiles="${homepage}/downloader.php?file=releases/mame${_distver}s.zip" +distfiles="https://github.com/mamedev/$pkgname/releases/download/${pkgname}${version}/${pkgname}${version}s.zip" short_desc="The Multiple Arcade Machine Emulator" maintainer="Juan RP " license="mame" -checksum=c0ba4c8e6ea7a491cbf7b317221d03c916dee53ca3cde4ff26adbc478a395a0f +checksum=8342af35ab8cc9498d3ade5947bf2376bbfdd40883a532cae9b09c63ace99d7e hostmakedepends="unzip perl pkg-config python automoc4" makedepends="SDL2_ttf-devel fontconfig-devel libXinerama-devel qt-devel alsa-lib-devel lua-devel" depends="liberation-fonts-ttf" -repository="nonfree" nocross=yes +repository="nonfree" +replaces="sdlmame>=0 sdlmess>=0" do_extract() { # mame source code is double-zipped to save space. @@ -25,25 +24,17 @@ do_extract() { unzip -q mame.zip rm -f mame.zip 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 - _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() { - # REGENIE=1 rebuild genie binary and dependencies - # TOOLS=1 replaces target tools - make REGENIE=1 NOWERROR=1 TOOLS=1 ${makejobs} + local opts="REGENIE=1 NOWERROR=1 TOOLS=1 OPTIMIZE=3" + if [ "${CROSS_BUILD}" ]; then + # Doesn't work yet because of qt (which can't be cross compiled ?) + opts+=" CROSS_BUILD=1 OVERRIDE_CC=${CC} OVERRIDE_CXX=${CXX} OVERRIDE_LD=${CC}" + fi + make ${opts} ${makejobs} } do_install() { - # Install the sdlmame script + # Install the mame script vbin ${FILESDIR}/${pkgname}.sh ${pkgname} # Install the applications and the UI font in /usr/share @@ -54,13 +45,15 @@ do_install() { fi for f in chdman jedutil regrep romcmp testkeys src2html srcclean \ - ldverify ldresample unidasm; do + ldverify ldresample unidasm castool floptool imgtool; 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 + # Currently mess.6 still exists, so install it as well + vman src/osd/sdl/man/mess.6 # Install the extra bits install -d ${DESTDIR}/usr/share/${pkgname}/{artwork,ctrlr,keymaps,shader} @@ -72,28 +65,5 @@ do_install() { ${DESTDIR}/usr/share/${pkgname}/keymaps # Include the license - vlicense docs/license.txt LICENSE -} - -sdlmess_package() { - depends="sdlmame-${version}_${revision}" - short_desc+=" - Multi Emulator Super System (MESS)" - 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} - } + vlicense docs/mamelicense.txt LICENSE } diff --git a/srcpkgs/sdlmame/files/sdlmess.sh b/srcpkgs/sdlmame/files/sdlmess.sh deleted file mode 100644 index 77e609ab1c..0000000000 --- a/srcpkgs/sdlmame/files/sdlmess.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/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/sdlmess b/srcpkgs/sdlmess deleted file mode 120000 index 417c6e1b09..0000000000 --- a/srcpkgs/sdlmess +++ /dev/null @@ -1 +0,0 @@ -sdlmame \ No newline at end of file