void-packages/srcpkgs/noip2/patches/03-prefix.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

16 lines
490 B
Diff

--- a/noip2.c.old 2015-01-05 15:40:56.269596723 -0200
+++ b/noip2.c 2015-01-05 15:41:51.549595383 -0200
@@ -240,10 +240,10 @@
#define GROUP 2
#define DOMAIN 3
#ifndef PREFIX
- #define PREFIX "/usr/local"
+ #define PREFIX "/usr"
#endif
-#define CONFIG_FILEPATH PREFIX"/etc"
-#define CONFIG_FILENAME PREFIX"/etc/no-ip2.conf"
+#define CONFIG_FILEPATH "/etc"
+#define CONFIG_FILENAME "/etc/no-ip2.conf"
#define CONFSTRLEN 1024
#define MAX_DEVLEN 16
#define MAX_INSTANCE 4