# SliTaz package receipt.

PACKAGE="m4"
VERSION="1.4.18"
CATEGORY="development"
SHORT_DESC="GNU traditional Unix macro processor."
MAINTAINER="pankso@slitaz.org"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WEB_SITE="http://www.gnu.org/software/m4/"
WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"

DEPENDS="glibc-base"
BUILD_DEPENDS="gcc"

# Rules to compile & install the temporary toolchain by Tazwok.
cook_tmp_toolchain()
{
	cd $src
	./configure && make && make install
}


# Rules to configure and make the package.
compile_rules()
{
	cd $src

	# Patch for glibc >= 2.28
	patch -p1 < $stuff/m4-1.4.18-glibc-2.28\+-workaround.patch
 
	./configure --build=$HOST_SYSTEM --host=$HOST_SYSTEM &&
	make && make install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/usr
	cp -a $_pkg/usr/bin $fs/usr
}