2020-04-28 17:22:31 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPackages
|
|
|
|
, fetchFromGitHub
|
|
|
|
, zlib
|
|
|
|
, ilmbase
|
2020-07-30 00:35:18 +00:00
|
|
|
, fetchpatch
|
2020-04-28 17:22:31 +00:00
|
|
|
, cmake
|
|
|
|
, libtool
|
|
|
|
}:
|
2020-07-30 00:35:18 +00:00
|
|
|
|
2010-07-28 18:01:17 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "openexr";
|
2020-08-11 18:13:48 +00:00
|
|
|
version = "2.5.2";
|
|
|
|
|
|
|
|
outputs = [ "bin" "dev" "out" "doc" ];
|
2015-02-19 02:02:05 +00:00
|
|
|
|
2020-04-26 21:29:17 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "AcademySoftwareFoundation";
|
|
|
|
repo = "openexr";
|
|
|
|
rev = "v${version}";
|
2020-08-11 18:13:48 +00:00
|
|
|
sha256 = "dtVoXA3JdmNs1iqu7cZlAdxt/CAgL5lSbOwu0SheyO0=";
|
2015-07-02 12:27:47 +00:00
|
|
|
};
|
2015-02-19 02:02:05 +00:00
|
|
|
|
2020-08-11 18:13:48 +00:00
|
|
|
patches = [
|
|
|
|
# Fix pkg-config paths
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/AcademySoftwareFoundation/openexr/commit/6442fb71a86c09fb0a8118b6dbd93bcec4883a3c.patch";
|
|
|
|
sha256 = "bwD5WTKPT4DjOJDnPXIvT5hJJkH0b71Vo7qupWO9nPA=";
|
|
|
|
})
|
|
|
|
] ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.libc != "glibc") [
|
|
|
|
# Fix ilmbase/openexr using glibc-only fpstate.
|
|
|
|
# Found via https://git.alpinelinux.org/aports/tree/community/openexr/10-musl-_fpstate.patch?id=80d9611b7b8e406a554c6f511137e03ff26acbae,
|
|
|
|
# TODO Remove when https://github.com/AcademySoftwareFoundation/openexr/pull/798 is merged and available.
|
|
|
|
(fetchpatch {
|
|
|
|
name = "ilmbase-musl-_fpstate.patch.patch";
|
|
|
|
url = "https://raw.githubusercontent.com/void-linux/void-packages/80bbc168faa25448bd3399f4df331b836e74b85c/srcpkgs/ilmbase/patches/musl-_fpstate.patch";
|
|
|
|
sha256 = "1bmyg4qfbz2p5iflrakbj8jzs85s1cf4cpfyclycnnqqi45j8m8d";
|
|
|
|
# The patch's files are written as `IlmBase/...`, this turns it into
|
|
|
|
# `a/IlmBase/...`, so that the `patch -p1` that `patches` does works.
|
|
|
|
extraPrefix = ""; # Changing this requires changing the `sha256` (fixed-output)!
|
|
|
|
})
|
|
|
|
];
|
2020-04-28 17:22:31 +00:00
|
|
|
nativeBuildInputs = [ cmake libtool ];
|
2015-02-19 02:02:05 +00:00
|
|
|
propagatedBuildInputs = [ ilmbase zlib ];
|
2015-03-31 05:27:36 +00:00
|
|
|
|
2015-07-02 12:27:47 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2015-02-19 02:02:05 +00:00
|
|
|
meta = with stdenv.lib; {
|
2019-11-17 08:43:55 +00:00
|
|
|
description = "A high dynamic-range (HDR) image file format";
|
|
|
|
homepage = "https://www.openexr.com/";
|
2015-02-19 02:02:05 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
2005-11-12 22:04:57 +00:00
|
|
|
}
|