summaryrefslogtreecommitdiff
blob: ed75a0d0bf7bb17ee6f550e5b10e957d5531c590 (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-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-board/mah-jong/mah-jong-1.6.3.ebuild,v 1.2 2004/05/10 13:24:45 dholm Exp $

inherit games

MY_P="mj-${PV}-src"
S="${WORKDIR}/${MY_P}"
DESCRIPTION="A networked Mah Jong program, together with a computer player"
HOMEPAGE="http://www.stevens-bradfield.com/MahJong/"
SRC_URI="http://www.stevens-bradfield.com/MahJong/Source/${MY_P}.tar.gz"

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

RDEPEND="virtual/x11
	=x11-libs/gtk+-1.2*"
DEPEND="${RDEPEND}
	dev-lang/perl
	>=sys-apps/sed-4"

src_unpack() {
	unpack ${A}
	cd ${S}

	sed -i \
		-e '/^.TH/ s/1/6/' xmj.man \
			|| die "sed xmj.man failed"
	sed -i \
		-e "/^DESTDIR =/ s:=.*:= ${D}:" \
		-e "/^BINDIR =/ s:=.*:= ${GAMES_BINDIR}:" \
		-e "/^MANDIR =/ s:man/man1:/usr/share/man/man6:" \
		-e "/^MANSUFFIX =/ s:1:6:" \
		-e "/^CFLAGS =/ s:=:= ${CFLAGS}:" \
		-e "/^TILESETPATH=/ s:NULL:\"${GAMES_DATADIR}/${PN}/\":" Makefile \
			|| die "sed Makefile failed"
}

src_install() {
	make install install.man || die "make install failed"
	dodir "${GAMES_DATADIR}/${PN}"
	cp -R fallbacktiles/ \
		tiles-numbered/ \
		tiles-small/ "${D}${GAMES_DATADIR}/${PN}" \
			|| die "cp failed"
	dodoc CHANGES ChangeLog *.txt
	prepgamesdirs
}