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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
DESCRIPTION = "Userspace libraries for PowerVR Rogue GPU on TI SoCs"
HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-umlibs"
LICENSE = "TI-TFL"
LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=7232b98c1c58f99e3baa03de5207e76f"
inherit bin_package
PACKAGE_ARCH = "${MACHINE_ARCH}"
COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx"
PR = "r2"
BRANCH = "linuxws/kirkstone/k6.1/${PV}"
SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-umlibs.git;protocol=https;branch=${BRANCH}"
SRCREV = "bfacba50b004d0e93ee1f8b42d2217131453f5fd"
S = "${WORKDIR}/git/targetfs/${TARGET_PRODUCT}/${PVR_WS}/${PVR_BUILD}"
TARGET_PRODUCT:j721e = "j721e_linux"
TARGET_PRODUCT:j721s2 = "j721s2_linux"
TARGET_PRODUCT:j784s4 = "j784s4_linux"
TARGET_PRODUCT:am62xx = "am62_linux"
PVR_BUILD = "release"
PVR_WS = "lws-generic"
RDEPENDS:${PN} = " \
libdrm \
ti-img-rogue-driver \
${PN}-firmware \
"
do_install:append() {
if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then
mv ${D}/lib/firmware ${D}${nonarch_base_libdir}
rmdir ${D}/lib
fi
}
PACKAGES = " \
libgles1-rogue \
libgles2-rogue \
libgles3-rogue \
libvk-rogue \
libopencl-rogue \
libopencl-rogue-tools \
${PN}-tools \
${PN}-firmware \
${PN}-dev \
${PN} \
"
# Inject variables so that packages don't get Debian-renamed (which would
# remove the -rogue suffix), but don't RPROVIDEs/RCONFLICTs on the generic
# libgl name to prevent colliding with swrast libs
python __anonymous() {
suffix = ""
if "-native" in d.getVar("PN"):
suffix = "-native"
for p in (("vulkan", "libvk",),
("gles", "libgles1", "libglesv1-cm1"),
("gles", "libgles2", "libglesv2-2"),
("gles", "libgles3",),
("opencl", "libopencl",)):
mlprefix = d.getVar("MLPREFIX")
fullp = mlprefix + p[1] + "-rogue" + suffix
mlprefix = d.getVar("MLPREFIX")
pkgs = " " + " ".join(mlprefix + x + suffix for x in p[1:])
d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1")
d.setVar("INSANE_SKIP:" + fullp, "dev-so")
d.appendVar("RRECOMMENDS:" + fullp, " ${MLPREFIX}ti-img-rogue-umlibs" + suffix)
}
# gles specific shared objects
FILES:libgles1-rogue = "${libdir}/libGLESv1*.so*"
FILES:libgles2-rogue = "${libdir}/libGLESv2*.so*"
RDEPENDS:libgles1-rogue += "mesa-megadriver"
RDEPENDS:libgles2-rogue += "mesa-megadriver"
# vulkan specific shared objects and configs
FILES:libvk-rogue = "${libdir}/libVK_IMG.so* ${datadir}/vulkan"
RDEPENDS:libvk-rogue += "vulkan-loader libx11-xcb wayland libdrm"
# opencl specific shared objects and configs
FILES:libopencl-rogue = "${libdir}/libPVROCL.so* ${sysconfdir}/OpenCL"
RDEPENDS:libopencl-rogue += "opencl-icd-loader"
RRECOMMENDS:libopencl-rogue += "libopencl-rogue-tools"
FILES:libopencl-rogue-tools += "${bindir}/ocl*"
DEBIAN_NOAUTONAME:libopencl-rogue-tools = "1"
# optional tools and tests
FILES:${PN}-tools = "${bindir}/"
RDEPENDS:${PN}-tools = "python3-core ${PN}"
# required firmware
FILES:${PN}-firmware = "${base_libdir}/firmware/*"
INSANE_SKIP:${PN}-firmware += "arch"
RRECOMMENDS:${PN} += " \
${@bb.utils.contains("DISTRO_FEATURES", "opengl", "libgles1-rogue libgles2-rogue", "", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "vulkan x11 wayland", "libvk-rogue", "", d)} \
${@bb.utils.contains("DISTRO_FEATURES", "opencl", "libopencl-rogue", "", d)} \
${PN}-tools \
"
INSANE_SKIP:${PN} += "already-stripped dev-so"
|