xref: /OK3568_Linux_fs/buildroot/package/weston/weston.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# weston
4#
5################################################################################
6
7WESTON_VERSION = 11.0.1
8WESTON_SITE = https://gitlab.freedesktop.org/wayland/weston/-/archive/$(WESTON_VERSION)
9WESTON_SOURCE = weston-$(WESTON_VERSION).tar.gz
10WESTON_LICENSE = MIT
11WESTON_LICENSE_FILES = COPYING
12WESTON_CPE_ID_VENDOR = wayland
13WESTON_INSTALL_STAGING = YES
14
15WESTON_DEPENDENCIES = host-pkgconf wayland wayland-protocols \
16	libxkbcommon pixman libpng udev cairo libinput libdrm
17
18WESTON_CONF_OPTS = \
19	-Dbackend-headless=false \
20	-Ddoc=false \
21	-Dremoting=false \
22	-Dtools=calibrator,debug,info,terminal,touch-calibrator
23
24ifeq ($(BR2_PACKAGE_DBUS)$(BR2_PACKAGE_SYSTEMD),yy)
25WESTON_CONF_OPTS += -Dlauncher-logind=true
26WESTON_DEPENDENCIES += dbus systemd
27else
28WESTON_CONF_OPTS += -Dlauncher-logind=false
29endif
30
31ifeq ($(BR2_PACKAGE_SEATD),y)
32WESTON_CONF_OPTS += -Dlauncher-libseat=true
33WESTON_DEPENDENCIES += seatd
34else
35WESTON_CONF_OPTS += -Dlauncher-libseat=false
36endif
37
38ifeq ($(BR2_PACKAGE_JPEG),y)
39WESTON_CONF_OPTS += -Dimage-jpeg=true
40WESTON_DEPENDENCIES += jpeg
41else
42WESTON_CONF_OPTS += -Dimage-jpeg=false
43endif
44
45ifeq ($(BR2_PACKAGE_WEBP),y)
46WESTON_CONF_OPTS += -Dimage-webp=true
47WESTON_DEPENDENCIES += webp
48else
49WESTON_CONF_OPTS += -Dimage-webp=false
50endif
51
52ifeq ($(BR2_PACKAGE_HAS_LIBEGL_WAYLAND)$(BR2_PACKAGE_HAS_LIBGLES),yy)
53WESTON_CONF_OPTS += -Drenderer-gl=true
54WESTON_DEPENDENCIES += libegl libgles
55ifeq ($(BR2_PACKAGE_PIPEWIRE)$(BR2_PACKAGE_WESTON_DRM),yy)
56WESTON_CONF_OPTS += -Dpipewire=true
57WESTON_DEPENDENCIES += pipewire
58else
59WESTON_CONF_OPTS += -Dpipewire=false
60endif
61else
62WESTON_CONF_OPTS += \
63	-Drenderer-gl=false \
64	-Dpipewire=false
65endif
66
67ifeq ($(BR2_PACKAGE_WESTON_VNC),y)
68ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
69WESTON_DEPENDENCIES += linux-pam
70endif
71
72WESTON_DEPENDENCIES += neatvnc
73WESTON_CONF_OPTS += -Dbackend-vnc=true
74else
75WESTON_CONF_OPTS += -Dbackend-vnc=false
76endif
77
78ifeq ($(BR2_PACKAGE_WESTON_RDP),y)
79WESTON_DEPENDENCIES += freerdp
80WESTON_CONF_OPTS += -Dbackend-rdp=true
81else
82WESTON_CONF_OPTS += -Dbackend-rdp=false
83endif
84
85ifeq ($(BR2_PACKAGE_WESTON_DRM),y)
86WESTON_CONF_OPTS += -Dbackend-drm=true
87else
88WESTON_CONF_OPTS += -Dbackend-drm=false
89endif
90
91ifeq ($(BR2_PACKAGE_WESTON_HEADLESS),y)
92WESTON_CONF_OPTS += -Dbackend-headless=true
93else
94WESTON_CONF_OPTS += -Dbackend-headless=false
95endif
96
97ifeq ($(BR2_PACKAGE_WESTON_WAYLAND),y)
98WESTON_CONF_OPTS += -Dbackend-wayland=true
99else
100WESTON_CONF_OPTS += -Dbackend-wayland=false
101endif
102
103ifeq ($(BR2_PACKAGE_WESTON_X11),y)
104WESTON_CONF_OPTS += -Dbackend-x11=true
105WESTON_DEPENDENCIES += libxcb xlib_libX11
106else
107WESTON_CONF_OPTS += -Dbackend-x11=false
108endif
109
110# We're guaranteed to have at least one backend
111WESTON_CONF_OPTS += -Dbackend-default=$(call qstrip,$(BR2_PACKAGE_WESTON_DEFAULT_COMPOSITOR))
112
113ifeq ($(BR2_PACKAGE_WESTON_XWAYLAND),y)
114WESTON_CONF_OPTS += -Dxwayland=true
115WESTON_DEPENDENCIES += cairo libepoxy libxcb xlib_libX11 xlib_libXcursor xwayland
116else
117WESTON_CONF_OPTS += -Dxwayland=false
118endif
119
120ifeq ($(BR2_PACKAGE_LIBVA),y)
121WESTON_CONF_OPTS += -Dbackend-drm-screencast-vaapi=true
122WESTON_DEPENDENCIES += libva
123else
124WESTON_CONF_OPTS += -Dbackend-drm-screencast-vaapi=false
125endif
126
127ifeq ($(BR2_PACKAGE_LCMS2),y)
128WESTON_CONF_OPTS += -Dcolor-management-lcms=true
129WESTON_DEPENDENCIES += lcms2
130else
131WESTON_CONF_OPTS += -Dcolor-management-lcms=false
132endif
133
134ifeq ($(BR2_PACKAGE_SYSTEMD),y)
135WESTON_CONF_OPTS += -Dsystemd=true
136WESTON_DEPENDENCIES += systemd
137else
138WESTON_CONF_OPTS += -Dsystemd=false
139endif
140
141ifeq ($(BR2_PACKAGE_LIBXML2),y)
142WESTON_CONF_OPTS += -Dtest-junit-xml=true
143WESTON_DEPENDENCIES += libxml2
144else
145WESTON_CONF_OPTS += -Dtest-junit-xml=false
146endif
147
148ifeq ($(BR2_PACKAGE_WESTON_SHELL_DESKTOP),y)
149WESTON_CONF_OPTS += -Dshell-desktop=true
150else
151WESTON_CONF_OPTS += -Dshell-desktop=false
152endif
153
154ifeq ($(BR2_PACKAGE_WESTON_SHELL_FULLSCREEN),y)
155WESTON_CONF_OPTS += -Dshell-fullscreen=true
156else
157WESTON_CONF_OPTS += -Dshell-fullscreen=false
158endif
159
160ifeq ($(BR2_PACKAGE_WESTON_SHELL_IVI),y)
161WESTON_CONF_OPTS += -Dshell-ivi=true
162else
163WESTON_CONF_OPTS += -Dshell-ivi=false
164endif
165
166ifeq ($(BR2_PACKAGE_WESTON_SHELL_KIOSK),y)
167WESTON_CONF_OPTS += -Dshell-kiosk=true
168else
169WESTON_CONF_OPTS += -Dshell-kiosk=false
170endif
171
172ifeq ($(BR2_PACKAGE_WESTON_DEMO_CLIENTS),y)
173WESTON_CONF_OPTS += -Ddemo-clients=true
174WESTON_DEPENDENCIES += pango
175else
176WESTON_CONF_OPTS += -Ddemo-clients=false
177endif
178
179ifeq ($(BR2_PACKAGE_ROCKCHIP_RGA),y)
180WESTON_DEPENDENCIES += rockchip-rga
181endif
182
183ifeq ($(BR2_PACKAGE_HAS_LIBEGL_WAYLAND)$(BR2_PACKAGE_HAS_LIBGLES),yy)
184WESTON_CONF_OPTS += -Dsimple-clients=all
185else
186WESTON_CONF_OPTS += -Dsimple-clients=
187endif
188
189ifeq ($(BR2_PACKAGE_WESTON_DEFAULT_PIXMAN),y)
190define WESTON_INSTALL_PIXMAN_INI
191        $(INSTALL) -D -m 0644 $(WESTON_PKGDIR)/pixman.ini \
192                $(TARGET_DIR)/etc/xdg/weston/weston.ini.d/01-pixman.ini
193endef
194
195WESTON_POST_INSTALL_TARGET_HOOKS += WESTON_INSTALL_PIXMAN_INI
196endif
197
198define WESTON_INSTALL_TARGET_ENV
199        $(INSTALL) -D -m 0644 $(WESTON_PKGDIR)/weston.sh \
200                $(TARGET_DIR)/etc/profile.d/weston.sh
201endef
202
203WESTON_POST_INSTALL_TARGET_HOOKS += WESTON_INSTALL_TARGET_ENV
204
205define WESTON_INSTALL_TARGET_SCRIPTS
206        $(INSTALL) -D -m 0755 $(WESTON_PKGDIR)/weston-calibration-helper.sh \
207                $(TARGET_DIR)/bin/weston-calibration-helper.sh
208endef
209
210WESTON_POST_INSTALL_TARGET_HOOKS += WESTON_INSTALL_TARGET_SCRIPTS
211
212define WESTON_INSTALL_INIT_SYSV
213	$(INSTALL) -D -m 755 $(WESTON_PKGDIR)/S49weston \
214		$(TARGET_DIR)/etc/init.d/S49weston
215endef
216
217$(eval $(meson-package))
218