Merge pull request #145724 from trofi/fix-oggvideotools-on-gcc-12
oggvideotools: fix build on gcc-12
This commit is contained in:
commit
9f4c86ec2b
2 changed files with 23 additions and 12 deletions
|
@ -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 ];
|
||||
|
|
|
@ -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[])
|
||||
{
|
Loading…
Reference in a new issue