summaryrefslogtreecommitdiff
blob: 11ed50979dbe8b7695cdc7bd0c5f289fb466f341 (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
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=4
DESCRIPTION="Modern, high-level, general-purpose, high-performance programming language"
HOMEPAGE="http://jsoftware.com"
SRC_URI="http://www.jsoftware.com/download/${PN}${PV}_b_source.tar.gz"

inherit eutils

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

DEPEND=""
RDEPEND="${DEPEND}"

S="${WORKDIR}/jgplsrc"

src_prepare() {
	sed -i -e 's:make libj >& make.txt:make libj:' bin/build_libj || die
	sed -i -e 's:W1,soname:Wl,-soname:' bin/jconfig || die
	if use amd64; then
		sed -i -e 's/bits=32/bits=64/' bin/jconfig || die
	fi
}

src_compile() {
	bin/jconfig	|| die
	bin/build_defs 	|| die
	bin/build_libj 	|| die
	bin/build_jconsole || die
}

src_install() {
	# since this appears to use hardcoded relative paths
	# there's no sane way to put it in the normal filesystem hierarchy
	mkdir -p "${D}/opt/j"
	cp -r j/* "${D}/opt/j" || die
	mkdir -p "${D}/usr/bin"
	echo -e "#!/bin/sh\n/opt/j/bin/jconsole" > "${D}/usr/bin/jc"  || die
	chmod +x "${D}/usr/bin/jc"
}