openexr-3.1.5-r1.ebuild 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # Copyright 1999-2023 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. inherit cmake flag-o-matic
  5. MY_PN=OpenEXR
  6. DESCRIPTION="ILM's OpenEXR high dynamic-range image file format libraries"
  7. HOMEPAGE="https://www.openexr.com/"
  8. SRC_URI="https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
  9. LICENSE="BSD"
  10. SLOT="0/30" # based on SONAME
  11. # -ppc -sparc because broken on big endian, bug #818424
  12. KEYWORDS="amd64 ~arm arm64 ~ia64 ~loong -ppc ~ppc64 ~riscv -sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-solaris"
  13. IUSE="cpu_flags_x86_avx doc examples large-stack utils test threads"
  14. RESTRICT="!test? ( test )"
  15. RDEPEND="
  16. >=dev-libs/imath-${PV}:=
  17. sys-libs/zlib
  18. !media-libs/openexr:3
  19. !media-libs/ilmbase
  20. "
  21. DEPEND="${RDEPEND}"
  22. BDEPEND="
  23. doc? ( dev-python/breathe )
  24. virtual/pkgconfig
  25. "
  26. PATCHES=(
  27. "${FILESDIR}"/${PN}-3.1.1-0003-disable-failing-test.patch
  28. "${FILESDIR}"/${P}-Add-missing-include-cstdint-required-by-gcc-13-1264.patch
  29. "${FILESDIR}"/${P}-add-missed-include-cstdint-statement.patch
  30. )
  31. DOCS=( CHANGES.md GOVERNANCE.md PATENTS README.md SECURITY.md docs/SymbolVisibility.md )
  32. src_prepare() {
  33. # Fix path for testsuite
  34. sed -e "s:/var/tmp/:${T}:" \
  35. -i "${S}"/src/test/${MY_PN}{,Fuzz,Util}Test/tmpDir.h || die "failed to set temp path for tests"
  36. use x86 && eapply "${FILESDIR}"/${P}-drop-failing-testDwaLookups.patch
  37. use elibc_musl && eapply "${FILESDIR}"/${P}-musl.patch
  38. cmake_src_prepare
  39. }
  40. src_configure() {
  41. if use x86; then
  42. replace-cpu-flags native i686
  43. fi
  44. local mycmakeargs=(
  45. -DBUILD_TESTING=$(usex test)
  46. -DDOCS=$(usex doc)
  47. -DOPENEXR_BUILD_TOOLS=$(usex utils)
  48. -DOPENEXR_ENABLE_LARGE_STACK=$(usex large-stack)
  49. -DOPENEXR_ENABLE_THREADING=$(usex threads)
  50. -DOPENEXR_INSTALL_EXAMPLES=$(usex examples)
  51. -DOPENEXR_INSTALL_PKG_CONFIG=ON
  52. -DOPENEXR_INSTALL_TOOLS=$(usex utils)
  53. -DOPENEXR_USE_CLANG_TIDY=OFF # don't look for clang-tidy
  54. )
  55. use test && mycmakeargs+=( -DOPENEXR_RUN_FUZZ_TESTS=ON )
  56. cmake_src_configure
  57. }
  58. src_install() {
  59. use examples && docompress -x /usr/share/doc/${PF}/examples
  60. cmake_src_install
  61. }