name=gawk
revision=2
from_source=gawk
imagedeps="build-essential"
hostdeps="xgcc xbinutils"
deps="base"

configure() {
	cp -rp ${source_dir}/* .
	./configure --host=x86_64-astral --prefix=${prefix} --disable-nls --disable-extensions

	# we need to remove the test as gawk seems to autoexecute it

	echo "all:" > test/Makefile
	echo "	echo ignore" >> test/Makefile
	echo "install:" >> test/Makefile
	echo "	echo ignore" >> test/Makefile
}

build() {
	make -j ${parallelism}
}

package() {
	make install DESTDIR=${dest_dir}
}
