From cab33cad3add53aac8748d04b8bd387fd96146f8 Mon Sep 17 00:00:00 2001 From: RunningDroid Date: Tue, 23 May 2023 03:15:55 -0400 Subject: [PATCH] preload: generate manpage this also adds psmisc to checkdepends (the test script uses killall to end the tests) --- srcpkgs/preload/patches/qemu-help2man.patch | 30 +++++++++++++++++++++ srcpkgs/preload/template | 6 +++-- 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/preload/patches/qemu-help2man.patch diff --git a/srcpkgs/preload/patches/qemu-help2man.patch b/srcpkgs/preload/patches/qemu-help2man.patch new file mode 100644 index 000000000000..c2fa7068bb2d --- /dev/null +++ b/srcpkgs/preload/patches/qemu-help2man.patch @@ -0,0 +1,30 @@ +--- preload-0.6.4/src/Makefile.in 2009-04-15 17:49:28.000000000 -0400 ++++ preload-0.6.4.new/src/Makefile.in 2023-05-30 22:23:16.820648202 -0400 +@@ -222,6 +222,12 @@ + dist_man_MANS = preload.8 + RUNPREQ = preload preload.conf.debug + RUNCMD = ./preload -c preload.conf.debug -s preload.state -d $(ARGS) ++preload_binary = `if [ -n "$$CROSS_BUILD" ]; then \ ++ echo "qemu-$$XBPS_TARGET_QEMU_MACHINE-static ./preload"; \ ++ else \ ++ echo './preload'; \ ++ fi;` ++ + all: all-am + + .SUFFIXES: +@@ -678,11 +684,11 @@ + @$(top_builddir)/missing --run \ + help2man --no-info --section=8 --include=preload.8.i \ + --help-option="-H" --output="$@.tmp" \ +- --name 'Adaptive readahead daemon' ./preload \ ++ --name 'Adaptive readahead daemon' "$(preload_binary)" \ + && mv "$@.tmp" "$@" \ + || ($(RM) "$@"; \ +- echo Failed to update preload.8, the man page may be outdated >&2; \ +- (test -f "$@" || echo help2man is required to generate this file. >> "$@")); ++ echo Failed to create preload.8 >&2; \ ++ exit 1); + + install-data-hook: + @cd "$(DESTDIR)$(man8dir)" && gzip -c preload.8 > preload.8.gz.tmp && mv preload.8.gz.tmp preload.8.gz && $(RM) preload.8 diff --git a/srcpkgs/preload/template b/srcpkgs/preload/template index 9623aed0e6eb..2efe74d46b6c 100644 --- a/srcpkgs/preload/template +++ b/srcpkgs/preload/template @@ -1,10 +1,12 @@ # Template file for 'preload' pkgname=preload version=0.6.4 -revision=11 +revision=12 build_style=gnu-configure -hostmakedepends="pkg-config" +build_helper=qemu +hostmakedepends="pkg-config help2man" makedepends="libglib-devel" +checkdepends="psmisc" short_desc="Adaptive readahead daemon" maintainer="bougyman " license="GPL-2.0-or-later"