diff --git a/local/recipes/qt/qtbase/recipe.toml b/local/recipes/qt/qtbase/recipe.toml index 35a1135af..a85245483 100644 --- a/local/recipes/qt/qtbase/recipe.toml +++ b/local/recipes/qt/qtbase/recipe.toml @@ -127,8 +127,7 @@ GLES3_EOF done mkdir -p "${COOKBOOK_SYSROOT}/include/netinet" -if [ ! -f "${COOKBOOK_SYSROOT}/include/netinet/in6_pktinfo_compat.h" ]; then - cat > "${COOKBOOK_SYSROOT}/include/netinet/in6_pktinfo_compat.h" <<'PKTINFO_EOF' +cat > "${COOKBOOK_SYSROOT}/include/netinet/in6_pktinfo_compat.h" <<'PKTINFO_EOF' #ifndef REDBEAR_IN6_PKTINFO_COMPAT_H #define REDBEAR_IN6_PKTINFO_COMPAT_H #include @@ -138,13 +137,14 @@ if [ ! -f "${COOKBOOK_SYSROOT}/include/netinet/in6_pktinfo_compat.h" ]; then #ifndef IPV6_PKTINFO #define IPV6_PKTINFO 50 #endif +#ifndef __redox__ struct in6_pktinfo { struct in6_addr ipi6_addr; int ipi6_ifindex; }; #endif +#endif PKTINFO_EOF -fi python - <<'PY' import os from pathlib import Path @@ -736,4 +736,16 @@ for path in targets: text = text.replace(old, new, 1) path.write_text(text) PY -""" +# libwayland is "ignore" in the config because it can't be rebuilt from source. +# But Qt Wayland plugins need libwayland-client.so at runtime. Copy them from +# the sysroot into the stage so they're available when dlopen() loads the plugins. +mkdir -p "${COOKBOOK_STAGE}/usr/lib" +for lib in libwayland-client libwayland-server libwayland-cursor libwayland-egl; do + for variant in so so.0 so.0.24.0 so.1 so.1.24.0; do + src="${COOKBOOK_SYSROOT}/usr/lib/${lib}.${variant}" + if [ -f "$src" ]; then + cp -v "$src" "${COOKBOOK_STAGE}/usr/lib/" + fi + done +done + """