Source: xfel
Version: 1.4.0-1
Tags: patch upstream
User: [email protected]
Usertags: ftcbfs

xfel fails to cross build from source, because the upstream Makefile
hard codes the build architecture pkg-config. I'm attaching a patch to
make it substitutable. Once applying the patch, it completes the build
but fails running help2man. I fear for help2man there is no easy
solution as it is fundamentally incompatible with cross building. The
package could include a pre-generated manual page, have a manually
written manual page, support the nodoc build profile, install the
documentation to a separate -doc package or implement one of a few other
schemes. However, this bug report shall only be concerned with the wrong
use of pkg-config as that has an obvious solution. Please forward the
patch upstream.

Helmut
--- xfel-1.4.0.orig/Makefile
+++ xfel-1.4.0/Makefile
@@ -15,6 +15,7 @@
 AR			:= $(CROSS)ar
 OC			:= $(CROSS)objcopy
 OD			:= $(CROSS)objdump
+PKG_CONFIG              := $(CROSS)pkg-config
 RM			:= rm -fr
 
 ASFLAGS		:= -g -ggdb -Wall -O3
@@ -27,9 +28,9 @@
 MCFLAGS		:=
 
 LIBDIRS		:=
-LIBS 		:= `pkg-config --libs libusb-1.0`
+LIBS 		:= `$(PKG_CONFIG) --libs libusb-1.0`
 
-INCDIRS		:= -I . `pkg-config --cflags libusb-1.0`
+INCDIRS		:= -I . `$(PKG_CONFIG) --cflags libusb-1.0`
 SRCDIRS		:= . chips
 
 SFILES		:= $(foreach dir, $(SRCDIRS), $(wildcard $(dir)/*.S))

Reply via email to