Source: apwal
Version: 0.4.5-1.1
Tags: patch
User: [email protected]
Usertags: rebootstrap

apwal fails to cross build from source. It does not pass cross tools to
make. The easiest way of fixing that is using dh_auto_build. Then the
upstream build system fails to pick up those tools. The attached patch
makes them substitutable. And then it strips using the wrong strip. It
is best to disable stripping during build, because dh_strip does the
right thing and doing it earlier breaks DEB_BUILD_OPTIONS=nostrip
(#436940) and generation of -dbgsym packages. The attached patch fixes
all of that. Please consider applying it.

Helmut
diff -u apwal-0.4.5/debian/changelog apwal-0.4.5/debian/changelog
--- apwal-0.4.5/debian/changelog
+++ apwal-0.4.5/debian/changelog
@@ -1,3 +1,13 @@
+apwal (0.4.5-1.2) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Let dh_auto_build pass cross tools to make.
+    + cross.patch: Make tools substitutable.
+    + Don't strip during build.
+
+ -- Helmut Grohne <[email protected]>  Mon, 27 May 2019 21:57:26 +0200
+
 apwal (0.4.5-1.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -u apwal-0.4.5/debian/rules apwal-0.4.5/debian/rules
--- apwal-0.4.5/debian/rules
+++ apwal-0.4.5/debian/rules
@@ -10,7 +10,7 @@
        dh_testdir
 
        # Add here commands to compile the package.
-       $(MAKE)
+       dh_auto_build -- STRIP=true
 
        touch build-stamp
 
only in patch2:
unchanged:
--- apwal-0.4.5.orig/src/Makefile
+++ apwal-0.4.5/src/Makefile
@@ -1,12 +1,15 @@
 
 include ../Makefile.inc
 
+PKG_CONFIG ?= pkg-config
+STRIP ?= strip
+
 ifdef APWAL_DEBUG
-CFLAGS=-g -Wall -Werror `pkg-config --cflags gtk+-2.0 gthread-2.0` 
-DGTK_DISABLE_DEPRECATED -DAPWAL_DEBUG
-LDFLAGS=`pkg-config --libs gtk+-2.0 gthread-2.0` `xml2-config --libs`
+CFLAGS=-g -Wall -Werror `$(PKG_CONFIG) --cflags gtk+-2.0 gthread-2.0` 
-DGTK_DISABLE_DEPRECATED -DAPWAL_DEBUG
+LDFLAGS=`$(PKG_CONFIG) --libs gtk+-2.0 gthread-2.0` `xml2-config --libs`
 else
-CFLAGS=-O2 `pkg-config --cflags gtk+-2.0 gthread-2.0`
-LDFLAGS=-O2 `pkg-config --libs gtk+-2.0 gthread-2.0` `xml2-config --libs`
+CFLAGS=-O2 `$(PKG_CONFIG) --cflags gtk+-2.0 gthread-2.0`
+LDFLAGS=-O2 `$(PKG_CONFIG) --libs gtk+-2.0 gthread-2.0` `xml2-config --libs`
 endif
 
 OBJS=main.o app.o launcher.o editor.o property.o \
@@ -24,12 +27,12 @@
 ifdef APWAL_DEBUG
 all: checktraceformat apwal tags
 apwal: $(OBJS)
-       gcc -o $@ $^ $(LDFLAGS)
+       $(CC) -o $@ $^ $(LDFLAGS)
 else
 all: apwal
 apwal: $(OBJS)
-       gcc -o $@ $^ $(LDFLAGS)
-       strip $@
+       $(CC) -o $@ $^ $(LDFLAGS)
+       $(STRIP) $@
 endif
 
 install: all
@@ -37,12 +40,12 @@
        ln -sf /usr/local/bin/apwal /usr/local/bin/apwal-editor
 
 .c.o: $(INCS)
-       gcc -c $< -o $*.o $(CFLAGS)
+       $(CC) -c $< -o $*.o $(CFLAGS)
 
 xmlrc.o: xmlrc.c $(INCS)
-       gcc -c $< -o $*.o $(CFLAGS) `xml2-config --cflags`
+       $(CC) -c $< -o $*.o $(CFLAGS) `xml2-config --cflags`
 about.o: about.c $(INCS) ../Makefile.inc
-       gcc -c $< -o $*.o $(CFLAGS) -DAPWAL_VERSION=\"$(VERS)\"
+       $(CC) -c $< -o $*.o $(CFLAGS) -DAPWAL_VERSION=\"$(VERS)\"
 
 gtkstuff.o: pixbufinline.inc
 xmlrc.o: xmlrcinline.inc

Reply via email to