File: rules

package info (click to toggle)
webkit2gtk 2.18.6-1~deb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 159,080 kB
  • sloc: cpp: 1,636,147; ansic: 45,350; python: 14,988; perl: 13,794; ruby: 9,803; xml: 9,342; asm: 5,312; yacc: 2,167; lex: 1,007; sh: 773; makefile: 61
file content (85 lines) | stat: -rwxr-xr-x 2,657 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
85
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

include /usr/share/dpkg/architecture.mk

CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS) -Wall
CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed

DEBHELPER_VERSION = $(shell dpkg-query -W -f='$${source:Version}' debhelper)

EXTRA_CMAKE_ARGUMENTS =

# Sacrifice speed in order to make it more likely resource limits
# won't be hit.
ifeq ($(DEB_BUILD_ARCH_BITS),32)
	LDFLAGS += -Wl,--no-keep-memory
endif

# 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),amd64 ppc64 ppc64el))
	CFLAGS := $(CFLAGS:-g=-g1)
endif

ifeq (,$(filter $(DEB_HOST_ARCH),i386 amd64 hurd-i386 kfreebsd-i386 kfreebsd-amd64 armhf arm64))
	EXTRA_CMAKE_ARGUMENTS += -DENABLE_JIT=OFF
endif

ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
	EXTRA_CMAKE_ARGUMENTS += -DUSE_SYSTEM_MALLOC=ON
endif

ifneq (,$(filter debug,$(DEB_BUILD_OPTIONS)))
	EXTRA_CMAKE_ARGUMENTS += -DCMAKE_BUILD_TYPE=Debug
else
	EXTRA_CMAKE_ARGUMENTS += -DCMAKE_BUILD_TYPE=Release
	CPPFLAGS += -DNDEBUG -DG_DISABLE_CAST_CHECKS
endif

ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes)
	EXTRA_CMAKE_ARGUMENTS += -DUSE_GSTREAMER_GL=OFF -DUSER_AGENT_GTK_DISTRIBUTOR_NAME=\'\\"Ubuntu\\"\'
	DEB_DH_GENCONTROL_ARGS += -- -Vgst:Recommends=""
else
	DEB_DH_GENCONTROL_ARGS += -- -Vgst:Recommends="gstreamer1.0-plugins-bad, gstreamer1.0-libav,"
endif

%:
	dh $@ --parallel --with gir

override_dh_auto_configure:
	CFLAGS="$(CFLAGS) $(CPPFLAGS)" \
	CXXFLAGS="$(CFLAGS) $(CPPFLAGS)" \
	LDFLAGS="$(LDFLAGS)" \
	dh_auto_configure -- \
	   -DPORT=GTK \
	   -DCMAKE_INSTALL_LIBEXECDIR=lib/$(DEB_HOST_MULTIARCH) \
	   -DCMAKE_C_FLAGS_RELEASE="" \
	   -DCMAKE_C_FLAGS_DEBUG="" \
	   -DCMAKE_CXX_FLAGS_RELEASE="" \
	   -DCMAKE_CXX_FLAGS_DEBUG="" \
	   -DENABLE_MINIBROWSER=ON \
	   $(EXTRA_CMAKE_ARGUMENTS)

override_dh_strip:
	if dpkg --compare-versions $(DEBHELPER_VERSION) ge 9.20151219; then \
		dh_strip -plibwebkit2gtk-4.0-37 --ddeb-migration='libwebkit2gtk-4.0-37-dbg (<< 2.10.5-1~)' ; \
		dh_strip -plibjavascriptcoregtk-4.0-18 --ddeb-migration='libjavascriptcoregtk-4.0-18-dbg (<< 2.10.5-1~)' ; \
	fi
	dh_strip

override_dh_makeshlibs:
	dh_makeshlibs -plibwebkit2gtk-4.0-37 -Xinjected-bundle
	dh_makeshlibs -plibjavascriptcoregtk-4.0-18

override_dh_installchangelogs:
	dh_installchangelogs $(CURDIR)/NEWS

override_dh_builddeb:
	DEB_BUILD_OPTIONS="$(filter-out parallel=%,$(DEB_BUILD_OPTIONS))" \
		dh_builddeb

override_dh_auto_test: