3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #146831 from thiagokokada/bump-mame

mame: 0.226 -> 0.237
This commit is contained in:
Thiago Kenji Okada 2021-11-21 20:15:30 -03:00 committed by GitHub
commit 8889b936b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 46 additions and 22 deletions

View file

@ -1,12 +1,26 @@
{ lib, stdenv, mkDerivation, fetchFromGitHub, makeDesktopItem, makeWrapper { lib
, python, pkg-config, SDL2, SDL2_ttf, alsa-lib, which, qtbase, libXinerama , stdenv
, libpcap, CoreAudioKit, ForceFeedback , alsa-lib
, installShellFiles }: , CoreAudioKit
, fetchFromGitHub
, fontconfig
, ForceFeedback
, installShellFiles
, libpcap
, libpulseaudio
, libXi
, libXinerama
, makeDesktopItem
, makeWrapper
, pkg-config
, python3
, qtbase
, SDL2
, SDL2_ttf
, which
}:
let let
majorVersion = "0";
minorVersion = "226";
desktopItem = makeDesktopItem { desktopItem = makeDesktopItem {
name = "MAME"; name = "MAME";
exec = "mame${lib.optionalString stdenv.is64bit "64"}"; exec = "mame${lib.optionalString stdenv.is64bit "64"}";
@ -16,15 +30,16 @@ let
}; };
dest = "$out/opt/mame"; dest = "$out/opt/mame";
in mkDerivation { in
stdenv.mkDerivation rec {
pname = "mame"; pname = "mame";
version = "${majorVersion}.${minorVersion}"; version = "0.237";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "mamedev"; owner = "mamedev";
repo = "mame"; repo = "mame";
rev = "mame${majorVersion}${minorVersion}"; rev = "mame${builtins.replaceStrings [ "." ] [ "" ] version}";
sha256 = "0pnsvz4vkjkqb1ac5wzwz31vx0iknyg5ffly90nhl13kcr656jrj"; sha256 = "sha256-0GOzpE8YP32ixz+c4dtDur9K0Szf7cl/dkWzPcJRFAM=";
}; };
hardeningDisable = [ "fortify" ]; hardeningDisable = [ "fortify" ];
@ -33,18 +48,19 @@ in mkDerivation {
makeFlags = [ makeFlags = [
"TOOLS=1" "TOOLS=1"
"USE_LIBSDL=1" "USE_LIBSDL=1"
] "CC=${stdenv.cc.targetPrefix}cc"
++ lib.optionals stdenv.cc.isClang [ "CC=clang" "CXX=clang++" ] "CXX=${stdenv.cc.targetPrefix}c++"
; ];
dontWrapQtApps = true; dontWrapQtApps = true;
# https://docs.mamedev.org/initialsetup/compilingmame.html
buildInputs = buildInputs =
[ SDL2 SDL2_ttf qtbase libXinerama ] [ SDL2 SDL2_ttf qtbase ]
++ lib.optional stdenv.isLinux alsa-lib ++ lib.optionals stdenv.isLinux [ alsa-lib libpulseaudio libXinerama libXi fontconfig ]
++ lib.optionals stdenv.isDarwin [ libpcap CoreAudioKit ForceFeedback ] ++ lib.optionals stdenv.isDarwin [ libpcap CoreAudioKit ForceFeedback ];
;
nativeBuildInputs = [ python pkg-config which makeWrapper installShellFiles ]; nativeBuildInputs = [ python3 pkg-config which makeWrapper installShellFiles ];
# by default MAME assumes that paths with stock resources # by default MAME assumes that paths with stock resources
# are relative and that you run MAME changing to # are relative and that you run MAME changing to
@ -75,13 +91,15 @@ in mkDerivation {
ln -s ${desktopItem}/share/applications $out/share ln -s ${desktopItem}/share/applications $out/share
''; '';
enableParallelBuilding = true;
meta = with lib; { meta = with lib; {
description = "Is a multi-purpose emulation framework"; description = "Is a multi-purpose emulation framework";
homepage = "https://www.mamedev.org/"; homepage = "https://www.mamedev.org/";
license = with licenses; [ bsd3 gpl2Plus ]; license = with licenses; [ bsd3 gpl2Plus ];
platforms = platforms.unix; platforms = platforms.unix;
# makefile needs fixes for install target maintainers = with maintainers; [ thiagokokada ];
badPlatforms = [ "aarch64-linux" ]; # macOS needs more time to build
maintainers = with maintainers; [ ]; timeout = 24 * 3600;
}; };
} }

View file

@ -32363,6 +32363,12 @@ with pkgs;
mame = libsForQt514.callPackage ../misc/emulators/mame { mame = libsForQt514.callPackage ../misc/emulators/mame {
inherit (darwin.apple_sdk.frameworks) CoreAudioKit ForceFeedback; inherit (darwin.apple_sdk.frameworks) CoreAudioKit ForceFeedback;
# TODO: remove it on mame 0.238
stdenv =
if stdenv.cc.isClang then
overrideCC stdenv clang_6
else
stdenv;
}; };
martyr = callPackage ../development/libraries/martyr { }; martyr = callPackage ../development/libraries/martyr { };