Merge pull request #127522 from rytone/ocio2
blender: Switch to OpenColorIO 2.x
This commit is contained in:
commit
9959bb87e8
11 changed files with 135 additions and 40 deletions
|
@ -9156,6 +9156,16 @@
|
|||
githubId = 3280280;
|
||||
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 = {
|
||||
email = "richard.zetterberg@gmail.com";
|
||||
github = "rzetterberg";
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
, kguiaddons, ki18n, kitemmodels, kitemviews, kwindowsystem
|
||||
, kio, kcrash, breeze-icons
|
||||
, 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
|
||||
, python3Packages
|
||||
}:
|
||||
|
@ -23,7 +23,7 @@ mkDerivation rec {
|
|||
karchive kconfig kwidgetsaddons kcompletion kcoreaddons kguiaddons
|
||||
ki18n kitemmodels kitemviews kwindowsystem kio kcrash breeze-icons
|
||||
boost libraw fftw eigen exiv2 lcms2 gsl openexr libheif giflib
|
||||
openjpeg opencolorio poppler curl ilmbase
|
||||
openjpeg opencolorio_1 poppler curl ilmbase
|
||||
qtmultimedia qtx11extras quazip
|
||||
python3Packages.pyqt5
|
||||
] ++ lib.optional (stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isx86_64) vc;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
, libjpeg
|
||||
, libpng
|
||||
, libtiff
|
||||
, opencolorio
|
||||
, opencolorio_1
|
||||
, openexr
|
||||
, robin-map
|
||||
, unzip
|
||||
|
@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
|
|||
libjpeg
|
||||
libpng
|
||||
libtiff
|
||||
opencolorio
|
||||
opencolorio_1
|
||||
openexr
|
||||
robin-map
|
||||
fmt
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ lib, stdenv, fetchFromGitHub, boost, cmake, ilmbase, libjpeg, libpng, libtiff
|
||||
, opencolorio, openexr, unzip
|
||||
, opencolorio_1, openexr, unzip
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
|
|||
nativeBuildInputs = [ cmake unzip ];
|
||||
buildInputs = [
|
||||
boost ilmbase libjpeg libpng
|
||||
libtiff opencolorio openexr
|
||||
libtiff opencolorio_1 openexr
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, stdenv, fetchurl, qt4, pkg-config, boost, expat, cairo, python2Packages,
|
||||
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 }:
|
||||
|
||||
let
|
||||
|
@ -58,7 +58,7 @@ let
|
|||
sha256 = "tUb6myG03mRieUAfgRZfv5Ap+cLvbpNrLMYCGTiAq8c=";
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [
|
||||
pango librsvg librevenge libcdr opencolorio libxml2 libzip
|
||||
pango librsvg librevenge libcdr opencolorio_1 libxml2 libzip
|
||||
poppler imagemagick
|
||||
];
|
||||
preConfigure = ''
|
||||
|
@ -74,7 +74,7 @@ let
|
|||
sha256 = "OQg6a5wNy9TFFySjmgd1subvXRxY/ZnSOCkaoUo+ZaA=";
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [
|
||||
libpng ffmpeg_3 openexr opencolorio openimageio boost libGL
|
||||
libpng ffmpeg_3 openexr opencolorio_1 openimageio boost libGL
|
||||
seexpr libraw openjpeg libwebp
|
||||
];
|
||||
})
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ lib, stdenv, fetchFromGitHub, pkg-config, which, qmake, mkDerivation,
|
||||
qtmultimedia, wrapQtAppsHook, frei0r, opencolorio, ffmpeg-full,
|
||||
qtmultimedia, wrapQtAppsHook, frei0r, opencolorio_1, ffmpeg-full,
|
||||
CoreFoundation }:
|
||||
|
||||
mkDerivation rec {
|
||||
|
@ -23,7 +23,7 @@ mkDerivation rec {
|
|||
buildInputs = [
|
||||
ffmpeg-full
|
||||
frei0r
|
||||
opencolorio
|
||||
opencolorio_1
|
||||
qtmultimedia
|
||||
] ++ lib.optional stdenv.isDarwin CoreFoundation;
|
||||
|
||||
|
|
45
pkgs/development/libraries/opencolorio/1.x.nix
Normal file
45
pkgs/development/libraries/opencolorio/1.x.nix
Normal 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;
|
||||
};
|
||||
}
|
|
@ -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;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "opencolorio";
|
||||
version = "1.1.1";
|
||||
version = "2.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "imageworks";
|
||||
owner = "AcademySoftwareFoundation";
|
||||
repo = "OpenColorIO";
|
||||
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
|
||||
nativeBuildInputs = [ cmake pkg-config git ];
|
||||
cmakeFlags = [ "-DOCIO_INSTALL_EXT_PACKAGES=NONE" ]
|
||||
++ lib.optional (!pythonBindings) "-DOCIO_BUILD_PYTHON=OFF"
|
||||
++ lib.optional (!buildApps) "-DOCIO_BUILD_APPS=OFF";
|
||||
|
||||
buildInputs = [ lcms2 tinyxml ] ++ 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"
|
||||
] ++ 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/
|
||||
'';
|
||||
# TODO Investigate this: Python and GPU tests fail to load libOpenColorIO.so.2.0
|
||||
# doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://opencolorio.org";
|
||||
description = "A color management framework for visual effects and animation";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.goibhniu ];
|
||||
maintainers = [ maintainers.rytone ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
|
33
pkgs/development/libraries/pystring/default.nix
Normal file
33
pkgs/development/libraries/pystring/default.nix
Normal 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;
|
||||
};
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, boost165, pkg-config, guile,
|
||||
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 {
|
||||
|
@ -21,7 +21,7 @@ in stdenv.mkDerivation rec {
|
|||
nativeBuildInputs = [ cmake pkg-config makeWrapper ];
|
||||
buildInputs = [
|
||||
boost_static guile eigen libpng python
|
||||
libGLU qt4 openexr openimageio opencolorio xercesc
|
||||
libGLU qt4 openexr openimageio opencolorio_1 xercesc
|
||||
osl seexpr
|
||||
];
|
||||
|
||||
|
|
|
@ -8118,6 +8118,8 @@ in
|
|||
|
||||
pywal = with python3Packages; toPythonApplication pywal;
|
||||
|
||||
pystring = callPackage ../development/libraries/pystring {};
|
||||
|
||||
rbw = callPackage ../tools/security/rbw {
|
||||
inherit (darwin.apple_sdk.frameworks) Security;
|
||||
};
|
||||
|
@ -17574,7 +17576,10 @@ in
|
|||
|
||||
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 { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue