void-packages/srcpkgs/sxiv/patches/sxiv-1.3-makefile.patch
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: 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

35 lines
1.4 KiB
Diff

--- a/Makefile 2014-10-24 12:25:18.000000000 +0200
+++ b/Makefile 2014-10-26 01:19:33.040945097 +0200
@@ -43,9 +43,9 @@
sed "s!PREFIX!$(PREFIX)!g; s!VERSION!$(VERSION)!g" sxiv.1 > $(DESTDIR)$(MANPREFIX)/man1/sxiv.1
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/sxiv.1
@echo "INSTALL share/sxiv/"
- mkdir -p $(DESTDIR)$(PREFIX)/share/sxiv/exec
- cp exec/* $(DESTDIR)$(PREFIX)/share/sxiv/exec/
- chmod 755 $(DESTDIR)$(PREFIX)/share/sxiv/exec/*
+ mkdir -p $(DESTDIR)$(PREFIX)/share/examples/sxiv
+ cp exec/* $(DESTDIR)$(PREFIX)/share/examples/sxiv/
+ chmod 755 $(DESTDIR)$(PREFIX)/share/examples/sxiv/*
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/sxiv
--- a/sxiv.1 2014-10-24 12:25:18.000000000 +0200
+++ b/sxiv.1 2014-10-26 01:18:00.053107605 +0200
@@ -351,7 +351,7 @@
and the first argument to this script is the path of the loaded image.
.P
There is also an example script installed together with sxiv as
-.IR PREFIX/share/sxiv/exec/image-info .
+.IR PREFIX/share/examples/sxiv/image-info .
.SH EXTERNAL KEY HANDLER
Additional external keyboard commands can be defined using a handler program
located in
@@ -368,7 +368,7 @@
keysym as listed in /usr/include/X11/keysymdef.h without the "XK_" prefix.
There is also an example script installed together with sxiv as
-.IR PREFIX/share/sxiv/exec/key-handler .
+.IR PREFIX/share/examples/sxiv/key-handler .
.SH THUMBNAIL CACHING
sxiv stores all thumbnails under
.IR $XDG_CACHE_HOME/sxiv/ .