Bug#930901: metapixel FTCBFS: does not pass cross tools to make
Source: metapixel
Version: 1.0.2-8
Tags: patch
User: debian-cross@lists.debian.org
Usertags: ftcbfs
metapixel fails to cross build from source, because it does not pass
cross tools to make. The easiest way of fixing that is using
dh_auto_build. It still fails relinking metapixel during dh_auto_install
as debhelper does not pass cross tools there. This relinking is
unnecessary and could be avoided with correct makefile dependencies. The
attached patch fixes both and makes metapixel cross buildable. Please
consider applying it.
Helmut
diff --minimal -Nru metapixel-1.0.2/debian/changelog metapixel-1.0.2/debian/changelog
--- metapixel-1.0.2/debian/changelog 2019-06-09 01:53:30.000000000 +0200
+++ metapixel-1.0.2/debian/changelog 2019-06-22 07:58:15.000000000 +0200
@@ -1,3 +1,11 @@
+metapixel (1.0.2-9) UNRELEASED; urgency=medium
+
+ * Fix FTCBFS: (Closes: #-1)
+ + Let dh_auto_build pass cross tools to make.
+ + cross.patch: Fix makefile dependencies.
+
+ -- Helmut Grohne <helmut@subdivi.de> Sat, 22 Jun 2019 07:58:15 +0200
+
metapixel (1.0.2-8) unstable; urgency=medium
* QA upload.
diff --minimal -Nru metapixel-1.0.2/debian/patches/cross.patch metapixel-1.0.2/debian/patches/cross.patch
--- metapixel-1.0.2/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100
+++ metapixel-1.0.2/debian/patches/cross.patch 2019-06-22 07:58:15.000000000 +0200
@@ -0,0 +1,23 @@
+--- metapixel-1.0.2.orig/Makefile
++++ metapixel-1.0.2/Makefile
+@@ -30,8 +30,8 @@
+
+ all : metapixel metapixel.1 convert metapixel-imagesize
+
+-metapixel : $(OBJS) librwimg
+- $(CC) $(LDOPTS) -o metapixel $(OBJS) rwimg/librwimg.a -lpng -ljpeg -lgif $(LIBFFM) -lm -lz
++metapixel : $(OBJS) rwimg/librwimg.a
++ $(CC) $(LDOPTS) -o metapixel $^ -lpng -ljpeg -lgif $(LIBFFM) -lm -lz
+
+ metapixel.1 : metapixel.xml
+ xsltproc --nonet $(MANPAGE_XSL) metapixel.xml
+@@ -48,7 +48,8 @@
+ %.o : %.c
+ $(CC) $(CCOPTS) $(FORMATDEFS) -c $<
+
+-librwimg :
++librwimg : rwimg/librwimg.a
++rwimg/librwimg.a :
+ $(MAKE) -C rwimg
+
+ install : metapixel metapixel.1
diff --minimal -Nru metapixel-1.0.2/debian/patches/series metapixel-1.0.2/debian/patches/series
--- metapixel-1.0.2/debian/patches/series 2019-06-09 01:20:49.000000000 +0200
+++ metapixel-1.0.2/debian/patches/series 2019-06-22 07:58:15.000000000 +0200
@@ -1,2 +1,3 @@
libgif.patch
libpng1.6.patch
+cross.patch
diff --minimal -Nru metapixel-1.0.2/debian/rules metapixel-1.0.2/debian/rules
--- metapixel-1.0.2/debian/rules 2019-06-09 01:38:55.000000000 +0200
+++ metapixel-1.0.2/debian/rules 2019-06-22 07:58:14.000000000 +0200
@@ -8,7 +8,7 @@
dh $@
override_dh_auto_build:
- $(MAKE) MANPAGE_XSL=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
+ dh_auto_build -- MANPAGE_XSL=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
override_dh_auto_install:
dh_auto_install -- PREFIX=$(PREFIX) BINDIR=$(BINDIR) MANDIR=$(MANDIR)
Reply to: