void-packages/srcpkgs/mg/patches/pkg-config-ncurses.patch
Đoàn Trần Công Danh 765e304c4b srcpkgs/m*: 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
694 B
Diff

--- a/GNUmakefile 2016-09-05 13:51:19.133051791 +0200
+++ b/GNUmakefile 2016-09-05 13:51:29.519052327 +0200
@@ -13,7 +13,7 @@
includedir= $(prefix)/include
mandir= $(prefix)/man
-PKG_CONFIG= /usr/bin/pkg-config --silence-errors
+PKG_CONFIG= pkg-config --silence-errors
INSTALL= /usr/bin/install
STRIP= /usr/bin/strip
@@ -33,7 +33,7 @@
$(error You probably need to install "libbsd-dev" or "libbsd-devel" or something like that.)
endif
-CURSES_LIBS:= $(shell $(PKG_CONFIG) --libs ncurses)
+CURSES_LIBS:= $(shell $(PKG_CONFIG) --libs ncursesw)
ifeq ($(CURSES_LIBS),)
$(error You probably need to install "libncurses5-dev" or "libnnurses6-devel" or something like that.)
endif