libretro.mame2016: fix build with gnumake-4.3

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
(https://github.com/mamedev/mame/issues/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: https://github.com/bkaradzic/GENie/pull/493
- MAME: https://github.com/mamedev/mame/pull/6262
- libretro: https://github.com/libretro/mame2016-libretro/pull/47

The fetched patch comes from the last of these.
This commit is contained in:
Aluísio Augusto Silva Gonçalves 2020-10-28 13:03:22 -03:00
parent a151124ca3
commit 8880179b65
No known key found for this signature in database
GPG key ID: DA6EA2FACDB1CBD2

View file

@ -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
@ -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 ];