From: Yukiharu YABUKI <yabuki@netfort.gr.jp>
Date: Sun, 14 Sep 2025 13:34:40 -0700
Subject: cross build patch

This patch enable us to build in cross environment.

Apply dh_auto_build patch (Closes: #913841).

  [ Helmut Grohne <helmut@subdivi.de> ]
  * Fix FTCBFS
    * Let dh_auto_bild pass cross tools to make.
    * cross.patch: Use the build architecture compiler for mkconf.c.

Bug-Debian: https://bugs.debian.org/913841
Forwarded: not-needed
---
 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 2af5081..a25072b 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,7 @@ XLIBDIR = $(X11BASE)/lib
 CFLAGS = -O
 LFLAGS = -lm -lX11
 CC = cc
+CC_FOR_BUILD ?= $(CC)
 CP = cp
 RM = rm -f
 MKDIR = mkdir -p
@@ -66,7 +67,7 @@ xfireworks_conf.h :	xfireworks.conf mkconf
 		cat xfireworks.conf | ./mkconf > xfireworks_conf.h
 
 mkconf :	mkconf.c
-		$(CC) $(CPPFLAGS) $(CFLAGS) mkconf.c -o mkconf
+		$(CC_FOR_BUILD) $(CPPFLAGS) $(CFLAGS) mkconf.c -o mkconf
 
 etc.o :		etc.c
 		$(CC) -c etc.c $(CPPFLAGS) $(CFLAGS)
