void-packages/srcpkgs/hunspell/patches/search_path.patch
Đoàn Trần Công Danh 200bed5c06 srcpkgs/h*: 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

34 lines
1.4 KiB
Diff

diff --git src/tools/hunspell.cxx src/tools/hunspell.cxx
index 690e34a..d9b094d 100644
--- a/src/tools/hunspell.cxx
+++ b/src/tools/hunspell.cxx
@@ -119,25 +119,11 @@
"/usr/share/hunspell:" \
"/usr/share/myspell:" \
"/usr/share/myspell/dicts:" \
- "/Library/Spelling"
-#define USEROOODIR { \
- ".openoffice.org/3/user/wordbook", \
- ".openoffice.org2/user/wordbook", \
- ".openoffice.org2.0/user/wordbook",\
- "Library/Spelling" }
+ "/usr/share/mozilla-dicts"
+#define USEROOODIR { \
+ ".config/libreoffice/4/user/wordbook" }
#define OOODIR \
- "/opt/openoffice.org/basis3.0/share/dict/ooo:" \
- "/usr/lib/openoffice.org/basis3.0/share/dict/ooo:" \
- "/opt/openoffice.org2.4/share/dict/ooo:" \
- "/usr/lib/openoffice.org2.4/share/dict/ooo:" \
- "/opt/openoffice.org2.3/share/dict/ooo:" \
- "/usr/lib/openoffice.org2.3/share/dict/ooo:" \
- "/opt/openoffice.org2.2/share/dict/ooo:" \
- "/usr/lib/openoffice.org2.2/share/dict/ooo:" \
- "/opt/openoffice.org2.1/share/dict/ooo:" \
- "/usr/lib/openoffice.org2.1/share/dict/ooo:" \
- "/opt/openoffice.org2.0/share/dict/ooo:" \
- "/usr/lib/openoffice.org2.0/share/dict/ooo"
+ "/usr/lib/libreoffice/share/wordbook"
#define HOME getenv("HOME")
#define DICBASENAME ".hunspell_"
#define LOGFILE "/tmp/hunspell.log"