libyami-1.1.0.ebuild 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. SCM=""
  5. if [ "${PV#9999}" != "${PV}" ] ; then
  6. SCM=git-r3
  7. EGIT_REPO_URI="https://github.com/01org/libyami"
  8. fi
  9. inherit ${SCM} autotools multilib-minimal flag-o-matic
  10. DESCRIPTION="Yet Another Media Infrastructure: Media codec with hardware acceleration"
  11. HOMEPAGE="https://github.com/01org/libyami"
  12. if [ "${PV#9999}" != "${PV}" ] ; then
  13. KEYWORDS=""
  14. SRC_URI=""
  15. else
  16. KEYWORDS="~amd64"
  17. SRC_URI="https://github.com/01org/libyami/archive/${P}.tar.gz"
  18. S="${WORKDIR}/${PN}-${P}"
  19. fi
  20. LICENSE="Apache-2.0"
  21. SLOT="0"
  22. IUSE="debug egl dmabuf doc md5 v4l X test wayland"
  23. RDEPEND="
  24. >=x11-libs/libva-1.7.2[drm,X?,wayland?,${MULTILIB_USEDEP}]
  25. v4l? (
  26. >=virtual/opengl-7[${MULTILIB_USEDEP}]
  27. >=media-libs/libv4l-1.6.2[${MULTILIB_USEDEP}]
  28. >=media-libs/mesa-10[egl,gles2,${MULTILIB_USEDEP}]
  29. )
  30. X? ( >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] )
  31. md5? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
  32. dmabuf? ( x11-libs/libdrm[${MULTILIB_USEDEP}] )
  33. "
  34. DEPEND="${RDEPEND}
  35. virtual/pkgconfig
  36. doc? ( app-doc/doxygen )
  37. test? ( >=dev-cpp/gtest-1.7 )
  38. "
  39. src_prepare() {
  40. eautoreconf
  41. }
  42. multilib_src_configure() {
  43. append-cppflags -I"${S}/"
  44. ECONF_SOURCE="${S}" econf \
  45. $(use_enable debug) \
  46. $(use_enable egl) \
  47. $(use_enable v4l v4l2) \
  48. $(use_enable v4l v4l2-ops) \
  49. $(use_enable X x11) \
  50. $(use_enable dmabuf) \
  51. $(use_enable md5) \
  52. $(use_enable wayland) \
  53. $(use_enable test gtest) \
  54. $(multilib_native_use_enable doc docs) \
  55. --enable-h265dec \
  56. --enable-vc1dec \
  57. --enable-h264dec \
  58. --enable-jpegdec \
  59. --enable-mpeg2dec \
  60. --enable-vp8dec \
  61. --enable-vp9dec \
  62. --enable-h265enc \
  63. --enable-h264enc \
  64. --enable-jpegenc \
  65. --enable-vp8enc \
  66. --enable-vp9enc
  67. }
  68. multilib_src_compile() {
  69. emake
  70. multilib_is_native_abi && use doc && emake -C doc
  71. }
  72. multilib_src_install() {
  73. emake DESTDIR="${D}" install
  74. multilib_is_native_abi && use doc && dohtml -r doc/html/*
  75. }
  76. src_install() {
  77. multilib-minimal_src_install
  78. find "${ED}" -name '*.la' -delete
  79. }