From 636cf1561c0e2232c13149e6e66c8a00598772f9 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sat, 9 Jun 2018 19:27:53 +0200 Subject: games/albion: Fix build with Automake 1.16 This has been broken since a while when Automake 1.16 was introduced in NixOS/nixpkgs@e0c155e26b6a73bba06d6f2ced12bd4bcb0d6503. The upstream WildMIDI project has since moved to CMake and the patches from the static recompilation project haven't been ported to a newer version, so we're stuck with the Automake variant. Fortunately, the fix is rather easy and it's more obvious when you look at the changelog of Automake 1.16: The 'subdir-object' option no longer causes object files corresponding to source files specified with an explicit '$(srcdir)' component to be placed in the source tree rather than in the build tree. For example, if Makefile.am contains: AUTOMAKE_OPTIONS = subdir-objects foo_SOURCES = $(srcdir)/foo.c $(srcdir)/s/bar.c $(top_srcdir)/baz.c then "make all" will create 'foo.o' and 's/bar.o' in $(builddir) rather than in $(srcdir), and will create 'baz.o' in $(top_builddir) rather than in $(top_srcdir). So all we need to do is strip off the absolute pathname of libWildMidi.la/libWildMidiA.la and the build passes. Signed-off-by: aszlig --- pkgs/games/gog/albion/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pkgs/games') diff --git a/pkgs/games/gog/albion/default.nix b/pkgs/games/gog/albion/default.nix index 8ecc6e6e..09b8d39a 100644 --- a/pkgs/games/gog/albion/default.nix +++ b/pkgs/games/gog/albion/default.nix @@ -23,7 +23,10 @@ let nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ alsaLib ]; patches = [ ./wildmidi-build-fixes.patch ]; - postPatch = "sed -i -e '/^CFLAGS/s/-pedantic//' configure.ac"; + postPatch = '' + sed -i -e '/^CFLAGS/s/-pedantic//' configure.ac + sed -i -e '/^wildmidi_libs *=/s!\$(top_builddir)/src/!!' src/Makefile.am + ''; }; compileMidiPlugin = variant: let -- cgit 1.4.1