From d6e2366b1cd97d4cdcc5c84a361bc8533dd6c063 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 23 Mar 2017 22:57:51 +0100 Subject: [PATCH] mpd: fix i686-linux build See upstream https://github.com/MaxKellermann/MPD/pull/24, not clear if this will be merged upstream as the author has been quite uncooperative. Github patch URL (https://github.com/MaxKellermann/MPD/pull/24.patch) sadly does not work for this. --- pkgs/servers/mpd/default.nix | 4 +++- pkgs/servers/mpd/x86.patch | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 pkgs/servers/mpd/x86.patch diff --git a/pkgs/servers/mpd/default.nix b/pkgs/servers/mpd/default.nix index e3938ec71a84..1883764e24ff 100644 --- a/pkgs/servers/mpd/default.nix +++ b/pkgs/servers/mpd/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, glib, systemd, boost, darwin +{ stdenv, fetchurl, fetchpatch, pkgconfig, glib, systemd, boost, darwin , alsaSupport ? true, alsaLib , avahiSupport ? true, avahi, dbus , flacSupport ? true, flac @@ -42,6 +42,8 @@ in stdenv.mkDerivation rec { sha256 = "0isbpa79m7zf09w3s1ry638cw96rxasy1ch66zl01k75i48mw1gl"; }; + patches = [ ./x86.patch ]; + buildInputs = [ pkgconfig glib boost ] ++ opt stdenv.isDarwin darwin.apple_sdk.frameworks.CoreAudioKit ++ opt stdenv.isLinux systemd diff --git a/pkgs/servers/mpd/x86.patch b/pkgs/servers/mpd/x86.patch new file mode 100644 index 000000000000..3e4c036418d2 --- /dev/null +++ b/pkgs/servers/mpd/x86.patch @@ -0,0 +1,12 @@ +--- a/src/decoder/plugins/FfmpegDecoderPlugin.cxx ++++ b/src/decoder/plugins/FfmpegDecoderPlugin.cxx +@@ -20,8 +20,8 @@ + /* necessary because libavutil/common.h uses UINT64_C */ + #define __STDC_CONSTANT_MACROS + +-#include "lib/ffmpeg/Time.hxx" + #include "config.h" ++#include "lib/ffmpeg/Time.hxx" + #include "FfmpegDecoderPlugin.hxx" + #include "lib/ffmpeg/Domain.hxx" + #include "lib/ffmpeg/Error.hxx"