Skip to contentSkip to conversation

libdrm: Add PACKAGECONFIG support for all meson options

PATCH In review Martin Jansa 3 participants 8 messages Jul 10, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 libdrm: Add PACKAGECONFIG support for all meson options

* Use the same defaults as meson does, with few modifications based on previous EXTRA_OEMESON
* move libpciaccess dependency to new intel PACKAGECONFIG
* add dependency on util-macros which was previously pulled by libpciaccess, because it's still needed even with intel disabled:
| configure.ac:34: error: must install xorg-macros 1.12 or later
before running autoconf/autogen

---
 meta/recipes-graphics/drm/libdrm_2.4.92.bb | 26 ++++++++++++++++------
 1 file changed, 19 insertions(+), 7 deletions(-)
meta/recipes-graphics/drm/libdrm_2.4.92.bb +19 -7
index 347090cd5f..1526553254 100644
@@ -8,7 +8,7 @@ SECTION = "x11/base"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c530816761e949dc71"
 PROVIDES = "drm"
-DEPENDS = "libpthread-stubs libpciaccess"
+DEPENDS = "libpthread-stubs util-macros"
 
 SRC_URI = "http://dri.freedesktop.org/libdrm/${BP}.tar.bz2 \
            file://musl-ioctl.patch"
@@ -17,12 +17,24 @@ SRC_URI[sha256sum] = "e9e48fdb4de139dc4d9880aa1473158a16ff6aff63d14341367bd30a51
 
 inherit meson pkgconfig manpages
 
-EXTRA_OEMESON = "-Dvalgrind=false \
-                 -Dcairo-tests=false \
-                 -Dinstall-test-programs=true \
-                 -Domap=true \
-                 -Detnaviv=true"
-
+PACKAGECONFIG ??= "libkms intel radeon amdgpu nouveau vmwgfx omap freedreno vc4 etnaviv install-test-programs"
+PACKAGECONFIG[libkms] = "-Dlibkms=true,-Dlibkms=false"
+PACKAGECONFIG[intel] = "-Dintel=true,-Dintel=false,libpciaccess"
+PACKAGECONFIG[radeon] = "-Dradeon=true,-Dradeon=false"
+PACKAGECONFIG[amdgpu] = "-Damdgpu=true,-Damdgpu=false"
+PACKAGECONFIG[nouveau] = "-Dnouveau=true,-Dnouveau=false"
+PACKAGECONFIG[vmwgfx] = "-Dvmwgfx=true,-Dvmwgfx=false"
+PACKAGECONFIG[omap] = "-Domap=true,-Domap=false"
+PACKAGECONFIG[exynos] = "-Dexynos=true,-Dexynos=false"
+PACKAGECONFIG[freedreno] = "-Dfreedreno=true,-Dfreedreno=false"
+PACKAGECONFIG[tegra] = "-Dtegra=true,-Dtegra=false"
+PACKAGECONFIG[vc4] = "-Dvc4=true,-Dvc4=false"
+PACKAGECONFIG[etnaviv] = "-Detnaviv=true,-Detnaviv=false"
+PACKAGECONFIG[freedreno-kgsl] = "-Dfreedreno-kgsl=true,-Dfreedreno-kgsl=false"
+PACKAGECONFIG[valgrind] = "-Dvalgrind=true,-Dvalgrind=false,valgrind"
+PACKAGECONFIG[install-test-programs] = "-Dinstall-test-programs=true,-Dinstall-test-programs=false"
+PACKAGECONFIG[cairo-tests] = "-Dcairo-tests=true,-Dcairo-tests=false"
+PACKAGECONFIG[udev] = "-Dudev=true,-Dudev=false,udev"
 PACKAGECONFIG[manpages] = "-Dman-pages=true,-Dman-pages=false,libxslt-native xmlto-native"
 
 ALLOW_EMPTY_${PN}-drivers = "1"
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/2 libdrm: allow to build native and nativesdk

---
 meta/recipes-graphics/drm/libdrm_2.4.92.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-graphics/drm/libdrm_2.4.92.bb +2 -0
