logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

libplacebo-3.104.0.ebuild (1887B)


  1. # Copyright 1999-2020 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=7
  4. PYTHON_REQ_USE="xml"
  5. PYTHON_COMPAT=( python3_{7,8,9} )
  6. if [[ "${PV}" == "9999" ]]; then
  7. EGIT_REPO_URI="https://code.videolan.org/videolan/libplacebo.git"
  8. inherit git-r3
  9. else
  10. KEYWORDS="~amd64 ~ppc64 ~x86"
  11. SRC_URI="https://code.videolan.org/videolan/libplacebo/-/archive/v${PV}/libplacebo-v${PV}.tar.gz"
  12. S="${WORKDIR}/${PN}-v${PV}"
  13. fi
  14. inherit meson multilib-minimal python-any-r1
  15. DESCRIPTION="Reusable library for GPU-accelerated image processing primitives"
  16. HOMEPAGE="https://code.videolan.org/videolan/libplacebo"
  17. LICENSE="LGPL-2.1+"
  18. SLOT="0/$(ver_cut 2)" # libplacebo.so version
  19. IUSE="glslang lcms +opengl +shaderc test +vulkan"
  20. REQUIRED_USE="vulkan? ( || ( glslang shaderc ) )"
  21. RESTRICT="!test? ( test )"
  22. RDEPEND="glslang? ( dev-util/glslang[${MULTILIB_USEDEP}] )
  23. lcms? ( media-libs/lcms:2[${MULTILIB_USEDEP}] )
  24. opengl? ( media-libs/libepoxy[${MULTILIB_USEDEP}] )
  25. shaderc? ( >=media-libs/shaderc-2017.2[${MULTILIB_USEDEP}] )
  26. vulkan? (
  27. dev-util/vulkan-headers
  28. media-libs/vulkan-loader[${MULTILIB_USEDEP}]
  29. )"
  30. DEPEND="${RDEPEND}"
  31. BDEPEND="virtual/pkgconfig
  32. vulkan? (
  33. ${PYTHON_DEPS}
  34. $(python_gen_any_dep 'dev-python/mako[${PYTHON_USEDEP}]')
  35. )"
  36. python_check_deps() {
  37. has_version -b "dev-python/mako[${PYTHON_USEDEP}]"
  38. }
  39. pkg_setup() {
  40. use vulkan && python-any-r1_pkg_setup
  41. }
  42. multilib_src_configure() {
  43. local emesonargs=(
  44. $(meson_feature glslang)
  45. $(meson_feature lcms)
  46. $(meson_feature opengl)
  47. $(meson_feature shaderc)
  48. $(meson_feature vulkan)
  49. $(meson_use test tests)
  50. # hard-code path from dev-util/vulkan-headers
  51. -Dvulkan-registry=/usr/share/vulkan/registry/vk.xml
  52. )
  53. meson_src_configure
  54. }
  55. multilib_src_compile() {
  56. meson_src_compile
  57. }
  58. multilib_src_test() {
  59. meson_src_test -t 10
  60. }
  61. multilib_src_install() {
  62. meson_src_install
  63. }