Merge pull request #127522 from rytone/ocio2

blender: Switch to OpenColorIO 2.x
This commit is contained in:
Dmitry Kalinkin 2021-06-25 10:39:43 -04:00 committed by GitHub
commit 9959bb87e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 135 additions and 40 deletions

View File

@ -9156,6 +9156,16 @@
githubId = 3280280; githubId = 3280280;
name = "Ryne Everett"; name = "Ryne Everett";
}; };
rytone = {
email = "max@ryt.one";
github = "rytone";
githubId = 8082305;
name = "Maxwell Beck";
keys = [{
longkeyid = "rsa2048/0xBB3EFA303760A0DB";
fingerprint = "D260 79E3 C2BC 2E43 905B D057 BB3E FA30 3760 A0DB";
}];
};
rzetterberg = { rzetterberg = {
email = "richard.zetterberg@gmail.com"; email = "richard.zetterberg@gmail.com";
github = "rzetterberg"; github = "rzetterberg";

View File

@ -3,7 +3,7 @@
, kguiaddons, ki18n, kitemmodels, kitemviews, kwindowsystem , kguiaddons, ki18n, kitemmodels, kitemviews, kwindowsystem
, kio, kcrash, breeze-icons , kio, kcrash, breeze-icons
, boost, libraw, fftw, eigen, exiv2, libheif, lcms2, gsl, openexr, giflib , boost, libraw, fftw, eigen, exiv2, libheif, lcms2, gsl, openexr, giflib
, openjpeg, opencolorio, vc, poppler, curl, ilmbase , openjpeg, opencolorio_1, vc, poppler, curl, ilmbase
, qtmultimedia, qtx11extras, quazip , qtmultimedia, qtx11extras, quazip
, python3Packages , python3Packages
}: }:
@ -23,7 +23,7 @@ mkDerivation rec {
karchive kconfig kwidgetsaddons kcompletion kcoreaddons kguiaddons karchive kconfig kwidgetsaddons kcompletion kcoreaddons kguiaddons
ki18n kitemmodels kitemviews kwindowsystem kio kcrash breeze-icons ki18n kitemmodels kitemviews kwindowsystem kio kcrash breeze-icons
boost libraw fftw eigen exiv2 lcms2 gsl openexr libheif giflib boost libraw fftw eigen exiv2 lcms2 gsl openexr libheif giflib
openjpeg opencolorio poppler curl ilmbase openjpeg opencolorio_1 poppler curl ilmbase
qtmultimedia qtx11extras quazip qtmultimedia qtx11extras quazip
python3Packages.pyqt5 python3Packages.pyqt5
] ++ lib.optional (stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isx86_64) vc; ] ++ lib.optional (stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isx86_64) vc;

View File

@ -7,7 +7,7 @@
, libjpeg , libjpeg
, libpng , libpng
, libtiff , libtiff
, opencolorio , opencolorio_1
, openexr , openexr
, robin-map , robin-map
, unzip , unzip
@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
libjpeg libjpeg
libpng libpng
libtiff libtiff
opencolorio opencolorio_1
openexr openexr
robin-map robin-map
fmt fmt

View File

@ -1,5 +1,5 @@
{ lib, stdenv, fetchFromGitHub, boost, cmake, ilmbase, libjpeg, libpng, libtiff { lib, stdenv, fetchFromGitHub, boost, cmake, ilmbase, libjpeg, libpng, libtiff
, opencolorio, openexr, unzip , opencolorio_1, openexr, unzip
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake unzip ]; nativeBuildInputs = [ cmake unzip ];
buildInputs = [ buildInputs = [
boost ilmbase libjpeg libpng boost ilmbase libjpeg libpng
libtiff opencolorio openexr libtiff opencolorio_1 openexr
]; ];
cmakeFlags = [ cmakeFlags = [

View File

@ -1,6 +1,6 @@
{ lib, stdenv, fetchurl, qt4, pkg-config, boost, expat, cairo, python2Packages, { lib, stdenv, fetchurl, qt4, pkg-config, boost, expat, cairo, python2Packages,
cmake, flex, bison, pango, librsvg, librevenge, libxml2, libcdr, libzip, cmake, flex, bison, pango, librsvg, librevenge, libxml2, libcdr, libzip,
poppler, imagemagick, openexr, ffmpeg_3, opencolorio, openimageio, poppler, imagemagick, openexr, ffmpeg_3, opencolorio_1, openimageio,
qmake4Hook, libpng, libGL, lndir, libraw, openjpeg, libwebp, fetchFromGitHub }: qmake4Hook, libpng, libGL, lndir, libraw, openjpeg, libwebp, fetchFromGitHub }:
let let
@ -58,7 +58,7 @@ let
sha256 = "tUb6myG03mRieUAfgRZfv5Ap+cLvbpNrLMYCGTiAq8c="; sha256 = "tUb6myG03mRieUAfgRZfv5Ap+cLvbpNrLMYCGTiAq8c=";
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [ pkg-config ];
buildInputs = [ buildInputs = [
pango librsvg librevenge libcdr opencolorio libxml2 libzip pango librsvg librevenge libcdr opencolorio_1 libxml2 libzip
poppler imagemagick poppler imagemagick
]; ];
preConfigure = '' preConfigure = ''
@ -74,7 +74,7 @@ let
sha256 = "OQg6a5wNy9TFFySjmgd1subvXRxY/ZnSOCkaoUo+ZaA="; sha256 = "OQg6a5wNy9TFFySjmgd1subvXRxY/ZnSOCkaoUo+ZaA=";
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [ pkg-config ];
buildInputs = [ buildInputs = [
libpng ffmpeg_3 openexr opencolorio openimageio boost libGL libpng ffmpeg_3 openexr opencolorio_1 openimageio boost libGL
seexpr libraw openjpeg libwebp seexpr libraw openjpeg libwebp
]; ];
}) })

