summaryrefslogtreecommitdiff
blob: 8520a13ac6c8e58d4357288f49b48cc3469f8281 (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
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emacs/chess/chess-2.0_beta5-r2.ebuild,v 1.3 2007/04/07 16:41:45 opfer Exp $

inherit elisp-common eutils

DESCRIPTION="A chess client and library for Emacs"
HOMEPAGE="http://emacs-chess.sourceforge.net/"
SRC_URI="mirror://sourceforge/emacs-chess/${P/_beta/b}.tar.bz2
	mirror://gentoo/emacs-chess-sounds-2.0.tar.bz2
	mirror://gentoo/emacs-chess-pieces-2.0.tar.bz2"

LICENSE="GPL-2 FDL-1.1"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="festival"

# don't forget to change it back to virtual/emacs
# (inherit elisp.eclass)!  See bug 151474
DEPEND="app-editors/emacs-cvs"

RDEPEND="${DEPEND}
	games-board/gnuchess
	festival? ( app-accessibility/festival ) "

S="${WORKDIR}/${P/_beta/b}"

SITEFILE=51chess-gentoo.el

src_unpack() {
	unpack ${A}
	epatch "${FILESDIR}/${PV}-byte-compiling-files-gentoo.patch" || die "epatch failed"
	cd "${S}" && rm -f *.elc
}

src_compile() {
	make || die
}

src_install() {
	elisp-install ${PN} *.el *.elc
	elisp-site-file-install "${FILESDIR}/${SITEFILE}"

	dodir /usr/share/pixmaps/${PN}
	cp -r "${WORKDIR}/pieces/." "${D}/usr/share/pixmaps/${PN}"
	dodir /usr/share/sounds/${PN}
	cp -r "${WORKDIR}/sounds/." "${D}/usr/share/sounds/${PN}"

	doinfo chess.info
	dohtml *.html
	dodoc ChangeLog EPD.txt PGN.txt PLAN README TODO
}