Source: aspcud
Version: 1:1.9.6-1
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

aspcud fails to cross build from source, because it needs a native build
pass for lemon. Even though I was tempted to just use the lemon binary
package here, that does not work, because these lemon forks are too
different. Thus, it really needs to build aspcud's lemon. I'm attaching
a patch for your convenience.

Helmut
diff --minimal -Nru aspcud-1.9.6/debian/changelog aspcud-1.9.6/debian/changelog
--- aspcud-1.9.6/debian/changelog       2022-09-05 20:28:46.000000000 +0200
+++ aspcud-1.9.6/debian/changelog       2022-11-04 11:00:13.000000000 +0100
@@ -1,3 +1,10 @@
+aspcud (1:1.9.6-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Add a native build pass for lemon. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Fri, 04 Nov 2022 11:00:13 +0100
+
 aspcud (1:1.9.6-1) unstable; urgency=medium
 
   * New upstream release (closes: #1017131,#1000852).
diff --minimal -Nru aspcud-1.9.6/debian/clean aspcud-1.9.6/debian/clean
--- aspcud-1.9.6/debian/clean   1970-01-01 01:00:00.000000000 +0100
+++ aspcud-1.9.6/debian/clean   2022-11-04 10:58:54.000000000 +0100
@@ -0,0 +1,2 @@
+debian/lemon
+debian/lemon.cmake
diff --minimal -Nru aspcud-1.9.6/debian/rules aspcud-1.9.6/debian/rules
--- aspcud-1.9.6/debian/rules   2022-09-05 20:28:46.000000000 +0200
+++ aspcud-1.9.6/debian/rules   2022-11-04 11:00:13.000000000 +0100
@@ -1,7 +1,17 @@
 #!/usr/bin/make -f
 
+include /usr/share/dpkg/architecture.mk
+include /usr/share/dpkg/buildtools.mk
+
 %:
        dh $@
 
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+override_dh_auto_configure:
+       $(CC_FOR_BUILD) -o debian/lemon lemon/lemon.c
+       printf 'add_executable(lemon IMPORTED GLOBAL)\nset_property(TARGET 
lemon PROPERTY IMPORTED_LOCATION "$(CURDIR)/debian/lemon")\n' > 
debian/lemon.cmake
+       dh_auto_configure -- -DIMPORT_LEMON=$(CURDIR)/debian/lemon.cmake
+endif
+
 override_dh_auto_clean:
        -rm -rf build/release/*

Reply via email to