View File

@ -1,5 +1,5 @@
{ lib, stdenv, fetchFromGitHub, pkg-config, which, qmake, mkDerivation, { lib, stdenv, fetchFromGitHub, pkg-config, which, qmake, mkDerivation,
qtmultimedia, wrapQtAppsHook, frei0r, opencolorio, ffmpeg-full, qtmultimedia, wrapQtAppsHook, frei0r, opencolorio_1, ffmpeg-full,
CoreFoundation }: CoreFoundation }:
mkDerivation rec { mkDerivation rec {
@ -23,7 +23,7 @@ mkDerivation rec {
buildInputs = [ buildInputs = [
ffmpeg-full ffmpeg-full
frei0r frei0r
opencolorio opencolorio_1
qtmultimedia qtmultimedia
] ++ lib.optional stdenv.isDarwin CoreFoundation; ] ++ lib.optional stdenv.isDarwin CoreFoundation;

View File

@ -0,0 +1,45 @@
{ stdenv, lib, fetchFromGitHub, cmake, boost, pkg-config, lcms2, tinyxml, git }:
stdenv.mkDerivation rec {
pname = "opencolorio";
version = "1.1.1";
src = fetchFromGitHub {
owner = "imageworks";
repo = "OpenColorIO";
rev = "v${version}";
sha256 = "12srvxca51czpfjl0gabpidj9n84mw78ivxy5w75qhq2mmc798sb";
};
outputs = [ "bin" "out" "dev" ];
# TODO: Investigate whether git can be dropped: It's only used to apply patches
nativeBuildInputs = [ cmake pkg-config git ];
buildInputs = [ lcms2 tinyxml ] ++ lib.optional stdenv.isDarwin boost;
postPatch = ''
substituteInPlace src/core/CMakeLists.txt --replace "-Werror" ""
substituteInPlace src/pyglue/CMakeLists.txt --replace "-Werror" ""
'';
cmakeFlags = [
"-DUSE_EXTERNAL_LCMS=ON"
"-DUSE_EXTERNAL_TINYXML=ON"
# External libyamlcpp 0.6.* not compatible: https://github.com/imageworks/OpenColorIO/issues/517
"-DUSE_EXTERNAL_YAML=OFF"
] ++ lib.optional stdenv.isDarwin "-DOCIO_USE_BOOST_PTR=ON"
++ lib.optional (!stdenv.hostPlatform.isi686 && !stdenv.hostPlatform.isx86_64) "-DOCIO_USE_SSE=OFF";
postInstall = ''
mkdir -p $bin/bin; mv $out/bin $bin/
'';
meta = with lib; {
homepage = "https://opencolorio.org";
description = "A color management framework for visual effects and animation";
license = licenses.bsd3;
maintainers = [ maintainers.goibhniu ];
platforms = platforms.unix;
};
}

View File

@ -1,47 +1,49 @@
{ stdenv, lib, fetchFromGitHub, cmake, boost, pkg-config, lcms2, tinyxml, git }: {
stdenv, lib, fetchFromGitHub,
cmake, expat, libyamlcpp, ilmbase, pystring, # Base dependencies
glew, freeglut, # Only required on Linux
Carbon, GLUT, Cocoa, # Only required on Darwin
pythonBindings ? true, # Python bindings
python3Packages,
buildApps ? true, # Utility applications
lcms2, openimageio2, openexr,
}:
with lib; with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "opencolorio"; pname = "opencolorio";
version = "1.1.1"; version = "2.0.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "imageworks"; owner = "AcademySoftwareFoundation";
repo = "OpenColorIO"; repo = "OpenColorIO";
rev = "v${version}"; rev = "v${version}";
sha256 = "12srvxca51czpfjl0gabpidj9n84mw78ivxy5w75qhq2mmc798sb"; sha256 = "194j9jp5c8ws0fryiz936wyinphnpzwpqnzvw9ryx6rbiwrba487";
}; };
outputs = [ "bin" "out" "dev" ]; nativeBuildInputs = [ cmake ];
buildInputs = [ expat libyamlcpp ilmbase pystring ]
++ lib.optionals stdenv.hostPlatform.isLinux [ glew freeglut ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ Carbon GLUT Cocoa ]
++ lib.optionals pythonBindings [ python3Packages.python python3Packages.pybind11 ]
++ lib.optionals buildApps [ lcms2 openimageio2 openexr ];
# TODO: Investigate whether git can be dropped: It's only used to apply patches cmakeFlags = [ "-DOCIO_INSTALL_EXT_PACKAGES=NONE" ]
nativeBuildInputs = [ cmake pkg-config git ]; ++ lib.optional (!pythonBindings) "-DOCIO_BUILD_PYTHON=OFF"
++ lib.optional (!buildApps) "-DOCIO_BUILD_APPS=OFF";
buildInputs = [ lcms2 tinyxml ] ++ optional stdenv.isDarwin boost; # TODO Investigate this: Python and GPU tests fail to load libOpenColorIO.so.2.0
# doCheck = true;
postPatch = ''
substituteInPlace src/core/CMakeLists.txt --replace "-Werror" ""
substituteInPlace src/pyglue/CMakeLists.txt --replace "-Werror" ""
'';
cmakeFlags = [
"-DUSE_EXTERNAL_LCMS=ON"
"-DUSE_EXTERNAL_TINYXML=ON"
# External libyamlcpp 0.6.* not compatible: https://github.com/imageworks/OpenColorIO/issues/517
"-DUSE_EXTERNAL_YAML=OFF"
] ++ optional stdenv.isDarwin "-DOCIO_USE_BOOST_PTR=ON"
++ optional (!stdenv.hostPlatform.isi686 && !stdenv.hostPlatform.isx86_64) "-DOCIO_USE_SSE=OFF";
postInstall = ''
mkdir -p $bin/bin; mv $out/bin $bin/
'';
meta = with lib; { meta = with lib; {
homepage = "https://opencolorio.org"; homepage = "https://opencolorio.org";
description = "A color management framework for visual effects and animation"; description = "A color management framework for visual effects and animation";
license = licenses.bsd3; license = licenses.bsd3;
maintainers = [ maintainers.goibhniu ]; maintainers = [ maintainers.rytone ];
platforms = platforms.unix; platforms = platforms.unix;
}; };
} }

