File: rules

package info (click to toggle)
cairo 1.18.4-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 72,788 kB
  • sloc: ansic: 217,451; cpp: 2,108; cs: 1,763; xml: 1,280; sh: 990; python: 433; javascript: 347; awk: 89; makefile: 87
file content (82 lines) | stat: -rwxr-xr-x 2,439 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
#!/usr/bin/make -f

built_binaries := $(shell dh_listpackages)

export DEB_BUILD_MAINT_OPTIONS  = hardening=+all optimize=-lto
export DEB_CFLAGS_MAINT_APPEND  = -Wall
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1 -Wl,-z,defs
export DPKG_GENSYMBOLS_CHECK_LEVEL = 4

ifneq (,$(filter nocheck,$(DEB_BUILD_PROFILES)))
TESTS=-Dtests=disabled \
      -Dspectre=disabled
endif

ifneq (,$(filter loong64,$(DEB_HOST_ARCH)))
TESTS=-Dtests=disabled \
      -Dspectre=disabled
endif

%:
	dh $@

configure_flags += \
	-Dauto_features=enabled \
	-Dsymbol-lookup=disabled \
	-Dtee=enabled \
	-Dquartz=disabled \
	$(TESTS)

deb_configure_flags += \
	$(configure_flags) \
	-Dgtk_doc=$(if $(filter %-doc,$(shell dh_listpackages)),true,false)

udeb_configure_flags += \
	$(configure_flags) \
	-Dxcb=disabled

override_dh_auto_configure:
	cp debian/bug-image-compositor.ref.png test/reference/
	dh_auto_configure --builddirectory=debian/build/deb \
		-- $(deb_configure_flags)
ifneq ($(filter %-udeb,$(built_binaries)),)
	dh_auto_configure --builddirectory=debian/build/udeb \
		-- $(udeb_configure_flags)
endif

override_dh_auto_build:
	dh_auto_build --builddirectory=debian/build/deb
ifneq ($(filter %-udeb,$(built_binaries)),)
	dh_auto_build --builddirectory=debian/build/udeb
endif

override_dh_auto_install:
	dh_auto_install --builddirectory=debian/build/deb \
		--destdir=debian/install/deb
ifneq ($(filter %-udeb,$(built_binaries)),)
	dh_auto_install --builddirectory=debian/build/udeb \
		--destdir=debian/install/udeb
endif

override_dh_install:
ifneq ($(filter %-udeb,$(built_binaries)),)
	dh_install -plibcairo2-udeb --sourcedir=debian/install/udeb
endif
	dh_install -Nlibcairo2-udeb --sourcedir=debian/install/deb

execute_before_dh_auto_clean:
	rm -f test/reference/bug-image-compositor.ref.png
	rm -rf debian/install/ debian/build/

# The slow test suite is quite broken atm, so running it is not very useful.
# Furthermore there's just one test that runs a ton of sub-tests,
# that causes the single test to run for a long time without
# printing any output, which causes the build to fail due to inactivity
# on slow arches with no FPU, see https://bugs.debian.org/891547
override_dh_auto_test:
	dh_auto_test --builddirectory=debian/build/deb -- --no-suite=slow

override_dh_makeshlibs:
	dh_makeshlibs -plibcairo2 --add-udeb=libcairo2-udeb
	dh_makeshlibs -plibcairo-gobject2 --add-udeb=libcairo2-udeb
	dh_makeshlibs -plibcairo-script-interpreter2