Source: gkrellmoon
Version: 0.6-5.1
Tags: patch
User: [email protected]
Usertags: rebootstrap
gkrellmoon fails to cross build from source, because it uses the build
architecture toolchain. debian/rules does not pass cross tools to make
(fixed by using dh_auto_build) and the build system does not pick them
up properly. Furthermore it stuffs flags into CC, which get overridden
by dh_auto_build, so they must be moved out of CC. After applying the
attached patch, gkrellmoon cross builds successfully. Please consider
using it.
Helmut
diff -u gkrellmoon-0.6/Makefile gkrellmoon-0.6/Makefile
--- gkrellmoon-0.6/Makefile
+++ gkrellmoon-0.6/Makefile
@@ -1,5 +1,6 @@
-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`
INSTALLDIR = ${DESTDIR}/usr/lib/gkrellm2/plugins
@@ -8,12 +9,14 @@
LIBS = $(GTK_LIB)
LFLAGS = -shared
-CC = gcc $(CFLAGS) $(FLAGS)
+CC = gcc
+%.o:%.c
+ $(CC) $(CFLAGS) $(FLAGS) -c $< -o $@
OBJS = gkrellmoon.o MoonRise.o CalcEphem.o Moon.o
gkrellmoon.so: $(OBJS)
- $(CC) $(OBJS) -o gkrellmoon.so $(LFLAGS) $(LIBS)
+ $(CC) $(CFLAGS) $(FLAGS) $(OBJS) -o gkrellmoon.so $(LFLAGS) $(LIBS)
clean:
rm -f *.o core *.so* *.bak *~
diff -u gkrellmoon-0.6/debian/changelog gkrellmoon-0.6/debian/changelog
--- gkrellmoon-0.6/debian/changelog
+++ gkrellmoon-0.6/debian/changelog
@@ -1,3 +1,13 @@
+gkrellmoon (0.6-5.2) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix FTCBFS: (Closes: #-1)
+ + Let dh_auto_build pass cross tools to make.
+ + Do not stuff flags into CC.
+ + Make pkg-config substitutable.
+
+ -- Helmut Grohne <[email protected]> Sat, 09 Jun 2018 06:48:10 +0200
+
gkrellmoon (0.6-5.1) unstable; urgency=medium
* Non-maintainer upload
diff -u gkrellmoon-0.6/debian/rules gkrellmoon-0.6/debian/rules
--- gkrellmoon-0.6/debian/rules
+++ gkrellmoon-0.6/debian/rules
@@ -19,10 +19,7 @@
build:
dh_testdir
-
- # Add here commands to compile the package.
- $(MAKE)
-
+ dh_auto_build
clean:
dh_testdir