#!/usr/bin/make -f include /usr/share/dpkg/buildflags.mk export DEB_BUILD_MAINT_OPTIONS = hardening=+all export CK_TIMEOUT_MULTIPLIER=100 %: dh $@ configure-opts = \ -Dtests=true \ # disable video on Ubuntu due to libva being in universe configure-opts += \ -Dvideo=$(if $(filter $(shell dpkg-vendor --query vendor),Ubuntu),false,true) ifneq (armel, ${DEB_HOST_ARCH}) # vulkan requires 32bit atomic ints, armel lacks one (#1021861) configure-opts += \ -Drender-server=true \ -Drender-server-worker=process \ -Dvenus=true endif override_dh_auto_configure: dh_auto_configure -- ${configure-opts} execute_after_dh_auto_install: # remove Requires.private from .pc file (#1019485) # these are needed for static build and we're not providing static lib # virgl does not #include<> headers from their dependencies, only libs # which are needed for static linking. meson puts this to Requires.private # (instead of Libs.private), and both makes pkgconfig to fail if the # corresponding .pc files are not found. virglrenderer has grown quite a # few "internal" dependencies, - instead of repeading almost whole Build-Deps # in virglrenderer-dev's Depends, let's just remove whole Requires.private. # Maybe someday debian will grow somehting like dh_pkgconfigdeps to # automate maintenance of this unnecessary set of dependencies. # meson knows which libraries it generates so can omit these # (Libs|Requires).private in cade of dynamic-only library. sed -i '/^Requires\.private:/D' \ debian/tmp/usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig/virglrenderer.pc ignore-test-failure = ifeq (riscv64,${DEB_HOST_ARCH}) # see #962018, self-test fails on riscv64 ignore-test-failure = - endif ifeq (32,${DEB_HOST_ARCH_BITS}) # on 32bits arches, selftest sometimes fails and sometimes not. # ignore failures for now ignore-test-failure = - endif override_dh_auto_test: ifneq (1,1) # disable tests b/c it wants local /dev/dri/ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) ${ignore-test-failure}\ LIBGL_ALWAYS_SOFTWARE=1 \ GALLIUM_DRIVER=llvmpipe \ VRENDTEST_USE_EGL_SURFACELESS=1 \ meson test -C obj-* -t 100 || { \ echo '*** Self-tests failure, the logfile follows: ***' >&2; \ cat obj-*/meson-logs/testlog.txt >&2; \ echo '*** Self-tests failure log end ***' >&2; \ false; \ } endif endif