Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wayland #45

Merged
merged 10 commits into from
Dec 4, 2024
15 changes: 15 additions & 0 deletions classes/wayland-scanner.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
depends:
- tools:
# We can't use the compat toolchain, because this means "cross"
# compiling which the wayland meson build system wrongly interprets.
# See src/meson.build when it is checking for the scanner for the
# details.
target-toolchain: host-native-toolchain
depends:
- name: graphics::wayland::wayland-scanner
use: [tools]

buildToolsWeak: [wayland-scanner]
buildSetup: |
# add wayland-scanner to the pkg-config lib path, so it could be found by others
export PKG_CONFIG_LIBDIR+=":${BOB_TOOL_PATHS[wayland-scanner]}/../lib/pkgconfig"
33 changes: 33 additions & 0 deletions recipes/graphics/kmscube.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
inherit: [meson]

depends:
- libs::libpng-dev
- virtual::libs::libegl-dev
- virtual::libs::libgles-dev
- virtual::libs::libdrm-dev

- use: []
depends:
- libs::libpng-tgt
- virtual::libs::libegl-tgt
- virtual::libs::libgles-tgt
- virtual::libs::libdrm-tgt

metaEnvironment:
PKG_VERSION: "d93842dbed02fe3afe404d3a69e0a6f74b98be5b"
PKG_LICENSE: "MIT"

checkoutSCM:
scm: url
url: https://gitlab.freedesktop.org/mesa/kmscube/-/archive/${PKG_VERSION}/kmscube-${PKG_VERSION}.tar.bz2
digestSHA1: cab11caf008c5852542f91e5e9d845c9a3ba7e90
stripComponents: 1

buildScript: |
mesonBuild $1 \
-Dgstreamer=disabled

packageScript: |
mesonPackageTgt

provideDeps: ["*-tgt"]
19 changes: 19 additions & 0 deletions recipes/graphics/wayland/wayland-protocols.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
inherit: [meson, wayland-scanner]

metaEnvironment:
PKG_VERSION: "1.38"
PKG_LICENSE: "MIT"

checkoutSCM:
scm: url
url: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/releases/${PKG_VERSION}/downloads/wayland-protocols-${PKG_VERSION}.tar.xz
digestSHA1: 3fbb7095a8a33e8465351c25ff1fc01bedeafacd
stripComponents: 1

buildScript: |
mesonBuild $1 \
-Dtests=false

packageScript: |
# mesonPackageDev does not install the xml files, so use Copy
installCopy "${_MESON_BUILD_PATH}/install/"
70 changes: 70 additions & 0 deletions recipes/graphics/wayland/wayland.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
inherit: [meson]

metaEnvironment:
PKG_VERSION: "1.23.0"
PKG_LICENSE: "MIT"

depends:
- libs::libxml2-dev
- libs::libffi-dev
- libs::expat-dev

- use: []
depends:
- libs::libxml2-tgt
- libs::libffi-tgt
- libs::expat-tgt

checkoutSCM:
scm: url
url: https://gitlab.freedesktop.org/wayland/wayland/-/archive/${PKG_VERSION}/wayland-${PKG_VERSION}.tar.bz2
digestSHA1: 118c3a94f1f4a20e488a1451cdc1dd3f8ec8696e
stripComponents: 1

multiPackage:
"":
inherit: [wayland-scanner]
buildScript: |
mesonBuild $1 \
-Dtests=false \
-Ddocumentation=false \
-Ddtd_validation=true \
-Dlibraries=true \
-Dscanner=true

multiPackage:
"":
depends:
- name: graphics::wayland::wayland-tgt
use: []
packageScript: mesonPackageBin
provideDeps: [ "*-tgt" ]

dev:
packageScript: |
mesonPackageDev
# Delete wayland-scanner.pc because this is provided by the
# tool package
rm -f usr/lib/pkgconfig/wayland-scanner.pc
provideDeps: [ "*-dev" ]

tgt:
packageScript: mesonPackageLib
provideDeps: [ "*-tgt" ]

"scanner":
buildScript: |
mesonBuild $1 \
-Dtests=false \
-Ddocumentation=false \
-Dlibraries=false \
-Ddtd_validation=false \
-Dscanner=true

packageScript: |
mkdir -p usr/{bin,lib}
cp -a $1/install/usr/bin/wayland-scanner usr/bin
cp -a $1/install/usr/lib/pkgconfig usr/lib

provideTools:
wayland-scanner: "usr/bin"
46 changes: 46 additions & 0 deletions recipes/libs/libdrm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
inherit: [meson]

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

depends:
- virtual::core::udev-dev

- use: []
depends:
- virtual::core::udev-tgt

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

buildScript: |
mesonBuild $1 \
-Dcairo-tests=disabled \
-Dman-pages=disabled \
-Dintel=disabled \
-Dradeon=disabled \
-Damdgpu=disabled \
-Dnouveau=disabled \
-Dvmwgfx=disabled \
-Domap=disabled \
-Detnaviv=disabled \
-Dexynos=disabled \
-Dfreedreno=disabled \
-Dtegra=disabled \
-Dvc4=disabled \
-Dvalgrind=disabled \
-Dtests=false \
-Dudev=true

