Skip to content

Commit

Permalink
libretro.mame2016: fix build with gnumake-4.3
Browse files Browse the repository at this point in the history
Builds currently fail with `ar` trying to operate on what are clearly
two paths concatenated together.  It stems from a backward-incompatible
change in Make:

> Previously appending using '+=' to an empty variable would result in
> a value starting with a space.  Now the initial space is only added
> if the variable already contains some value.  Similarly, appending an
> empty string does not add a trailing space.

This issue was first reported on the MAME repository proper
(mamedev/mame#6248), and affects libretro's
2016 snapshot as well.  A fix that is reported to work with previous
versions of Make was upstreamed to:
- GENie, the build system: bkaradzic/GENie#493
- MAME: mamedev/mame#6262
- libretro: libretro/mame2016-libretro#47

The fetched patch comes from the last of these.
  • Loading branch information
AluisioASG committed Oct 28, 2020
1 parent a151124 commit 8880179
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkgs/misc/emulators/retroarch/cores.nix
@@ -1,4 +1,4 @@
{ stdenv, fetchgit, fetchFromGitHub, fetchFromGitLab, cmake, pkgconfig, makeWrapper, python27, python37, retroarch
{ stdenv, fetchgit, fetchFromGitHub, fetchFromGitLab, fetchpatch, cmake, pkgconfig, makeWrapper, python27, python37, retroarch
, alsaLib, fluidsynth, curl, hidapi, libGLU, gettext, glib, gtk2, portaudio, SDL, SDL_net, SDL2, SDL2_image, libGL
, ffmpeg_3, pcre, libevdev, libpng, libjpeg, libzip, udev, libvorbis, snappy, which, hexdump
, miniupnpc, sfml, xorg, zlib, nasm, libpcap, boost, icu, openssl
Expand Down Expand Up @@ -630,6 +630,13 @@ in with stdenv.lib.licenses;
rev = "02987af9b81a9c3294af8fb9d5a34f9826a2cf4d";
sha256 = "0gl7irmn5d8lk7kf484vgw6kb325fq4ghwsni3il4nm5n2a8yglh";
};
patches = [
(fetchpatch {
name = "fix_mame_build_on_make-4.3.patch";
url = "https://github.com/libretro/mame2016-libretro/commit/5874fae3d124f5e7c8a91634f5473a8eac902e47.patch";
sha256 = "061f1lcm72glksf475ikl8w10pnbgqa7049ylw06nikis2qdjlfn";
})
];
description = "Port of MAME ~2016 to libretro";
license = gpl2Plus;
extraNativeBuildInputs = [ python27 ];
Expand Down

0 comments on commit 8880179

Please sign in to comment.