Source: higan Version: 098-2 Tags: patch User: [email protected] Usertags: rebootstrap
higan fails to cross build from source, because it uses the build architecture compiler. By consistently using dh_auto_build, we can defer the passing of cross compilers, but the upstream build system calls them "compiler" rather than the standard "CXX", so we need to rename them. Furthermore, it uses the build architecture pkg-config. dh_auto_build also passes a suitable pkg-config via PKG_CONFIG. So after fixing all of this higan cross builds successfully. Please consider applying the attached patch. Helmut
diff --minimal -Nru higan-098/debian/changelog higan-098/debian/changelog --- higan-098/debian/changelog 2016-06-28 12:17:22.000000000 +0200 +++ higan-098/debian/changelog 2017-06-26 21:59:35.000000000 +0200 @@ -1,3 +1,13 @@ +higan (098-2.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Let dh_auto_build pass cross compilers to $(MAKE). + + Rename cross compiler to $(compiler). + + cross.patch: Make pkg-config substitutable by dh_auto_build. + + -- Helmut Grohne <[email protected]> Mon, 26 Jun 2017 21:59:35 +0200 + higan (098-2) unstable; urgency=medium * Disable check for the size of long double to diff --minimal -Nru higan-098/debian/patches/cross.patch higan-098/debian/patches/cross.patch --- higan-098/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ higan-098/debian/patches/cross.patch 2017-06-26 21:59:35.000000000 +0200 @@ -0,0 +1,47 @@ +From: Helmut Grohne <[email protected]> +Subject: allow substituting pkg-config + +Index: higan-098/hiro/GNUmakefile +=================================================================== +--- higan-098.orig/hiro/GNUmakefile ++++ higan-098/hiro/GNUmakefile +@@ -14,8 +14,8 @@ + endif + + ifeq ($(hiro),gtk) +- hiroflags = $(cppflags) $(flags) -DHIRO_GTK $(shell pkg-config --cflags gtk+-2.0 gtksourceview-2.0) +- hirolink = $(shell pkg-config --libs gtk+-2.0 gtksourceview-2.0) ++ hiroflags = $(cppflags) $(flags) -DHIRO_GTK $(shell $(PKG_CONFIG) --cflags gtk+-2.0 gtksourceview-2.0) ++ hirolink = $(shell $(PKG_CONFIG) --libs gtk+-2.0 gtksourceview-2.0) + endif + endif + +@@ -36,12 +36,12 @@ + endif + + ifeq ($(hiro),gtk) +- hiroflags = $(cppflags) $(flags) -DHIRO_GTK $(shell pkg-config --cflags gtk+-2.0 gtksourceview-2.0) +- hirolink = -lX11 $(shell pkg-config --libs gtk+-2.0 gtksourceview-2.0) ++ hiroflags = $(cppflags) $(flags) -DHIRO_GTK $(shell $(PKG_CONFIG) --cflags gtk+-2.0 gtksourceview-2.0) ++ hirolink = -lX11 $(shell $(PKG_CONFIG) --libs gtk+-2.0 gtksourceview-2.0) + endif + + ifeq ($(hiro),qt) +- hiroflags = $(cppflags) $(flags) -DHIRO_QT $(shell pkg-config --cflags QtCore QtGui) ++ hiroflags = $(cppflags) $(flags) -DHIRO_QT $(shell $(PKG_CONFIG) --cflags QtCore QtGui) + hirolink = -lX11 $(shell pkg-config --libs QtCore QtGui) + endif + endif +Index: higan-098/nall/GNUmakefile +=================================================================== +--- higan-098.orig/nall/GNUmakefile ++++ higan-098/nall/GNUmakefile +@@ -98,6 +98,8 @@ + endif + endif + ++PKG_CONFIG ?= pkg-config ++ + # paths + prefix := $(HOME)/.local + diff --minimal -Nru higan-098/debian/patches/find_cairo.patch higan-098/debian/patches/find_cairo.patch --- higan-098/debian/patches/find_cairo.patch 2016-06-21 19:29:10.000000000 +0200 +++ higan-098/debian/patches/find_cairo.patch 2017-06-26 21:59:35.000000000 +0200 @@ -9,7 +9,7 @@ flags += -march=native else ifneq ($(filter $(platform),linux bsd),) - flags += -fopenmp -+ flags += -fopenmp $(shell pkg-config gtk+-2.0 --cflags) ++ flags += -fopenmp $(shell $(PKG_CONFIG) gtk+-2.0 --cflags) link += -fopenmp link += -Wl,-export-dynamic link += -lX11 -lXext -ldl diff --minimal -Nru higan-098/debian/patches/series higan-098/debian/patches/series --- higan-098/debian/patches/series 2016-06-28 12:13:08.000000000 +0200 +++ higan-098/debian/patches/series 2017-06-26 21:59:35.000000000 +0200 @@ -11,3 +11,4 @@ include_cmath.patch disable-alsa-on-non-linux.patch disable_long_double_size_check.patch +cross.patch diff --minimal -Nru higan-098/debian/rules higan-098/debian/rules --- higan-098/debian/rules 2016-06-21 19:18:12.000000000 +0200 +++ higan-098/debian/rules 2017-06-26 21:59:35.000000000 +0200 @@ -15,17 +15,17 @@ override_dh_auto_build: mkdir -p icarus/obj icarus/out - $(MAKE) --directory=icarus + dh_auto_build --builddirectory=icarus -- compiler='$$(CXX)' mkdir -p higan/obj higan/out - dh_auto_build -- profile=balanced name=higan-balanced + dh_auto_build -- profile=balanced name=higan-balanced compiler='$$(CXX)' # Allow for building higan only once when testing stuff with the build option testbuild. ifeq (,$(findstring testbuild,$(DEB_BUILD_OPTIONS))) rm -rf higan/obj mkdir -p higan/obj - dh_auto_build -- profile=accuracy name=higan-accuracy + dh_auto_build -- profile=accuracy name=higan-accuracy compiler='$$(CXX)' rm -rf higan/obj mkdir -p higan/obj - dh_auto_build -- profile=performance name=higan-performance + dh_auto_build -- profile=performance name=higan-performance compiler='$$(CXX)' else cp higan/out/higan-balanced higan/out/higan-accuracy cp higan/out/higan-balanced higan/out/higan-performance

