2024-01-13 08:15:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchurl, cmake, pkg-config, libxml2, pcre
|
2020-04-24 23:36:52 +00:00
|
|
|
, darwin}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "opencollada";
|
|
|
|
|
|
|
|
version = "1.6.68";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "KhronosGroup";
|
|
|
|
repo = "OpenCOLLADA";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1ym16fxx9qhf952vva71sdzgbm7ifis0h1n5fj1bfdj8zvvkbw5w";
|
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
patches = [
|
2024-04-21 15:54:59 +00:00
|
|
|
./pcre.patch
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
# fix build with gcc 13
|
|
|
|
(fetchurl {
|
|
|
|
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/opencollada/files/opencollada-1.6.68-gcc13.patch?id=b76590f9fb8615da3da9d783ad841c0e3881a27b";
|
|
|
|
hash = "sha256-uimeLGHgXaFi61mmoaloJ5vo83c8EIQmtHEMngC2Nq4=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2024-09-26 11:04:55 +00:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ AGL ]);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ libxml2 pcre ];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
postPatch = ''
|
2024-04-21 15:54:59 +00:00
|
|
|
# Drop blanket -Werror as it tends to fail on newer toolchain for
|
|
|
|
# minor warnings. In this case it was gcc-13 build failure.
|
|
|
|
substituteInPlace DAEValidator/CMakeLists.txt --replace-fail ' -Werror"' '"'
|
2024-09-26 11:04:55 +00:00
|
|
|
'' + lib.optionalString stdenv.hostPlatform.isDarwin ''
|
2020-04-24 23:36:52 +00:00
|
|
|
substituteInPlace GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp \
|
|
|
|
--replace math.h cmath
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Library for handling the COLLADA file format";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/KhronosGroup/OpenCOLLADA/";
|
2024-09-19 14:19:46 +00:00
|
|
|
maintainers = [ ];
|
2021-02-05 17:12:51 +00:00
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
license = lib.licenses.mit;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|