openimageio-1.6.13.ebuild 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. PYTHON_COMPAT=( python{2_7,3_4,3_5} )
  5. inherit cmake-utils python-single-r1 vcs-snapshot
  6. DESCRIPTION="A library for reading and writing images"
  7. HOMEPAGE="https://sites.google.com/site/openimageio/ https://github.com/OpenImageIO"
  8. SRC_URI="https://github.com/OpenImageIO/oiio/archive/Release-${PV}.tar.gz -> ${P}.tar.gz"
  9. LICENSE="BSD"
  10. SLOT="0"
  11. KEYWORDS="amd64 ~ppc64 x86"
  12. IUSE="colorio ffmpeg gif jpeg2k opencv opengl python qt4 raw ssl +truetype"
  13. RESTRICT="test" #431412
  14. RDEPEND="dev-libs/boost:=[python?]
  15. dev-libs/pugixml:=
  16. media-libs/ilmbase:=
  17. media-libs/libpng:0=
  18. >=media-libs/libwebp-0.2.1:=
  19. media-libs/openexr:=
  20. media-libs/tiff:0=
  21. sys-libs/zlib:=
  22. virtual/jpeg:0
  23. colorio? ( >=media-libs/opencolorio-1.0.7:= )
  24. ffmpeg? ( media-video/ffmpeg:= )
  25. gif? ( media-libs/giflib:0= )
  26. jpeg2k? ( >=media-libs/openjpeg-1.5:0= )
  27. opencv? (
  28. >=media-libs/opencv-2.3:=
  29. python? ( >=media-libs/opencv-2.4.8[python,${PYTHON_USEDEP}] )
  30. )
  31. opengl? (
  32. virtual/glu
  33. virtual/opengl
  34. )
  35. python? ( ${PYTHON_DEPS} )
  36. qt4? (
  37. dev-qt/qtcore:4
  38. dev-qt/qtgui:4
  39. dev-qt/qtopengl:4
  40. media-libs/glew:=
  41. )
  42. raw? ( media-libs/libraw:= )
  43. ssl? ( dev-libs/openssl:0 )
  44. truetype? ( media-libs/freetype:2= )"
  45. DEPEND="${RDEPEND}"
  46. #S=${WORKDIR}/${P}/src
  47. DOCS=( CHANGES CREDITS README.rst src/doc/${PN}.pdf )
  48. pkg_setup() {
  49. use python && python-single-r1_pkg_setup
  50. }
  51. src_prepare() {
  52. default
  53. use python && python_fix_shebang .
  54. }
  55. src_configure() {
  56. local mycmakeargs=(
  57. -DLIB_INSTALL_DIR="/usr/$(get_libdir)"
  58. -DBUILDSTATIC=OFF
  59. -DLINKSTATIC=OFF
  60. -DINSTALL_DOCS=OFF
  61. -DOIIO_BUILD_TESTS=OFF # as they are RESTRICTed
  62. $(use python && echo -DPYLIB_INSTALL_DIR="$(python_get_sitedir)")
  63. -DSTOP_ON_WARNING=OFF
  64. -DUSE_EXTERNAL_PUGIXML=ON
  65. -DUSE_FIELD3D=OFF # missing in Portage
  66. -DUSE_FREETYPE=$(usex truetype)
  67. -DUSE_FFMPEG=$(usex ffmpeg)
  68. -DUSE_GIF=$(usex gif)
  69. -DUSE_OCIO=$(usex colorio)
  70. -DUSE_OPENCV=$(usex opencv)
  71. -DUSE_OPENGL=$(usex opengl)
  72. -DUSE_OPENJPEG=$(usex jpeg2k)
  73. -DUSE_OPENSSL=$(usex ssl)
  74. -DUSE_PYTHON=$(usex python)
  75. -DUSE_LIBRAW=$(usex raw)
  76. -DUSE_QT=$(usex qt4)
  77. )
  78. if [[ ${EPYTHON} == python3* ]]; then
  79. mycmakeargs+=( -DUSE_PYTHON3=ON )
  80. else
  81. mycmakeargs+=( -DUSE_PYTHON3=OFF )
  82. fi
  83. cmake-utils_src_configure
  84. }