Source: notion Version: 4.0.2+dfsg-2 Tags: patch User: [email protected] Usertags: ftcbfs
notion fails to cross build from source, because it uses the build architecture pkg-config. Please consider applying the attached to make pkg-config substitutable and use dpkg's buildtools.mk to supply a suitable substitution for all make targets. Helmut
diff --minimal -Nru notion-4.0.2+dfsg/debian/changelog notion-4.0.2+dfsg/debian/changelog --- notion-4.0.2+dfsg/debian/changelog 2021-01-31 03:27:28.000000000 +0100 +++ notion-4.0.2+dfsg/debian/changelog 2021-02-08 12:05:55.000000000 +0100 @@ -1,3 +1,10 @@ +notion (4.0.2+dfsg-2.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: Use the host architecture pkg-config. (Closes: #-1) + + -- Helmut Grohne <[email protected]> Mon, 08 Feb 2021 12:05:55 +0100 + notion (4.0.2+dfsg-2) unstable; urgency=medium * notion and notion-i18n menu entries are both generated. diff --minimal -Nru notion-4.0.2+dfsg/debian/patches/cross.patch notion-4.0.2+dfsg/debian/patches/cross.patch --- notion-4.0.2+dfsg/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ notion-4.0.2+dfsg/debian/patches/cross.patch 2021-02-08 12:05:25.000000000 +0100 @@ -0,0 +1,100 @@ +--- notion-4.0.2+dfsg.orig/build/lua-detect.mk ++++ notion-4.0.2+dfsg/build/lua-detect.mk +@@ -28,7 +28,7 @@ + # and there won't be any guarantees it looks the same as elsewhere. + # We try the package names lua$(ver), lua-$(ver) for all candidate versions in + # descending order and last but not least "lua" here. +-PKG_CONFIG_ALL_PACKAGES:= $(shell pkg-config --list-all | cut -f1 -d' ') ++PKG_CONFIG_ALL_PACKAGES:= $(shell $(PKG_CONFIG) --list-all | cut -f1 -d' ') + + # these are in order of preference + LUA_CANDIDATES:= $(or $(LUA_VERSION),5.3 5.2 5.1) +@@ -52,12 +52,12 @@ + variables manually: LUA LUAC LUA_VERSION LUA_LIBS LUA_INCLUDES) + endif + +-PKG_CONFIG_LUA_VERSION:= $(shell pkg-config --modversion $(PKG_CONFIG_LUA) | cut -d. -f-2) ++PKG_CONFIG_LUA_VERSION:= $(shell $(PKG_CONFIG) --modversion $(PKG_CONFIG_LUA) | cut -d. -f-2) + + $(info >> pkg-config found Lua $(PKG_CONFIG_LUA_VERSION) (available: $(PKG_CONFIG_LUA_PACKAGES:=)).) + +-LUA_LIBS= $(shell pkg-config --libs $(PKG_CONFIG_LUA)) +-LUA_INCLUDES= $(shell pkg-config --cflags $(PKG_CONFIG_LUA)) ++LUA_LIBS= $(shell $(PKG_CONFIG) --libs $(PKG_CONFIG_LUA)) ++LUA_INCLUDES= $(shell $(PKG_CONFIG) --cflags $(PKG_CONFIG_LUA)) + LUA_VERSION?= $(PKG_CONFIG_LUA_VERSION) + + LUA= $(firstword $(foreach bin,$(LUA_BIN_CANDIDATES),$(call pathsearch,$(bin)))) +--- notion-4.0.2+dfsg.orig/libextl/system-autodetect.mk ++++ notion-4.0.2+dfsg/libextl/system-autodetect.mk +@@ -2,6 +2,7 @@ + ## System settings + ## + ++PKG_CONFIG ?= pkg-config + + ## + ## Installation paths +@@ -65,24 +66,24 @@ + + ifndef LUA_MANUAL + +-ifeq (5.2,$(findstring 5.2,$(shell pkg-config --exists lua5.2 && pkg-config --modversion lua5.2))) ++ifeq (5.2,$(findstring 5.2,$(shell $(PKG_CONFIG) --exists lua5.2 && $(PKG_CONFIG) --modversion lua5.2))) + +-LUA_LIBS=`pkg-config --libs lua5.2` +-LUA_INCLUDES=`pkg-config --cflags lua5.2` ++LUA_LIBS=`$(PKG_CONFIG) --libs lua5.2` ++LUA_INCLUDES=`$(PKG_CONFIG) --cflags lua5.2` + LUA=`which lua5.2` + LUAC=`which luac5.2` + +-else ifeq (5.1,$(findstring 5.1,$(shell pkg-config --exists lua5.1 && pkg-config --modversion lua5.1))) ++else ifeq (5.1,$(findstring 5.1,$(shell $(PKG_CONFIG) --exists lua5.1 && $(PKG_CONFIG) --modversion lua5.1))) + +-LUA_LIBS=`pkg-config --libs lua5.1` +-LUA_INCLUDES=`pkg-config --cflags lua5.1` ++LUA_LIBS=`$(PKG_CONFIG) --libs lua5.1` ++LUA_INCLUDES=`$(PKG_CONFIG) --cflags lua5.1` + LUA=`which lua5.1` + LUAC=`which luac5.1` + +-else ifeq (5.1,$(findstring 5.1,$(shell pkg-config --exists lua && pkg-config --modversion lua))) ++else ifeq (5.1,$(findstring 5.1,$(shell $(PKG_CONFIG) --exists lua && $(PKG_CONFIG) --modversion lua))) + +-LUA_LIBS=`pkg-config --libs lua` +-LUA_INCLUDES=`pkg-config --cflags lua` ++LUA_LIBS=`$(PKG_CONFIG) --libs lua` ++LUA_INCLUDES=`$(PKG_CONFIG) --cflags lua` + LUA=`which lua` + LUAC=`which luac` + +--- notion-4.0.2+dfsg.orig/system-autodetect.mk ++++ notion-4.0.2+dfsg/system-autodetect.mk +@@ -102,12 +102,12 @@ + ## + + ifeq ($(USE_XFT),) +-USE_XFT:=$(shell (pkg-config --exists xft && echo 1)) ++USE_XFT:=$(shell ($(PKG_CONFIG) --exists xft && echo 1)) + endif + + ifeq ($(USE_XFT),1) +- X11_INCLUDES += $(shell pkg-config xft --cflags) +- X11_LIBS += $(shell pkg-config xft --libs) ++ X11_INCLUDES += $(shell $(PKG_CONFIG) xft --cflags) ++ X11_LIBS += $(shell $(PKG_CONFIG) xft --libs) + DEFINES += -DHAVE_X11_XFT + DEFINES += -DHAVE_X11_BMF + else +@@ -122,8 +122,8 @@ + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=901650 + READLINE_INCLUDES_FALLBACK := -D_XOPEN_SOURCE=600 -I/usr/include/readline + READLINE_LIBS_FALLBACK := -lreadline +- READLINE_INCLUDES ?= $(shell pkg-config readline --cflags || echo $(READLINE_INCLUDES_FALLBACK)) +- READLINE_LIBS ?= $(shell pkg-config readline --libs || echo $(READLINE_LIBS_FALLBACK)) ++ READLINE_INCLUDES ?= $(shell $(PKG_CONFIG) readline --cflags || echo $(READLINE_INCLUDES_FALLBACK)) ++ READLINE_LIBS ?= $(shell $(PKG_CONFIG) readline --libs || echo $(READLINE_LIBS_FALLBACK)) + endif + + ## diff --minimal -Nru notion-4.0.2+dfsg/debian/patches/series notion-4.0.2+dfsg/debian/patches/series --- notion-4.0.2+dfsg/debian/patches/series 2020-12-05 23:34:25.000000000 +0100 +++ notion-4.0.2+dfsg/debian/patches/series 2021-02-08 12:03:24.000000000 +0100 @@ -4,3 +4,4 @@ 0004-210_use-cfg_debian_ext.patch 0005-211_add-debian-menu.patch 0006-Fixed-test-failure-comparing-floating-point-numbers.patch +cross.patch diff --minimal -Nru notion-4.0.2+dfsg/debian/rules notion-4.0.2+dfsg/debian/rules --- notion-4.0.2+dfsg/debian/rules 2020-12-05 23:34:25.000000000 +0100 +++ notion-4.0.2+dfsg/debian/rules 2021-02-08 12:05:53.000000000 +0100 @@ -1,6 +1,8 @@ #!/usr/bin/make -f # -*- makefile -*- +DPKG_EXPORT_BUILDTOOLS=1 +-include /usr/share/dpkg/buildtools.mk include /usr/share/dpkg/pkg-info.mk export DEB_BUILD_MAINT_OPTIONS = hardening=+all

