Skip to content

Commit

Permalink
wip remove openexr 2
Browse files Browse the repository at this point in the history
  • Loading branch information
autra committed Dec 24, 2024
1 parent e7f7c76 commit 7d85b17
Show file tree
Hide file tree
Showing 16 changed files with 61 additions and 170 deletions.
4 changes: 2 additions & 2 deletions pkgs/applications/video/olive-editor/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
cmake,
wrapQtAppsHook,
openimageio,
openexr_3,
openexr,
portaudio,
imath,
qtwayland,
Expand Down Expand Up @@ -78,7 +78,7 @@ stdenv.mkDerivation {
opencolorio
openimageio'
imath
openexr_3
openexr
portaudio
qtwayland
qtmultimedia
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/an/ansel/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
libxml2,
cmake,
exiftool,
openexr_3,
openexr,
glib,
python3Packages,
perlPackages,
Expand Down Expand Up @@ -147,7 +147,7 @@ stdenv.mkDerivation {
libxkbcommon
libxslt
libXtst
openexr_3
openexr
openjpeg
osm-gps-map
pcre
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/ar/art/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
exiv2,
exiftool,
mimalloc,
openexr_3,
openexr,
ilmbase,
opencolorio,
color-transformation-language,
Expand Down Expand Up @@ -83,7 +83,7 @@ stdenv.mkDerivation rec {
exiftool
libcanberra-gtk3
mimalloc
openexr_3
openexr
ilmbase
opencolorio
color-transformation-language
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/co/color-transformation-language/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
fetchFromGitHub,
cmake,
ilmbase,
openexr_3,
openexr,
libtiff,
aces-container,
}:
Expand All @@ -23,7 +23,7 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [
cmake
ilmbase
openexr_3
openexr
libtiff
aces-container
];
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/da/darktable/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
librsvg,
libtiff,
libjxl,
openexr_3,
openexr,
osm-gps-map,
pkg-config,
sqlite,
Expand Down Expand Up @@ -94,7 +94,7 @@ stdenv.mkDerivation rec {
librsvg
libtiff
libjxl
openexr_3
openexr
sqlite
libxslt
libsoup_2_4
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/li/libjxl/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
libpng,
libwebp,
gdk-pixbuf,
openexr_3,
openexr,
pkg-config,
makeWrapper,
zlib,
Expand Down Expand Up @@ -87,7 +87,7 @@ stdenv.mkDerivation rec {
libpng
libwebp
gdk-pixbuf
openexr_3
openexr
zlib
];

Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/sw/swayimg/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
libjxl,
libexif,
libavif,
openexr_3,
openexr,
bash-completion,
testers,
nix-update-script,
Expand Down Expand Up @@ -71,7 +71,7 @@ stdenv.mkDerivation (finalAttrs: {
libjxl
libexif
libavif
openexr_3
openexr
];

passthru = {
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/libraries/gdal/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
libxml2,
lz4,
netcdf,
openexr_3,
openexr,
openjpeg,
openssl,
pcre2,
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/libraries/gstreamer/bad/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
, libusb1
, neon
, openal
, openexr_3
, openexr
, openh264Support ? lib.meta.availableOn stdenv.hostPlatform openh264
, openh264
, libopenmpt
Expand Down Expand Up @@ -176,7 +176,7 @@ stdenv.mkDerivation rec {
libusb1
neon
openal
openexr_3
openexr
rtmpdump
pango
soundtouch
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/libraries/opencolorio/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# Build apps
buildApps ? true, # Utility applications
lcms2,
openexr_3,
openexr,
}:

stdenv.mkDerivation rec {
Expand Down Expand Up @@ -75,7 +75,7 @@ stdenv.mkDerivation rec {
]
++ lib.optionals buildApps [
lcms2
openexr_3
openexr
];

cmakeFlags =
Expand Down
62 changes: 0 additions & 62 deletions pkgs/development/libraries/openexr/3.nix

This file was deleted.

84 changes: 34 additions & 50 deletions pkgs/development/libraries/openexr/default.nix
Original file line number Diff line number Diff line change
@@ -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;
};
}
25 changes: 0 additions & 25 deletions pkgs/development/libraries/openexr/gcc-13.patch

This file was deleted.

4 changes: 2 additions & 2 deletions pkgs/development/libraries/openscenegraph/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
jpegSupport ? true,
libjpeg,
exrSupport ? false,
openexr_3,
openexr,
gifSupport ? true,
giflib,
pngSupport ? true,
Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit 7d85b17

Please sign in to comment.