Source: osspd Version: 1.3.2-8 Tags: patch upstream User: helm...@debian.org Usertags: rebootstrap
osspd fails to cross build from source, because it uses the build architecture pkg-config (hard coded in Makefile) and thus fails finding required libraries, which are only requested for the host architecture by its Build-Depends. The correct solution is to use the host architecture pkg-config, which is correctly passed by dh_auto_build, but ignored by the Makefile. After making pkg-config substitutable, osspd cross builds successfully. Please consider applying the attached patch. Helmut
Index: osspd-1.3.2/Makefile =================================================================== --- osspd-1.3.2.orig/Makefile +++ osspd-1.3.2/Makefile @@ -2,6 +2,7 @@ # DESTDIR is completely respected CC := gcc AR := ar +PKG_CONFIG ?= pkg-config CFLAGS := -Wall -pthread $(CFLAGS) $(CPPFLAGS) XLDFLAGS := $(LDFLAGS) LDFLAGS := -L. -lossp -pthread $(LDFLAGS) @@ -11,27 +12,27 @@ SLAVESDIR := $(prefix)/sbin ifeq "$(origin OSSPD_CFLAGS)" "undefined" -OSSPD_CFLAGS := $(shell pkg-config --cflags fuse) +OSSPD_CFLAGS := $(shell $(PKG_CONFIG) --cflags fuse) endif ifeq "$(origin OSSPD_LDFLAGS)" "undefined" -OSSPD_LDFLAGS := $(shell pkg-config --libs fuse) +OSSPD_LDFLAGS := $(shell $(PKG_CONFIG) --libs fuse) endif ifeq "$(origin OSSP_PADSP_CFLAGS)" "undefined" -OSSP_PADSP_CFLAGS := $(shell pkg-config --cflags libpulse) +OSSP_PADSP_CFLAGS := $(shell $(PKG_CONFIG) --cflags libpulse) endif ifeq "$(origin OSSP_PADSP_LDFLAGS)" "undefined" -OSSP_PADSP_LDFLAGS := $(shell pkg-config --libs libpulse) +OSSP_PADSP_LDFLAGS := $(shell $(PKG_CONFIG) --libs libpulse) endif ifeq "$(origin OSSP_ALSAP_CFLAGS)" "undefined" -OSSP_ALSAP_CFLAGS := $(shell pkg-config --libs alsa) +OSSP_ALSAP_CFLAGS := $(shell $(PKG_CONFIG) --libs alsa) endif ifeq "$(origin OSSP_ALSAP_LDFLAGS)" "undefined" -OSSP_ALSAP_LDFLAGS := $(shell pkg-config --libs alsa) +OSSP_ALSAP_LDFLAGS := $(shell $(PKG_CONFIG) --libs alsa) endif headers := ossp.h ossp-util.h ossp-slave.h