summaryrefslogtreecommitdiffstats
path: root/debian/wv2/wv2-0.4.2.dfsg.2/debian/rules
blob: 1dbd5e3b6447c69e59442e97e49452d0569f2b80 (plain)
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
#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/cmake.mk
include debian/cdbs/debian-tde.mk

# Upstream build system seems to just ignore these, and as a result, libgsf
# fails to find libxml headers (see #707417).
CPPFLAGS += $(shell pkg-config libgsf-1 --cflags)

# Files on CIFS shares can have 64 bit inode numbers, which means we need LFS
# enabled to read them (which is something which a library which reads Word
# documents really should support).
CPPFLAGS += -D_FILE_OFFSET_BITS=64

# Disable debug output, which is very noisy.
# (#329109 and (after upstream moved to cmake and the fix was lost) #603871)
CXXFLAGS += -DNDEBUG

ifdef DEB_HOST_MULTIARCH
  LIB_SUFFIX = /$(DEB_HOST_MULTIARCH)
endif

DEB_CMAKE_EXTRA_FLAGS := \
 -DCMAKE_EXPORT_COMPILE_COMMANDS="ON" \
 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
 -DCMAKE_VERBOSE_MAKEFILE="ON" \
 -DCMAKE_SKIP_RPATH="OFF" \
 -DLIB_SUFFIX=$(LIB_SUFFIX)

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))

DEB_MAKE_CHECK_TARGET = test

common-build-arch::
	cp tests/*.doc obj-*/tests
	cd obj-*/tests ; for t in *test ; do \
	  echo "Running test $$t" ;\
	  if [ $$t = handlertest ]; then \
	    set -e ; ./$$t testole.doc ;\
	  else \
	    set -e ; ./$$t ;\
	  fi \
	done
endif
endif