blob: dad6f376d93f41465152aaebc31ab62792131f7d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_REQ_USE="xml"
PYTHON_COMPAT=( python3_{8..10} )
if [[ "${PV}" == "9999" ]]; then
EGIT_REPO_URI="https://code.videolan.org/videolan/libplacebo.git"
inherit git-r3
else
KEYWORDS="~amd64 ~ppc64 ~x86"
SRC_URI="https://code.videolan.org/videolan/libplacebo/-/archive/v${PV}/libplacebo-v${PV}.tar.gz"
S="${WORKDIR}/${PN}-v${PV}"
fi
inherit meson-multilib python-any-r1
DESCRIPTION="Reusable library for GPU-accelerated image processing primitives"
HOMEPAGE="https://code.videolan.org/videolan/libplacebo"
LICENSE="LGPL-2.1+"
SLOT="0/$(ver_cut 2)" # libplacebo.so version
IUSE="glslang lcms +opengl +shaderc test +vulkan"
REQUIRED_USE="vulkan? ( || ( glslang shaderc ) )"
RESTRICT="!test? ( test )"
RDEPEND="glslang? ( dev-util/glslang[${MULTILIB_USEDEP}] )
lcms? ( media-libs/lcms:2[${MULTILIB_USEDEP}] )
opengl? ( media-libs/libepoxy[${MULTILIB_USEDEP}] )
shaderc? ( >=media-libs/shaderc-2017.2[${MULTILIB_USEDEP}] )
vulkan? (
dev-util/vulkan-headers
media-libs/vulkan-loader[${MULTILIB_USEDEP}]
)"
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig
vulkan? (
${PYTHON_DEPS}
$(python_gen_any_dep 'dev-python/mako[${PYTHON_USEDEP}]')
)"
python_check_deps() {
has_version -b "dev-python/mako[${PYTHON_USEDEP}]"
}
pkg_setup() {
use vulkan && python-any-r1_pkg_setup
}
multilib_src_configure() {
local emesonargs=(
$(meson_feature glslang)
$(meson_feature lcms)
$(meson_feature opengl)
$(meson_feature shaderc)
$(meson_feature vulkan)
$(meson_use test tests)
# hard-code path from dev-util/vulkan-headers
-Dvulkan-registry=/usr/share/vulkan/registry/vk.xml
-Ddemos=false
# ^ useless, and also semi-broken
# (well, actually, looks like it requires some new just-for-demos deps and even with versions restrictions (say, >=glfw-3.3))
# feel free to patch if you need demos for some strange reason.
)
meson_src_configure
}
multilib_src_test() {
meson_src_test -t 10
}
|