@@ -148,7 +148,7 @@ stdenv.mkDerivation rec {
148148 "--disable-stripping"
149149 # Disable mmx support for 0.6.90
150150 (verFix null "0.6.90" "--disable-mmx")
151− ] ++ optionals (stdenv.hostPlatform == stdenv.buildPlatform) [
151+ ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
152152 "--cross-prefix=${stdenv.cc.targetPrefix}"
153153 "--enable-cross-compile"
154154 ] ++ optional stdenv.cc.isClang "--cc=clang";
@@ -170,9 +170,15 @@ stdenv.mkDerivation rec {
170170
171171 doCheck = false; # fails
172172
173+ # ffmpeg 3+ generates pkg-config (.pc) files that don't have the
174+ # form automatically handled by the multiple-outputs hooks.
173175 postFixup = ''
174176 moveToOutput bin "$bin"
175177 moveToOutput share/ffmpeg/examples "$doc"
178+ for pc in ''${!outputDev}/lib/pkgconfig/*.pc; do
179+ substituteInPlace $pc \
180+ --replace "includedir=$out" "includedir=''${!outputInclude}"
181+ done
176182 '';
177183
178184 installFlags = [ "install-man" ];