2023. 03. 06. 16:59 keltezéssel, Otavio Salvador írta:
Em seg., 6 de mar. de 2023 às 06:11, Zoltan Boszormenyi
<zbos...@gmail.com> escreveu:
In the anonymous python function that creates packages based
on PACKAGECONFIG, use a single synthetic "opencl" setting
that is added when either "clover" or "rusticl" are present.

Without this, creating variables for two "libopencl-mesa" will
confuse the packaging code, resulting in subsequent packages
(like mesa-megadriver and others) being renamed incorrectly.

This also makes sense from a packaging standpoint: currently
both clover and rusticl can be enabled, in which case both CL
frontends should go into the same libopencl-mesa subpackage.

Signed-off-by: Zoltán Böszörményi <zbos...@gmail.com>
Please name the PACKAGECONFIG as opencl-rusticl

  inherit meson pkgconfig python3native gettext features_check
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'rusticl', 'rust', '', d)}
Here.

  BBCLASSEXTEND = "native nativesdk"

@@ -136,6 +137,9 @@ PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled"
  OPENCL_NATIVE = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', 
'-Dopencl-native=true', '', d)}"
  PACKAGECONFIG[clover] = "-Dgallium-opencl=icd -Dopencl-spirv=true 
${OPENCL_NATIVE},-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools"

+# "rusticl" requires libclc, spirv-llvm-translator and bindgen-cli-native from 
meta-clang and spirv-tools from OE-Core
+PACKAGECONFIG[rusticl] = "-Dgallium-rusticl=true 
-Drust_std=2021,-Dgallium-rusticl=false,bindgen-cli-native libclc spirv-tools 
spirv-llvm-translator,libclc spirv-tools spirv-llvm-translator"
Here.

  RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'clover', 
'libclc spirv-tools', '', d)}"
+RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'rusticl', 
'libclc spirv-tools spirv-llvm-translator', '', d)}"
Here.

  PACKAGES =+ "libegl-mesa libegl-mesa-dev \
               libosmesa libosmesa-dev \
@@ -250,6 +255,11 @@ do_install:append () {
  # RPROVIDEs/RCONFLICTs on the generic libgl name.
  python __anonymous() {
      pkgconfig = (d.getVar('PACKAGECONFIG') or "").split()
+    # Add the synthetic "opencl" string to pkgconfig because
+    # both "clover" and "rusticl" would create libopencl-mesa.
+    # Both CL frontends should go into the same package.
+    if "clover" in pkgconfig or "rusticl" in pkgconfig:
+        pkgconfig.append("opencl")
Here.

Thanks, I will rename the PACKAGECONFIG names.


Also, we need to add RREPLACES, RRECOMMENDS and RCONFLICTS to old
clover package so we support package feed upgrades.

There is no "clover" package, there is libopencl-mesa.
That doesn't change with this, with either or both PACKAGECONFIGs
enabled, there is still libopencl-mesa that ships either or
both CL frontends. The versioning should be enough for the upgrade.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#178088): 
https://lists.openembedded.org/g/openembedded-core/message/178088
Mute This Topic: https://lists.openembedded.org/mt/97421292/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to