x264: pull upstream parallel build fix

Without the change parallel builds occasionally fail as:

    $ make --shuffle
    ...
    gcc ... -c common/opencl.c -o common/opencl-8.o ...
    common/opencl.c:116:10: fatal error: common/oclobj.h: No such file or directory
      116 | #include "common/oclobj.h"
          |          ^~~~~~~~~~~~~~~~~
This commit is contained in:
Sergei Trofimovich 2022-09-17 09:13:55 +01:00
parent 711191ca62
commit 3ed0fafe3b

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchFromGitLab, nasm
{ stdenv, lib, fetchFromGitLab, fetchpatch, nasm
, enableShared ? !stdenv.hostPlatform.isStatic
}:
@ -16,7 +16,15 @@ stdenv.mkDerivation rec {
# Upstream ./configure greps for (-mcpu|-march|-mfpu) in CFLAGS, which in nix
# is put in the cc wrapper anyway.
patches = [ ./disable-arm-neon-default.patch ];
patches = [
./disable-arm-neon-default.patch
(fetchpatch {
# https://code.videolan.org/videolan/x264/-/merge_requests/114
name = "fix-parallelism.patch";
url = "https://code.videolan.org/videolan/x264/-/commit/e067ab0b530395f90b578f6d05ab0a225e2efdf9.patch";
hash = "sha256-16h2IUCRjYlKI2RXYq8QyXukAdfoQxyBKsK/nI6vhRI=";
})
];
postPatch = ''
patchShebangs .