Bug#931020: lz4json FTCBFS: does not use cross tools

2019-06-24 Thread Adam Borowski
Control: tags -1 +forwarded
Control: forwarded -1 https://github.com/andikleen/lz4json/pull/12

On Mon, Jun 24, 2019 at 05:36:08PM +0200, Helmut Grohne wrote:
> lz4json fails to cross build from source, because it does not pass cross
> tools to make. Using dh_auto_build partially fixes that, but the
> upstream Makefile still hard codes pkg-config. The attached patch fixes
> both and makes lz4json cross buildable. Please consider applying it.

Thanks, forwarded upstream.

-- 
⢀⣴⠾⠻⢶⣦⠀ 
⣾⠁⢠⠒⠀⣿⡁ A dumb species has no way to open a tuna can.
⢿⡄⠘⠷⠚⠋⠀ A smart species invents a can opener.
⠈⠳⣄ A master species delegates.



Bug#931020: lz4json FTCBFS: does not use cross tools

2019-06-24 Thread Helmut Grohne
Source: lz4json
Version: 2-1
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

lz4json fails to cross build from source, because it does not pass cross
tools to make. Using dh_auto_build partially fixes that, but the
upstream Makefile still hard codes pkg-config. The attached patch fixes
both and makes lz4json cross buildable. Please consider applying it.

Helmut
diff --minimal -Nru lz4json-2/debian/changelog lz4json-2/debian/changelog
--- lz4json-2/debian/changelog  2019-02-10 23:45:38.0 +0100
+++ lz4json-2/debian/changelog  2019-06-24 17:32:15.0 +0200
@@ -1,3 +1,12 @@
+lz4json (2-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
++ Let dh_auto_build pass cross tools to make.
++ cross.patch: Make pkg-config substitutable.
+
+ -- Helmut Grohne   Mon, 24 Jun 2019 17:32:15 +0200
+
 lz4json (2-1) unstable; urgency=medium
 
   * New upstream release.
diff --minimal -Nru lz4json-2/debian/patches/cross.patch 
lz4json-2/debian/patches/cross.patch
--- lz4json-2/debian/patches/cross.patch1970-01-01 01:00:00.0 
+0100
+++ lz4json-2/debian/patches/cross.patch2019-06-24 17:32:15.0 
+0200
@@ -0,0 +1,10 @@
+--- lz4json-2.orig/Makefile
 lz4json-2/Makefile
+@@ -1,5 +1,6 @@
++PKG_CONFIG ?= pkg-config
+ CFLAGS := -g -O2 -Wall
+-LDLIBS := $(shell pkg-config --cflags --libs liblz4)
++LDLIBS := $(shell $(PKG_CONFIG) --cflags --libs liblz4)
+ 
+ lz4jsoncat: lz4jsoncat.c
+ 
diff --minimal -Nru lz4json-2/debian/patches/series 
lz4json-2/debian/patches/series
--- lz4json-2/debian/patches/series 1970-01-01 01:00:00.0 +0100
+++ lz4json-2/debian/patches/series 2019-06-24 17:32:15.0 +0200
@@ -0,0 +1 @@
+cross.patch
diff --minimal -Nru lz4json-2/debian/rules lz4json-2/debian/rules
--- lz4json-2/debian/rules  2019-02-06 00:57:12.0 +0100
+++ lz4json-2/debian/rules  2019-06-24 17:32:13.0 +0200
@@ -5,4 +5,4 @@
dh $@
 
 override_dh_auto_build:
-   make CFLAGS="$$(dpkg-buildflags --get CFLAGS)"
+   dh_auto_build -- CFLAGS="$$(dpkg-buildflags --get CFLAGS)"