void-packages/srcpkgs/ogmrip/patches/tesseract.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

20 lines
654 B
Diff

--- a/libogmrip/ogmrip-srt.c 2015-01-10 14:39:43.000000000 +0100
+++ b/libogmrip/ogmrip-srt.c 2017-10-16 21:00:19.921665865 +0200
@@ -228,7 +228,7 @@
g_return_val_if_fail (input != NULL, NULL);
argv = g_ptr_array_new ();
- g_ptr_array_add (argv, g_strdup ("tesseract"));
+ g_ptr_array_add (argv, g_strdup ("tesseract-ocr"));
g_ptr_array_add (argv, g_strdup (input));
g_ptr_array_add (argv, g_strdup (input));
@@ -555,7 +555,7 @@
}
#ifdef HAVE_TESSERACT_SUPPORT
- fullname = g_find_program_in_path ("tesseract");
+ fullname = g_find_program_in_path ("tesseract-ocr");
use_tesseract = fullname != NULL;
g_free (fullname);