void-packages/srcpkgs/noip2/patches/01-foreground.patch
Đoàn Trần Công Danh 65749575ab srcpkgs/n*: 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

43 lines
1.4 KiB
Diff

--- a/noip2.c.old 2015-01-05 18:06:18.704641169 -0200
+++ b/noip2.c 2015-01-05 18:07:45.157639072 -0200
@@ -130,6 +130,10 @@
+ hardened autoconf() the same way
+ patch suggested by xenomuta@phreaker.net
+ + January 2015 (dota? =op) version 2.1.9-1
+ + added -f flag to run in foreground
+ + patch suggested by rogi@skylittlesystem.org
+
*/
/////////////////////////////////////////////////////////////////////////////
@@ -217,9 +221,9 @@
#define UPDATE_SCRIPT "ducupdate.php"
#ifdef DEBUG
- #define OPTCHARS "CYU:Fc:dD:hp:u:x:SMi:K:I:z"
+ #define OPTCHARS "CYU:Fc:dD:hp:u:x:SMi:K:I:zf"
#else
- #define OPTCHARS "CYU:Fc:hp:u:x:SMi:K:I:z"
+ #define OPTCHARS "CYU:Fc:hp:u:x:SMi:K:I:zf"
#endif
#define ARGC 1
#define ARGF (1<<1)
@@ -551,6 +555,7 @@
fprintf(stderr, " -M permit multiple instances\n");
fprintf(stderr, " -K processID terminate instance PID\n");
fprintf(stderr, " -z activate shm dump code\n");
+ fprintf(stderr, " -f run on foreground\n");
fprintf(stderr, " -h help (this text)\n");
}
///////////////////////////////////////////////////////////////////////////
@@ -738,6 +743,9 @@
case 'z':
shm_dump_active++;
break;
+ case 'f':
+ background=0;
+ break;
default:
Usage();
exit(0);