void-packages/srcpkgs/dcron/patches/respect_cflags_and_ldflags.patch
Đoàn Trần Công Danh b6bcd8cd34 srcpkgs/d*: convert patches to -Np1
* daemontools and dmraid is kept at -Np0

```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
```
2021-06-20 13:17:29 +07:00

24 lines
763 B
Diff

--- a/Makefile 2012-01-23 10:56:26.473607101 +0100
+++ b/Makefile 2012-01-23 10:57:43.806746482 +0100
@@ -32,7 +32,6 @@ TABSRCS = crontab.c chuser.c
TABOBJS = crontab.o chuser.o
PROTOS = protos.h
LIBS =
-LDFLAGS =
DEFS = -DVERSION='"$(VERSION)"' \
-DSCRONTABS='"$(SCRONTABS)"' -DCRONTABS='"$(CRONTABS)"' \
-DCRONSTAMPS='"$(CRONSTAMPS)"' -DLOG_IDENT='"$(LOG_IDENT)"' \
@@ -54,10 +53,10 @@ protos.h: $(SRCS) $(TABSRCS)
fgrep -h Prototype $(SRCS) $(TABSRCS) > protos.h
crond: $(OBJS)
- $(CC) $(LDFLAGS) $^ $(LIBS) -o crond
+ $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o crond
crontab: $(TABOBJS)
- $(CC) $(LDFLAGS) $^ -o crontab
+ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o crontab
%.o: %.c defs.h $(PROTOS)
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(DEFS) $< -o $@