200bed5c06
```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
22 lines
651 B
Diff
22 lines
651 B
Diff
--- a/Makefile
|
|
+++ b/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
|