Merge pull request #300980 from Kamillaova/update/x264
x264: unstable-2021-06-13 -> 0-unstable-2023-10-01
This commit is contained in:
commit
1f08e554a2
|
@ -1,40 +1,29 @@
|
||||||
{ stdenv
|
{ stdenv
|
||||||
, lib
|
, lib
|
||||||
, fetchFromGitLab
|
, fetchFromGitLab
|
||||||
, fetchpatch
|
|
||||||
, nasm
|
, nasm
|
||||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "x264";
|
pname = "x264";
|
||||||
version = "unstable-2021-06-13";
|
version = "0-unstable-2023-10-01";
|
||||||
|
|
||||||
src = fetchFromGitLab {
|
src = fetchFromGitLab {
|
||||||
domain = "code.videolan.org";
|
domain = "code.videolan.org";
|
||||||
owner = "videolan";
|
owner = "videolan";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "5db6aa6cab1b146e07b60cc1736a01f21da01154";
|
rev = "31e19f92f00c7003fa115047ce50978bc98c3a0d";
|
||||||
sha256 = "0swyrkz6nvajivxvrr08py0jrfcsjvpxw78xm1k5gd9xbdrxvknh";
|
hash = "sha256-7/FaaDFmoVhg82BIhP3RbFq4iKGNnhviOPxl3/8PWCM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Upstream ./configure greps for (-mcpu|-march|-mfpu) in CFLAGS, which in nix
|
|
||||||
# is put in the cc wrapper anyway.
|
|
||||||
patches = [
|
patches = [
|
||||||
|
# Upstream ./configure greps for (-mcpu|-march|-mfpu) in CFLAGS, which in nix
|
||||||
|
# is put in the cc wrapper anyway.
|
||||||
./disable-arm-neon-default.patch
|
./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 = ''
|
postPatch = lib.optionalString stdenv.isDarwin ''
|
||||||
patchShebangs .
|
|
||||||
''
|
|
||||||
# Darwin uses `llvm-strip`, which results in a crash at runtime in assembly-based routines when `-x` is specified.
|
|
||||||
+ lib.optionalString stdenv.isDarwin ''
|
|
||||||
substituteInPlace Makefile --replace '$(if $(STRIP), $(STRIP) -x $@)' '$(if $(STRIP), $(STRIP) -S $@)'
|
substituteInPlace Makefile --replace '$(if $(STRIP), $(STRIP) -x $@)' '$(if $(STRIP), $(STRIP) -S $@)'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -53,6 +42,12 @@ stdenv.mkDerivation rec {
|
||||||
++ lib.optional (!stdenv.isi686) "--enable-pic"
|
++ lib.optional (!stdenv.isi686) "--enable-pic"
|
||||||
++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "--cross-prefix=${stdenv.cc.targetPrefix}";
|
++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "--cross-prefix=${stdenv.cc.targetPrefix}";
|
||||||
|
|
||||||
|
makeFlags = [
|
||||||
|
"BASHCOMPLETIONSDIR=$(out)/share/bash-completion/completions"
|
||||||
|
"install-bashcompletion"
|
||||||
|
"install-lib-shared"
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = lib.optional stdenv.hostPlatform.isx86 nasm;
|
nativeBuildInputs = lib.optional stdenv.hostPlatform.isx86 nasm;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user