summaryrefslogtreecommitdiff
blob: 679a8e2d11a17d67931143d6f94f1945aeeff658 (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-editors/jed/jed-0.99.19.ebuild,v 1.8 2012/05/20 15:44:55 ssuominen Exp $

EAPI=4
inherit versionator

MY_P=${PN}-$(replace_version_separator 2 '-')

DESCRIPTION="Console S-Lang-based editor"
HOMEPAGE="http://www.jedsoft.org/jed/"
SRC_URI="ftp://space.mit.edu/pub/davis/jed/v${PV%.*}/${MY_P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~x86-macos"
IUSE="X gpm xft"

RDEPEND=">=sys-libs/slang-2
	gpm? ( sys-libs/gpm )
	X? (
		x11-libs/libX11
		xft? (
			>=media-libs/freetype-2
			x11-libs/libXext
			x11-libs/libXft
			x11-libs/libXrender
			)
		)"
DEPEND="${RDEPEND}
	X? (
		x11-libs/libXt
		x11-proto/xproto
		)"

S=${WORKDIR}/${MY_P}

src_configure() {
	export JED_ROOT="${EPREFIX}"/usr/share/jed
	econf \
		$(use_enable gpm) \
		$(use_enable xft)
}

src_compile() {
	emake
	use X && emake xjed
}

src_install() {
	emake -j1 DESTDIR="${D}" install

	dodoc changes.txt INSTALL{,.unx} README
	doinfo info/jed*

	insinto /etc
	doins lib/jed.conf

	# replace IDE mode with EMACS mode
	sed -i \
		-e 's/\(_Jed_Default_Emulation = \).*/\1"emacs";/' \
		"${ED}"/etc/jed.conf || die
}