diff options
Diffstat (limited to 'pkgs/development/libraries/mp4v2')
-rw-r--r-- | pkgs/development/libraries/mp4v2/default.nix | 7 | ||||
-rw-r--r-- | pkgs/development/libraries/mp4v2/fix-build-clang.patch | 13 |
2 files changed, 19 insertions, 1 deletions
diff --git a/pkgs/development/libraries/mp4v2/default.nix b/pkgs/development/libraries/mp4v2/default.nix index 9601ae1eea3..fe0049c1f38 100644 --- a/pkgs/development/libraries/mp4v2/default.nix +++ b/pkgs/development/libraries/mp4v2/default.nix @@ -16,11 +16,16 @@ stdenv.mkDerivation rec { (fetchurl { # 2020-06-19: NOTE: # Fix build with C++11 # Close when https://github.com/TechSmith/mp4v2/pull/36 merged/closed. - url = "https://git.archlinux.org/svntogit/packages.git/plain/trunk/libmp4v2-c++11.patch?id=203f5a72bc97ffe089b424c47b07dd9eaea35713"; + url = "https://raw.githubusercontent.com/archlinux/svntogit-packages/203f5a72bc97ffe089b424c47b07dd9eaea35713/trunk/libmp4v2-c++11.patch"; sha256 = "0sbn0il7lmk77yrjyb4f0a3z3h8gsmdkscvz5n9hmrrrhrwf672w"; }) + ] ++ lib.optionals stdenv.cc.isClang [ + # unbreak build with Clangâ„6 (C++14 by default). Based on https://reviews.freebsd.org/rP458678 + ./fix-build-clang.patch ]; + NIX_CFLAGS_COMPILE = [ "-Wno-error=narrowing" ]; + # `faac' expects `mp4.h'. postInstall = "ln -s mp4v2/mp4v2.h $out/include/mp4.h"; diff --git a/pkgs/development/libraries/mp4v2/fix-build-clang.patch b/pkgs/development/libraries/mp4v2/fix-build-clang.patch new file mode 100644 index 00000000000..5d99f1951f7 --- /dev/null +++ b/pkgs/development/libraries/mp4v2/fix-build-clang.patch @@ -0,0 +1,13 @@ +diff --git a/src/mp4.cpp b/src/mp4.cpp +index c2a7238..9bb3e38 100644 +--- a/src/mp4.cpp ++++ b/src/mp4.cpp +@@ -870,7 +870,7 @@ MP4FileHandle MP4ReadProvider( const char* fileName, const MP4FileProvider* file + } + + catch (...) { +- return MP4_INVALID_TRACK_ID; ++ return NULL; + } + } + |