void-packages/srcpkgs/openjade/patches/openjade-1.3.2-msggen.pl.patch
Đoàn Trần Công Danh 2fd8d4df94 srcpkgs/o*: 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

32 lines
748 B
Diff

Use Getopt::Std in place of getopts.pl.
https://bugs.gentoo.org/show_bug.cgi?id=420083
--- a/msggen.pl
+++ b/msggen.pl
@@ -4,6 +4,7 @@
# See the file COPYING for copying permission.
use POSIX;
+use Getopt::Std;
# Package and version.
$package = 'openjade';
@@ -18,8 +19,7 @@
undef $opt_l;
undef $opt_p;
undef $opt_t;
-do 'getopts.pl';
-&Getopts('l:p:t:');
+getopts('l:p:t:');
$module = $opt_l;
$pot_file = $opt_p;
@@ -72,7 +72,7 @@
else {
$field[0] =~ /^[IWQXE][0-9]$/ || &error("invalid first field");;
$type[$num] = substr($field[0], 0, 1);
- $argc = int(substr($field[0], 1, 1));
+ $argc = substr($field[0], 1, 1);
}
$nargs[$num] = $argc;
$field[1] =~ /^[a-zA-Z_][a-zA-Z0-9_]+$/ || &error("invalid tag");