1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit autotools flag-o-matic toolchain-funcs multilib-minimal
8 DESCRIPTION="ILM's OpenEXR high dynamic-range image file format libraries"
9 HOMEPAGE="http://openexr.com/"
10 SRC_URI="https://github.com/openexr/openexr/releases/download/v${PV}/${P}.tar.gz"
13 SLOT="0/24" # based on SONAME
14 KEYWORDS="amd64 -arm arm64 hppa ~ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-solaris"
15 IUSE="cpu_flags_x86_avx examples static-libs"
18 >=media-libs/ilmbase-${PV}:=[${MULTILIB_USEDEP}]
19 sys-libs/zlib[${MULTILIB_USEDEP}]
22 >=sys-devel/autoconf-archive-2016.09.16
23 virtual/pkgconfig[${MULTILIB_USEDEP}]
26 RESTRICT="test" # Tests broken upstream doesn't really care about them, bug #656680
28 DOCS=( AUTHORS ChangeLog NEWS README.md )
29 MULTILIB_WRAPPED_HEADERS=( /usr/include/OpenEXR/OpenEXRConfig.h )
32 "${FILESDIR}/${PN}-2.2.0-fix-cpuid-on-abi_x86_32.patch"
33 "${FILESDIR}/${PN}-2.2.0-fix-config.h-collision.patch"
34 "${FILESDIR}/${PN}-2.2.0-Install-missing-header-files.patch"
35 "${FILESDIR}/${P}-fix-build-system.patch"
37 "${FILESDIR}/${PN}-2.3.0-tests-32bits.patch"
38 "${FILESDIR}/${PN}-2.3.0-skip-bogus-tests.patch"
39 "${FILESDIR}/${PN}-2.3.0-bigendian.patch"
40 "${FILESDIR}/${PN}-2.3.0-bigendian2.patch"
41 "${FILESDIR}/${PN}-2.3.0-tests-32bits-2.patch"
46 # Fix path for testsuite
47 sed -i -e "s:/var/tmp/:${T}:" IlmImfTest/tmpDir.h || die
51 multilib_src_configure() {
56 $(use_enable cpu_flags_x86_avx avx)
57 $(use_enable examples imfexamples)
58 $(use_enable static-libs static)
61 # TODO: check if this still applies on updates!
62 # internal tool dwaLookup fails to run when linked with gold linker
65 ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
68 multilib_src_install_all() {
72 docompress -x /usr/share/doc/${PF}/examples
74 rm -rf "${ED%/}"/usr/share/doc/${PF}/examples || die
77 find "${D}" -name '*.la' -type f -delete || die