File: rules

package info (click to toggle)
qtwebkit-opensource-src 5.212.0~alpha2-19
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 126,408 kB
  • sloc: cpp: 1,398,099; ansic: 32,876; perl: 19,440; python: 12,790; ruby: 10,299; xml: 8,371; asm: 5,078; yacc: 2,166; lex: 906; sh: 414; makefile: 49
file content (84 lines) | stat: -rwxr-xr-x 2,738 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/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

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

DEB_CXXFLAGS_MAINT_APPEND += -fpermissive

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