summaryrefslogtreecommitdiff
blob: 5a56d3185fae2ffc1c4c63a9e7fe7a38ad2af25a (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
43
44
45
46
47
48
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=6

inherit toolchain-funcs flag-o-matic

DESCRIPTION="Hybrid between a make utility and a shell scripting language"
HOMEPAGE="https://fbb-git.github.io/icmake/ https://github.com/fbb-git/icmake"
SRC_URI="https://github.com/fbb-git/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"

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

S=${WORKDIR}/${P}/${PN}

PATCHES=(
	"${FILESDIR}"/${PN}-9.00.00-ar.patch
	"${FILESDIR}"/${P}-verbose-build.patch
)

src_prepare() {
	default

	sed -e "/^#define LIBDIR/s/lib/$(get_libdir)/" \
		-e "/^#define DOCDIR/s/${PN}/${PF}/" \
		-e "/^#define DOCDOCDIR/s/${PN}-doc/${PF}/" \
		-i INSTALL.im || die

	# fix build issues (bug #589896)
	append-cflags -std=gnu99

	tc-export AR CC
}

src_configure() {
	./icm_prepare "${EROOT}" || die
}

src_compile() {
	./icm_bootstrap "${EROOT}" || die
}

src_install() {
	./icm_install all "${ED}" || die
}