Source: invada-studio-plugins-lv2
Version: 1.2.0+repack0-8
Tags: patch upstream
User: helm...@debian.org
Usertags: rebootstrap

invada-studio-plugins-lv2 fails to cross build from source, because it
uses some build architecture build tools. Notably, it hard codes the
build architecture pkg-config in the upstream build system. Then it
uses the build architecture compiler as the value for LD. The former is
easily fixed by making it overridable (and dh_auto_build passes that).
For LD, it is already indirected through a variable, but dh_auto_build
cannot know the right value as for some packages it needs to be a C++
linker. So it is best to default LD from CC or CXX respectively. The
attached patch implements all of that and makes
invada-studio-plugins-lv2 cross build successfully. Please consider
applying it.

Helmut
Index: invada-studio-plugins-lv2-1.2.0+repack0/plugin/Makefile
===================================================================
--- invada-studio-plugins-lv2-1.2.0+repack0.orig/plugin/Makefile
+++ invada-studio-plugins-lv2-1.2.0+repack0/plugin/Makefile
@@ -20,7 +20,7 @@
 # GENERAL
 
 CC		=	gcc
-LD		=	gcc
+LD		=	$(CC)
 CFLAGS		+=	-I. -O3 -Wall -fomit-frame-pointer -fstrength-reduce -funroll-loops -ffast-math -c -fPIC -DPIC
 LDFLAGS		+=	-shared -Llibrary -lc -lm  -linv_common -fPIC -DPIC
 
Index: invada-studio-plugins-lv2-1.2.0+repack0/plugingui/Makefile
===================================================================
--- invada-studio-plugins-lv2-1.2.0+repack0.orig/plugingui/Makefile
+++ invada-studio-plugins-lv2-1.2.0+repack0/plugingui/Makefile
@@ -20,9 +20,10 @@
 # GENERAL
 
 CC		=	gcc
-LD		=	gcc
-CFLAGS		+=	-I. `pkg-config --cflags cairo gtk+-2.0` -O3 -Wall -fomit-frame-pointer -fstrength-reduce -funroll-loops -ffast-math -c -fPIC -DPIC
-LDFLAGS		+=	-shared -Lwidgets -L../plugin/library -lc -lm -linv_widgets -linv_common `pkg-config --libs cairo gtk+-2.0` -fPIC -DPIC
+LD		=	$(CC)
+PKG_CONFIG	?=	pkg-config
+CFLAGS		+=	-I. `$(PKG_CONFIG) --cflags cairo gtk+-2.0` -O3 -Wall -fomit-frame-pointer -fstrength-reduce -funroll-loops -ffast-math -c -fPIC -DPIC
+LDFLAGS		+=	-shared -Lwidgets -L../plugin/library -lc -lm -linv_widgets -linv_common `$(PKG_CONFIG) --libs cairo gtk+-2.0` -fPIC -DPIC
 
 
 GUIS		=	inv_compressor_gui.so \
Index: invada-studio-plugins-lv2-1.2.0+repack0/plugingui/widgets/Makefile
===================================================================
--- invada-studio-plugins-lv2-1.2.0+repack0.orig/plugingui/widgets/Makefile
+++ invada-studio-plugins-lv2-1.2.0+repack0/plugingui/widgets/Makefile
@@ -19,8 +19,9 @@
 # GENERAL
 
 CC		=	gcc
+PKG_CONFIG	?=	pkg-config
 LD		=	ld
-CFLAGS		=	-I. `pkg-config --cflags gtk+-2.0`  -O3 -Wall -fomit-frame-pointer -fstrength-reduce -funroll-loops -ffast-math -c -fPIC -DPIC
+CFLAGS		=	-I. `$(PKG_CONFIG) --cflags gtk+-2.0`  -O3 -Wall -fomit-frame-pointer -fstrength-reduce -funroll-loops -ffast-math -c -fPIC -DPIC
 
 
 
_______________________________________________
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Reply via email to