summaryrefslogtreecommitdiff
blob: 22a193d41c718412cf32fe5013f348275464f2af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-embedded/picasm/picasm-1.14.ebuild,v 1.4 2012/02/17 07:46:52 radhermit Exp $

EAPI=4

inherit toolchain-funcs flag-o-matic

MY_PV="${PV//.}"
MY_P="${PN}${MY_PV}"
DESCRIPTION="An assembler and disassembler for 12 and 14-bit PIC chips"
HOMEPAGE="http://www.iki.fi/trossi/pic/"
SRC_URI="http://www.iki.fi/trossi/pic/${MY_P}.tar.bz2"

LICENSE="as-is"
SLOT="0"
KEYWORDS="~amd64 x86"
IUSE=""

S=${WORKDIR}/${MY_P}

src_prepare() {
	sed -i -e 's:$(CC):\0 $(LDFLAGS):' Makefile || die
}

src_compile() {
	append-cflags -DBUILTIN_INCLUDE1=\\\"/usr/share/picasm/include\\\"
	emake CFLAGS="${CFLAGS}" CC="$(tc-getCC)"
}

src_install() {
	dobin picasm
	dodoc picasm.txt HISTORY TODO

	insinto /usr/share/picasm/include
	doins device_definitions/*.i

	dohtml picasm.html
	docinto examples
	dodoc examples/*.*
	docompress -x /usr/share/doc/${PF}/examples
}