name=grep
version=3.11
revision=1
tarball_url="https://ftp.gnu.org/gnu/grep/grep-${version}.tar.xz"
tarball_blake2b="e21785bca20b5a090d32bb5dc525fb298af30165106ed4c289b1518ea3d2acdcacfd6309b12f13be29a4b958f19588546119c695deb2b7500d49dcff86357bdc"
source_hostdeps="automake autoconf libtool pkg-config"
imagedeps="gperf"
hostdeps="gcc autoconf automake libtool pkg-config"
deps="core-libs pcre2"

regenerate() {
    autoreconf -fvi
}

build() {
    cp -rp "${source_dir}"/. ./

        configure_script_path=./configure \
    autotools_configure

    make -j${parallelism}
}

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

    post_package_strip
}
