Source: freecdb
Version: 0.75
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

freecdb successfully misbuilds when performing a cross build. The
packaging is a mess. Please consider switching to debhelper. Anyway, the
attached patch makes it cross build. If you can't switch to debhelper,
can you apply it?

Helmut
diff --minimal -Nru freecdb-0.75/debian/changelog 
freecdb-0.75+nmu1/debian/changelog
--- freecdb-0.75/debian/changelog       2006-01-13 22:12:00.000000000 +0100
+++ freecdb-0.75+nmu1/debian/changelog  2018-06-06 20:06:26.000000000 +0200
@@ -1,3 +1,12 @@
+freecdb (0.75+nmu1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Use a host architecture $(STRIP) and $(CC)
+    + Honour DEB_BUILD_OPTIONS=nocheck.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Wed, 06 Jun 2018 20:06:26 +0200
+
 freecdb (0.75) unstable; urgency=low
 
   * take over upstream (closes: #272127).
diff --minimal -Nru freecdb-0.75/debian/rules freecdb-0.75+nmu1/debian/rules
--- freecdb-0.75/debian/rules   2006-01-13 22:12:00.000000000 +0100
+++ freecdb-0.75+nmu1/debian/rules      2018-06-06 20:06:26.000000000 +0200
@@ -1,11 +1,12 @@
 #!/usr/bin/make -f
 
-STRIP =strip
+include /usr/share/dpkg/architecture.mk
+-include /usr/share/dpkg/buildtools.mk
+STRIP ?=$(DEB_HOST_GNU_TYPE)-strip
 ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
   STRIP =: nostrip
 endif
 
-CC=gcc
 ifneq (,$(findstring diet,$(DEB_BUILD_OPTIONS)))
   CC =diet -v -Os gcc -nostdinc
 endif
@@ -15,7 +16,9 @@
 build: deb-checkdir build-stamp
 build-stamp: 
        $(MAKE) CC='$(CC)'
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
        $(MAKE) check
+endif
        touch build-stamp
 
 clean: deb-checkdir deb-checkuid
@@ -38,7 +41,9 @@
 binary-indep:
 
 binary-arch: install freecdb.deb
-       test '$(CC)' != 'gcc' || dpkg-shlibdeps '$(DIR)'/usr/bin/*
+ifeq (,$(findstring diet,$(DEB_BUILD_OPTIONS)))
+       dpkg-shlibdeps '$(DIR)'/usr/bin/*
+endif
        dpkg-gencontrol -isp -pfreecdb -P'$(DIR)'
        dpkg -b '$(DIR)' ..
 

Reply via email to