summaryrefslogtreecommitdiff
blob: 2e7b19964334083477b3a6bf0285b0ddae4db7af (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-editors/qemacs/qemacs-0.3.1-r1.ebuild,v 1.4 2006/03/18 23:41:53 joshuabaergen Exp $

inherit eutils

DESCRIPTION="QEmacs (for Quick Emacs) is a very small but powerful UNIX editor."
HOMEPAGE="http://fabrice.bellard.free.fr/qemacs/"
SRC_URI="http://fabrice.bellard.free.fr/qemacs/${P}.tar.gz"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~x86 ~amd64 ~ppc"
IUSE="X png unicode"

RDEPEND="X? ( || ( x11-libs/libXv virtual/x11 ) )
	png? ( =media-libs/libpng-1.2* )"
DEPEND="${RDEPEND}
	X? ( || ( ( x11-libs/libXft
				x11-proto/xextproto )
			virtual/x11 ) )"

src_unpack() {
	unpack ${A}
	cd ${S}
	epatch ${FILESDIR}/qemacs-Makefile-gentoo.patch
	epatch ${FILESDIR}/${P}-configure-gentoo.patch
	epatch ${FILESDIR}/${P}-make_backup.patch
	epatch ${FILESDIR}/${PN}-0.3.1-gcc-3.4.patch
	if use ppc; then
		epatch ${FILESDIR}/${PN}-ppc-segfault.patch
	fi
	use unicode && epatch ${FILESDIR}/${P}-tty_utf8.patch
}

src_compile() {
	local myconf
	use X && myconf="--enable-x11" || myconf="--disable-x11"
	use png && myconf="${myconf} --enable-png" || myconf="${myconf} --disable-png"
	econf ${myconf} || die "econf failed"
	emake -j1 || die
}

src_install() {
	dodir /usr/bin
	einstall || die
	doman qe.1
	dodoc Changelog README TODO VERSION
	dohtml *.html
}