openexr-2.2.0-r1.ebuild 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit autotools multilib-minimal
  5. DESCRIPTION="ILM's OpenEXR high dynamic-range image file format libraries"
  6. HOMEPAGE="http://openexr.com/"
  7. SRC_URI="http://download.savannah.gnu.org/releases/openexr/${P}.tar.gz"
  8. LICENSE="BSD"
  9. SLOT="0/22" # based on SONAME
  10. KEYWORDS="~amd64 -arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
  11. IUSE="cpu_flags_x86_avx examples static-libs"
  12. RDEPEND="
  13. sys-libs/zlib[${MULTILIB_USEDEP}]
  14. >=media-libs/ilmbase-${PV}:=[${MULTILIB_USEDEP}]"
  15. DEPEND="${RDEPEND}
  16. virtual/pkgconfig
  17. >=sys-devel/autoconf-archive-2016.09.16"
  18. PATCHES=(
  19. "${FILESDIR}/${P}-fix-cpuid-on-abi_x86_32.patch"
  20. "${FILESDIR}/${P}-use-ull-for-64-bit-literals.patch"
  21. "${FILESDIR}/${P}-fix-build-system.patch"
  22. "${FILESDIR}/${P}-fix-config.h-collision.patch"
  23. )
  24. src_prepare() {
  25. default
  26. # Fix path for testsuite
  27. sed -i -e "s:/var/tmp/:${T}:" IlmImfTest/tmpDir.h || die
  28. # delete stray config files causing havoc
  29. rm -f config*/OpenEXRConfig.h* || die
  30. eautoreconf
  31. }
  32. multilib_src_configure() {
  33. ECONF_SOURCE="${S}" econf \
  34. --enable-threading \
  35. $(use_enable cpu_flags_x86_avx avx) \
  36. $(use_enable static-libs static) \
  37. $(use_enable examples imfexamples)
  38. }
  39. multilib_src_install_all() {
  40. einstalldocs
  41. docompress -x /usr/share/doc/${PF}/examples
  42. if ! use examples; then
  43. rm -rf "${ED%/}"/usr/share/doc/${PF}/examples || die
  44. fi
  45. # package provides .pc files
  46. find "${D}" -name '*.la' -delete || die
  47. }