#!/usr/bin/make -f include /usr/share/dpkg/architecture.mk # The package ships the architecture independent library. CMAKE_FLAGS = -DCMAKE_INSTALL_LIBDIR=lib -DINTERNAL_EXPECTED=OFF # Don't build the tests and the examples in the "nocheck" profile. ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) CMAKE_FLAGS += -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF endif # Don't generate the manual page if we've been instructed not to do. ifneq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) CMAKE_FLAGS += -DRONN=RONN-NOTFOUND endif # Skip Gtk example on GNU Hurd because of low memory on builder. ifeq ($(DEB_BUILD_ARCH),hurd-i386) CMAKE_FLAGS += -DGTK_MAJOR=GTK-NOTFOUND endif # Put the generated code to a cleanable temporary directory. CMAKE_FLAGS += -DGENERATED_DIR=$(CURDIR)/debian/tmp # Search Girs in the arch-dependent directory as well. CMAKE_FLAGS += -DGIR_DIR=/usr/lib/${DEB_HOST_MULTIARCH}/gir-1.0 # Disable predefined macros outside the reserved namespace # so stringification with preprocessor can work okay. CMAKE_FLAGS += -DCMAKE_CXX_EXTENSIONS=OFF export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow export GI_DEBUG = 1 # suppress warnings from a cppgir call # Workaround wrong path to Nokogiri Ruby gem on the x32 port. # see https://bugs.debian.org/1146758 ifeq ($(DEB_HOST_ARCH),x32) RUBYGEM_BASE = /usr/lib/$(DEB_HOST_MULTIARCH)/rubygems-integration/3.3.0 NOKOGIRI_LIB = $(wildcard $(RUBYGEM_BASE)/gems/nokogiri-*/lib) NOKOGIRI_EXT = $(wildcard $(RUBYGEM_BASE)/extensions/x86_64-linux/3.3.0/nokogiri-*) ifneq (,$(and $(NOKOGIRI_LIB),$(NOKOGIRI_EXT))) export RUBYLIB = $(lastword $(NOKOGIRI_LIB)):$(lastword $(NOKOGIRI_EXT)) endif endif %: dh $@ override_dh_auto_configure: dh_auto_configure -- $(CMAKE_FLAGS)