void-packages/srcpkgs/serf/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

40 lines
1 KiB
Bash

# Template file for 'serf'
pkgname=serf
version=1.3.9
revision=13
build_style=scons
make_build_args="PREFIX=/usr"
hostmakedepends="openssl-devel"
makedepends="zlib-devel gdbm-devel openssl-devel apr-util-devel"
short_desc="High-performance asynchronous HTTP client library"
maintainer="Orphaned <orphan@voidlinux.org>"
license="Apache-2.0"
homepage="http://serf.apache.org"
distfiles="https://archive.apache.org/dist/serf/serf-${version}.tar.bz2"
checksum=549c2d21c577a8a9c0450facb5cca809f26591f048e466552240947bdf7a87cc
if [ "$CROSS_BUILD" ]; then
make_build_args+=" APR=${XBPS_WRAPPERDIR}/apr-1-config"
make_build_args+=" APU=${XBPS_WRAPPERDIR}/apu-1-config"
fi
pre_build() {
if [ "$CROSS_BUILD" ]; then
vsed -i SConstruct -e"s;'/usr';'${XBPS_CROSS_BASE}/usr';"
fi
}
do_install() {
scons PREFIX=${DESTDIR}/usr install
}
serf-devel_package() {
depends="apr-util-devel serf>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
vmove "usr/lib/*.a"
}
}