diff options
Diffstat (limited to 'meta-ti-bsp')
-rw-r--r-- | meta-ti-bsp/recipes-graphics/mesa/mesa-pvr.inc | 380 | ||||
-rw-r--r-- | meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_22.3.5.bb | 2 | ||||
-rw-r--r-- | meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_24.0.1.bb | 2 |
3 files changed, 382 insertions, 2 deletions
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr.inc b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr.inc new file mode 100644 index 00000000..471475ff --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr.inc | |||
@@ -0,0 +1,380 @@ | |||
1 | # Copy of mesa.inc from OE-core before commit f9eb0468e45e ("mesa: upgrade 24.0.7 -> 25.0.2") | ||
2 | |||
3 | SUMMARY = "A free implementation of the OpenGL API" | ||
4 | DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - \ | ||
5 | a system for rendering interactive 3D graphics. \ | ||
6 | A variety of device drivers allows Mesa to be used in many different environments \ | ||
7 | ranging from software emulation to complete hardware acceleration for modern GPUs. \ | ||
8 | Mesa is used as part of the overall Direct Rendering Infrastructure and X.org \ | ||
9 | environment." | ||
10 | |||
11 | HOMEPAGE = "http://mesa3d.org" | ||
12 | BUGTRACKER = "https://bugs.freedesktop.org" | ||
13 | SECTION = "x11" | ||
14 | LICENSE = "MIT" | ||
15 | LIC_FILES_CHKSUM = "file://docs/license.rst;md5=63779ec98d78d823a9dc533a0735ef10" | ||
16 | |||
17 | PE = "2" | ||
18 | |||
19 | SRC_URI = "https://archive.mesa3d.org/mesa-${PV}.tar.xz \ | ||
20 | file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \ | ||
21 | file://0001-drisw-fix-build-without-dri3.patch \ | ||
22 | file://0002-glxext-don-t-try-zink-if-not-enabled-in-mesa.patch \ | ||
23 | file://0001-Revert-meson-do-not-pull-in-clc-for-clover.patch \ | ||
24 | file://0001-amd-Include-missing-llvm-IR-header-Module.h.patch \ | ||
25 | file://0001-freedreno-don-t-encode-build-path-into-binaries.patch\ | ||
26 | " | ||
27 | |||
28 | SRC_URI[sha256sum] = "7454425f1ed4a6f1b5b107e1672b30c88b22ea0efea000ae2c7d96db93f6c26a" | ||
29 | PV = "24.0.7" | ||
30 | |||
31 | UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)" | ||
32 | |||
33 | #because we cannot rely on the fact that all apps will use pkgconfig, | ||
34 | #make eglplatform.h independent of MESA_EGL_NO_X11_HEADER | ||
35 | do_install:append() { | ||
36 | # sed can't find EGL/eglplatform.h as it doesn't get installed when glvnd enabled. | ||
37 | # So, check if EGL/eglplatform.h exists before running sed. | ||
38 | if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)} && [ -f ${D}${includedir}/EGL/eglplatform.h ]; then | ||
39 | sed -i -e 's/^#elif defined(__unix__) && defined(EGL_NO_X11)$/#elif defined(__unix__) \&\& defined(EGL_NO_X11) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h | ||
40 | fi | ||
41 | } | ||
42 | |||
43 | DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native" | ||
44 | DEPENDS:append:class-target = " ${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'mesa-native', '', d)}" | ||
45 | EXTRANATIVEPATH += "chrpath-native" | ||
46 | PROVIDES = " \ | ||
47 | ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \ | ||
48 | ${@bb.utils.contains('PACKAGECONFIG', 'glvnd', 'virtual/libglx', '', d)} \ | ||
49 | ${@bb.utils.contains('PACKAGECONFIG', 'gles', 'virtual/libgles1 virtual/libgles2 virtual/libgles3', '', d)} \ | ||
50 | ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \ | ||
51 | ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'virtual/libgbm', '', d)} \ | ||
52 | virtual/mesa \ | ||
53 | " | ||
54 | |||
55 | inherit meson pkgconfig python3native gettext features_check | ||
56 | |||
57 | BBCLASSEXTEND = "native nativesdk" | ||
58 | |||
59 | ANY_OF_DISTRO_FEATURES = "opengl vulkan" | ||
60 | |||
61 | PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)}" | ||
62 | |||
63 | # set the MESA_BUILD_TYPE to either 'release' (default) or 'debug' | ||
64 | # by default the upstream mesa sources build a debug release | ||
65 | # here we assume the user will want a release build by default | ||
66 | MESA_BUILD_TYPE ?= "release" | ||
67 | def check_buildtype(d): | ||
68 | _buildtype = d.getVar('MESA_BUILD_TYPE') | ||
69 | if _buildtype not in ['release', 'debug']: | ||
70 | bb.fatal("unknown build type (%s), please set MESA_BUILD_TYPE to either 'release' or 'debug'" % _buildtype) | ||
71 | if _buildtype == 'debug': | ||
72 | return 'debugoptimized' | ||
73 | return 'plain' | ||
74 | MESON_BUILDTYPE = "${@check_buildtype(d)}" | ||
75 | |||
76 | EXTRA_OEMESON = " \ | ||
77 | -Dshared-glapi=enabled \ | ||
78 | -Dglx-read-only-text=true \ | ||
79 | -Dplatforms='${@",".join("${PLATFORMS}".split())}' \ | ||
80 | " | ||
81 | |||
82 | EXTRA_OEMESON:append:class-target = " ${@bb.utils.contains('PACKAGECONFIG', 'opencl', '-Dintel-clc=system', '', d)}" | ||
83 | EXTRA_OEMESON:append:class-native = " ${@bb.utils.contains('PACKAGECONFIG', 'opencl', '-Dintel-clc=enabled', '', d)}" | ||
84 | |||
85 | def strip_comma(s): | ||
86 | return s.strip(',') | ||
87 | |||
88 | PACKAGECONFIG = " \ | ||
89 | gallium \ | ||
90 | video-codecs \ | ||
91 | ${@bb.utils.filter('DISTRO_FEATURES', 'x11 vulkan wayland', d)} \ | ||
92 | ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm virgl', '', d)} \ | ||
93 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'dri3', '', d)} \ | ||
94 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \ | ||
95 | ${@bb.utils.contains('DISTRO_FEATURES', 'vulkan', 'zink', '', d)} \ | ||
96 | " | ||
97 | |||
98 | PACKAGECONFIG:append:class-native = " gallium-llvm r600" | ||
99 | |||
100 | # "gbm" requires "opengl" | ||
101 | PACKAGECONFIG[gbm] = "-Dgbm=enabled,-Dgbm=disabled" | ||
102 | |||
103 | X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr" | ||
104 | # "x11" requires "opengl" | ||
105 | PACKAGECONFIG[x11] = ",-Dglx=disabled,${X11_DEPS}" | ||
106 | PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols" | ||
107 | |||
108 | PACKAGECONFIG[dri3] = "-Ddri3=enabled, -Ddri3=disabled, xorgproto libxshmfence" | ||
109 | |||
110 | # Vulkan drivers need dri3 enabled | ||
111 | # amd could be enabled as well but requires gallium-llvm with llvm >= 3.9 | ||
112 | VULKAN_DRIVERS = "" | ||
113 | VULKAN_DRIVERS:append:x86 = ",intel,amd" | ||
114 | VULKAN_DRIVERS:append:x86-64 = ",intel,amd" | ||
115 | # i686 is a 32 bit override for mesa-native | ||
116 | VULKAN_DRIVERS:append:i686 = ",intel,amd" | ||
117 | VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}" | ||
118 | VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'broadcom', ',broadcom', '', d)}" | ||
119 | VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',swrast', '', d)}" | ||
120 | VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'imagination', ',imagination-experimental', '', d)}" | ||
121 | PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, -Dvulkan-drivers='',glslang-native vulkan-loader vulkan-headers" | ||
122 | |||
123 | # mesa development and testing tools support, per driver | ||
124 | TOOLS = "" | ||
125 | TOOLS_DEPS = "" | ||
126 | TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}" | ||
127 | TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}" | ||
128 | TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}" | ||
129 | TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}" | ||
130 | TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'imagination', ',imagination', '', d)}" | ||
131 | |||
132 | # dependencies for tools. | ||
133 | TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' ncurses libxml2 ', '', d)}" | ||
134 | |||
135 | # the fdperf tool requires libconfig (a part of meta-oe) so it needs special | ||
136 | # treatment in addition to the usual 'freedreno tools'. | ||
137 | PACKAGECONFIG[freedreno-fdperf] = ",,libconfig" | ||
138 | |||
139 | PACKAGECONFIG[tools] = "-Dtools=${@strip_comma('${TOOLS}')}, -Dtools='', ${TOOLS_DEPS}" | ||
140 | |||
141 | PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false" | ||
142 | PACKAGECONFIG[glvnd] = "-Dglvnd=true, -Dglvnd=false, libglvnd" | ||
143 | |||
144 | # "gles" requires "opengl" | ||
145 | PACKAGECONFIG[gles] = "-Dgles1=enabled -Dgles2=enabled, -Dgles1=disabled -Dgles2=disabled" | ||
146 | |||
147 | # "egl" requires "opengl" | ||
148 | PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled" | ||
149 | |||
150 | # "opencl" requires libclc from meta-clang and spirv-tools from OE-Core | ||
151 | OPENCL_NATIVE = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', '-Dopencl-native=true', '', d)}" | ||
152 | PACKAGECONFIG[opencl] = "-Dgallium-opencl=icd -Dopencl-spirv=true ${OPENCL_NATIVE},-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools python3-ply-native" | ||
153 | |||
154 | PACKAGECONFIG[broadcom] = "" | ||
155 | PACKAGECONFIG[etnaviv] = ",,python3-pycparser-native" | ||
156 | PACKAGECONFIG[freedreno] = "" | ||
157 | PACKAGECONFIG[kmsro] = "" | ||
158 | PACKAGECONFIG[vc4] = "" | ||
159 | PACKAGECONFIG[v3d] = "" | ||
160 | PACKAGECONFIG[zink] = "" | ||
161 | |||
162 | GALLIUMDRIVERS = "swrast" | ||
163 | # gallium swrast was found to crash Xorg on startup in x32 qemu | ||
164 | GALLIUMDRIVERS:x86-x32 = "" | ||
165 | GALLIUMDRIVERS:append:x86 = ",i915,iris,crocus" | ||
166 | GALLIUMDRIVERS:append:x86-64 = ",i915,iris,crocus" | ||
167 | # i686 is a 32 bit override for mesa-native | ||
168 | GALLIUMDRIVERS:append:i686 = ",i915,iris,crocus" | ||
169 | |||
170 | GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}" | ||
171 | GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}" | ||
172 | GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'kmsro', ',kmsro', '', d)}" | ||
173 | GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'vc4', ',vc4', '', d)}" | ||
174 | GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'v3d', ',v3d', '', d)}" | ||
175 | GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'zink', ',zink', '', d)}" | ||
176 | |||
177 | # radeonsi requires LLVM | ||
178 | GALLIUMDRIVERS_RADEONSI = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',radeonsi', '', d)}" | ||
179 | GALLIUMDRIVERS_LLVM = ",r300,nouveau${GALLIUMDRIVERS_RADEONSI}" | ||
180 | GALLIUMDRIVERS_LLVM:append:x86 = ",svga" | ||
181 | GALLIUMDRIVERS_LLVM:append:x86-64 = ",svga" | ||
182 | # i686 is a 32 bit override for mesa-native | ||
183 | GALLIUMDRIVERS_LLVM:append:i686 = ",svga" | ||
184 | |||
185 | PACKAGECONFIG[r600] = "" | ||
186 | PACKAGECONFIG[virgl] = "" | ||
187 | |||
188 | GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', '${GALLIUMDRIVERS_LLVM}', '', d)}" | ||
189 | GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',r600', '', d)}" | ||
190 | GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'virgl', ',virgl', '', d)}" | ||
191 | |||
192 | PACKAGECONFIG[gallium] = "-Dgallium-drivers=${@strip_comma('${GALLIUMDRIVERS}')}, -Dgallium-drivers='', libdrm" | ||
193 | PACKAGECONFIG[gallium-llvm] = "-Dllvm=enabled -Dshared-llvm=enabled, -Dllvm=disabled, llvm llvm-native elfutils" | ||
194 | PACKAGECONFIG[xa] = "-Dgallium-xa=enabled, -Dgallium-xa=disabled" | ||
195 | PACKAGECONFIG[va] = "-Dgallium-va=enabled,-Dgallium-va=disabled,libva-initial" | ||
196 | PACKAGECONFIG[vdpau] = "-Dgallium-vdpau=enabled,-Dgallium-vdpau=disabled,libvdpau" | ||
197 | |||
198 | PACKAGECONFIG[imagination] = "-Dimagination-srv=true,-Dimagination-srv=false" | ||
199 | |||
200 | PACKAGECONFIG[lima] = "" | ||
201 | GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}" | ||
202 | |||
203 | PACKAGECONFIG[panfrost] = "" | ||
204 | GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}" | ||
205 | |||
206 | PACKAGECONFIG[tegra] = "" | ||
207 | GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'tegra', ',tegra,nouveau', '', d)}" | ||
208 | |||
209 | PACKAGECONFIG[vulkan-beta] = "-Dvulkan-beta=true,-Dvulkan-beta=false" | ||
210 | |||
211 | PACKAGECONFIG[osmesa] = "-Dosmesa=true,-Dosmesa=false" | ||
212 | |||
213 | PACKAGECONFIG[perfetto] = "-Dperfetto=true,-Dperfetto=false,libperfetto" | ||
214 | |||
215 | PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind" | ||
216 | |||
217 | PACKAGECONFIG[lmsensors] = "-Dlmsensors=enabled,-Dlmsensors=disabled,lmsensors" | ||
218 | |||
219 | VIDEO_CODECS ?= "${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'all', 'all_free', d)}" | ||
220 | PACKAGECONFIG[video-codecs] = "-Dvideo-codecs=${VIDEO_CODECS}, -Dvideo-codecs=''" | ||
221 | |||
222 | # llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2) | ||
223 | FULL_OPTIMIZATION:append = " -fno-omit-frame-pointer" | ||
224 | |||
225 | CFLAGS:append:armv5 = " -DMISSING_64BIT_ATOMICS" | ||
226 | CFLAGS:append:armv6 = " -DMISSING_64BIT_ATOMICS" | ||
227 | |||
228 | # Remove the mesa dependency on mesa-dev, as mesa is empty | ||
229 | DEV_PKG_DEPENDENCY = "" | ||
230 | |||
231 | # Khronos documentation says that include/GLES2/gl2ext.h can be used for | ||
232 | # OpenGL ES 3 specification as well as for OpenGL ES 2. | ||
233 | # There can be applications including GLES2/gl2ext.h instead of GLES3/gl3ext.h | ||
234 | # meaning we should probably bring in GLES2/gl2ext.h if someone asks for | ||
235 | # development package of libgles3. | ||
236 | RDEPENDS:libgles3-mesa-dev += "libgles2-mesa-dev" | ||
237 | |||
238 | # GLES2 and GLES3 implementations are packaged in a single library in libgles2-mesa. | ||
239 | # Add a dependency so the GLES3 dev package is associated with its implementation. | ||
240 | RDEPENDS:libgles2-mesa += "libgles3-mesa" | ||
241 | ALLOW_EMPTY:libgles3-mesa = "1" | ||
242 | |||
243 | RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc spirv-tools', '', d)}" | ||
244 | |||
245 | PACKAGES =+ "libegl-mesa libegl-mesa-dev \ | ||
246 | libosmesa libosmesa-dev \ | ||
247 | libgl-mesa libgl-mesa-dev \ | ||
248 | libglx-mesa libglx-mesa-dev \ | ||
249 | libglapi libglapi-dev \ | ||
250 | libgbm libgbm-dev \ | ||
251 | libgles1-mesa libgles1-mesa-dev \ | ||
252 | libgles2-mesa libgles2-mesa-dev \ | ||
253 | libgles3-mesa libgles3-mesa-dev \ | ||
254 | libopencl-mesa libopencl-mesa-dev \ | ||
255 | libxatracker libxatracker-dev \ | ||
256 | mesa-megadriver mesa-vulkan-drivers \ | ||
257 | mesa-vdpau-drivers mesa-tools \ | ||
258 | " | ||
259 | |||
260 | do_install:append () { | ||
261 | # Drivers never need libtool .la files | ||
262 | rm -f ${D}${libdir}/dri/*.la | ||
263 | rm -f ${D}${libdir}/egl/*.la | ||
264 | rm -f ${D}${libdir}/gallium-pipe/*.la | ||
265 | rm -f ${D}${libdir}/gbm/*.la | ||
266 | |||
267 | # libwayland-egl has been moved to wayland 1.15+ | ||
268 | rm -f ${D}${libdir}/libwayland-egl* | ||
269 | rm -f ${D}${libdir}/pkgconfig/wayland-egl.pc | ||
270 | } | ||
271 | |||
272 | do_install:append:class-native () { | ||
273 | if ${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'true', 'false', d)}; then | ||
274 | install -d ${D}${bindir} | ||
275 | install -m0755 ${B}/src/intel/compiler/intel_clc ${D}${bindir} | ||
276 | fi | ||
277 | } | ||
278 | |||
279 | # For the packages that make up the OpenGL interfaces, inject variables so that | ||
280 | # they don't get Debian-renamed (which would remove the -mesa suffix), and | ||
281 | # RPROVIDEs/RCONFLICTs on the generic libgl name. | ||
282 | python __anonymous() { | ||
283 | pkgconfig = (d.getVar('PACKAGECONFIG') or "").split() | ||
284 | suffix = "" | ||
285 | if "-native" in d.getVar("PN"): | ||
286 | suffix = "-native" | ||
287 | for p in (("egl", "libegl", "libegl1"), | ||
288 | ("opengl", "libgl", "libgl1"), | ||
289 | ("glvnd", "libglx",), | ||
290 | ("gles", "libgles1", "libglesv1-cm1"), | ||
291 | ("gles", "libgles2", "libglesv2-2"), | ||
292 | ("gles", "libgles3",), | ||
293 | ("opencl", "libopencl",)): | ||
294 | if not p[0] in pkgconfig: | ||
295 | continue | ||
296 | mlprefix = d.getVar("MLPREFIX") | ||
297 | fullp = mlprefix + p[1] + "-mesa" + suffix | ||
298 | mlprefix = d.getVar("MLPREFIX") | ||
299 | pkgs = " " + " ".join(mlprefix + x + suffix for x in p[1:]) | ||
300 | d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1") | ||
301 | d.appendVar("RREPLACES:" + fullp, pkgs) | ||
302 | d.appendVar("RPROVIDES:" + fullp, pkgs) | ||
303 | d.appendVar("RCONFLICTS:" + fullp, pkgs) | ||
304 | |||
305 | d.appendVar("RRECOMMENDS:" + fullp, " ${MLPREFIX}mesa-megadriver" + suffix) | ||
306 | |||
307 | # For -dev, the first element is both the Debian and original name | ||
308 | fullp = mlprefix + p[1] + "-mesa-dev" + suffix | ||
309 | pkgs = " " + mlprefix + p[1] + "-dev" + suffix | ||
310 | d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1") | ||
311 | d.appendVar("RREPLACES:" + fullp, pkgs) | ||
312 | d.appendVar("RPROVIDES:" + fullp, pkgs) | ||
313 | d.appendVar("RCONFLICTS:" + fullp, pkgs) | ||
314 | } | ||
315 | |||
316 | python mesa_populate_packages() { | ||
317 | pkgs = ['mesa', 'mesa-dev', 'mesa-dbg'] | ||
318 | for pkg in pkgs: | ||
319 | d.setVar("RPROVIDES:%s" % pkg, pkg.replace("mesa", "mesa-dri", 1)) | ||
320 | d.setVar("RCONFLICTS:%s" % pkg, pkg.replace("mesa", "mesa-dri", 1)) | ||
321 | d.setVar("RREPLACES:%s" % pkg, pkg.replace("mesa", "mesa-dri", 1)) | ||
322 | |||
323 | import re | ||
324 | dri_drivers_root = oe.path.join(d.getVar('PKGD'), d.getVar('libdir'), "dri") | ||
325 | if os.path.isdir(dri_drivers_root): | ||
326 | dri_pkgs = sorted(os.listdir(dri_drivers_root)) | ||
327 | lib_name = d.expand("${MLPREFIX}mesa-megadriver") | ||
328 | for p in dri_pkgs: | ||
329 | m = re.match(r'^(.*)_dri\.so$', p) | ||
330 | if m: | ||
331 | pkg_name = " ${MLPREFIX}mesa-driver-%s" % legitimize_package_name(m.group(1)) | ||
332 | d.appendVar("RPROVIDES:%s" % lib_name, pkg_name) | ||
333 | d.appendVar("RCONFLICTS:%s" % lib_name, pkg_name) | ||
334 | d.appendVar("RREPLACES:%s" % lib_name, pkg_name) | ||
335 | |||
336 | pipe_drivers_root = os.path.join(d.getVar('libdir'), "gallium-pipe") | ||
337 | do_split_packages(d, pipe_drivers_root, r'^pipe_(.*)\.so$', 'mesa-driver-pipe-%s', 'Mesa %s pipe driver', extra_depends='') | ||
338 | } | ||
339 | |||
340 | PACKAGESPLITFUNCS =+ "mesa_populate_packages" | ||
341 | |||
342 | PACKAGES_DYNAMIC += "^mesa-driver-.*" | ||
343 | PACKAGES_DYNAMIC:class-native = "^mesa-driver-.*-native" | ||
344 | |||
345 | FILES:mesa-megadriver = "${libdir}/dri/* ${datadir}/drirc.d" | ||
346 | FILES:mesa-vulkan-drivers = "${libdir}/libvulkan_*.so ${libdir}/libpowervr_rogue.so ${datadir}/vulkan" | ||
347 | FILES:${PN}-vdpau-drivers = "${libdir}/vdpau/*.so.*" | ||
348 | FILES:libegl-mesa = "${libdir}/libEGL*.so.* ${datadir}/glvnd/egl_vendor.d" | ||
349 | FILES:libgbm = "${libdir}/libgbm.so.*" | ||
350 | FILES:libgles1-mesa = "${libdir}/libGLESv1*.so.*" | ||
351 | FILES:libgles2-mesa = "${libdir}/libGLESv2.so.*" | ||
352 | FILES:libgl-mesa = "${libdir}/libGL.so.*" | ||
353 | FILES:libglx-mesa = "${libdir}/libGLX*.so.*" | ||
354 | FILES:libopencl-mesa = "${libdir}/libMesaOpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/mesa.icd" | ||
355 | FILES:libglapi = "${libdir}/libglapi.so.*" | ||
356 | FILES:libosmesa = "${libdir}/libOSMesa.so.*" | ||
357 | FILES:libxatracker = "${libdir}/libxatracker.so.*" | ||
358 | |||
359 | FILES:${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/vulkan ${libdir}/vdpau/*.so" | ||
360 | FILES:libegl-mesa-dev = "${libdir}/libEGL*.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc" | ||
361 | FILES:libgbm-dev = "${libdir}/libgbm.* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h" | ||
362 | FILES:libgl-mesa-dev = "${libdir}/libGL.* ${includedir}/GL ${libdir}/pkgconfig/gl.pc" | ||
363 | FILES:libglx-mesa-dev = "${libdir}/libGLX*.*" | ||
364 | FILES:libglapi-dev = "${libdir}/libglapi.*" | ||
365 | FILES:libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc" | ||
366 | FILES:libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc" | ||
367 | FILES:libgles3-mesa-dev = "${includedir}/GLES3" | ||
368 | FILES:libopencl-mesa-dev = "${libdir}/libMesaOpenCL.so" | ||
369 | FILES:libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/GL/osmesa.h ${libdir}/pkgconfig/osmesa.pc" | ||
370 | FILES:libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \ | ||
371 | ${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \ | ||
372 | ${libdir}/pkgconfig/xatracker.pc" | ||
373 | # catch all to get all the tools and data | ||
374 | FILES:${PN}-tools = "${bindir} ${datadir}" | ||
375 | ALLOW_EMPTY:${PN}-tools = "1" | ||
376 | |||
377 | # Fix upgrade path from mesa to mesa-megadriver | ||
378 | RREPLACES:mesa-megadriver = "mesa" | ||
379 | RCONFLICTS:mesa-megadriver = "mesa" | ||
380 | RPROVIDES:mesa-megadriver = "mesa" | ||
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_22.3.5.bb b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_22.3.5.bb index bdc9ce16..5af196aa 100644 --- a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_22.3.5.bb +++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_22.3.5.bb | |||
@@ -2,7 +2,7 @@ | |||
2 | # upstream yet. This allows us to build the shims we need without completely | 2 | # upstream yet. This allows us to build the shims we need without completely |
3 | # clobbering mesa. | 3 | # clobbering mesa. |
4 | 4 | ||
5 | require recipes-graphics/mesa/mesa.inc | 5 | require recipes-graphics/mesa/mesa-pvr.inc |
6 | 6 | ||
7 | SUMMARY += " (with PowerVR support for TI platforms)" | 7 | SUMMARY += " (with PowerVR support for TI platforms)" |
8 | 8 | ||
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_24.0.1.bb b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_24.0.1.bb index 1ac022d2..e834355c 100644 --- a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_24.0.1.bb +++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_24.0.1.bb | |||
@@ -2,7 +2,7 @@ | |||
2 | # upstream yet. This allows us to build the shims we need without completely | 2 | # upstream yet. This allows us to build the shims we need without completely |
3 | # clobbering mesa. | 3 | # clobbering mesa. |
4 | 4 | ||
5 | require recipes-graphics/mesa/mesa.inc | 5 | require recipes-graphics/mesa/mesa-pvr.inc |
6 | 6 | ||
7 | SUMMARY += " (with PowerVR support for TI platforms)" | 7 | SUMMARY += " (with PowerVR support for TI platforms)" |
8 | 8 | ||