Source: docker Version: 1.5-1 Tags: patch User: helm...@debian.org Usertags: rebootstrap
docker fails to cross build from source, because it uses the build architecture toolchain. Letting dh_auto_build pass cross compilers to make mostly fixes this, except for the bare usage of pkg-config. After making that substitutable, docker cross builds successfully. Please consider applying the attached patch. Helmut
diff --minimal -Nru docker-1.5/debian/changelog docker-1.5/debian/changelog --- docker-1.5/debian/changelog 2014-06-11 22:05:50.000000000 +0200 +++ docker-1.5/debian/changelog 2017-10-05 18:01:41.000000000 +0200 @@ -1,3 +1,12 @@ +docker (1.5-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS (Closes: #-1) + + Let dh_auto_build pass cross tools to make. + + Add 05_cross.patch. + + -- Helmut Grohne <hel...@subdivi.de> Thu, 05 Oct 2017 18:01:41 +0200 + docker (1.5-1) unstable; urgency=medium [ Mahyuddin Susanto ] diff --minimal -Nru docker-1.5/debian/patches/05_cross.patch docker-1.5/debian/patches/05_cross.patch --- docker-1.5/debian/patches/05_cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ docker-1.5/debian/patches/05_cross.patch 2017-10-05 18:01:23.000000000 +0200 @@ -0,0 +1,26 @@ +From: Helmut Grohne <hel...@subdivi.de> +Subject: make pkg-config substitutable for cross compilation + +--- docker-1.5.orig/Makefile ++++ docker-1.5/Makefile +@@ -11,6 +11,7 @@ + + # Sets some flags for stricter compiling + CFLAGS=-pedantic -Wall -W -O ++PKG_CONFIG ?= pkg-config + + #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# + # # +@@ -32,10 +33,10 @@ + $(target): $(sources:.c=.o) + $(CC) $(CFLAGS) \ + $^ -o $@ \ +- -L$(XLIBPATH) -lX11 `pkg-config --libs glib-2.0` ++ -L$(XLIBPATH) -lX11 `$(PKG_CONFIG) --libs glib-2.0` + + %.o: %.c +- $(CC) -c $(CFLAGS) `pkg-config --cflags glib-2.0` $< ++ $(CC) -c $(CFLAGS) `$(PKG_CONFIG) --cflags glib-2.0` $< + + version.h: version.h.in Makefile + sed -e "s/@VERSION@/$(VERSION)/" version.h.in > $@ diff --minimal -Nru docker-1.5/debian/patches/series docker-1.5/debian/patches/series --- docker-1.5/debian/patches/series 2014-06-11 22:05:50.000000000 +0200 +++ docker-1.5/debian/patches/series 2017-10-05 18:00:52.000000000 +0200 @@ -3,3 +3,4 @@ 02_no-poll.patch 03_wmdocker.patch 04_fix_ftbfs_binutils-gold.patch +05_cross.patch diff --minimal -Nru docker-1.5/debian/rules docker-1.5/debian/rules --- docker-1.5/debian/rules 2014-06-11 22:05:50.000000000 +0200 +++ docker-1.5/debian/rules 2017-10-05 18:01:36.000000000 +0200 @@ -34,7 +34,7 @@ dh_testdir # Add here commands to compile the package. - $(MAKE) PREFIX=/usr + dh_auto_build -- PREFIX=/usr #/usr/bin/docbook-to-man debian/docker.sgml > docker.1 touch build-stamp