From bebf6830a053af64a14c9a0b1930e1ae5a523483 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 25 Jan 2019 15:30:49 +0100 Subject: [PATCH] fix cross-build (again) --- debian/changelog | 2 ++ debian/patches/0007-cross.patch | 54 +++++++++++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 57 insertions(+) create mode 100644 debian/patches/0007-cross.patch diff --git a/debian/changelog b/debian/changelog index 7816fc5..bd83f40 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ osspd (1.3.2-11) UNRELEASED; urgency=medium * Unreleased. * Update Standards-Version to 4.3.0. No changes needed. + * Fix cross-build with a patch by Helmut Grohne + (again). (Closes: #917827). -- Ralf Jung Fri, 25 Jan 2019 15:13:46 +0100 diff --git a/debian/patches/0007-cross.patch b/debian/patches/0007-cross.patch new file mode 100644 index 0000000..4a4b646 --- /dev/null +++ b/debian/patches/0007-cross.patch @@ -0,0 +1,54 @@ +From: Helmut Grohne +Date: Tue, 21 Nov 2017 21:20:20 +0100 +Subject: fix using target-architecture pkg-config + +--- + Makefile | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/Makefile b/Makefile +index 11f2836..bd963ca 100644 +--- a/Makefile ++++ b/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 @@ UDEVDIR := /etc/udev/rules.d + 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 diff --git a/debian/patches/series b/debian/patches/series index cefd5f4..521cc6b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ 0004-Allow-to-set-slave-installation-path-during-compilat.patch 0005-Add-pthread-compiler-and-linker-flag.patch 0006-fix-build-on-MIPS.patch +0007-cross.patch -- 2.30.2