libopenshot: fix build with gcc10

This commit is contained in:
Fabian Möller 2021-01-07 15:27:53 +01:00
parent e640da3120
commit 02e8f39c2a
No known key found for this signature in database
GPG Key ID: 70B29D65DD8A7E31

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub
{ stdenv, fetchFromGitHub, fetchpatch
, pkgconfig, cmake, doxygen
, libopenshot-audio, imagemagick, ffmpeg_3
, swig, python3
@ -19,7 +19,15 @@ stdenv.mkDerivation rec {
sha256 = "1mxjkgjmjzgf628y3rscc6rqf55hxgjpmvwxlncfk1216i5xskwp";
};
patchPhase = ''
patches = [
(fetchpatch {
name = "fix-build-with-gcc-10.patch";
url = "https://github.com/OpenShot/libopenshot/commit/13290364e7bea54164ab83d973951f2898ad9e23.diff";
sha256 = "0i7rpdsr8y9dphil8yq75qbh20vfqjc2hp5ahv0ws58z9wj6ngnz";
})
];
postPatch = ''
sed -i 's/{UNITTEST++_INCLUDE_DIR}/ENV{UNITTEST++_INCLUDE_DIR}/g' tests/CMakeLists.txt
sed -i 's/{_REL_PYTHON_MODULE_PATH}/ENV{_REL_PYTHON_MODULE_PATH}/g' src/bindings/python/CMakeLists.txt
export _REL_PYTHON_MODULE_PATH=$(toPythonPath $out)