void-packages/srcpkgs/gperftools/template
Đoàn Trần Công Danh 7fc9190f0e srcpkgs/g*: convert patches to -Np1
* gcc is kept at -Np0, because of void-cross

```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

58 lines
1.5 KiB
Bash

# Template file for 'gperftools'
pkgname=gperftools
version=2.8
revision=2
build_style=gnu-configure
hostmakedepends="automake libtool"
makedepends="libunwind-devel"
checkdepends="perl"
short_desc="Multi-threaded malloc() and performance analysis tools"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="BSD-3-Clause"
homepage="https://github.com/gperftools/gperftools"
distfiles="${homepage}/releases/download/${pkgname}-${version}/${pkgname}-${version}.tar.gz"
checksum=240deacdd628b6459671b83eb0c4db8e97baadf659f25b92e9a078d536bd513e
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
# needed by some newly enabled code
CXXFLAGS+=" -D__WORDSIZE=$XBPS_TARGET_WORDSIZE"
# needed on musl other than x86_64
if [ "$XBPS_TARGET_MACHINE" != "x86_64-musl" ]; then
makedepends+=" libucontext-devel"
LDFLAGS+=" -lucontext"
fi
fi
case "$XBPS_TARGET_MACHINE" in
arm*-musl|aarch64-musl|i686-musl)
# having libunwind in makedepends still causes failures...
makedepends="libucontext-devel"
configure_args+=" --disable-libunwind"
;;
esac
post_extract() {
sed -i -e 's/__off64_t/off64_t/' \
src/base/linux_syscall_support.h src/malloc_hook_mmap_linux.h
}
pre_configure() {
autoreconf -fi
}
post_install() {
vlicense COPYING
rm -rf ${DESTDIR}/usr/share/doc
}
gperftools-devel_package() {
depends="gperftools-${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
vmove "usr/lib/*.a"
}
}