# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0
PortGroup       muniversal 1.0

name            gmake
version         4.4.1
revision        1
categories      devel
maintainers     nomaintainer
description     GNU Make
long_description \
    Make is a tool which controls the generation of executables and     \
    other non-source files of a program from the program’s source files.\
    Make gets its knowledge of how to build your program from a file    \
    called the makefile, which lists each of the non-source files and   \
    how to compute it from other files. When you write a program, you   \
    should write a makefile for it, so that it is possible to use Make  \
    to build and install the program.

homepage        https://www.gnu.org/software/make/make.html
license         GPL-3
installs_libs   no
distname        make-${version}
master_sites    gnu:make
use_lzip        yes

checksums       rmd160  23d9de2a348ff617149d3926d3f478d91e756131 \
                sha256  8814ba072182b605d156d7589c19a43b89fc58ea479b9355146160946f8cf6e9 \
                size    1305648

depends_build-append \
                port:gettext

depends_lib-append \
                port:gettext-runtime \
                port:libiconv

configure.args  --program-prefix=g \
                --without-guile

post-destroot {
    xinstall -m 0755 -d ${destroot}${prefix}/libexec/gnubin
    ln -s ${prefix}/bin/gmake ${destroot}${prefix}/libexec/gnubin/make
    xinstall -m 0755 -d ${destroot}${prefix}/libexec/gnubin/man/man1
    ln -s \
        ${prefix}/share/man/man1/gmake.1.gz \
        ${destroot}${prefix}/libexec/gnubin/man/man1/make.1.gz
}

variant guile description "Enable GNU Guile extensions" {
    depends_lib-append  port:guile-3.0
    configure.args-replace  --without-guile --with-guile
}

test.run        yes
test.target     check
