Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 27 additions & 4 deletions recipes/libs/libdrm.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,54 @@
inherit: [meson]

metaEnvironment:
PKG_VERSION: "2.4.123"
PKG_VERSION: "2.4.131"
PKG_LICENSE: "MIT"

Config:
LIBDRM_INTEL:
type: choice
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should use type: bool consistently for on/off switches. It makes the usage of the switches more predictable across the project and simplifies the if: conditions. Maybe we should move the bool to enabled/disabled conversion part of the systemd recipe to the meson class?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These options are feature options in meson. They can have 3 values, enabled, disabled and auto. I'd like to be consistent to the meson_options.txt and keep it as choice. But I added the missing auto choice.

BTW: the FEATURE conversion in the systemd recipe is actually unused..

default: disabled
help: Enable support for Intel's KMS API.
choice:
auto:
enabled:
disabled:
LIBDRM_VMWGFX:
type: choice
default: disabled
help: Enable support for vmgfx's KMS API.
choice:
auto:
enabled:
disabled:

depends:
- name: libs::xorg::libpciaccess-dev
if: "$(not,$(eq,${LIBDRM_INTEL},disabled))"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could also use the expression syntax here if you prefer this as it might be more readable?

- virtual::core::udev-dev

- use: []
depends:
- name: libs::xorg::libpciaccess-tgt
if: "$(not,$(eq,${LIBDRM_INTEL},disabled))"
- virtual::core::udev-tgt

checkoutSCM:
scm: url
url: https://dri.freedesktop.org/libdrm/libdrm-${PKG_VERSION}.tar.xz
digestSHA1: d61f31495f931d53971fa61686239483c25c2a86
digestSHA256: 45ba9983b51c896406a3d654de81d313b953b76e6391e2797073d543c5f617d5
stripComponents: 1

buildVars: [LIBDRM_INTEL, LIBDRM_VMWGFX]
buildScript: |
mesonBuild $1 \
-Dcairo-tests=disabled \
-Dman-pages=disabled \
-Dintel=disabled \
-Dintel=${LIBDRM_INTEL} \
-Dradeon=disabled \
-Damdgpu=disabled \
-Dnouveau=disabled \
-Dvmwgfx=disabled \
-Dvmwgfx=${LIBDRM_VMWGFX} \
-Domap=disabled \
-Detnaviv=disabled \
-Dexynos=disabled \
Expand Down