void-packages/srcpkgs/rc/template
2021-09-12 19:12:50 +02:00

38 lines
1.1 KiB
Bash

# Template file for 'rc'
pkgname=rc
version=1.7.4
revision=6
build_style=gnu-configure
configure_args="ac_cv_sys_restartable_syscalls=no
$(vopt_if readline --with-edit=gnu)
$(vopt_if libedit --with-edit=bsd)"
hostmakedepends="automake"
makedepends="$(vopt_if readline readline-devel)
$(vopt_if libedit libedit-devel)"
short_desc="Alternative implementation of the plan 9 rc shell"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="Zlib"
homepage="https://github.com/rakitzis/rc"
distfiles="https://github.com/rakitzis/rc/archive/refs/tags/v${version}.tar.gz"
checksum=0b83f8698dd8ef44ca97b25c4748c087133f53c7fff39b6b70dab65931def8b0
register_shell="/bin/rc"
build_options="readline libedit static"
build_options_default="readline"
pre_configure() {
if [ "$build_option_static" ]; then
CFLAGS+=" -static"
LDFLAGS+=" -static"
fi
sh bootstrap
}
pre_build() {
sed -i 's/i != SIGCLD/i != SIGCHLD/' fn.c
sed -i 's/(SIGCLD/(SIGCHLD/g' signal.c
if [ "$CROSS_BUILD" ]; then
make CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" LIBS= LDFLAGS= \
sigmsgs.c sigmsgs.h statval.h
fi
}