multiPackage:
dev:
packageScript: mesonPackageDev
provideDeps: [ "*-dev" ]

tgt:
packageScript: mesonPackageTgt
provideDeps: [ "*-tgt" ]
68 changes: 68 additions & 0 deletions recipes/libs/mesa3d.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
inherit: [meson, wayland-scanner]

metaEnvironment:
PKG_VERSION: "24.2.8"
PKG_LICENSE: "MIT, SGI, Khronos"

depends:
- libs::zlib-dev
- virtual::libs::libdrm-dev
- graphics::wayland::wayland-protocols
- graphics::wayland::wayland-dev

- tools:
target-toolchain: host-compat-toolchain
depends:
- python::mako
- python::pyyaml
- python::pycparser

- use: []
depends:
- libs::zlib-tgt
- virtual::libs::libdrm-tgt
- graphics::wayland::wayland-tgt

checkoutSCM:
scm: url
url: https://archive.mesa3d.org/mesa-${PKG_VERSION}.tar.xz
digestSHA1: c7994d1bf40879518b6ae331dd92e04b6e9d436e
stripComponents: 1

buildTools: [bison, flex]
buildVars: [CONFIG_MESA3D_GALLIUM_DRIVERS]
buildScript: |
# crocus,etnaviv,freedreno,i915,iris,lima,nouveau,panfrost,r300,r600,radeonsi,svga,softpipe,llvmpipe,tegra,v3d,vc4,virgl
# this is the maximum we support right now:
CONFIG_MESA3D_GALLIUM_DRIVERS=${CONFIG_MESA3D_GALLIUM_DRIVERS:-crocus,lima,panfrost,svga,nouveau,tegra,v3d,vc4,virgl}

mesonBuild $1 \
-Dglx=disabled \
-Dgallium-xa=disabled \
-Dglvnd=disabled \
-Dgallium-opencl=disabled \
-Dgallium-drivers="$CONFIG_MESA3D_GALLIUM_DRIVERS" \
-Dvulkan-drivers="" \
-Dplatforms=wayland \
-Dgbm=enabled \
-Degl=enabled \
-Dopengl=false \
-Dshared-glapi=enabled \
-Dgles1=enabled \
-Dgles2=enabled

multiPackage:
"":
depends:
- name: libs::mesa3d-tgt
use: []
packageScript: mesonPackageBin
provideDeps: [ "*-tgt" ]

dev:
packageScript: mesonPackageDev
provideDeps: [ "*-dev" ]

tgt:
packageScript: mesonPackageLib
provideDeps: [ "*-tgt" ]
9 changes: 9 additions & 0 deletions recipes/python/pycparser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
inherit: [ python3-pkg ]

buildNetAccess: True
buildScript: |
python3InstallPip \
pycparser==2.22

packageScript: |
python3PackageTgt
9 changes: 9 additions & 0 deletions recipes/python/pyyaml.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
inherit: [ python3-cext-pkg ]

buildNetAccess: True
buildScript: |
python3InstallPip \
pyyaml==6.0.2

packageScript: |
python3PackageTgt
14 changes: 14 additions & 0 deletions recipes/virtual/libs/libdrm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
multiPackage:
dev:
depends:
- name: ${CONFIG_SELECT_LIBDRM:-libs::libdrm}-dev
use: []

tgt:
depends:
- name: ${CONFIG_SELECT_LIBDRM:-libs::libdrm}-tgt
use: []

provideDeps: [ "*" ]
provideVars:
CONFIG_SELECT_LIBDRM_PKG: "${CONFIG_SELECT_LIBDRM:-libs::libdrm}"
19 changes: 19 additions & 0 deletions recipes/virtual/libs/libegl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
multiPackage:
"":
depends:
- name: ${CONFIG_SELECT_LIBEGL:-libs::mesa3d}
use: []

dev:
depends:
- name: ${CONFIG_SELECT_LIBEGL:-libs::mesa3d}-dev
use: []

tgt:
depends:
- name: ${CONFIG_SELECT_LIBEGL:-libs::mesa3d}-tgt
use: []

provideDeps: [ "*" ]
provideVars:
CONFIG_SELECT_LIBEGL_PGK: "${CONFIG_SELECT_LIBEGL:-libs::mesa3d}"
19 changes: 19 additions & 0 deletions recipes/virtual/libs/libgles.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
multiPackage:
"":
depends:
- name: ${CONFIG_SELECT_LIBGLES:-libs::mesa3d}
use: []

dev:
depends:
- name: ${CONFIG_SELECT_LIBGLES:-libs::mesa3d}-dev
use: []

tgt:
depends:
- name: ${CONFIG_SELECT_LIBGLES:-libs::mesa3d}-tgt
use: []

provideDeps: [ "*" ]
provideVars:
CONFIG_SELECT_LIBGLES_PKG: "${CONFIG_SELECT_LIBGLES:-libs::mesa3d}"