View File

@ -0,0 +1,33 @@
{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake }:
stdenv.mkDerivation rec {
pname = "pystring";
version = "1.1.3";
src = fetchFromGitHub {
owner = "imageworks";
repo = "pystring";
rev = "v${version}";
sha256 = "1w31pjiyshqgk6zd6m3ab3xfgb0ribi77r6fwrry2aw8w1adjknf";
};
patches = [
(fetchpatch {
name = "pystring-cmake-configuration.patch";
url = "https://github.com/imageworks/pystring/commit/4f653fc35421129eae8a2c424901ca7170059370.patch";
sha256 = "1hynzz76ff4vvmi6kwixsmjswkpyj6s4vv05d7nw0zscj4cdp8k3";
})
];
nativeBuildInputs = [ cmake ];
doCheck = true;
meta = with lib; {
homepage = "https://github.com/imageworks/pystring/";
description = "A collection of C++ functions which match the interface and behavior of python's string class methods using std::string";
license = licenses.bsd3;
maintainers = [ maintainers.rytone ];
platforms = platforms.unix;
};
}

View File

@ -1,6 +1,6 @@
{ lib, stdenv, fetchFromGitHub, cmake, boost165, pkg-config, guile, { lib, stdenv, fetchFromGitHub, cmake, boost165, pkg-config, guile,
eigen, libpng, python, libGLU, qt4, openexr, openimageio, eigen, libpng, python, libGLU, qt4, openexr, openimageio,
opencolorio, xercesc, ilmbase, osl, seexpr, makeWrapper opencolorio_1, xercesc, ilmbase, osl, seexpr, makeWrapper
}: }:
let boost_static = boost165.override { let boost_static = boost165.override {
@ -21,7 +21,7 @@ in stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake pkg-config makeWrapper ]; nativeBuildInputs = [ cmake pkg-config makeWrapper ];
buildInputs = [ buildInputs = [
boost_static guile eigen libpng python boost_static guile eigen libpng python
libGLU qt4 openexr openimageio opencolorio xercesc libGLU qt4 openexr openimageio opencolorio_1 xercesc
osl seexpr osl seexpr
]; ];

View File

@ -8118,6 +8118,8 @@ in
pywal = with python3Packages; toPythonApplication pywal; pywal = with python3Packages; toPythonApplication pywal;
pystring = callPackage ../development/libraries/pystring {};
rbw = callPackage ../tools/security/rbw { rbw = callPackage ../tools/security/rbw {
inherit (darwin.apple_sdk.frameworks) Security; inherit (darwin.apple_sdk.frameworks) Security;
}; };
@ -17574,7 +17576,10 @@ in
openldap = callPackage ../development/libraries/openldap { }; openldap = callPackage ../development/libraries/openldap { };
opencolorio = callPackage ../development/libraries/opencolorio { }; opencolorio = callPackage ../development/libraries/opencolorio {
inherit (darwin.apple_sdk.frameworks) Carbon GLUT Cocoa;
};
opencolorio_1 = callPackage ../development/libraries/opencolorio/1.x.nix { };
opendmarc = callPackage ../development/libraries/opendmarc { }; opendmarc = callPackage ../development/libraries/opendmarc { };