summaryrefslogtreecommitdiff
blob: 4fd27ec5836c6fd84760ca8db01a03e704201dfa (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-lang/icon/icon-9.4.2.ebuild,v 1.3 2005/11/03 12:26:56 grobian Exp $

MY_PV=${PV//./}
SRC_URI="http://www.cs.arizona.edu/icon/ftp/packages/unix/icon.v${MY_PV}src.tgz"
HOMEPAGE="http://www.cs.arizona.edu/icon/"
DESCRIPTION="very high level language"

LICENSE="as-is"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~ppc-macos ~x86"
IUSE="X"

S=${WORKDIR}/icon.v${MY_PV}src

DEPEND="X? ( virtual/x11 )
	sys-devel/gcc"

src_unpack() {
	unpack ${A}
	cd ${S}/config
	#this is just a nicefier, so no || die ..
	grep -rle "CFLAGS = -O2" . | xargs sed -i -e "s:CFLAGS = -O2:CFLAGS = ${CFLAGS}:"
}

src_compile() {
	# select the right compile target.  Note there are many platforms
	# available
	local mytarget;
	if use ppc-macos;
	then
		mytarget="ppc_macos"
	else
		mytarget="linux"
	fi

	if use X; then
		emake X-Configure name=${mytarget} -j1 || die
	else
		emake Configure name=${mytarget} -j1 || die
	fi

	emake -j1 || die

	# small builtin test
	#make Samples || die
	# large builtin test
	#make Test || die
}

src_install() {
	#make Install dest=${D}/opt/icon || die
	# fhs-problems, manual rectify
	into /usr

	cd ${S}/bin
	rm .placeholder libXpm.a rt.h
	dobin *

	cd ${S}/lib
	rm .placeholder
	dolib *

	cd ${S}/man/man1
	doman icont.1

	cd ${S}/doc
	dodoc * ../README
}