Source: wmwave
Version: 0.4-10
Severity: normal
Tags: patch
User:helm...@debian.org
Usertags: rebootstrap

Hi,

wmwave fails to cross build from source, because the upstream build
system hard codes the build architecture compiler "cc" in its Makefile,
and it uses the build architecture strip on host architecture ELF objects.
 - Replacing "cc" with "$(CC)" in Makefile and "$(MAKE)" with "dh_auto_build"
   in debian/rules.
 - Adding a host architecture prefix to strip.

wmwave cross builds successfully. Please consider applying the attached patch.

Hieu.

diff -u wmwave-0.4/Makefile wmwave-0.4/Makefile
--- wmwave-0.4/Makefile
+++ wmwave-0.4/Makefile
@@ -15,13 +15,13 @@
 default:all
 
 .c.o:
-       cc $(CFLAGS) -I/usr/X11R6/share/include -c $< -o $*.o
+       $(CC) $(CFLAGS) -I/usr/X11R6/share/include -c $< -o $*.o
 
 wmwave.o: wmwave.c wmwave-master.xpm
-       cc $(CFLAGS) -I/usr/X11R6/share/include -c wmwave.c -o $*.o
+       $(CC) $(CFLAGS) -I/usr/X11R6/share/include -c wmwave.c -o $*.o
 
 wmwave: $(OBJS) wmwave.o
-       cc $(CFLAGS) -o wmwave $(OBJS) -lXext $(LIBDIR) $(LIBS) wmwave.o
+       $(CC) $(CFLAGS) -o wmwave $(OBJS) -lXext $(LIBDIR) $(LIBS) wmwave.o
 
 all:: wmwave
 
diff -u wmwave-0.4/debian/rules wmwave-0.4/debian/rules
--- wmwave-0.4/debian/rules
+++ wmwave-0.4/debian/rules
@@ -13,7 +13,7 @@
        CFLAGS += -O2
 endif
 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-       INSTALL_OPTS = -s
+       INSTALL_OPTS = -s --strip-program=$(DEB_HOST_GNU_TYPE)-strip
 endif
 
 configure: configure-stamp
@@ -26,7 +26,7 @@
        dh_testdir
 
        # Add here commands to compile the package.
-       $(MAKE) CFLAGS="$(CFLAGS)"
+       dh_auto_build -- CFLAGS="$(CFLAGS)"
        #/usr/bin/docbook-to-man debian/wmwave.sgml > wmwave.1
 
        touch build-stamp
-- 
This mail was scanned by BitDefender
For more information please visit http://www.bitdefender.com

Reply via email to