Package: setbfree
Version: 0.8.11-2
Severity: normal
Tags: patch
X-Debbugs-Cc: debian-cr...@lists.debian.org
Hi,
setbfree Fails to cross build because:
- It hard-codes pkg-config everywhere and that defaults to the build
architecture
while cross-building. This can be resolved by using PKG_CONFIG and setting it
to this value only if it is previously un-set.
And PKG_CONFIG can be set to the pkg-config prefixed with the
architecure-triplet
while cross building.
- It uses strip extensively. While for debian systems, simply removing the strip
call from all makefiles could be OK, since dh_strip will simply take care of it.
But, it'd be hard to make things upstream-able
if desired at some point. So I sent STRIP to the -strip for
cross builds.
A patch can be found attached with this mail.
Thanks!
-- System Information:
Debian Release: bookworm/sid
APT prefers testing
APT policy: (990, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 5.18.0-3-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
>From 131fbc61c9baf052d0693b7f7d63d69fcd970d14 Mon Sep 17 00:00:00 2001
From: Nilesh Patra
Date: Sat, 15 Oct 2022 22:19:54 +0530
Subject: [PATCH] Get package cross-building
---
debian/patches/cross.patch | 252 +
debian/patches/series | 1 +
debian/rules | 9 +-
3 files changed, 261 insertions(+), 1 deletion(-)
create mode 100644 debian/patches/cross.patch
diff --git a/debian/patches/cross.patch b/debian/patches/cross.patch
new file mode 100644
index 000..1dd9be8
--- /dev/null
+++ b/debian/patches/cross.patch
@@ -0,0 +1,252 @@
+--- a/b_chorato/Makefile
b/b_chorato/Makefile
+@@ -3,7 +3,7 @@
+
+ LOADLIBES = -lm
+ override CFLAGS+= -I../src
+-override CFLAGS+=`pkg-config --cflags lv2` -fvisibility=hidden
++override CFLAGS+=`$(PKG_CONFIG) --cflags lv2` -fvisibility=hidden
+
+ targets=
+
+--- a/b_overdrive/Makefile
b/b_overdrive/Makefile
+@@ -12,16 +12,16 @@
+ targets+=lv2
+ endif
+
+-ifeq ($(shell pkg-config --exists liblo && echo yes), yes)
+- override CFLAGS+=-DHAVE_LIBLO `pkg-config --cflags liblo`
+- LOADLIBES+=`pkg-config --libs liblo`
++ifeq ($(shell $(PKG_CONFIG) --exists liblo && echo yes), yes)
++ override CFLAGS+=-DHAVE_LIBLO `$(PKG_CONFIG) --cflags liblo`
++ LOADLIBES+=`$(PKG_CONFIG) --libs liblo`
+ endif
+
+-ifeq ($(shell pkg-config --exists jack && echo yes)$(OVERDRIVEJACK), yesyes)
++ifeq ($(shell $(PKG_CONFIG) --exists jack && echo yes)$(OVERDRIVEJACK),
yesyes)
+ targets+=jboverdrive
+ binaries+=jboverdrive
+- override CFLAGS+=-DHAVE_JACK `pkg-config --cflags jack`
+- LOADLIBES+=`pkg-config --libs jack`
++ override CFLAGS+=-DHAVE_JACK `$(PKG_CONFIG) --cflags jack`
++ LOADLIBES+=`$(PKG_CONFIG) --libs jack`
+ endif
+
+ OVMSRC=\
+--- a/b_reverb/Makefile
b/b_reverb/Makefile
+@@ -3,7 +3,7 @@
+ include ../git2lv2.mk
+
+ LOADLIBES = -lm
+-override CFLAGS+=`pkg-config --cflags lv2` -fvisibility=hidden
++override CFLAGS+=`$(PKG_CONFIG) --cflags lv2` -fvisibility=hidden
+
+ targets=reverb.o
+
+--- a/b_synth/Makefile
b/b_synth/Makefile
+@@ -4,7 +4,7 @@
+
+ LOADLIBES = -lm
+ override CFLAGS+= -I../src -I../b_overdrive -I../b_reverb -I../b_whirl
+-override CFLAGS+=`pkg-config --cflags lv2` -DLV2SYNTH -fvisibility=hidden
++override CFLAGS+=`$(PKG_CONFIG) --cflags lv2` -DLV2SYNTH -fvisibility=hidden
+ targets=
+
+ LV2NAME=b_synth
+--- a/b_whirl/Makefile
b/b_whirl/Makefile
+@@ -7,7 +7,7 @@
+ endif
+
+ LOADLIBES = -lm
+-override CFLAGS+=`pkg-config --cflags lv2` -fvisibility=hidden
++override CFLAGS+=`$(PKG_CONFIG) --cflags lv2` -fvisibility=hidden
+
+ targets=whirl.o eqcomp.o
+
+@@ -25,7 +25,7 @@
+ $(warning This plugin GUI needs https://github.com/x42/robtk)
+ $(info set the RW environment variale to the location of the robtk
headers)
+ else
+- HAVE_RTK = $(shell pkg-config --exists pango cairo $(PKG_GL_LIBS) &&
echo yes)
++ HAVE_RTK = $(shell $(PKG_CONFIG) --exists pango cairo $(PKG_GL_LIBS) &&
echo yes)
+ endif
+
+ ifeq ($(HAVE_RTK), yes)
+@@ -79,7 +79,7 @@
+ -shared $(LV2LDFLAGS) $(LDFLAGS)
+
+ JACKCFLAGS=$(CFLAGS) $(GLUICFLAGS) $(LIC_CFLAGS) -Wno-unused-function
+-JACKCFLAGS+=`pkg-config --cflags jack lv2 pango pangocairo $(PKG_GL_LIBS)`
++JACKCFLAGS+=`$(PKG_CONFIG) --cflags jack lv2 pango pangocairo $(PKG_GL_LIBS)`
+ JACKLIBS=-lm $(GLUILIBS) $(LIC_LOADLIBES)
+
+ $(eval x42_whirl_JACKSRC = lv2.c whirl.c)
+--- a/common.mak
b/common.mak
+@@ -29,17 +29,18 @@
+ override CFLAGS += -DVERSION="\"$(VERSION)\""
+
+ STRIP?= strip
++PKG_CONFIG ?= pkg-config
+
+ CXXFLAGS ?= $(OPTIMIZATIONS) -Wall
+ GLUICFLAGS=-I. -I.. -Wno-unused-function
+ STRIPFLAGS=-s
+
+ # check for LV2
+-LV2AVAIL=$(shell pkg-config --exists lv2 && echo yes)
++LV2AVAIL=$(shell $(PKG_CONFIG)