void-packages/srcpkgs/wvstreams/patches/wvstreams-4.6.1-wvcrash-basename.patch
Đoàn Trần Công Danh 04b9978a29 srcpkgs/w*: convert patches to -Np1
* wine 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

11 lines
374 B
Diff

--- a/utils/wvcrash.cc.old 2015-09-22 02:27:09.219293510 -0400
+++ b/utils/wvcrash.cc 2015-09-22 02:37:15.577967752 -0400
@@ -409,7 +409,7 @@
void wvcrash_setup(const char *_argv0, const char *_desc)
{
if (_argv0)
- argv0 = basename(_argv0);
+ argv0 = strrchr(_argv0, '/') ? strrchr(_argv0, '/')+1 : _argv0;
__wvcrash_init_buffers(argv0);
if (_desc)
{