sys-process/glances: 3.1.4.1-r1 amd64 stable, bug #720368
[gentoo.git] / media-libs / openexr / openexr-2.3.0.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit autotools flag-o-matic toolchain-funcs multilib-minimal
7
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"
11
12 LICENSE="BSD"
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"
16
17 RDEPEND="
18         >=media-libs/ilmbase-${PV}:=[${MULTILIB_USEDEP}]
19         sys-libs/zlib[${MULTILIB_USEDEP}]
20 "
21 DEPEND="${RDEPEND}
22         >=sys-devel/autoconf-archive-2016.09.16
23         virtual/pkgconfig[${MULTILIB_USEDEP}]
24 "
25
26 RESTRICT="test" # Tests broken upstream doesn't really care about them, bug #656680
27
28 DOCS=( AUTHORS ChangeLog NEWS README.md )
29 MULTILIB_WRAPPED_HEADERS=( /usr/include/OpenEXR/OpenEXRConfig.h )
30
31 PATCHES=(
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"
36         # From Debian
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"
42 )
43
44 src_prepare() {
45         default
46         # Fix path for testsuite
47         sed -i -e "s:/var/tmp/:${T}:" IlmImfTest/tmpDir.h || die
48         eautoreconf
49 }
50
51 multilib_src_configure() {
52         local myeconfargs=(
53                 --disable-imffuzztest
54                 --disable-imfhugetest
55                 --enable-threading
56                 $(use_enable cpu_flags_x86_avx avx)
57                 $(use_enable examples imfexamples)
58                 $(use_enable static-libs static)
59         )
60
61         # TODO: check if this still applies on updates!
62         # internal tool dwaLookup fails to run when linked with gold linker
63         tc-ld-disable-gold
64
65         ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
66 }
67
68 multilib_src_install_all() {
69         einstalldocs
70
71         if use examples; then
72                 docompress -x /usr/share/doc/${PF}/examples
73         else
74                 rm -rf "${ED%/}"/usr/share/doc/${PF}/examples || die
75         fi
76
77         find "${D}" -name '*.la' -type f -delete || die
78 }