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

View file

@ -32363,6 +32363,12 @@ with pkgs;
mame = libsForQt514.callPackage ../misc/emulators/mame {
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 { };