diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2021-11-13 08:13:49 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyich@gmail.com> | 2021-11-13 08:37:48 +0000 |
commit | c6b8047eb1280c883020aefd7b18a3ac3c09dc16 (patch) | |
tree | b38721eeb4cd5a9c811eb03a3d2cb08d46ecdb92 /pkgs/tools/misc/oggvideotools | |
parent | 1ad8cd2d56bc67832846b3be3d7985136c400869 (diff) |
oggvideotools: fix build on gcc-12
While at it: - uploaded gcc-10 fix to upstream bugtracker and pulled patch from there - dropped explicit -O0 from CXXFLAGS to enable default optimisations
Diffstat (limited to 'pkgs/tools/misc/oggvideotools')
-rw-r--r-- | pkgs/tools/misc/oggvideotools/default.nix | 25 | ||||
-rw-r--r-- | pkgs/tools/misc/oggvideotools/fix-compile.patch | 10 |
2 files changed, 23 insertions, 12 deletions
diff --git a/pkgs/tools/misc/oggvideotools/default.nix b/pkgs/tools/misc/oggvideotools/default.nix index 2780354aa0e62..e6b8d9a1d288c 100644 --- a/pkgs/tools/misc/oggvideotools/default.nix +++ b/pkgs/tools/misc/oggvideotools/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, cmake, pkg-config, boost, gd, libogg, libtheora, libvorbis }: +{ lib, stdenv, fetchurl, fetchpatch, cmake, pkg-config, boost, gd, libogg, libtheora, libvorbis }: stdenv.mkDerivation rec { pname = "oggvideotools"; @@ -10,9 +10,30 @@ stdenv.mkDerivation rec { }; patches = [ - ./fix-compile.patch + # Fix pending upstream inclusion for missing includes: + # https://sourceforge.net/p/oggvideotools/bugs/12/ + (fetchpatch { + name = "gcc-10.patch"; + url = "https://sourceforge.net/p/oggvideotools/bugs/12/attachment/fix-compile.patch"; + sha256 = "sha256-mJttoC3jCLM3vmPhlyqh+W0ryp2RjJGIBXd6sJfLJA4="; + }) + + # Fix pending upstream inclusion for build failure on gcc-12: + # https://sourceforge.net/p/oggvideotools/bugs/13/ + (fetchpatch { + name = "gcc-12.patch"; + url = "https://sourceforge.net/p/oggvideotools/bugs/13/attachment/fix-gcc-12.patch"; + sha256 = "sha256-zuDXe86djWkR8SgYZHkuAJJ7Lf2VYsVRBrlEaODtMKE="; + # svn patch, rely on prefix added by fetchpatch: + extraPrefix = ""; + }) ]; + postPatch = '' + # Don't disable optimisations + substituteInPlace CMakeLists.txt --replace " -O0 " "" + ''; + nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ boost gd libogg libtheora libvorbis ]; diff --git a/pkgs/tools/misc/oggvideotools/fix-compile.patch b/pkgs/tools/misc/oggvideotools/fix-compile.patch deleted file mode 100644 index 65c3dd6a2351b..0000000000000 --- a/pkgs/tools/misc/oggvideotools/fix-compile.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- oggvideotools-0.9.1/src/base/test/decoderTest.cpp 2016-09-05 10:35:14.000000000 +0200 -+++ oggvideotools-0.9.1/src/base/test/decoderTest.cpp 2021-10-22 22:42:48.980473419 +0200 -@@ -5,6 +5,7 @@ - #include "oggDecoder.h" - #include <vector> - #include <iostream> -+#include <cstring> - - int main(int argc, char* argv[]) - { |