diff --git a/srcpkgs/hexer/patches/fix-cross.patch b/srcpkgs/hexer/patches/fix-cross.patch new file mode 100644 index 00000000000..111fce0f3ff --- /dev/null +++ b/srcpkgs/hexer/patches/fix-cross.patch @@ -0,0 +1,22 @@ +--- Makefile ++++ Makefile +@@ -29,8 +29,8 @@ CPPFLAGS_STD ?= -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 \ + CPPFLAGS += $(CPPFLAGS_STD) -DHEXER_VERSION=\"1.0.4\" + + # -- Which compiler? -- +-CC ?= cc +-CC_FOR_BUILD ?= $(CC) ++CC := cc ++CC_FOR_BUILD := $(CC) + CFLAGS ?= -O + LDFLAGS ?= + LDLIBS = $(LTERMCAP) -lm +@@ -72,7 +72,7 @@ $(MYC): calc.c config.h + $(CC) $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) -DMYCALC=1 -o $@ calc.c -lm + + bin2c: bin2c.c +- $(CC_FOR_BUILD) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ bin2c.c ++ $(CC_FOR_BUILD) $(HOSTCPPFLAGS) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ bin2c.c + + helptext.c: help.txt bin2c + ./bin2c -n helptext -o $@ help.txt diff --git a/srcpkgs/hexer/template b/srcpkgs/hexer/template index 66b69b9084f..be358ff2b56 100644 --- a/srcpkgs/hexer/template +++ b/srcpkgs/hexer/template @@ -3,6 +3,7 @@ pkgname=hexer version=1.0.4 revision=1 build_style=gnu-makefile +make_build_args="CC_FOR_BUILD=cc" make_install_args="MANDIR=/usr/share/man/man1" hostmakedepends="xxd" makedepends="ncurses-devel"