[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#923617: vlevel FTCBFS: confuses CC vs. CXX



Source: vlevel
Version: 0.5.1-3
Tags: patch
User: helmutg@debian.org
Usertags: rebootstrap

vlevel's upstream Makefile observes that storing the C++ compiler in
$(CC) is an "evil hack". Indeed, this hack breaks cross compilation,
because dh_auto_build passes a C compiler there. Updating CC to a $(CXX)
fixes that part, but there is still a Makefile that hard codes the build
architecture pkg-config. The attached patch makes vlevel cross
buildable. Please consider applying it.

Helmut
diff --minimal -Nru vlevel-0.5.1/debian/changelog vlevel-0.5.1/debian/changelog
--- vlevel-0.5.1/debian/changelog	2019-01-02 07:30:04.000000000 +0100
+++ vlevel-0.5.1/debian/changelog	2019-03-02 21:47:15.000000000 +0100
@@ -1,3 +1,12 @@
+vlevel (0.5.1-3.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Upstream expects $(CC) to contain a C++ compiler.
+    + cross.patch: Make pkg-config substitutable.
+
+ -- Helmut Grohne <helmut@subdivi.de>  Sat, 02 Mar 2019 21:47:15 +0100
+
 vlevel (0.5.1-3) unstable; urgency=medium
 
   [ Ondřej Nový ]
diff --minimal -Nru vlevel-0.5.1/debian/patches/cross.patch vlevel-0.5.1/debian/patches/cross.patch
--- vlevel-0.5.1/debian/patches/cross.patch	1970-01-01 01:00:00.000000000 +0100
+++ vlevel-0.5.1/debian/patches/cross.patch	2019-03-02 21:47:15.000000000 +0100
@@ -0,0 +1,18 @@
+--- vlevel-0.5.1.orig/vlevel-jack/Makefile
++++ vlevel-0.5.1/vlevel-jack/Makefile
+@@ -21,11 +21,12 @@
+ #
+ # This is evil, but it makes implicit link rules use g++, not gcc
+ CC = $(CXX)
++PKG_CONFIG ?= pkg-config
+ #LDFLAGS = -L/opt/local/lib
+-LDFLAGS += ` pkg-config --libs-only-L jack `
++LDFLAGS += ` $(PKG_CONFIG) --libs-only-L jack `
+ #LDLIBS = -ljack -lpthread -framework CoreAudio -framework CoreServices -framework AudioUnit
+-LDLIBS = ` pkg-config --libs-only-l jack `
+-CXXFLAGS += ` pkg-config --cflags jack `
++LDLIBS = ` $(PKG_CONFIG) --libs-only-l jack `
++CXXFLAGS += ` $(PKG_CONFIG) --cflags jack `
+ #CXXFLAGS= -I/opt/local/include -g -v
+ CFLAGS = $(CXXFLAGS)
+ 
diff --minimal -Nru vlevel-0.5.1/debian/patches/series vlevel-0.5.1/debian/patches/series
--- vlevel-0.5.1/debian/patches/series	2017-10-30 00:44:44.000000000 +0100
+++ vlevel-0.5.1/debian/patches/series	2019-03-02 21:47:15.000000000 +0100
@@ -1,2 +1,3 @@
 fix-hardcoded-makefile-variables.patch
 recursive-make-done-properly.patch
+cross.patch
diff --minimal -Nru vlevel-0.5.1/debian/rules vlevel-0.5.1/debian/rules
--- vlevel-0.5.1/debian/rules	2017-10-30 00:33:11.000000000 +0100
+++ vlevel-0.5.1/debian/rules	2019-03-02 21:47:13.000000000 +0100
@@ -6,6 +6,9 @@
 %:
 	dh $@
 
+override_dh_auto_build:
+	dh_auto_build -- 'CC=$$(CXX)'
+
 override_dh_auto_install:
 	dh_auto_install
 	mv -v debian/vlevel/usr/bin/vlevel-bin debian/vlevel/usr/bin/vlevel

Reply to: