void-packages/srcpkgs/socklog/patches/cross.patch
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: convert patches to -Np1
```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

48 lines
1.2 KiB
Diff

chskshsgr must be built for the host.
--- a/src/Makefile 2014-07-18 18:38:30.305068171 +0200
+++ b/src/Makefile 2014-07-18 18:40:28.028069614 +0200
@@ -117,11 +117,11 @@
byte_zero.o: byte.h byte_zero.c compile
./compile byte_zero.c
-chkshsgr: chkshsgr.o load
- ./load chkshsgr
+chkshsgr: chkshsgr.o loadhost
+ ./loadhost chkshsgr
-chkshsgr.o: chkshsgr.c compile
- ./compile chkshsgr.c
+chkshsgr.o: chkshsgr.c compilehost
+ ./compilehost chkshsgr.c
choose: choose.sh warn-auto.sh
rm -f choose
@@ -137,6 +137,11 @@
sh print-cc.sh > compile
chmod 555 compile
+compilehost:
+ cat warn-auto.sh > compilehost
+ @echo 'exec cc -c $${1+"$$@"}' >> compilehost
+ chmod 555 compilehost
+
direntry.h: choose compile direntry.h1 direntry.h2 trydrent.c
./choose c trydrent direntry.h1 direntry.h2 > direntry.h
@@ -198,6 +203,15 @@
sh print-ld.sh > load
chmod 555 load
+loadhost:
+ rm -f loadhost
+ @echo > loadhost
+ @echo 'systype="`cat systype`"' >> loadhost
+ @echo 'cat warn-auto.sh' >> loadhost
+ @echo 'main="$$1"; shift' >> loadhost
+ @echo 'exec cc -o "$$main" "$$main".o $${1+"$$@"}' >> loadhost
+ chmod 555 loadhost
+
lock_ex.o: compile hasflock.h lock.h lock_ex.c
./compile lock_ex.c