diff --git a/recipes-wlroots/wlroots/wlroots-tinywl/Makefile b/recipes-wlroots/wlroots/wlroots-tinywl/Makefile new file mode 100644 index 0000000..95e2491 --- /dev/null +++ b/recipes-wlroots/wlroots/wlroots-tinywl/Makefile @@ -0,0 +1,27 @@ +WAYLAND_PROTOCOLS=$(shell pkg-config --variable=pkgdatadir wayland-protocols) +WAYLAND_SCANNER=$(shell pkg-config --variable=wayland_scanner wayland-scanner) +LIBS=\ + $(shell pkg-config --cflags --libs wlroots) \ + $(shell pkg-config --cflags --libs wayland-server) \ + $(shell pkg-config --cflags --libs xkbcommon) + +# wayland-scanner is a tool which generates C headers and rigging for Wayland +# protocols, which are specified in XML. wlroots requires you to rig these up +# to your build system yourself and provide them in the include path. +xdg-shell-protocol.h: + $(WAYLAND_SCANNER) server-header \ + $(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@ + +tinywl: tinywl.c xdg-shell-protocol.h + $(CC) $(CFLAGS) \ + -g -Werror -I. \ + -DWLR_USE_UNSTABLE \ + ${LDFLAGS} \ + -o $@ $< \ + $(LIBS) + +clean: + rm -f tinywl xdg-shell-protocol.h xdg-shell-protocol.c + +.DEFAULT_GOAL=tinywl +.PHONY: clean diff --git a/recipes-wlroots/wlroots/wlroots-tinywl_0.15.1.bb b/recipes-wlroots/wlroots/wlroots-tinywl_0.15.1.bb new file mode 100644 index 0000000..ec4a93b --- /dev/null +++ b/recipes-wlroots/wlroots/wlroots-tinywl_0.15.1.bb @@ -0,0 +1,36 @@ +LICENSE = "CCO-1.0" +LIC_FILES_CHKSUM = "file://tinywl/LICENSE;md5=d957da0415f5b0b974bfc6063afab2b5" + +SRC_URI = "\ + https://gitlab.freedesktop.org/wlroots/wlroots/-/archive/${PV}/wlroots-${PV}.tar.gz \ + file://Makefile \ +" +SRC_URI[md5sum] = "d847f52dd4be602918fdfa25e00aef27" + +DEPENDS += "\ + libxkbcommon \ + wayland \ + wayland-native \ + wlroots \ +" + +S = "${WORKDIR}/wlroots-${PV}" + +inherit pkgconfig + +EXTRA_OEMAKE = "\ + 'CC=${CC}' \ + 'CFLAGS=${CFLAGS}' \ + 'LDFLAGS=${LDFLAGS}' \ +" + +do_compile() { + cp ${WORKDIR}/Makefile ${S}/tinywl/ + + cd ${S}/tinywl + oe_runmake ${EXTRA_OEMAKE} tinywl VERBOSE=1 +} + +do_install() { + install -Dm0755 ${S}/tinywl/tinywl ${D}${bindir}/tinywl +}