Source: optee-client
Version: 3.19.0-1
Tags: patch upstream
User: [email protected]
Usertags: ftcbfs
optee-client fails to cross build from source, because the upstream
Makefiles hard code the build architecture pkg-config. Please consider
applying the attached patch to fix the cross build.
Helmut
--- optee-client-3.19.0.orig/Makefile
+++ optee-client-3.19.0/Makefile
@@ -52,7 +52,7 @@
check-libuuid:
@echo "Finding uuid.pc"
- pkg-config --atleast-version=2.34 uuid
+ $(PKG_CONFIG) --atleast-version=2.34 uuid
install: copy_export
--- optee-client-3.19.0.orig/flags.mk
+++ optee-client-3.19.0/flags.mk
@@ -5,6 +5,7 @@
CROSS_COMPILE ?=
CC ?= $(CROSS_COMPILE)gcc
AR ?= $(CROSS_COMPILE)ar
+PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config
override CFLAGS += -Wall -Wbad-function-cast -Wcast-align \
-Werror-implicit-function-declaration -Wextra \
--- optee-client-3.19.0.orig/libteeacl/Makefile
+++ optee-client-3.19.0/libteeacl/Makefile
@@ -27,10 +27,10 @@
LIBTEEACL_INCLUDES = ${CURDIR}/include
LIBTEEACL_CFLAGS := $(addprefix -I, $(LIBTEEACL_INCLUDES)) \
- $(shell pkg-config --cflags uuid) \
+ $(shell $(PKG_CONFIG) --cflags uuid) \
$(CFLAGS) -D_GNU_SOURCE -fPIC
-LIBTEEACL_LFLAGS := $(LDFLAGS) $(shell pkg-config --libs uuid)
+LIBTEEACL_LFLAGS := $(LDFLAGS) $(shell $(PKG_CONFIG) --libs uuid)
LIBTEEACL_OBJ_DIR := $(OUT_DIR)
LIBTEEACL_OBJS := $(patsubst %.c,$(LIBTEEACL_OBJ_DIR)/%.o, $(LIBTEEACL_SRCS))