# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4

inherit toolchain-funcs

DESCRIPTION="tool for converting and processing OpenStreetMap files"
HOMEPAGE="http://wiki.openstreetmap.org/wiki/Osmconvert"
SRC_URI="http://m.m.i24.cc/${PN}.c"

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

DEPEND="sys-libs/zlib"
RDEPEND="${DEPEND}"

S=${WORKDIR}

src_unpack() {
	cp -v "${DISTDIR}"/${A} ${PN}.c || die
}

src_compile() {
	$(tc-getCC) ${CFLAGS} -lz -o ${PN} ${PN}.c ${LDFLAGS} || die
}

src_install() {
	dobin ${PN} || die
}