summaryrefslogtreecommitdiff
blob: 704ed8eb972b1d8fe43f9700dbfc9958cea5255f (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-board/daemonshogi/daemonshogi-0.1.4.ebuild,v 1.2 2006/10/05 17:24:04 nyhm Exp $

AT_M4DIR=macros
WANT_AUTOMAKE=latest
inherit autotools eutils games

DESCRIPTION="A GTK+ based, simple shogi (Japanese chess) program"
HOMEPAGE="http://daemonshogi.sourceforge.jp"
SRC_URI="http://daemonshogi.sourceforge.jp/${P}.tar.gz"

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

RDEPEND="gnome-base/gnome-libs
	nls? ( virtual/libintl )"
DEPEND="${RDEPEND}
	nls? ( >=sys-devel/gettext-0.10.38 )"

src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${FILESDIR}/${P}"-sandbox.patch
	sed -i \
		-e "/^localedir/s:\$(datadir):/usr/share:" \
		-e "/^gnulocaledir/s:\$(prefix):/usr:" \
		po/Makefile.in.in \
		|| die "sed failed"
	sed -i \
		-e '/PACKAGE_LOCALE_DIR/s:".*":"/usr/share/locale":' \
		configure.in \
		|| die "sed failed"
	eautoreconf
}

src_compile() {
	if use nls && has_version '>=sys-devel/gettext-0.12' ; then
		export XGETTEXT="/usr/bin/xgettext --from-code=EUC-JP"
	fi
	egamesconf $(use_enable nls) || die
	emake || die "emake failed"
}

src_install() {
	emake DESTDIR="${D}" install || die "emake install failed"
	dodoc ChangeLog README* NEWS
	prepgamesdirs
}