Skip to contentSkip to conversation

wayland: Fix wayland-tools packaging problems

PATCH Superseded Tom Hochstein 2 participants 4 messages Nov 7, 2021

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 wayland: Fix wayland-tools packaging problems

There are several packaging problems due to the wayland-tools packaging implementation. The wayland-tools package currently looks like this:

wayland-tools

└── usr
    ├── bin
    │   └── wayland-scanner
    └── share
        └── wayland
            ├── wayland.dtd
            ├── wayland-scanner.mk
            └── wayland.xml

The files wayland-scanner.pc and wayland-scanner.m4 are incorrectly located in the main package. The files wayland.dtd and wayland.xml are incorrectly located here but belong in the main package.

Fix the problems by moving wayland-tools before the other packages, adding wayland-tools-dev, and dropping the main package FILES variable override as no longer needed.

After the fix wayland-tools and wayland-tools-dev look like this:

wayland-tools

└── usr
    └── bin
        └── wayland-scanner
wayland-tools-dev
└── usr
    ├── lib
    │   └── pkgconfig
    │       └── wayland-scanner.pc
    └── share
        ├── aclocal
        │   └── wayland-scanner.m4
        └── wayland
            └── wayland-scanner.mk
---
 meta/recipes-graphics/wayland/wayland_1.19.0.bb | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
meta/recipes-graphics/wayland/wayland_1.19.0.bb +7 -3
index d6e468497d..74d6d65e9e 100644
@@ -52,10 +52,14 @@ sysroot_stage_all:append:class-target () {
 	cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/
 }
 
-PACKAGES += "${PN}-tools"
+PACKAGES =+ "${PN}-tools ${PN}-tools-dev"
 
-FILES:${PN} = "${libdir}/*${SOLIBS}"
-FILES:${PN}-tools += "${bindir} ${datadir}/wayland"
+FILES:${PN}-tools = "${bindir}/wayland-scanner"
+FILES:${PN}-tools-dev = " \
+    ${libdir}/pkgconfig/wayland-scanner.pc \
+    ${datadir}/aclocal/wayland-scanner.m4 \
+    ${datadir}/wayland/wayland-scanner.mk \
+"
 
 BBCLASSEXTEND = "native nativesdk"
 
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/3 nativesdk-packagegroup-sdk-host.bb: Update host tools for wayland

The wayland-scanner host tool required to build weston is moved to the wayland-tools package, so update the SDK host tools list accordingly.

Also, the weston build requires wayland-scanner.pc to find wayland-scanner, so add wayland-tools-dev.

---
 .../packagegroups/nativesdk-packagegroup-sdk-host.bb            | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb +1 -1
index 39e5002bb7..16752026d0 100644
@@ -25,7 +25,7 @@ RDEPENDS:${PN} = "\
     nativesdk-makedevs \
     nativesdk-cmake \
     nativesdk-meson \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'nativesdk-wayland', '', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'nativesdk-wayland-tools nativesdk-wayland-tools-dev', '', d)} \
     nativesdk-sdk-provides-dummy \
     nativesdk-bison \
     nativesdk-flex \
Signature · 1 line
2.17.1
#2 lore raw

PATCH 3/3 bitbake.conf: Use wayland distro feature for native builds

In reply to Tom Hochstein

The wayland-scanner is missing from SDKs with weston, but the weston build requires wayland-scanner. Allow the distro feature in order to include the wayland-scanner packages via nativesdk-packagegroup-sdk-host.bb.

---
 meta/conf/bitbake.conf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/conf/bitbake.conf +2 -2
index 790f2f7a8c..71c1e52ad6 100644
@@ -869,8 +869,8 @@ DISTRO_FEATURES_NATIVESDK ?= "x11"
 
 # Normally target distro features will not be applied to native builds:
 # Native distro features on this list will use the target feature value
-DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation debuginfod opengl"
-DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation debuginfod opengl"
+DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation debuginfod opengl wayland"
+DISTRO_FEATURES_FILTER_NATIVESDK ?= "api-documentation debuginfod opengl wayland"
 
 DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit gobject-introspection-data ldconfig"
 MACHINE_FEATURES_BACKFILL = "rtc qemu-usermode"
Signature · 1 line
2.17.1
#3 lore raw
In reply to Tom Hochstein
Quoted 55 lines · Tom Hochstein

There are several packaging problems due to the wayland-tools packaging implementation. The wayland-tools package currently looks like this:

wayland-tools

└── usr
    ├── bin
    │   └── wayland-scanner
    └── share
        └── wayland
            ├── wayland.dtd
            ├── wayland-scanner.mk
            └── wayland.xml

The files wayland-scanner.pc and wayland-scanner.m4 are incorrectly located in the main package. The files wayland.dtd and wayland.xml are incorrectly located here but belong in the main package.

Fix the problems by moving wayland-tools before the other packages, adding wayland-tools-dev, and dropping the main package FILES variable override as no longer needed.

After the fix wayland-tools and wayland-tools-dev look like this:

wayland-tools

└── usr
    └── bin
        └── wayland-scanner
wayland-tools-dev
└── usr
    ├── lib
    │   └── pkgconfig
    │       └── wayland-scanner.pc
    └── share
        ├── aclocal
        │   └── wayland-scanner.m4
        └── wayland
            └── wayland-scanner.mk
---
 meta/recipes-graphics/wayland/wayland_1.19.0.bb | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
meta/recipes-graphics/wayland/wayland_1.19.0.bb +1 -2
index d6e468497d..74d6d65e9e 100644
@@ -52,10 +52,14 @@ sysroot_stage_all:append:class-target () {
 	cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/
 }
 
-PACKAGES += "${PN}-tools"
+PACKAGES =+ "${PN}-tools ${PN}-tools-dev"
 
-FILES:${PN} = "${libdir}/*${SOLIBS}"

meta/recipes-graphics/wayland/wayland_1.19.0.bb sysroot_stage_all:append:class-target () { · line 65

Quoted 10 lines
meta/recipes-graphics/wayland/wayland_1.19.0.bb +6 -1
-FILES:${PN}-tools += "${bindir} ${datadir}/wayland"
+FILES:${PN}-tools = "${bindir}/wayland-scanner"
+FILES:${PN}-tools-dev = " \
+    ${libdir}/pkgconfig/wayland-scanner.pc \
+    ${datadir}/aclocal/wayland-scanner.m4 \
+    ${datadir}/wayland/wayland-scanner.mk \
+"
 
 BBCLASSEXTEND = "native nativesdk"
 

Shouldn't these just go into wayland-dev?

Cheers,

Richard