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
|
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# gcc has strange false positives on array bounds (some arches)
export DEB_CXXFLAGS_MAINT_APPEND = -Wno-error=array-bounds
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/pkg-info.mk
TARGET_LIBDIR = /usr/lib/$(DEB_HOST_MULTIARCH)
BUILD_TEST = OFF
ifeq (,$(filter, nocheck,$(DEB_BUILD_OPTIONS)))
ifneq ($(DEB_HOST_ARCH),sh4) # fails to compile some tests (OOM?)
BUILD_TEST = ON
endif
endif
USE_CAPNPROTO = ON
# no or too old libcapnp on m68k, hppa, hurd
# fail unit tests on big endian arch: s390x, powerpc, ppc64, sparc64
ifneq (,$(filter $(DEB_HOST_ARCH), m68k s390x powerpc ppc64 sparc64 hppa hurd-i386 hurd-amd64))
USE_CAPNPROTO = OFF
endif
USE_BSON=ON
# no libbson exists
ifneq (,$(filter $(DEB_HOST_ARCH), hurd-i386 hurd-amd64))
USE_BSON=OFF
endif
%:
dh $@ --buildsystem=cmake+ninja
override_dh_auto_configure:
dh_auto_configure -- -DREFLECTCPP_BUILD_SHARED=ON -DREFLECTCPP_USE_BUNDLED_DEPENDENCIES=OFF \
-DREFLECTCPP_USE_VCPKG=OFF -DCMAKE_INSTALL_LIBDIR=$(TARGET_LIBDIR) \
-DREFLECTCPP_JSON=ON -DREFLECTCPP_AVRO=ON -DREFLECTCPP_BSON=$(USE_BSON) \
-DREFLECTCPP_CAPNPROTO=$(USE_CAPNPROTO) -DREFLECTCPP_CBOR=ON \
-DREFLECTCPP_FLEXBUFFERS=ON -DREFLECTCPP_MSGPACK=ON -DREFLECTCPP_XML=ON \
-DREFLECTCPP_TOML=ON -DREFLECTCPP_UBJSON=ON -DREFLECTCPP_YAML=ON \
-DREFLECTCPP_BUILD_TESTS=$(BUILD_TEST)
|