diff options
author | aszlig <aszlig@nix.build> | 2018-06-09 19:27:53 +0200 |
---|---|---|
committer | aszlig <aszlig@nix.build> | 2018-06-09 19:27:53 +0200 |
commit | 636cf1561c0e2232c13149e6e66c8a00598772f9 (patch) | |
tree | fe8e452bf87b70ebe615e697905416fd7c7c97cf /pkgs/games/gog/albion | |
parent | 5d98818c8e2e7cdf2bfe0dbd0c2a8fd069e9acb9 (diff) |
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 <aszlig@nix.build>
Diffstat (limited to 'pkgs/games/gog/albion')
-rw-r--r-- | pkgs/games/gog/albion/default.nix | 5 |
1 files changed, 4 insertions, 1 deletions
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 |