#!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 include /usr/share/dpkg/architecture.mk export DEB_CPPFLAGS_MAINT_APPEND = -DNDEBUG # The debug packages produced by webkit are huge and cause problems in # most buildds, so use -g1 in all architectures except the ones that # are known to work fine ifeq (,$(filter $(DEB_HOST_ARCH_CPU),ppc64 ppc64el s390x)) export DEB_CXXFLAGS_MAINT_STRIP = -g export DEB_CXXFLAGS_MAINT_APPEND = -g1 endif # See https://github.com/annulen/webkit/issues/626 ifneq (,$(filter $(DEB_HOST_ARCH_CPU),mips mipsel)) export DEB_CXXFLAGS_MAINT_APPEND = -mfp32 endif # Disable gold linker on all architectures except x32 ifneq ($(DEB_HOST_ARCH),x32) EXTRA_CMAKE_ARGUMENTS += -DUSE_LD_GOLD=OFF endif # JIT is only supported on x86 / armhf / aarch64 / mips32 ifeq (,$(filter $(DEB_HOST_ARCH),amd64 arm64 armhf hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386 mips mipsel)) EXTRA_CMAKE_ARGUMENTS += -DENABLE_JIT=OFF endif # Copied from Fedora; see also https://github.com/annulen/webkit/issues/480 ifneq (,$(filter $(DEB_HOST_ARCH_CPU),ppc64el s390x)) EXTRA_CMAKE_ARGUMENTS += -DUSE_SYSTEM_MALLOC=ON endif ifeq (illumos,$(DEB_HOST_ARCH_OS)) EXTRA_CMAKE_ARGUMENTS += -DUSE_SYSTEM_MALLOC=ON EXTRA_CMAKE_ARGUMENTS += -DENABLE_JIT=ON endif %: dh $@ --buildsystem=cmake --with pkgkde_symbolshelper override_dh_auto_configure: dh_auto_configure -- -G Ninja -DPORT=Qt $(EXTRA_CMAKE_ARGUMENTS) override_dh_auto_build-arch: dh_auto_build --builddirectory=obj-$(DEB_HOST_GNU_TYPE) -O--buildsystem=ninja override_dh_auto_build-indep: BUILDDIR=$(CURDIR)/obj-$(DEB_HOST_GNU_TYPE) \ dh_auto_build --builddirectory=obj-$(DEB_HOST_GNU_TYPE) -O--buildsystem=ninja -- docs override_dh_auto_install-arch: dh_auto_install --builddirectory=obj-$(DEB_HOST_GNU_TYPE) -O--buildsystem=ninja # Remove private headers rm -rf debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/qt5/QtWebKit/*/QtWebKit rm -rf debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/qt5/QtWebKitWidgets/*/QtWebKitWidgets override_dh_auto_install-indep: install -d debian/tmp/usr/share/qt5/ cp -r obj-$(DEB_HOST_GNU_TYPE)/doc debian/tmp/usr/share/qt5/ override_dh_missing: dh_missing --fail-missing override_dh_auto_test-arch: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) -cd obj-$(DEB_HOST_GNU_TYPE); \ xvfb-run -a -s "-screen 0 1024x768x24 +extension RANDR +extension RENDER +extension GLX" \ ctest --output-on-failure endif override_dh_auto_test-indep: # Do not attempt to run anything to make build-indep work override_dh_strip: dh_strip --dbgsym-migration='libqt5webkit5-dbg (<< 5.212.0~alpha2-1~)'