index 1526553254..b4d06d19a6 100644
@@ -56,3 +56,5 @@ FILES_${PN}-kms = "${libdir}/libkms*.so.*"
 FILES_${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*"
 FILES_${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.*"
 FILES_${PN}-etnaviv = "${libdir}/libdrm_etnaviv.so.*"
+
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.17.1
#2 lore raw

Re: [PATCH 2/2] libdrm: allow to build native and nativesdk

Normally I don't mind native/nativesdk variants but libdrm starts to worry me as its a short step away from mesa and when we've tried native or nativesdk versions in the past its been a nightmare, particularly around GL.

Could you explain a little more about why we need libdrm-native?

Cheers,

Richard

Quoted 19 lines · Martin Jansa
---
 meta/recipes-graphics/drm/libdrm_2.4.92.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-graphics/drm/libdrm_2.4.92.bb +2 -0
index 1526553254..b4d06d19a6 100644
@@ -56,3 +56,5 @@ FILES_${PN}-kms = "${libdir}/libkms*.so.*"
 FILES_${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*"
 FILES_${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.*"
 FILES_${PN}-etnaviv = "${libdir}/libdrm_etnaviv.so.*"
+
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.17.1
#3 lore raw

Re: [PATCH 2/2] libdrm: allow to build native and nativesdk

Quoted 6 lines · Richard Purdie

Normally I don't mind native/nativesdk variants but libdrm starts to worry me as its a short step away from mesa and when we've tried native or nativesdk versions in the past its been a nightmare, particularly around GL.

Could you explain a little more about why we need libdrm-native?

It's for mesa and nativesdk-mesa indeed and qemu-native with spice, virglrenderer and opengl support enabled.

http://lists.openembedded.org/pipermail/openembedded-core/2017-September/142349.html

Quoted 20 lines · Martin Jansa
Quoted 19 lines
---
 meta/recipes-graphics/drm/libdrm_2.4.92.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-graphics/drm/libdrm_2.4.92.bb +2 -0
index 1526553254..b4d06d19a6 100644
@@ -56,3 +56,5 @@ FILES_${PN}-kms = "${libdir}/libkms*.so.*"
 FILES_${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*"
 FILES_${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.*"
 FILES_${PN}-etnaviv = "${libdir}/libdrm_etnaviv.so.*"
+
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.17.1
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#4 lore raw

Re: [PATCH 2/2] libdrm: allow to build native and nativesdk

Whilst I'm not yet convinced this is something we should have on by default, I am very interested in seeing it working.

Ross

Quoted 43 lines · Martin Jansa
Quoted 6 lines · Richard Purdie

Normally I don't mind native/nativesdk variants but libdrm starts to worry me as its a short step away from mesa and when we've tried native or nativesdk versions in the past its been a nightmare, particularly around GL.

Could you explain a little more about why we need libdrm-native?

It's for mesa and nativesdk-mesa indeed and qemu-native with spice, virglrenderer and opengl support enabled.

http://lists.openembedded.org/pipermail/openembedded-core/2017-September/142349.html

Quoted 6 lines · Martin Jansa
Quoted 5 lines
---
 meta/recipes-graphics/drm/libdrm_2.4.92.bb | 2 ++
 1 file changed, 2 insertions(+)
Quoted 14 lines
Quoted 12 lines
meta/recipes-graphics/drm/libdrm_2.4.92.bb +2 -1
index 1526553254..b4d06d19a6 100644
@@ -56,3 +56,5 @@ FILES_${PN}-kms = "${libdir}/libkms*.so.*"
 FILES_${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*"
 FILES_${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.*"
 FILES_${PN}-etnaviv = "${libdir}/libdrm_etnaviv.so.*"
+
+BBCLASSEXTEND = "native nativesdk"
--
Quoted 2 lines

2.17.1

--
Martin 'JaMa' Jansa jabber: [email protected]

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#5 lore raw
In reply to Martin Jansa
Quoted 7 lines · Martin Jansa

* Use the same defaults as meson does, with few modifications based on previous EXTRA_OEMESON
* move libpciaccess dependency to new intel PACKAGECONFIG
* add dependency on util-macros which was previously pulled by libpciaccess, because it's still needed even with intel disabled:
| configure.ac:34: error: must install xorg-macros 1.12 or later
before running autoconf/autogen

Why is configure giving you an error message when Meson is being used?

Ross

#6 lore raw
Quoted 10 lines · Ross
Quoted 7 lines · Martin Jansa

* Use the same defaults as meson does, with few modifications based on previous EXTRA_OEMESON
* move libpciaccess dependency to new intel PACKAGECONFIG
* add dependency on util-macros which was previously pulled by libpciaccess, because it's still needed even with intel disabled:
| configure.ac:34: error: must install xorg-macros 1.12 or later
before running autoconf/autogen

Why is configure giving you an error message when Meson is being used?

Because this error message is almost a year old from:
http://git.openembedded.org/openembedded-core-contrib/commit/?h=jansa/qemu&id=2eb3926cc54fef8e8cdd39cc20fbdc129aa1e52f
switch to meson just pushed me to send this part upstream instead of rebasing it forever.

I can update it with meson version of the error if you want.

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#7 lore raw

I can't replicate the error, I don't think util-macros is needed anymore.

Ross

Quoted 21 lines · Martin Jansa
Quoted 10 lines · Ross
Quoted 7 lines · Martin Jansa

* Use the same defaults as meson does, with few modifications based on previous EXTRA_OEMESON
* move libpciaccess dependency to new intel PACKAGECONFIG
* add dependency on util-macros which was previously pulled by libpciaccess, because it's still needed even with intel disabled:
| configure.ac:34: error: must install xorg-macros 1.12 or later
before running autoconf/autogen

Why is configure giving you an error message when Meson is being used?

Because this error message is almost a year old from:
http://git.openembedded.org/openembedded-core-contrib/commit/?h=jansa/qemu&id=2eb3926cc54fef8e8cdd39cc20fbdc129aa1e52f
switch to meson just pushed me to send this part upstream instead of rebasing it forever.

I can update it with meson version of the error if you want.

--
Martin 'JaMa' Jansa jabber: [email protected]