# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit toolchain-funcs

DESCRIPTION="Convert between ECM and BIN files"
HOMEPAGE="https://web.archive.org/web/20091104002036/http://www.neillcorlett\
.com:80/ecm"
SRC_URI="https://web.archive.org/web/20091021035854/www.neillcorlett.com\
/downloads/ecm100.zip"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND="app-arch/unzip"
RDEPEND="${DEPEND}"

S=${WORKDIR}

src_compile(){
	for i in *.c; do
		$(tc-getCC) ${CFLAGS} ${LDFLAGS} "$i" -o "${i%.*}" || die
	done
}

src_install(){
	dobin ecm
	dobin unecm
	dodoc format.txt
	dodoc readme.txt
}