summaryrefslogtreecommitdiff
blob: 6bd750343e499937e076f3a7eb6919fdf94a8631 (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-i18n/jless-iso254/jless-iso254-358.ebuild,v 1.14 2004/07/13 03:41:55 tgall Exp $

inherit eutils

LESS_P="less-${PV}"

DESCRIPTION="Jam less is an enhancement of less which supports multibyte character"
HOMEPAGE="http://www.flash.net/~marknu/less/ http://www.io.com/~kazushi/less/"
SRC_URI="mirror://gnu/less/${LESS_P}.tar.gz
	http://www.io.com/~kazushi/less/${LESS_P}-iso254.patch.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="x86 ppc sparc alpha ppc64"
IUSE=""

DEPEND="virtual/libc
	>=sys-libs/ncurses-5.2"

S=${WORKDIR}/${LESS_P}

src_unpack() {
	unpack ${LESS_P}.tar.gz
	cd ${S}
	epatch ${DISTDIR}/${LESS_P}-iso254.patch.gz
}

src_compile() {
	econf \
		--without-cs-regex \
		--with-regex=auto \
		--enable-msb \
		--enable-jisx0213 \
		--with-editor=${EDITOR} \
		|| die

	emake || die
}

src_install() {
	einstall binprefix=j manprefix=j || die

	newbin ${FILESDIR}/lesspipe.sh-r1 jlesspipe.sh
	if [ ! -f ${ROOT}/usr/bin/lesspipe.sh ] ; then
		dosym /usr/bin/jlesspipe.sh /usr/bin/lesspipe.sh
	fi

	insinto /etc/env.d
	doins ${FILESDIR}/70jless

	dodoc NEWS README*
}

pkg_postinst() {
	# for backward compatibility
	if [ ! -f ${ROOT}/usr/bin/lesspipe.sh ] ; then
		ln -s /usr/bin/jlesspipe.sh ${ROOT}/usr/bin/lesspipe.sh
	fi
}