From d9ee3bc94f1987ab095d819a6ef64a9db496d8c8 Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Fri, 18 Aug 2023 14:17:07 +0200 Subject: [PATCH 1/5] yaml-cpp: 0.7.0 -> 0.8.0 --- .../libraries/yaml-cpp/default.nix | 27 +++---------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/pkgs/development/libraries/yaml-cpp/default.nix b/pkgs/development/libraries/yaml-cpp/default.nix index c9468b10b99be..20d546e346b8f 100644 --- a/pkgs/development/libraries/yaml-cpp/default.nix +++ b/pkgs/development/libraries/yaml-cpp/default.nix @@ -3,36 +3,19 @@ , fetchFromGitHub , gitUpdater , cmake -, fetchpatch }: stdenv.mkDerivation rec { pname = "yaml-cpp"; - version = "0.7.0"; + version = "0.8.0"; src = fetchFromGitHub { owner = "jbeder"; repo = "yaml-cpp"; - rev = "yaml-cpp-${version}"; - hash = "sha256-2tFWccifn0c2lU/U1WNg2FHrBohjx8CXMllPJCevaNk="; + rev = version; + hash = "sha256-J87oS6Az1/vNdyXu3L7KmUGWzU0IAkGrGMUUha+xDXI="; }; - patches = [ - # https://github.com/jbeder/yaml-cpp/issues/774 - # https://github.com/jbeder/yaml-cpp/pull/1037 - (fetchpatch { - name = "yaml-cpp-Fix-generated-cmake-config.patch"; - url = "https://github.com/jbeder/yaml-cpp/commit/4f48727b365962e31451cd91027bd797bc7d2ee7.patch"; - hash = "sha256-jarZAh7NgwL3xXzxijDiAQmC/EC2WYfNMkYHEIQBPhM="; - }) - # TODO: Remove with the next release, when https://github.com/jbeder/yaml-cpp/pull/1058 is available - (fetchpatch { - name = "yaml-cpp-Fix-pc-paths-for-absolute-GNUInstallDirs.patch"; - url = "https://github.com/jbeder/yaml-cpp/commit/328d2d85e833be7cb5a0ab246cc3f5d7e16fc67a.patch"; - hash = "sha256-1M2rxfbVOrRH9kiImcwcEolXOP8DeDW9Cbu03+mB5Yk="; - }) - ]; - strictDeps = true; nativeBuildInputs = [ @@ -47,9 +30,7 @@ stdenv.mkDerivation rec { doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; - passthru.updateScript = gitUpdater { - rev-prefix = "yaml-cpp-"; - }; + passthru.updateScript = gitUpdater { }; meta = with lib; { description = "A YAML parser and emitter for C++"; From 77083d8d513b1e553efa6203ef57b3df8ad72b8f Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Thu, 12 Oct 2023 09:07:46 +0200 Subject: [PATCH 2/5] opencolorio: 2.2 -> 2.3 --- .../broken-cmake-zlib-version.patch | 17 +++++++++++ .../libraries/opencolorio/default.nix | 30 ++++++++----------- 2 files changed, 30 insertions(+), 17 deletions(-) create mode 100644 pkgs/development/libraries/opencolorio/broken-cmake-zlib-version.patch diff --git a/pkgs/development/libraries/opencolorio/broken-cmake-zlib-version.patch b/pkgs/development/libraries/opencolorio/broken-cmake-zlib-version.patch new file mode 100644 index 0000000000000..e60ebc9e1efef --- /dev/null +++ b/pkgs/development/libraries/opencolorio/broken-cmake-zlib-version.patch @@ -0,0 +1,17 @@ +diff --git a/src/cmake/Config.cmake.in b/src/cmake/Config.cmake.in +index c122b013..04f36bf0 100644 +--- a/src/cmake/Config.cmake.in ++++ b/src/cmake/Config.cmake.in +@@ -43,11 +43,7 @@ if (NOT @BUILD_SHARED_LIBS@) # NOT @BUILD_SHARED_LIBS@ + # ZLIB_VERSION_STRING is still available for backward compatibility. + # See https://cmake.org/cmake/help/git-stage/module/FindZLIB.html + +- if (@ZLIB_VERSION@) # @ZLIB_VERSION@ +- find_dependency(ZLIB @ZLIB_VERSION@) +- else() +- find_dependency(ZLIB @ZLIB_VERSION_STRING@) +- endif() ++ find_dependency(ZLIB) + endif() + + if (NOT TARGET MINIZIP::minizip-ng) diff --git a/pkgs/development/libraries/opencolorio/default.nix b/pkgs/development/libraries/opencolorio/default.nix index 40a64077acc93..9b5018ef41826 100644 --- a/pkgs/development/libraries/opencolorio/default.nix +++ b/pkgs/development/libraries/opencolorio/default.nix @@ -27,32 +27,25 @@ stdenv.mkDerivation rec { pname = "opencolorio"; - version = "2.2.0"; + version = "2.3.0"; src = fetchFromGitHub { owner = "AcademySoftwareFoundation"; repo = "OpenColorIO"; rev = "v${version}"; - sha256 = "sha256-l5UUysHdP/gb4Mn5A64XEoHOkthl6Mlb95CuI0l4vXQ="; + sha256 = "sha256-E4TmMEFzI3nKqiDFaAkNx44uo84sacvZqjbfWe3A8fE="; }; patches = [ (fetchpatch { - name = "darwin-no-hidden-l.patch"; - url = "https://github.com/AcademySoftwareFoundation/OpenColorIO/commit/48bab7c643ed8d108524d718e5038d836f906682.patch"; - revert = true; - sha256 = "sha256-0DF+lwi2nfkUFG0wYvL3HYbhZS6SqGtPWoOabrFS1Eo="; - }) - (fetchpatch { - name = "pkg-config-absolute-path.patch"; - url = "https://github.com/AcademySoftwareFoundation/OpenColorIO/commit/332462e7f5051b7e26ee3d8c22890cd5e71e7c30.patch"; - sha256 = "sha256-7xHALhnOkKszgFBgPIbiZQaORnEJ+1M6RyoZdFgjElM="; - }) - (fetchpatch { - name = "minizip-ng-4.patch"; - url = "https://gitlab.archlinux.org/archlinux/packaging/packages/opencolorio/-/raw/5fc40f42f5c05d905793610c37b46ca3649245f3/minizip-ng-4.patch"; - hash = "sha256-B+dbBVRn0EuGtJaWxz5ah9el0RN7cLb81hgqnKkvhew="; + # Taken from https://github.com/AcademySoftwareFoundation/OpenColorIO/pull/1891. + name = "opencolorio-yaml-cpp-8.0-compat.patch"; + url = "https://github.com/AcademySoftwareFoundation/OpenColorIO/commit/e99b4afcf0408d8ec56fdf2b9380327c9284db00.patch"; + sha256 = "sha256-7eIvVWKcpE0lmuYdNqFQFHkW/sSSzQ//LNIMOC28KZg="; }) + # Workaround for https://gitlab.kitware.com/cmake/cmake/-/issues/25200. + # Needed for zlib >= 1.3 && cmake < 3.27.4. + ./broken-cmake-zlib-version.patch ]; postPatch = lib.optionalString stdenv.isDarwin '' @@ -81,14 +74,17 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DOCIO_INSTALL_EXT_PACKAGES=NONE" + "-DOCIO_USE_SSE2NEON=OFF" # GPU test fails with: freeglut (GPU tests): failed to open display '' "-DOCIO_BUILD_GPU_TESTS=OFF" - "-Dminizip-ng_INCLUDE_DIR=${minizip-ng}/include" + "-Dminizip-ng_INCLUDE_DIR=${minizip-ng}/include/minizip-ng" ] ++ lib.optional (!pythonBindings) "-DOCIO_BUILD_PYTHON=OFF" ++ lib.optional (!buildApps) "-DOCIO_BUILD_APPS=OFF"; # precision issues on non-x86 doCheck = stdenv.isx86_64; + # Tends to fail otherwise. + enableParallelChecking = false; meta = with lib; { homepage = "https://opencolorio.org"; From 25fdcb4af94c094e5b29fa11a2e7b09dcefd9e4c Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Wed, 25 Oct 2023 05:53:12 +0200 Subject: [PATCH 3/5] olive-editor: patch for opencolorio-2.3 --- pkgs/applications/video/olive-editor/default.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/video/olive-editor/default.nix b/pkgs/applications/video/olive-editor/default.nix index e90781c3d976f..5daac65313e82 100644 --- a/pkgs/applications/video/olive-editor/default.nix +++ b/pkgs/applications/video/olive-editor/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch , pkg-config , which , frei0r @@ -34,12 +35,19 @@ stdenv.mkDerivation { "-DBUILD_QT6=1" ]; + patches = [ + (fetchpatch { + # Taken from https://github.com/olive-editor/olive/pull/2294. + name = "olive-editor-openimageio-2.3-compat.patch"; + url = "https://github.com/olive-editor/olive/commit/311eeb72944f93f873d1cd1784ee2bf423e1e7c2.patch"; + hash = "sha256-lswWn4DbXGH1qPvPla0jSgUJQXuqU7LQGHIPoXAE8ag="; + }) + ]; + # https://github.com/olive-editor/olive/issues/2200 - patchPhase = '' - runHook prePatch + postPatch = '' substituteInPlace ./app/node/project/serializer/serializer230220.cpp \ --replace 'QStringRef' 'QStringView' - runHook postPatch ''; nativeBuildInputs = [ From 8142c0c9006d290e701aa8a0917208a587657de6 Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Wed, 25 Oct 2023 07:40:24 +0200 Subject: [PATCH 4/5] openimageio: fix build with zlib 1.3 --- pkgs/development/libraries/openimageio/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/libraries/openimageio/default.nix b/pkgs/development/libraries/openimageio/default.nix index 610a458c071d3..a0f520dcb6cea 100644 --- a/pkgs/development/libraries/openimageio/default.nix +++ b/pkgs/development/libraries/openimageio/default.nix @@ -25,6 +25,12 @@ stdenv.mkDerivation rec { hash = "sha256-I2/JPmUBDb0bw7qbSZcAkYHB2q2Uo7En7ZurMwWhg/M="; }; + # Workaround broken zlib version detecion in CMake < 3.37. + postPatch = '' + substituteInPlace ./src/cmake/Config.cmake.in \ + --replace " @ZLIB_VERSION@" "" + ''; + outputs = [ "bin" "out" "dev" "doc" ]; nativeBuildInputs = [ From b5cd2e5089992576cd433fcb89c3adb9a3885112 Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Wed, 25 Oct 2023 07:40:52 +0200 Subject: [PATCH 5/5] krita: patch for opencolorio-2.3 --- pkgs/applications/graphics/krita/generic.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/applications/graphics/krita/generic.nix b/pkgs/applications/graphics/krita/generic.nix index 507aaf0f76868..ba53a94f71076 100644 --- a/pkgs/applications/graphics/krita/generic.nix +++ b/pkgs/applications/graphics/krita/generic.nix @@ -27,6 +27,12 @@ mkDerivation rec { url = "https://gitlab.archlinux.org/archlinux/packaging/packages/krita/-/raw/acd9a818660e86b14a66fceac295c2bab318c671/exiv2-0.28.patch"; hash = "sha256-iD2pyid513ThJVeotUlVDrwYANofnEiZmWINNUm/saw="; }) + (fetchpatch { + name = "krita-opencolorio-2.3-compat.patch"; + url = "https://invent.kde.org/graphics/krita/-/commit/520c633c2c868f2236d8e56eefecdcb6e3ebd840.patch"; + hash = "sha256-eXsgBN8OnKjZOQsOxViPypts6CVh3L+IYKMB/mDUcfQ="; + includes = [ "plugins/dockers/lut/ocio_display_filter_vfx2021.cpp" ]; + }) ]; nativeBuildInputs = [ cmake extra-cmake-modules python3Packages.sip makeWrapper ];