void-packages/srcpkgs/hunspell/template
Đ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

42 lines
1.3 KiB
Bash

# Template file for 'hunspell'
pkgname=hunspell
version=1.7.0
revision=3
build_style=gnu-configure
configure_args="--with-ui"
hostmakedepends="automake bison libtool pkg-config"
makedepends="ncurses-devel"
short_desc="Spell checker and morphological analyzer"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later, LGPL-2.1-or-later, MPL-1.1"
homepage="https://hunspell.github.io/"
distfiles="https://github.com/hunspell/hunspell/archive/v${version}.tar.gz"
checksum=bb27b86eb910a8285407cf3ca33b62643a02798cf2eef468c0a74f6c3ee6bc8a
pre_configure() {
autoreconf -fi
}
libhunspell1.7_package() {
short_desc+=" - runtime library"
pkg_install() {
vmove "usr/lib/*.so.*"
}
}
hunspell-devel_package() {
depends="ncurses-devel lib${sourcepkg}1.7>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
# Provides symlinks that don't have versions before the .so and .a parts
# this fixes builds with stuff that uses -lhunspell instead of -lhunspell-x.y
ln -rs "${DESTDIR}"/usr/lib/libhunspell-1.7.so ${DESTDIR}/usr/lib/libhunspell.so
ln -rs "${DESTDIR}"/usr/lib/libhunspell-1.7.a ${DESTDIR}/usr/lib/libhunspell.a
vmove usr/include
vmove usr/lib/pkgconfig
vmove usr/lib/*.a
vmove usr/lib/*.so
vmove usr/share/man/man3
}
}