#!/usr/bin/make -f
#export DH_VERBOSE = 1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# Ubuntu's dpkg enables -Wl,-Bsymbolic-functions by default; Debian does not. It makes
# wlroots bind its own wlr_scene_* internally, so scenefx (which swayfx links alongside
# wlroots and which exports a LARGER struct wlr_scene_buffer) cannot interpose wlroots'
# internal wlr_scene_buffer_create inside wlr_scene_subsurface_tree_create. The subsurface
# scene-buffer node is then destroyed at scenefx's offset and buffer_release.link is read
# out of bounds -> GP fault in wl_list_remove as Xwayland/layer surfaces come and go
# (BASED-260). Dropping the flag matches Debian's trixie build, which does not crash.
export DEB_LDFLAGS_MAINT_STRIP = -Wl,-Bsymbolic-functions

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- -Dbackends=drm,libinput,x11 -Dwerror=false
