diff --git a/pkgs/by-name/op/opencollada/package.nix b/pkgs/by-name/op/opencollada/package.nix index 85a69f825868..b5d8cddae639 100644 --- a/pkgs/by-name/op/opencollada/package.nix +++ b/pkgs/by-name/op/opencollada/package.nix @@ -1,7 +1,8 @@ { cmake, + dos2unix, fetchFromGitHub, - fetchurl, + fetchpatch, lib, libxml2, pcre, @@ -20,13 +21,28 @@ stdenv.mkDerivation rec { sha256 = "1ym16fxx9qhf952vva71sdzgbm7ifis0h1n5fj1bfdj8zvvkbw5w"; }; - patches = [ - ./pcre.patch + # Fix freaky dos-style CLRF things + prePatch = '' + dos2unix CMakeLists.txt + ''; + patches = [ # fix build with gcc 13 - (fetchurl { + (fetchpatch { url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/opencollada/files/opencollada-1.6.68-gcc13.patch?id=b76590f9fb8615da3da9d783ad841c0e3881a27b"; - hash = "sha256-uimeLGHgXaFi61mmoaloJ5vo83c8EIQmtHEMngC2Nq4="; + hash = "sha256-oi/QhNPRnuSHfJJ071/3wnjLeg4zZUL6NwSGYvgkb/k="; + }) + + # fix pcre + (fetchpatch { + url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/opencollada/files/opencollada-1.6.63-pcre-fix.patch"; + hash = "sha256-igrwgmNwDKYwj6xWvWrryT5ARWJpztVmlQ0HCLQn5+Q="; + }) + + # fix build with cmake 4 + (fetchpatch { + url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/opencollada/files/opencollada-1.6.68-cmake4.patch?id=42f1e0614c4d056841fdc162c29a04ff0e910139"; + hash = "sha256-gbF6PPalJGgXGu4W7EptYeDq8418JdGH50LIqKqGKX0="; }) ]; @@ -43,6 +59,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config + dos2unix ]; propagatedBuildInputs = [ diff --git a/pkgs/by-name/op/opencollada/pcre.patch b/pkgs/by-name/op/opencollada/pcre.patch deleted file mode 100644 index 39408f5a61e3..000000000000 --- a/pkgs/by-name/op/opencollada/pcre.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h b/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h -index 22f2598b..269c50ca 100644 ---- a/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h -+++ b/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h -@@ -13,8 +13,7 @@ - - #include "COLLADABUPrerequisites.h" - --struct real_pcre; --typedef struct real_pcre pcre; -+#include "pcre.h" - - - namespace COLLADABU