Source: gkrellm2-cpufreq Version: 0.6.4-4 Tags: patch upstream User: helm...@debian.org Usertags: rebootstrap
gkrellm2-cpufreq fails to cross build from source due to three bugs in the upstream build system: * It stuffs CFLAGS into CC. So when overriding CC, one looses CFLAGS. * It uses the build architecture pkg-config for determining CFLAGS. * It uses install -s and thus the build architecture strip. The attached patch fixes all of these issues and makes gkrellm2-cpufreq cross build successfully. It also causes a -dbgsym package to be generated as stripping is now deferred to dh_strip. Please consider applying it. Helmut
Index: gkrellm2-cpufreq-0.6.4/Makefile =================================================================== --- gkrellm2-cpufreq-0.6.4.orig/Makefile +++ gkrellm2-cpufreq-0.6.4/Makefile @@ -1,22 +1,23 @@ # Makefile for gkrellm cpufreq plugin -GTK_INCLUDE = `pkg-config gtk+-2.0 --cflags` -GTK_LIB = `pkg-config gtk+-2.0 --libs` +PKG_CONFIG ?= pkg-config +GTK_INCLUDE = `$(PKG_CONFIG) gtk+-2.0 --cflags` +GTK_LIB = `$(PKG_CONFIG) gtk+-2.0 --libs` -FLAGS = -O2 -Wall -fPIC $(GTK_INCLUDE) +CFLAGS += -O2 -Wall -fPIC $(GTK_INCLUDE) LIBS = $(GTK_LIB) LDFLAGS += -shared -lcpufreq -CC = gcc $(CFLAGS) $(FLAGS) +CC = gcc OBJS = cpufreq.o cpufreq.so: $(OBJS) - $(CC) $(OBJS) -o cpufreq.so $(LDFLAGS) $(LIBS) + $(CC) $(CFLAGS) $(OBJS) -o cpufreq.so $(LDFLAGS) $(LIBS) install: cpufreq.so - install -D -m 755 -s cpufreq.so $(DESTDIR)/usr/lib/gkrellm2/plugins/cpufreq.so + install -D -m 755 cpufreq.so $(DESTDIR)/usr/lib/gkrellm2/plugins/cpufreq.so install -g root -o root -D -m 755 cpufreqnextgovernor $(DESTDIR)/usr/sbin/cpufreqnextgovernor install-sudo: