File: rules

package info (click to toggle)
qtwebkit-opensource-src 5.212.0~alpha4-11
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 126,228 kB
  • sloc: cpp: 1,399,205; javascript: 111,961; ansic: 29,742; perl: 19,510; python: 13,364; ruby: 10,299; xml: 9,342; asm: 5,078; yacc: 2,166; lex: 906; sh: 417; makefile: 34
file content (60 lines) | stat: -rwxr-xr-x 1,884 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/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 instead of -g
export DEB_CXXFLAGS_MAINT_STRIP = -g
export DEB_CXXFLAGS_MAINT_APPEND = -g1

# See https://github.com/qtwebkit/qtwebkit/issues/626
ifneq (,$(filter $(DEB_HOST_ARCH_CPU),mips mipsel))
	export DEB_CXXFLAGS_MAINT_APPEND += -mfp32
endif

# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81426
ifneq (,$(filter $(DEB_HOST_ARCH_CPU),sh3 sh4))
	export DEB_CXXFLAGS_MAINT_STRIP += -O2
	export DEB_CXXFLAGS_MAINT_APPEND += -O1
endif

# WebKit uses memset/memcpy a lot
export DEB_CXXFLAGS_MAINT_APPEND += -Wno-class-memaccess

# 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/qtwebkit/qtwebkit/issues/480
ifneq (,$(filter $(DEB_HOST_ARCH_CPU),ppc64el s390x))
	EXTRA_CMAKE_ARGUMENTS += -DUSE_SYSTEM_MALLOC=ON
endif

# webkit2gtk does a similar thing, see their prefer-pthread.patch
ifeq ($(DEB_HOST_ARCH),riscv64)
	EXTRA_CMAKE_ARGUMENTS += -DTHREADS_PREFER_PTHREAD_FLAG=ON
endif

%:
	dh $@ --buildsystem=cmake+ninja --with pkgkde_symbolshelper

override_dh_auto_configure:
	dh_auto_configure -- -DPORT=Qt $(EXTRA_CMAKE_ARGUMENTS)

override_dh_auto_test:
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