# $Id: Portfile 106428 2013-05-26 10:29:31Z mww@macports.org $

PortSystem 1.0
PortGroup  compiler_blacklist_versions 1.0

name			smake
version			1.2.3
categories		devel
platforms		darwin
maintainers		mww
license			CDDL
description		highly portable make program with automake features
long_description	Smake is a highly portable make program with automake \
				features. It is currently mainly targeted to be used \
				with the makefiles system. 

homepage		http://cdrecord.berlios.de/old/private/smake.html
master_sites	ftp://ftp.berlios.de/pub/smake/
use_bzip2		yes

checksums           rmd160  7fb9f1ce920bee179b195f4f71aaaefb6a8c8721 \
                    sha256  908e06bc7d16f66227376e604199750c7bb953760ab6823a640aa3e2db6a739e

use_configure	no

# https://trac.macports.org/ticket/31616
compiler.blacklist-append llvm-gcc-4.2 {clang < 318}

# TODO: base should do this: http://trac.macports.org/ticket/32542
if {[info exists portconfigure::compiler_name_map(${configure.compiler})]} {
    depends_build-append port:$portconfigure::compiler_name_map(${configure.compiler})

    # base 2.1.x ignores the argument and just use ${configure.compiler}
    if {[portconfigure::arch_flag_supported ${configure.compiler}]} {
        depends_skip_archcheck-append $portconfigure::compiler_name_map(${configure.compiler})
    }

    if {[string match macports-gcc* ${configure.compiler}]} {
        depends_lib-append port:$portconfigure::compiler_name_map(${configure.compiler})
    }
}

build.type		gnu
build.args      CC=${configure.cc}
use_parallel_build  no

destroot.destdir	INS_BASE=${destroot}${prefix} \
					MANDIR=man \
					INSUSR=`id -u` INSGRP=`id -g`
post-destroot	{
	file delete -force ${destroot}${prefix}/share/man/man5 \
		${destroot}${prefix}/lib ${destroot}${prefix}/include
}

livecheck.type	regex
livecheck.url	[lindex ${master_sites} 0]
livecheck.regex	${name}-(\[0-9.]\+)\\.tar
