media-libs/openexr: add 3.3.4

Avoid running fuzzer tests by default.

Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/43084
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Paul Zander
2025-07-20 21:37:49 +02:00
committed by Sam James
parent 689882aa19
commit 3d45cacc0f
2 changed files with 150 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
DIST openexr-3.3.2.tar.gz 21324765 BLAKE2B 82e67953b75da0d27347260099ccae249f5b1946b78eccc383e9278f57565ed5cb9f0fa17385f0c5cdb3815d647197be3661372f9896e10596a8723ea3d8414b SHA512 0c43337fda2979b328202488a43711afb5d680781c933aa0d74970a3dcda1135fbd01228cb10e81e4628c0d19da2d3e5b781e147d609cdc8a796d2a51a90932f
DIST openexr-3.3.3.tar.gz 21211333 BLAKE2B 62831276081911efb7c112bbf6051bf5dc80cc20933b701d79a6574a55d4a8811716a3a0f7e7988989a727d9f4477dcdf7719460db8596d98952ce401b62d106 SHA512 ba77ce7826e2b327832807ea73073adbcb630009f6410b5db37e9b793187c7ebfd0153d0416029c8f7852e2ee44134b6e8667731d0553a40aa5cb2ab71ef2a96
DIST openexr-3.3.4.tar.gz 21212943 BLAKE2B 6e166cf71919c49d52ea45380450e2ad0027e63d9aab3acdc55b6e911b4324b94638c6e2f94b1c359bea077fe08dafe7649756cbd8a4b9c6ba99743261bbec0e SHA512 9085def42a3c9194c98287ce48b28703b3e4811fe7c6a5f63289c5e44c2cfaaecbdcac3212d6412d7c765e72e27e3dc2422452ca802efa930351b2376afe9aae
DIST openexr-images-1.0.tar.gz 252222962 BLAKE2B d57c458dfbd1b08c964429022b6e08a3309bf11cbd43c64e271ebc620dae6dbe70636e5221f47dabd7fe2aa0806f2cf3f3c9b3f55fd7f45b0a34f3e62b6029e7 SHA512 c1c83a26cd326d0fcda824daccb0044abad46f29e1bd2ceb1c38bc62b3e71f0aeef126dddc4517eb1cb9f7c9d0fe234276a48a754bdb7c7823e9aee459d8670a

View File

@@ -0,0 +1,149 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake flag-o-matic
MY_PN=OpenEXR
DESCRIPTION="ILM's OpenEXR high dynamic-range image file format libraries"
HOMEPAGE="https://openexr.com/"
SRC_URI="
https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
test? (
utils? (
https://github.com/AcademySoftwareFoundation/openexr-images/archive/refs/tags/v1.0.tar.gz
-> openexr-images-1.0.tar.gz
)
)
"
LICENSE="BSD"
SLOT="0/32" # based on SONAME
# -ppc -sparc because broken on big endian, bug #818424
KEYWORDS="~amd64 ~arm ~arm64 ~loong -ppc ~ppc64 ~riscv -sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
IUSE="cpu_flags_x86_avx doc examples large-stack utils test threads"
REQUIRED_USE="doc? ( utils )"
RESTRICT="!test? ( test )"
RDEPEND="
app-arch/libdeflate:=[zlib(+)]
>=dev-libs/imath-3.1.6:=
"
DEPEND="${RDEPEND}"
BDEPEND="
virtual/pkgconfig
doc? ( sys-apps/help2man )
"
PATCHES=(
"${FILESDIR}/${PN}-3.2.1-bintests-iff-utils.patch"
)
DOCS=( CHANGES.md GOVERNANCE.md PATENTS README.md SECURITY.md )
src_prepare() {
# Fix path for testsuite
sed -e "s:/var/tmp/:${T}:" \
-i "${S}"/src/test/${MY_PN}Test/tmpDir.h || die "failed to set temp path for tests"
sed -e "s:if(INSTALL_DOCS):if(OPENEXR_INSTALL_DOCS):" \
-i docs/CMakeLists.txt || die
cmake_src_prepare
if use test && use utils; then
IMAGES=(
Beachball/multipart.0001.exr
Beachball/singlepart.0001.exr
Chromaticities/Rec709.exr
Chromaticities/Rec709_YC.exr
Chromaticities/XYZ.exr
Chromaticities/XYZ_YC.exr
LuminanceChroma/Flowers.exr
LuminanceChroma/Garden.exr
MultiResolution/ColorCodedLevels.exr
MultiResolution/WavyLinesCube.exr
MultiResolution/WavyLinesLatLong.exr
MultiView/Adjuster.exr
TestImages/GammaChart.exr
TestImages/GrayRampsHorizontal.exr
v2/LeftView/Balls.exr
v2/Stereo/Trunks.exr
)
mkdir -p "${BUILD_DIR}/src/test/bin" || die
for image in "${IMAGES[@]}"; do
mkdir -p "${BUILD_DIR}/src/test/bin/$(dirname "${image}")" || die
cp -a "${WORKDIR}/openexr-images-1.0/${image}" "${BUILD_DIR}/src/test/bin/${image}" || die
done
fi
}
src_configure() {
if use x86; then
replace-cpu-flags native i686
fi
local mycmakeargs=(
-DOPENEXR_CXX_STANDARD="17"
-DBUILD_SHARED_LIBS="yes"
-DBUILD_TESTING="$(usex test)"
-DBUILD_WEBSITE="no"
-DOPENEXR_BUILD_EXAMPLES="$(usex examples)"
-DOPENEXR_BUILD_PYTHON="no"
-DOPENEXR_BUILD_TOOLS="$(usex utils)"
-DOPENEXR_ENABLE_LARGE_STACK="$(usex large-stack)"
-DOPENEXR_ENABLE_THREADING="$(usex threads)"
-DOPENEXR_INSTALL="yes"
-DOPENEXR_INSTALL_DOCS="$(usex doc)"
-DOPENEXR_INSTALL_PKG_CONFIG="yes"
-DOPENEXR_INSTALL_TOOLS="$(usex utils)"
-DOPENEXR_USE_CLANG_TIDY="no" # don't look for clang-tidy
-DOPENEXR_FORCE_INTERNAL_DEFLATE="no"
-DOPENEXR_FORCE_INTERNAL_IMATH="no"
)
if [[ "${EXPENSIVE_TESTS:-0}" -gt 0 ]]; then
if use test; then
# OPENEXR_RUN_FUZZ_TESTS depends on BUILD_TESTING, see
# - https://bugs.gentoo.org/925128
# - https://openexr.com/en/latest/install.html#component-options
# NOTE: the fuzz tests are very slow
mycmakeargs+=( -DOPENEXR_RUN_FUZZ_TESTS="ON" )
fi
fi
cmake_src_configure
}
src_test() {
local CMAKE_SKIP_TESTS=()
use arm64 && CMAKE_SKIP_TESTS+=(
# bug #922247
'OpenEXRCore.testDWAACompression'
'OpenEXRCore.testDWABCompression'
)
use x86 && CMAKE_SKIP_TESTS+=(
'^OpenEXR.testDwaLookups$'
)
cmake_src_test
}
src_install() {
use examples && docompress -x "/usr/share/doc/${PF}/examples"
cmake_src_install
}