From 19cebf78d1bb57691c8bd8cda01ea48a7bf1119a Mon Sep 17 00:00:00 2001 From: Augustin Trancart Date: Sun, 22 Dec 2024 17:41:30 +0100 Subject: [PATCH] wip remove openexr 2 --- .../video/olive-editor/default.nix | 4 +- pkgs/by-name/an/ansel/package.nix | 4 +- pkgs/by-name/ar/art/package.nix | 4 +- .../color-transformation-language/package.nix | 4 +- pkgs/by-name/da/darktable/package.nix | 4 +- pkgs/by-name/li/libjxl/package.nix | 4 +- pkgs/by-name/sw/swayimg/package.nix | 4 +- pkgs/development/libraries/gdal/default.nix | 4 +- .../libraries/gstreamer/bad/default.nix | 4 +- .../libraries/opencolorio/default.nix | 4 +- pkgs/development/libraries/openexr/3.nix | 62 -------------- .../development/libraries/openexr/default.nix | 84 ++++++++----------- .../libraries/openexr/gcc-13.patch | 25 ------ .../libraries/openscenegraph/default.nix | 4 +- pkgs/kde/frameworks/kimageformats/default.nix | 4 +- pkgs/top-level/all-packages.nix | 12 +-- 16 files changed, 61 insertions(+), 170 deletions(-) delete mode 100644 pkgs/development/libraries/openexr/3.nix delete mode 100644 pkgs/development/libraries/openexr/gcc-13.patch diff --git a/pkgs/applications/video/olive-editor/default.nix b/pkgs/applications/video/olive-editor/default.nix index b0c39aa7b3b585..b3cd3512a74db1 100644 --- a/pkgs/applications/video/olive-editor/default.nix +++ b/pkgs/applications/video/olive-editor/default.nix @@ -12,7 +12,7 @@ cmake, wrapQtAppsHook, openimageio, - openexr_3, + openexr, portaudio, imath, qtwayland, @@ -78,7 +78,7 @@ stdenv.mkDerivation { opencolorio openimageio' imath - openexr_3 + openexr portaudio qtwayland qtmultimedia diff --git a/pkgs/by-name/an/ansel/package.nix b/pkgs/by-name/an/ansel/package.nix index fbc8c8046f6b26..7b23241e8581aa 100644 --- a/pkgs/by-name/an/ansel/package.nix +++ b/pkgs/by-name/an/ansel/package.nix @@ -15,7 +15,7 @@ libxml2, cmake, exiftool, - openexr_3, + openexr, glib, python3Packages, perlPackages, @@ -147,7 +147,7 @@ stdenv.mkDerivation { libxkbcommon libxslt libXtst - openexr_3 + openexr openjpeg osm-gps-map pcre diff --git a/pkgs/by-name/ar/art/package.nix b/pkgs/by-name/ar/art/package.nix index c6ac2033d25667..428aaf9d400e9f 100644 --- a/pkgs/by-name/ar/art/package.nix +++ b/pkgs/by-name/ar/art/package.nix @@ -32,7 +32,7 @@ exiv2, exiftool, mimalloc, - openexr_3, + openexr, ilmbase, opencolorio, color-transformation-language, @@ -83,7 +83,7 @@ stdenv.mkDerivation rec { exiftool libcanberra-gtk3 mimalloc - openexr_3 + openexr ilmbase opencolorio color-transformation-language diff --git a/pkgs/by-name/co/color-transformation-language/package.nix b/pkgs/by-name/co/color-transformation-language/package.nix index 7fe0b5c661beaa..1fd5403142c903 100644 --- a/pkgs/by-name/co/color-transformation-language/package.nix +++ b/pkgs/by-name/co/color-transformation-language/package.nix @@ -4,7 +4,7 @@ fetchFromGitHub, cmake, ilmbase, - openexr_3, + openexr, libtiff, aces-container, }: @@ -23,7 +23,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake ilmbase - openexr_3 + openexr libtiff aces-container ]; diff --git a/pkgs/by-name/da/darktable/package.nix b/pkgs/by-name/da/darktable/package.nix index df3bb7986b355e..b34f4414110796 100644 --- a/pkgs/by-name/da/darktable/package.nix +++ b/pkgs/by-name/da/darktable/package.nix @@ -55,7 +55,7 @@ libxslt, lua, util-linux, - openexr_3, + openexr, openjpeg, osm-gps-map, pcre2, @@ -142,7 +142,7 @@ stdenv.mkDerivation rec { libxslt lua util-linux - openexr_3 + openexr openjpeg osm-gps-map pcre2 diff --git a/pkgs/by-name/li/libjxl/package.nix b/pkgs/by-name/li/libjxl/package.nix index e9860f5867f2c3..0a91d21f128e92 100644 --- a/pkgs/by-name/li/libjxl/package.nix +++ b/pkgs/by-name/li/libjxl/package.nix @@ -12,7 +12,7 @@ libpng, libwebp, gdk-pixbuf, - openexr_3, + openexr, pkg-config, makeWrapper, zlib, @@ -87,7 +87,7 @@ stdenv.mkDerivation rec { libpng libwebp gdk-pixbuf - openexr_3 + openexr zlib ]; diff --git a/pkgs/by-name/sw/swayimg/package.nix b/pkgs/by-name/sw/swayimg/package.nix index 95eacdfec9a682..d5a52c2d02c439 100644 --- a/pkgs/by-name/sw/swayimg/package.nix +++ b/pkgs/by-name/sw/swayimg/package.nix @@ -21,7 +21,7 @@ libjxl, libexif, libavif, - openexr_3, + openexr, bash-completion, testers, nix-update-script, @@ -71,7 +71,7 @@ stdenv.mkDerivation (finalAttrs: { libjxl libexif libavif - openexr_3 + openexr ]; passthru = { diff --git a/pkgs/development/libraries/gdal/default.nix b/pkgs/development/libraries/gdal/default.nix index 937433329b7dc9..5280dfb768538d 100644 --- a/pkgs/development/libraries/gdal/default.nix +++ b/pkgs/development/libraries/gdal/default.nix @@ -60,7 +60,7 @@ libxml2, lz4, netcdf, - openexr_3, + openexr, openjpeg, openssl, pcre2, @@ -167,7 +167,7 @@ stdenv.mkDerivation (finalAttrs: { nonDarwinDeps = lib.optionals (!stdenv.hostPlatform.isDarwin) ( [ # tests for formats enabled by these packages fail on macos - openexr_3 + openexr xercesc ] ++ arrowDeps diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix index 3231bb6c649f63..396faa9fc5addb 100644 --- a/pkgs/development/libraries/gstreamer/bad/default.nix +++ b/pkgs/development/libraries/gstreamer/bad/default.nix @@ -61,7 +61,7 @@ , libusb1 , neon , openal -, openexr_3 +, openexr , openh264Support ? lib.meta.availableOn stdenv.hostPlatform openh264 , openh264 , libopenmpt @@ -184,7 +184,7 @@ stdenv.mkDerivation rec { libusb1 neon openal - openexr_3 + openexr rtmpdump pango soundtouch diff --git a/pkgs/development/libraries/opencolorio/default.nix b/pkgs/development/libraries/opencolorio/default.nix index 8797c2962fbc13..7cce8a562b7a6c 100644 --- a/pkgs/development/libraries/opencolorio/default.nix +++ b/pkgs/development/libraries/opencolorio/default.nix @@ -22,7 +22,7 @@ # Build apps buildApps ? true, # Utility applications lcms2, - openexr_3, + openexr, }: stdenv.mkDerivation rec { @@ -74,7 +74,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals buildApps [ lcms2 - openexr_3 + openexr ]; cmakeFlags = diff --git a/pkgs/development/libraries/openexr/3.nix b/pkgs/development/libraries/openexr/3.nix deleted file mode 100644 index 65666cd7d6f28a..00000000000000 --- a/pkgs/development/libraries/openexr/3.nix +++ /dev/null @@ -1,62 +0,0 @@ -{ lib -, stdenv -, fetchFromGitHub -, cmake -, imath -, libdeflate -, pkg-config -, libjxl -, pkgsCross -}: - -stdenv.mkDerivation rec { - pname = "openexr"; - version = "3.2.4"; - - src = fetchFromGitHub { - owner = "AcademySoftwareFoundation"; - repo = "openexr"; - rev = "v${version}"; - hash = "sha256-mVUxxYe6teiJ18PQ9703/kjBpJ9+a7vcDme+NwtQQQM="; - }; - - outputs = [ "bin" "dev" "out" "doc" ]; - - patches = - # Disable broken test on musl libc - # https://github.com/AcademySoftwareFoundation/openexr/issues/1556 - lib.optional stdenv.hostPlatform.isMusl ./disable-iex-test.patch - ; - - # tests are determined to use /var/tmp on unix - postPatch = '' - cat <(find . -name tmpDir.h) <(echo src/test/OpenEXRCoreTest/main.cpp) | while read -r f ; do - substituteInPlace $f --replace '/var/tmp' "$TMPDIR" - done - ''; - - cmakeFlags = lib.optional stdenv.hostPlatform.isStatic "-DCMAKE_SKIP_RPATH=ON"; - - nativeBuildInputs = [ cmake pkg-config ]; - propagatedBuildInputs = [ imath libdeflate ]; - - # Without 'sse' enforcement tests fail on i686 as due to excessive precision as: - # error reading back channel B pixel 21,-76 got -nan expected -nan - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isi686 "-msse2 -mfpmath=sse"; - - # https://github.com/AcademySoftwareFoundation/openexr/issues/1400 - doCheck = !stdenv.hostPlatform.isAarch32; - - passthru.tests = { - inherit libjxl; - musl = pkgsCross.musl64.openexr_3; - }; - - meta = with lib; { - description = "High dynamic-range (HDR) image file format"; - homepage = "https://www.openexr.com"; - license = licenses.bsd3; - maintainers = with maintainers; [ paperdigits ]; - platforms = platforms.all; - }; -} diff --git a/pkgs/development/libraries/openexr/default.nix b/pkgs/development/libraries/openexr/default.nix index 84dc7fb990e79f..c3335ff5ae0485 100644 --- a/pkgs/development/libraries/openexr/default.nix +++ b/pkgs/development/libraries/openexr/default.nix @@ -1,78 +1,62 @@ -{ - lib, - stdenv, - fetchFromGitHub, - zlib, - ilmbase, - fetchpatch, - cmake, +{ lib +, stdenv +, fetchFromGitHub +, cmake +, imath +, libdeflate +, pkg-config +, libjxl +, pkgsCross }: stdenv.mkDerivation rec { pname = "openexr"; - version = "2.5.10"; - - outputs = [ - "bin" - "dev" - "out" - "doc" - ]; + version = "3.2.4"; src = fetchFromGitHub { owner = "AcademySoftwareFoundation"; repo = "openexr"; rev = "v${version}"; - hash = "sha256-xdC+T79ZQBx/XhuIXtP93Roj0N9lF+E65ReEKQ4kIsg="; + hash = "sha256-mVUxxYe6teiJ18PQ9703/kjBpJ9+a7vcDme+NwtQQQM="; }; - patches = [ - (fetchpatch { - name = "CVE-2021-45942.patch"; - url = "https://github.com/AcademySoftwareFoundation/openexr/commit/11cad77da87c4fa2aab7d58dd5339e254db7937e.patch"; - stripLen = 4; - extraPrefix = "OpenEXR/IlmImf/"; - sha256 = "1wa2jn6sa0n3phaqvklnlbgk1bz60y756ad4jk4d757pzpnannsy"; - }) - (fetchpatch { - name = "CVE-2021-3933.patch"; - url = "https://github.com/AcademySoftwareFoundation/openexr/commit/5db6f7aee79e3e75e8c3780b18b28699614dd08e.patch"; - stripLen = 4; - extraPrefix = "OpenEXR/IlmImf/"; - sha256 = "sha256-DrpldpNgN5pWKzIuuPIrynGX3EpP8YhJlu+lLfNFGxQ="; - }) + outputs = [ "bin" "dev" "out" "doc" ]; - # GCC 13 fixes - ./gcc-13.patch - ]; + patches = + # Disable broken test on musl libc + # https://github.com/AcademySoftwareFoundation/openexr/issues/1556 + lib.optional stdenv.hostPlatform.isMusl ./disable-iex-test.patch + ; + # tests are determined to use /var/tmp on unix postPatch = '' - # tests are determined to use /var/tmp on unix - find . -name tmpDir.h | while read -r f ; do + cat <(find . -name tmpDir.h) <(echo src/test/OpenEXRCoreTest/main.cpp) | while read -r f ; do substituteInPlace $f --replace '/var/tmp' "$TMPDIR" done - # On slower machines this test can take more than the default 1500 seconds - echo 'set_tests_properties(OpenEXR.IlmImf PROPERTIES TIMEOUT 3000)' >> OpenEXR/IlmImfTest/CMakeLists.txt ''; - cmakeFlags = [ - "-DCMAKE_CTEST_ARGUMENTS=--timeout;3600" - ] ++ lib.optional stdenv.hostPlatform.isStatic "-DCMAKE_SKIP_RPATH=ON"; + cmakeFlags = lib.optional stdenv.hostPlatform.isStatic "-DCMAKE_SKIP_RPATH=ON"; + + nativeBuildInputs = [ cmake pkg-config ]; + propagatedBuildInputs = [ imath libdeflate ]; - nativeBuildInputs = [ cmake ]; - propagatedBuildInputs = [ - ilmbase - zlib - ]; + # Without 'sse' enforcement tests fail on i686 as due to excessive precision as: + # error reading back channel B pixel 21,-76 got -nan expected -nan + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isi686 "-msse2 -mfpmath=sse"; # https://github.com/AcademySoftwareFoundation/openexr/issues/1400 - # https://github.com/AcademySoftwareFoundation/openexr/issues/1281 - doCheck = !stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isi686; + doCheck = !stdenv.hostPlatform.isAarch32; + + passthru.tests = { + inherit libjxl; + musl = pkgsCross.musl64.openexr; + }; meta = with lib; { description = "High dynamic-range (HDR) image file format"; - homepage = "https://www.openexr.com/"; + homepage = "https://www.openexr.com"; license = licenses.bsd3; + maintainers = with maintainers; [ paperdigits ]; platforms = platforms.all; }; } diff --git a/pkgs/development/libraries/openexr/gcc-13.patch b/pkgs/development/libraries/openexr/gcc-13.patch deleted file mode 100644 index 6264a8df24331d..00000000000000 --- a/pkgs/development/libraries/openexr/gcc-13.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 8aa103fe6e815514990e59708468eabc36f7f332 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=C3=A9clairevoyant?= - <848000+eclairevoyant@users.noreply.github.com> -Date: Fri, 5 Jan 2024 18:12:16 -0500 -Subject: [PATCH] gcc13 - ---- - OpenEXR/IlmImf/ImfTiledMisc.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/OpenEXR/IlmImf/ImfTiledMisc.cpp b/OpenEXR/IlmImf/ImfTiledMisc.cpp -index 06ea3144..749537d4 100644 ---- a/OpenEXR/IlmImf/ImfTiledMisc.cpp -+++ b/OpenEXR/IlmImf/ImfTiledMisc.cpp -@@ -46,6 +46,7 @@ - #include - #include - #include -+#include - - #include "ImfNamespace.h" - --- -2.42.0 - diff --git a/pkgs/development/libraries/openscenegraph/default.nix b/pkgs/development/libraries/openscenegraph/default.nix index ee13f76d7feedf..13c5a57b822c63 100644 --- a/pkgs/development/libraries/openscenegraph/default.nix +++ b/pkgs/development/libraries/openscenegraph/default.nix @@ -25,7 +25,7 @@ jpegSupport ? true, libjpeg, exrSupport ? false, - openexr_3, + openexr, gifSupport ? true, giflib, pngSupport ? true, @@ -97,7 +97,7 @@ stdenv.mkDerivation rec { zlib ] ++ lib.optional jpegSupport libjpeg - ++ lib.optional exrSupport openexr_3 + ++ lib.optional exrSupport openexr ++ lib.optional gifSupport giflib ++ lib.optional pngSupport libpng ++ lib.optional tiffSupport libtiff diff --git a/pkgs/kde/frameworks/kimageformats/default.nix b/pkgs/kde/frameworks/kimageformats/default.nix index 0b3d049dc185a4..71e6d884af981e 100644 --- a/pkgs/kde/frameworks/kimageformats/default.nix +++ b/pkgs/kde/frameworks/kimageformats/default.nix @@ -5,7 +5,7 @@ libjxl, libavif, libraw, - openexr_3, + openexr, }: mkKdeDerivation { pname = "kimageformats"; @@ -17,6 +17,6 @@ mkKdeDerivation { libjxl libavif libraw - openexr_3 + openexr ]; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5750b99a5dc1d9..486c69f1d2edab 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4572,7 +4572,6 @@ with pkgs; libclang = llvmPackages_15.libclang; clang = clang_15; llvm = llvm_15; - openexr = openexr_3; }; ossec-agent = callPackage ../tools/security/ossec/agent.nix { }; @@ -10188,9 +10187,8 @@ with pkgs; opencv = opencv4; - openexr = openexr_2; - openexr_2 = callPackage ../development/libraries/openexr { }; - openexr_3 = callPackage ../development/libraries/openexr/3.nix { }; + openexr = openexr_3; + openexr_3 = callPackage ../development/libraries/openexr/default.nix { }; opencolorio = darwin.apple_sdk_11_0.callPackage ../development/libraries/opencolorio { inherit (darwin.apple_sdk_11_0.frameworks) Carbon GLUT Cocoa; @@ -12920,9 +12918,7 @@ with pkgs; airwave = libsForQt5.callPackage ../applications/audio/airwave { }; - alembic = callPackage ../development/libraries/alembic { - openexr = openexr_3; - }; + alembic = callPackage ../development/libraries/alembic { }; amarok = libsForQt5.callPackage ../applications/audio/amarok { }; amarok-kf5 = amarok; # for compatibility @@ -13026,7 +13022,6 @@ with pkgs; }; blender = callPackage ../applications/misc/blender { - openexr = openexr_3; python3Packages = python311Packages; inherit (darwin.apple_sdk.frameworks) Cocoa CoreGraphics ForceFeedback OpenAL OpenGL; }; @@ -14695,7 +14690,6 @@ with pkgs; }; openimageio = darwin.apple_sdk_11_0.callPackage ../development/libraries/openimageio { - openexr = openexr_3; }; open-music-kontrollers = lib.recurseIntoAttrs {