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

41 lines
1.1 KiB
Bash

# Template file for 'sword'
pkgname=sword
version=1.8.1
revision=6
build_style=gnu-configure
configure_args="--without-conf --with-icuregex"
hostmakedepends="libtool automake pkg-config"
makedepends="icu-devel clucene-devel libcurl-devel zlib-devel"
short_desc="CrossWire Bible Society's free Bible software project"
maintainer="Dan Arnfield <dan@arnfield.com>"
license="GPL-2.0-only"
homepage="https://crosswire.org/sword/index.jsp"
distfiles="https://crosswire.org/ftpmirror/pub/sword/source/v1.8/sword-${version}.tar.gz"
checksum=ce9aa8f721a737f406115d35ff438bd07c829fce1605f0d6dcdabc4318bc5e93
CXXFLAGS=' -DU_USING_ICU_NAMESPACE=1'
pre_configure() {
./autogen.sh
}
libsword_package() {
conf_files="/etc/sword.conf"
short_desc+=" - libraries"
pkg_install() {
vconf ${FILESDIR}/sword.conf
vmove "usr/lib/libsword-*.so"
vmove usr/share
}
}
sword-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.a"
vmove "usr/lib/libsword.so"
}
}