# Template file for 'wol'
pkgname=wol
version=0.7.1
revision=2
build_style=gnu-configure
configure_args="jm_cv_func_working_malloc=yes"
hostmakedepends="perl"
short_desc="Wakes up hardware that is Magic Packet compliant"
maintainer="Duncaen <duncaen@voidlinux.eu>"
license="GPL-2"
homepage="http://wake-on-lan.sourceforge.net/"
distfiles="${SOURCEFORGE_SITE}/ahh/${pkgname}-${version}.tar.gz"
checksum=e0086c9b9811df2bdf763ec9016dfb1bcb7dba9fa6d7858725b0929069a12622

pre_configure() {
	# Fix mismatching declarations - unbreaks target *-musl
	sed -i lib/realloc.c \
		-e "s/char \*malloc ();/void *malloc (size_t);/" \
		-e "s/char \*realloc ();/void *realloc (void*, size_t);/"
	sed -i lib/getline.h -e "s/^int$/ssize_t/"
}
