Source: ssocr
Version: 2.25.0-1
Tags: patch upstream
User: [email protected]
Usertags: ftcbfs

ssocr fails to cross build from source, because it fails to discover the 
imlib flags as it hard codes the build architecture pkg-config. I 
propose making pkg-config substitutable upstream and that is sufficient 
to make ssocr cross buildable. Please find a patch attached.

Helmut
--- ssocr-2.25.0.orig/Makefile
+++ ssocr-2.25.0/Makefile
@@ -1,8 +1,9 @@
+PKG_CONFIG ?= pkg-config
 # minimal CFLAGS definition (try if compilation fails with default CFLAGS)
-#CFLAGS  := $(shell if command -v imlib2-config >/dev/null; then imlib2-config --cflags; else pkg-config --cflags imlib2; fi)
+#CFLAGS  := $(shell if command -v imlib2-config >/dev/null; then imlib2-config --cflags; else $(PKG_CONFIG) --cflags imlib2; fi)
 # default CFLAGS definition
-CFLAGS  := -D_FORTIFY_SOURCE=2 -Wall -W -Wextra -pedantic -fstack-protector-all $(shell if command -v imlib2-config >/dev/null; then imlib2-config --cflags; else pkg-config --cflags imlib2; fi) -g
-LDLIBS  := -lm $(shell if command -v imlib2-config >/dev/null; then imlib2-config --libs; else pkg-config --libs imlib2; fi)
+CFLAGS  := -D_FORTIFY_SOURCE=2 -Wall -W -Wextra -pedantic -fstack-protector-all $(shell if command -v imlib2-config >/dev/null; then imlib2-config --cflags; else $(PKG_CONFIG) --cflags imlib2; fi) -g
+LDLIBS  := -lm $(shell if command -v imlib2-config >/dev/null; then imlib2-config --libs; else $(PKG_CONFIG) --libs imlib2; fi)
 PREFIX  := /usr/local
 BINDIR  := $(PREFIX)/bin
 MANDIR  := $(PREFIX)/share/man/man1

Reply via email to