uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
|
|
@ -0,0 +1,37 @@
|
|||
From 54aebffc4584ee68149d4b5b64ceaa79a82b8427 Mon Sep 17 00:00:00 2001
|
||||
From: Thiago Kenji Okada <thiagokokada@gmail.com>
|
||||
Date: Sat, 9 Apr 2022 13:16:08 +0100
|
||||
Subject: [PATCH] Revert "Added PDF documentation to dist.mak"
|
||||
|
||||
This reverts commit c0e93076232e794c919231e4386445d78b2d80b1.
|
||||
---
|
||||
dist.mak | 8 +-------
|
||||
1 file changed, 1 insertion(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dist.mak b/dist.mak
|
||||
index edbb4cd67cb..c378dfdf708 100644
|
||||
--- a/dist.mak
|
||||
+++ b/dist.mak
|
||||
@@ -109,7 +109,7 @@ GEN_FOLDERS := $(addprefix $(STAGEDIR)/,$(CREATED_DIRS))
|
||||
COPY_BINARIES := $(addprefix $(STAGEDIR)/,$(addsuffix $(EXE),$(BINARIES)))
|
||||
COPY_FILES := $(addprefix $(STAGEDIR)/,$(COPIED_FILES))
|
||||
|
||||
-all: $(COPY_BINARIES) $(COPY_FILES) $(STAGEDIR)/docs/MAME.pdf
|
||||
+all: $(COPY_BINARIES) $(COPY_FILES)
|
||||
|
||||
clean:
|
||||
$(SILENT) rm -rf $(STAGEDIR)
|
||||
@@ -124,10 +124,4 @@ $(STAGEDIR)/%: $(BINDIR)/% | $(GEN_FOLDERS)
|
||||
$(STAGEDIR)/%: % | $(GEN_FOLDERS)
|
||||
$(call COPY,$<,$@)
|
||||
|
||||
-$(STAGEDIR)/docs/MAME.pdf: docs/build/latex/MAME.pdf | $(GEN_FOLDERS)
|
||||
- $(call COPY,$<,$@)
|
||||
-
|
||||
-docs/build/latex/MAME.pdf:
|
||||
- $(MAKE) -C docs latexpdf
|
||||
-
|
||||
.PHONY: all clean
|
||||
--
|
||||
2.33.1
|
||||
|
||||
156
pkgs/applications/emulators/mame/default.nix
Normal file
156
pkgs/applications/emulators/mame/default.nix
Normal file
|
|
@ -0,0 +1,156 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, alsa-lib
|
||||
, CoreAudioKit
|
||||
, expat
|
||||
, fetchFromGitHub
|
||||
, flac
|
||||
, fontconfig
|
||||
, ForceFeedback
|
||||
, glm
|
||||
, installShellFiles
|
||||
, libjpeg
|
||||
, libpcap
|
||||
, libpulseaudio
|
||||
, libXi
|
||||
, libXinerama
|
||||
, lua5_3
|
||||
, makeDesktopItem
|
||||
, makeWrapper
|
||||
, pkg-config
|
||||
, portaudio
|
||||
, portmidi
|
||||
, pugixml
|
||||
, python3
|
||||
, qtbase
|
||||
, rapidjson
|
||||
, SDL2
|
||||
, SDL2_ttf
|
||||
, utf8proc
|
||||
, which
|
||||
, writeScript
|
||||
, zlib
|
||||
}:
|
||||
|
||||
let
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "MAME";
|
||||
exec = "mame${lib.optionalString stdenv.is64bit "64"}";
|
||||
desktopName = "MAME";
|
||||
genericName = "MAME is a multi-purpose emulation framework";
|
||||
categories = [ "System" "Emulator" ];
|
||||
};
|
||||
|
||||
dest = "$out/opt/mame";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mame";
|
||||
version = "0.243";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mamedev";
|
||||
repo = "mame";
|
||||
rev = "mame${builtins.replaceStrings [ "." ] [ "" ] version}";
|
||||
sha256 = "sha256-dUgYLNvgvolz9M0ySkGJIZjVMBQwejkxsZ6npg8rIqk=";
|
||||
};
|
||||
|
||||
hardeningDisable = [ "fortify" ];
|
||||
|
||||
makeFlags = [
|
||||
"CC=${stdenv.cc.targetPrefix}cc"
|
||||
"CXX=${stdenv.cc.targetPrefix}c++"
|
||||
"TOOLS=1"
|
||||
"USE_LIBSDL=1"
|
||||
# "USE_SYSTEM_LIB_ASIO=1"
|
||||
"USE_SYSTEM_LIB_EXPAT=1"
|
||||
"USE_SYSTEM_LIB_FLAC=1"
|
||||
"USE_SYSTEM_LIB_GLM=1"
|
||||
"USE_SYSTEM_LIB_JPEG=1"
|
||||
"USE_SYSTEM_LIB_LUA=1"
|
||||
"USE_SYSTEM_LIB_PORTAUDIO=1"
|
||||
"USE_SYSTEM_LIB_PORTMIDI=1"
|
||||
"USE_SYSTEM_LIB_PUGIXML=1"
|
||||
"USE_SYSTEM_LIB_RAPIDJSON=1"
|
||||
"USE_SYSTEM_LIB_UTF8PROC=1"
|
||||
"USE_SYSTEM_LIB_ZLIB=1"
|
||||
];
|
||||
|
||||
dontWrapQtApps = true;
|
||||
|
||||
# https://docs.mamedev.org/initialsetup/compilingmame.html
|
||||
buildInputs = [
|
||||
expat
|
||||
zlib
|
||||
flac
|
||||
lua5_3
|
||||
portmidi
|
||||
portaudio
|
||||
utf8proc
|
||||
libjpeg
|
||||
rapidjson
|
||||
pugixml
|
||||
glm
|
||||
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 ];
|
||||
|
||||
patches = [
|
||||
# MAME is now generating the PDF documentation on its release script since commit:
|
||||
# https://github.com/mamedev/mame/commit/c0e93076232e794c919231e4386445d78b2d80b1
|
||||
# however this needs sphinx+latex to build, and it is available in the website
|
||||
# anyway for those who need it
|
||||
./0001-Revert-Added-PDF-documentation-to-dist.mak.patch
|
||||
# by default MAME assumes that paths with stock resources
|
||||
# are relative and that you run MAME changing to
|
||||
# install directory, so we add absolute paths here
|
||||
./emuopts.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/emu/emuopts.cpp \
|
||||
--subst-var-by mame ${dest}
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
make -f dist.mak PTR64=${lib.optionalString stdenv.is64bit "1"}
|
||||
mkdir -p ${dest}
|
||||
mv build/release/*/Release/mame/* ${dest}
|
||||
|
||||
mkdir -p $out/bin
|
||||
find ${dest} -maxdepth 1 -executable -type f -exec mv -t $out/bin {} \;
|
||||
install -Dm755 src/osd/sdl/taputil.sh $out/bin/taputil.sh
|
||||
|
||||
installManPage ${dest}/docs/man/*.1 ${dest}/docs/man/*.6
|
||||
|
||||
mv artwork plugins samples ${dest}
|
||||
'' + lib.optionalString stdenv.isLinux ''
|
||||
mkdir -p $out/share
|
||||
ln -s ${desktopItem}/share/applications $out/share
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru.updateScript = writeScript "mame-update-script" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl common-updater-scripts jq
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
latest_version=$(curl -s https://api.github.com/repos/mamedev/mame/releases/latest | jq --raw-output .tag_name)
|
||||
update-source-version mame "''${latest_version/mame0/0.}"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
|
||||
description = "Is a multi-purpose emulation framework";
|
||||
homepage = "https://www.mamedev.org/";
|
||||
license = with licenses; [ bsd3 gpl2Plus ];
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ thiagokokada ];
|
||||
};
|
||||
}
|
||||
29
pkgs/applications/emulators/mame/emuopts.patch
Normal file
29
pkgs/applications/emulators/mame/emuopts.patch
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp
|
||||
index c42fcef848..d1bddae060 100644
|
||||
--- a/src/emu/emuopts.cpp
|
||||
+++ b/src/emu/emuopts.cpp
|
||||
@@ -36,16 +36,16 @@ const options_entry emu_options::s_option_entries[] =
|
||||
{ nullptr, nullptr, OPTION_HEADER, "CORE SEARCH PATH OPTIONS" },
|
||||
{ OPTION_HOMEPATH, ".", OPTION_STRING, "path to base folder for plugin data (read/write)" },
|
||||
{ OPTION_MEDIAPATH ";rp;biospath;bp", "roms", OPTION_STRING, "path to ROM sets and hard disk images" },
|
||||
- { OPTION_HASHPATH ";hash_directory;hash", "hash", OPTION_STRING, "path to software definition files" },
|
||||
- { OPTION_SAMPLEPATH ";sp", "samples", OPTION_STRING, "path to audio sample sets" },
|
||||
- { OPTION_ARTPATH, "artwork", OPTION_STRING, "path to artwork files" },
|
||||
- { OPTION_CTRLRPATH, "ctrlr", OPTION_STRING, "path to controller definitions" },
|
||||
- { OPTION_INIPATH, ".;ini;ini/presets", OPTION_STRING, "path to ini files" },
|
||||
- { OPTION_FONTPATH, ".", OPTION_STRING, "path to font files" },
|
||||
+ { OPTION_HASHPATH ";hash_directory;hash", "hash;@mame@/hash", OPTION_STRING, "path to software definition files" },
|
||||
+ { OPTION_SAMPLEPATH ";sp", "samples;@mame@/samples", OPTION_STRING, "path to audio sample sets" },
|
||||
+ { OPTION_ARTPATH, "artwork;@mame@/artwork", OPTION_STRING, "path to artwork files" },
|
||||
+ { OPTION_CTRLRPATH, "ctrlr;@mame@/ctrlr", OPTION_STRING, "path to controller definitions" },
|
||||
+ { OPTION_INIPATH, ".;ini;ini/presets;@mame@/ini/presets", OPTION_STRING, "path to ini files" },
|
||||
+ { OPTION_FONTPATH, ".;@mame@", OPTION_STRING, "path to font files" },
|
||||
{ OPTION_CHEATPATH, "cheat", OPTION_STRING, "path to cheat files" },
|
||||
{ OPTION_CROSSHAIRPATH, "crosshair", OPTION_STRING, "path to crosshair files" },
|
||||
- { OPTION_PLUGINSPATH, "plugins", OPTION_STRING, "path to plugin files" },
|
||||
- { OPTION_LANGUAGEPATH, "language", OPTION_STRING, "path to UI translation files" },
|
||||
+ { OPTION_PLUGINSPATH, "plugins;@mame@/plugins", OPTION_STRING, "path to plugin files" },
|
||||
+ { OPTION_LANGUAGEPATH, "language;@mame@/language", OPTION_STRING, "path to UI translation files" },
|
||||
{ OPTION_SWPATH, "software", OPTION_STRING, "path to loose software" },
|
||||
|
||||
// output directory options
|
||||
Loading…
Add table
Add a link
Reference in a new issue