summaryrefslogtreecommitdiff
blob: 30e33c085ccd535cb042d2983a286da86a2e601c (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
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit desktop

DESCRIPTION="An Al Bhed translator"
HOMEPAGE="http://liquidchile.net/software/gbhed/"
SRC_URI="http://liquidchile.net/software/gbhed/${P}.tar.gz"

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

DEPEND="gtk? ( x11-libs/gtk+:2 )"
RDEPEND="${DEPEND}"

src_prepare() {
	default

	sed -i 's/19/32/' src/gui/translation_fork.c || die
}

src_configure() {
	econf \
		--datadir=/usr/share/${PN} \
		$(use_enable gtk gbhed)
}

src_install() {
	emake -C src DESTDIR="${D}" install
	dodoc AUTHORS ChangeLog NEWS README THANKS TODO
	doman doc/abtranslate.1

	if use gtk ; then
		insinto /usr/share/${PN}/pixmaps
		doins pixmaps/*.{jpg,png,xpm}

		newicon pixmaps/gbhed48.png ${PN}.png

		make_desktop_entry gbhed ${PN}
		doman doc/gbhed.1
	fi
}