libva-2.20.0.ebuild 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # Copyright 1999-2023 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. inherit meson-multilib optfeature
  5. DESCRIPTION="Video Acceleration (VA) API for Linux"
  6. HOMEPAGE="https://01.org/linuxmedia/vaapi"
  7. if [[ ${PV} = *9999 ]] ; then
  8. inherit git-r3
  9. EGIT_BRANCH=master
  10. EGIT_REPO_URI="https://github.com/intel/libva"
  11. else
  12. SRC_URI="https://github.com/intel/libva/archive/${PV}.tar.gz -> ${P}.tar.gz"
  13. KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux"
  14. fi
  15. LICENSE="MIT"
  16. SLOT="0/$(ver_cut 1)"
  17. IUSE="opengl wayland X"
  18. REQUIRED_USE="opengl? ( X )"
  19. RDEPEND="
  20. >=x11-libs/libdrm-2.4.60[${MULTILIB_USEDEP}]
  21. wayland? (
  22. >=dev-libs/wayland-1.11[${MULTILIB_USEDEP}]
  23. )
  24. X? (
  25. >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
  26. >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
  27. >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
  28. >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}]
  29. x11-libs/libxcb:=[${MULTILIB_USEDEP}]
  30. )
  31. "
  32. DEPEND="${RDEPEND}"
  33. BDEPEND="
  34. wayland? ( dev-util/wayland-scanner )
  35. virtual/pkgconfig
  36. "
  37. MULTILIB_WRAPPED_HEADERS=(
  38. /usr/include/va/va_backend_glx.h
  39. /usr/include/va/va_x11.h
  40. /usr/include/va/va_dri2.h
  41. /usr/include/va/va_dricommon.h
  42. /usr/include/va/va_glx.h
  43. )
  44. PATCHES=(
  45. "${FILESDIR}/libva-2.2.0-fix-lld-linking.patch"
  46. )
  47. multilib_src_configure() {
  48. local emesonargs=(
  49. -Ddriverdir="${EPREFIX}/usr/$(get_libdir)/va/drivers"
  50. -Ddisable_drm=false
  51. -Dwith_x11=$(usex X)
  52. -Dwith_glx=$(usex X)
  53. -Dwith_wayland=$(usex wayland)
  54. -Denable_docs=false
  55. )
  56. meson_src_configure
  57. }
  58. pkg_postinst() {
  59. optfeature_header
  60. optfeature "Older Intel GPU support up to Gen8" media-libs/libva-intel-driver
  61. optfeature "Newer Intel GPU support from Gen9+" media-libs/libva-intel-media-driver
  62. }