X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by lists.alpinelinux.org (Postfix) with ESMTP id C9C535C5E74 for ; Mon, 16 Apr 2018 18:30:02 +0000 (GMT) Received: by mail-wr0-f194.google.com with SMTP id q13so25270108wre.3 for ; Mon, 16 Apr 2018 11:30:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qBx6zSHYUOwzdmzFg6AaIbZP+mv0R736gaYR7n1Y0lI=; b=UN1+yq1KV6ynrG1axeMLSOsrmg8Vv6OLkgOG1uRZBDNUQlw+rs9AXVu/sntaRvUHw+ RSoti2moSOng36U0VSbpHyt+81pMsZY1ZKs6bkhrrgRYKgXs6JBny0UCdeESUXC2LrZf 5eNCypaHHpEBryWd7bfcYToMhFu15vUHow0f6cLq5iQR8k35t59dpNHOmdcKjdDHKB5n M+EirTQ4Zhs+h0w/tXlz4I9YLNI9kp3qnDe5WPSdqJrVtw+7sMKGKhEOU2CiH4NtTuaR 3efkBrEPLEmPzo38bvx+7UdYQ6YeyvJ4P0wOSZYqGdB95nYdDl+IfeO1Jud4X+Eqcf45 p7xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qBx6zSHYUOwzdmzFg6AaIbZP+mv0R736gaYR7n1Y0lI=; b=ZR4n47ojSXS1olMNcgsUYfLR1pjgcSeMvKaiY6PxWBevtBwB18K3nyzKohHDfYyqET xXS4Zf4t3y2UEDNnPLpjdPsRgFfT0xoSyM1UoiAy0dTOWfLc97ZzbNoRRMpSHCu963vO uMmmcwjRY+WTsswM7OCNxvQ5/5a5OUAtJdOIKGILJCwFHQoXO0gpkjhn3cmPsGL579/p kCFWf/2+7UE10M6zwBFkDrJPVbX8tTHbJUN01bg5tmbisS4uv/obOaHj/W5/emkqo053 v3XEGuemC9gCc/FpDGslOJlCEXcOA0G4kL5BJi9UVzNE/H9BNolp6oN/mCRr1dTpa52e sjIA== X-Gm-Message-State: ALQs6tBpjZ6sQXS+AkYOh1aWWtmtdUz1RL6Af/9nSATUu6GiNtYdZijv sLBJmJZmpss9Xci11nWrE0wx2Q== X-Google-Smtp-Source: AIpwx48NL0DA+3ZQguc7M0Ve4pVNe+RdNO1u6gZAortFbnEZTAuvOCiAxwI/QMEhrejvd/rFk9+Dvg== X-Received: by 10.223.160.195 with SMTP id n3mr11520971wrn.92.1523903401686; Mon, 16 Apr 2018 11:30:01 -0700 (PDT) Received: from localhost.localdomain ([31.223.25.210]) by smtp.gmail.com with ESMTPSA id 24sm19057032wrt.60.2018.04.16.11.30.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Apr 2018 11:30:00 -0700 (PDT) From: Taner Tas To: alpine-aports@lists.alpinelinux.org Cc: Taner Tas Subject: [alpine-aports] [PATCH v3] testing/mame: new aport Date: Mon, 16 Apr 2018 21:29:36 +0300 Message-Id: <20180416182936.20794-1-taner76@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180302172909.24694-1-taner76@gmail.com> References: <20180302172909.24694-1-taner76@gmail.com> X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: http://mamedev.org Multi Arcade Machine Emulator. --- testing/mame/APKBUILD | 165 +++++++++++++++++++++++++++++ testing/mame/fix-musl.patch | 21 ++++ testing/mame/m68000_archopts.patch | 17 +++ testing/mame/mame.ini | 61 +++++++++++ testing/mame/midi.conf | 1 + testing/mame/musl-time_t.patch | 10 ++ 6 files changed, 275 insertions(+) create mode 100644 testing/mame/APKBUILD create mode 100644 testing/mame/fix-musl.patch create mode 100644 testing/mame/m68000_archopts.patch create mode 100644 testing/mame/mame.ini create mode 100644 testing/mame/midi.conf create mode 100644 testing/mame/musl-time_t.patch diff --git a/testing/mame/APKBUILD b/testing/mame/APKBUILD new file mode 100644 index 00000000..618f8513 --- /dev/null +++ b/testing/mame/APKBUILD @@ -0,0 +1,165 @@ +# Contributor: Taner Tas +# Maintainer: Taner Tas +pkgname=mame +pkgver=0.196 +pkgrel=0 +pkgdesc="Multi Arcade Machine Emulator." +url="http://mamedev.org" +arch="all" +license="GPL-2.0-or-later" +makedepends="coreutils p7zip nasm dos2unix clang-dev libxrandr-dev libxinerama-dev + alsa-lib-dev python2-dev py3-sphinx sdl2-dev sdl2_ttf-dev expat-dev zlib-dev + mesa-dev libxinerama-dev fontconfig-dev libjpeg-turbo-dev flac-dev lua5.3-dev + sqlite-dev portaudio-dev rapidjson-dev glm-dev portmidi-dev asio-dev" +subpackages="$pkgname-data::noarch $pkgname-doc $pkgname-common::noarch $pkgname-lang + $pkgname-tools $pkgname-plugins::noarch $pkgname-arcade $pkgname-mess" +source="https://github.com/mamedev/mame/releases/download/${pkgname}${pkgver/.}/${pkgname}${pkgver/.}s.zip + mame.ini + midi.conf + fix-musl.patch + m68000_archopts.patch + " +options="!check" + +prepare() { + cd "$srcdir" + if [ ! -d ${pkgname}-${pkgver} ]; then + 7z x -o"${pkgname}-${pkgver}" ${pkgname}.zip + fi + cd "$builddir" + echo "Converting all non-binary files to Unix format.." + find . -type f -exec dos2unix -s -q {} \; + #clang workaraound + sed -i -e 's/-flifetime-dse=1//g' scripts/genie.lua + default_prepare +} + +build() { + export OVERRIDE_CC=clang + export OVERRIDE_CXX=clang++ + export CFLAGS="$CFLAGS -I/usr/include/lua5.3 -DBX_CRT_MUSL" + export CXXFLAGS="$CFLAGS" + export LDFLAGS="$LDFLAGS -L/usr/lib/lua5.3" + + case "$CARCH" in + x86|armhf) _PTR64=0 SYMBOLS=0;; + *) _PTR64=1 ;; + esac + case "$CARCH" in + x86_64|x86) _NOASM=0 ;; + *) _NOASM=1 ;; + esac + case "$CARCH" in + s390x) _BIGENDIAN=1 ;; + *) _BIGENDIAN=0 ;; + esac + +_build="make + TARGETOS=linux + NOWERROR=1 + DEBUG=0 + USE_QTDEBUG=0 + VERBOSE=1 + REGENIE=1 + OSD=sdl + FORCE_DRC_C_BACKEND= + PTR64=$_PTR64 + NOASM=$_NOASM + BIGENDIAN=$_BIGENDIAN + TOOLS= + SDL_INI_PATH=/etc/mame + USE_SYSTEM_LIB_EXPAT=1 + USE_SYSTEM_LIB_ZLIB=1 + USE_SYSTEM_LIB_JPEG=1 + USE_SYSTEM_LIB_FLAC=1 + USE_SYSTEM_LIB_LUA=1 + USE_SYSTEM_LIB_SQLITE3=1 + USE_SYSTEM_LIB_PORTAUDIO=1 + USE_SYSTEM_LIB_UV=1 + USE_SYSTEM_LIB_GLM=1 + USE_SYSTEM_LIB_RAPIDJSON=1 + USE_SYSTEM_LIB_PORTMIDI=1 + USE_SYSTEM_LIB_ASIO=1" + + cd "$builddir" + + $_build TOOLS=1 SUBTARGET=mame + $_build SUBTARGET=arcade + $_build SUBTARGET=mess +} + +package() { + depends="$pkgname-common" + cd "$builddir" + install -D -m755 mame "$pkgdir"/usr/bin/mame || install -D -m755 mame64 "$pkgdir"/usr/bin/mame +} + +common() { + cd "$builddir" + install -D -m644 "$srcdir"/mame.ini "$subpkgdir"/etc/mame/mame.ini + install -D -m644 "$srcdir"/midi.conf "$subpkgdir"/etc/modules-load.d/midi.conf + install -d -m755 "$subpkgdir"/usr/share/"$pkgname/roms" +} + +arcade() { + pkgdesc="Multi Arcade Machine Emulator - Arcade specific build." + depends="$pkgname-common" + cd "$builddir" + install -D -m755 mamearcade "$subpkgdir"/usr/bin/mamearcade || install -D -m755 mamearcade64 "$subpkgdir"/usr/bin/mamearcade +} + +mess() { + pkgdesc="Multi Arcade Machine Emulator - Mess specific build." + depends="$pkgname-common" + cd "$builddir" + install -D -m755 mess "$subpkgdir"/usr/bin/mess || install -D -m755 mess64 "$subpkgdir"/usr/bin/mess +} + +data() { + pkgdesc="Distribution files for ${pkgname}" + cd "$builddir" + mkdir -p "$subpkgdir"/usr/share/"$pakgname" + for i in artwork bgfx hash hlsl ini keymaps samples; do + cp -r $i "$subpkgdir"/usr/share/"$pkgname" + done +} + +plugins() { + pkgdesc="Distribution plugins for ${pkgname}" + cd "$builddir" + mkdir -p "$subpkgdir"/usr/share/"$pakgname" + cp -r plugins "$subpkgdir"/usr/share/"$pkgname" +} + +tools() { + pkgdesc="Tools for ${pkgname}" + cd "$builddir" + mkdir -p "$subpkgdir"/usr/bin + for i in castool chdman floptool imgtool jedutil ldresample ldverify romcmp; do + install -sm755 $i "$subpkgdir"/usr/bin + done +} + +lang() { + pkgdesc="Localization files for ${pkgname}" + cd "$builddir" + mkdir -p "$subpkgdir"/usr/share/"$pkgname" + cp -r language "$subpkgdir"/usr/share/"$pkgname"/ +} + +doc() { + pkgdesc="Man pages for ${pkgname} and tools" + cd "$builddir" + mkdir -p "$subpkgdir"/usr/share/man/man6 + mkdir -p "$subpkgdir"/usr/share/man/man1 + gzip -c docs/man/mame.6 > docs/man/mame.6.gz + cp docs/man/mame.6.gz "$subpkgdir"/usr/share/man/man6/ + for i in castool.1 chdman.1 floptool.1 imgtool.1 jedutil.1 ldresample.1 ldverify.1 romcmp.1; do + gzip -c docs/man/$i > "$subpkgdir"/usr/share/man/man1/${i}.gz + done +} +sha512sums="dfff1f1d0c8fd11e49a0d4d554a229e13c3e10fcb90da54c8b4945bc05ebe936ad31ed96cd5c320a831500db58a48f7ea25b97312f29c94c970c808e64af595d mame0196s.zip +b05e953b7c4be26eaa4ab192279fa62dd2b006069cd963e997295afe6e64b3ba04e5a257c69b008d5bc4b509274646d10b9499970b5c3c36cc86fb4ce18f9266 mame.ini +8f83ff5a916f4ff8e86c5afbdfe4475f7780bb36c20c78d6d029d0eb0dafd77b3471faa538aca384001d2049dc94c4df3429c67d743adde9fd6329c91e6d19a2 midi.conf +75bba366aebb37de7758368fbf7418194a18d535e61c1768e6c2c5cf4b3b7a2f625ef687cb8278c03daa9e308951df4c0bdcc944dfcc4ce5305f5ac83e5e049b fix-musl.patch +a4d628d4648d28b9ae95f27ecba4a70b999ef11ffde31b31ca3ce2ed2fd4cfcab82ec78e2602309952518fac8c549d0b8b4294f6aa34c1acaa77f012ea13de9e m68000_archopts.patch" diff --git a/testing/mame/fix-musl.patch b/testing/mame/fix-musl.patch new file mode 100644 index 00000000..cda91419 --- /dev/null +++ b/testing/mame/fix-musl.patch @@ -0,0 +1,21 @@ +--- a/src/lib/netlist/plib/pexception.cpp ++++ b/src/lib/netlist/plib/pexception.cpp +@@ -10,7 +10,7 @@ + + #include + +-#if (defined(__x86_64__) || defined(__i386__)) && defined(__linux__) ++#if (defined(__x86_64__) || defined(__i386__)) && defined(__linux__) && defined(__GLIBC__) + #define HAS_FEENABLE_EXCEPT (1) + #else + #define HAS_FEENABLE_EXCEPT (0) +--- a/3rdparty/bx/include/bx/bx.h ++++ b/3rdparty/bx/include/bx/bx.h +@@ -11,6 +11,7 @@ + #include // uint32_t + #include // size_t + #include // ptrdiff_t ++#include // time_t + + #include "platform.h" + #include "config.h" diff --git a/testing/mame/m68000_archopts.patch b/testing/mame/m68000_archopts.patch new file mode 100644 index 00000000..46fd4a66 --- /dev/null +++ b/testing/mame/m68000_archopts.patch @@ -0,0 +1,17 @@ +Author: Jordi Mallach +Description: Pass $(ARCHOPTS) to standalone m68000 makefile. +Forwarded: no + +Index: mame/src/devices/cpu/m68000/makefile +=================================================================== +--- mame.orig/src/devices/cpu/m68000/makefile ++++ mame/src/devices/cpu/m68000/makefile +@@ -25,7 +25,7 @@ clean: + -@rm -f m68kops.* + + m68kmake.o: m68kmake.cpp +- $(SILENT) $(CC) -x c++ -std=c++11 -o "$@" -c "$<" ++ $(SILENT) $(CC) -x c++ -std=c++11 $(ARCHOPTS) -o "$@" -c "$<" + + m68kmake$(EXE) : m68kmake.o + @echo Linking $@... diff --git a/testing/mame/mame.ini b/testing/mame/mame.ini new file mode 100644 index 00000000..795634a8 --- /dev/null +++ b/testing/mame/mame.ini @@ -0,0 +1,61 @@ +#Run "mame -cc" to generate a custom mame.ini file.Then put it into ~/.mame folder. +#To see all available options, run "mame -showusage" +homepath . +rompath $HOME/.mame/roms;/usr/share/mame/roms +hashpath /usr/share/mame/hash +samplepath $HOME/.mame/samples;/usr/share/mame/samples +artpath $HOME/.mame/artwork;/usr/share/mame/artwork +ctrlrpath /usr/share/mame/ctrlr +inipath $HOME/.mame;/etc/mame +fontpath $HOME/.mame/fonts;/usr/share/mame/fonts +cheatpath $HOME/.mame/cheat;/usr/share/mame/cheat +crosshairpath $HOME/.mame/crosshair;/usr/share/mame/crosshair +pluginspath $HOME/.mame/plugins/;/usr/share/mame/plugins +languagepath /usr/share/mame/language +swpath software + +cfg_directory $HOME/.mame/cfg +nvram_directory $HOME/.mame/nvram +input_directory $HOME/.mame/inp +state_directory $HOME/.mame/sta +snapshot_directory $HOME/.mame/snap +diff_directory $HOME/.mame/diff +comment_directory $HOME/.mame/comments + +#Video output method: none, soft, bgfx, opengl +video opengl + +#GROOVYMAME SPECIFIC +#Automatic generation of modelines based on the specified monitor type +modeline_generation 0 +#Predefined monitor type (http://forum.arcadecontrols.com/index.php/topic,116023.0.html) +monitor arcade_31 +orientation horizontal +connector auto +interlace 1 +doublescan 1 +super_width 2560 +changeres 1 +powerstrip 0 +lock_system_modes 1 +lock_unsupported_modes 1 +refresh_dont_care 0 +dotclock_min 0 +sync_refresh_tolerance 2.0 +frame_delay 0 +vsync_offset 0 +black_frame_insertion 0 +modeline auto +ps_timing auto +lcd_range auto +crt_range0 auto +crt_range1 auto +crt_range2 auto +crt_range3 auto +crt_range4 auto +crt_range5 auto +crt_range6 auto +crt_range7 auto +crt_range8 auto +crt_range9 auto +#END OF GROOVYMAME SPECIFIC diff --git a/testing/mame/midi.conf b/testing/mame/midi.conf new file mode 100644 index 00000000..30a86650 --- /dev/null +++ b/testing/mame/midi.conf @@ -0,0 +1 @@ +snd_virmidi diff --git a/testing/mame/musl-time_t.patch b/testing/mame/musl-time_t.patch new file mode 100644 index 00000000..02c11cf0 --- /dev/null +++ b/testing/mame/musl-time_t.patch @@ -0,0 +1,10 @@ +--- 3rdparty/bx/include/bx/bx.h 2017-12-27 02:45:37.000000000 +0100 ++++ 3rdparty/bx/include/bx/bx.h 2017-12-28 10:58:30.254932880 +0100 +@@ -11,6 +11,7 @@ + #include // uint32_t + #include // size_t + #include // ptrdiff_t ++#include // time_t + + #include "platform.h" + #include "config.h" -- 2.17.0 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---