summaryrefslogtreecommitdiff
blob: f5e9f9d51da31e3a697165504a21f605223dbc18 (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
53
54
55
56
57
58
59
60
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-puzzle/picpuz/picpuz-1.7.ebuild,v 1.1 2008/08/25 22:54:38 mr_bones_ Exp $

inherit toolchain-funcs eutils games

DESCRIPTION="a jigsaw puzzle program"
HOMEPAGE="http://www.kornelix.com/picpuz"
SRC_URI="http://www.kornelix.com/${P}.tar.gz"

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

RDEPEND=">=x11-libs/gtk+-2.8"
DEPEND="${RDEPEND}
	dev-util/pkgconfig"

S=${WORKDIR}/${PN}

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

	sed -i \
		-e 's/CFLAGS/CXXFLAGS/g' \
		-e '/LFLAGS/s/$/ $(LDFLAGS)/' \
		-e '/^CXXFLAGS/s/=/+=/' \
		-e 's/-O//' \
		-e "s/g++/$(tc-getCXX)/g" \
		Makefile \
		|| die "sed failed"
	rm -f doc/COPYING
	mv doc/*pdf "${T}" || die "mv failed"
}

src_compile() {
	emake \
		BINDIR="${GAMES_BINDIR}" \
		DATADIR="${GAMES_DATADIR}/${PN}" \
		DOCDIR=/usr/share/doc/${PF} \
		|| die "emake failed"
}

src_install() {
	emake \
		DESTDIR="${D}" \
		BINDIR="${GAMES_BINDIR}" \
		DATADIR="${GAMES_DATADIR}/${PN}" \
		DOCDIR=/usr/share/doc/${PF} \
		install \
		|| die "emake failed"
	doicon data/icons/${PN}.png
	make_desktop_entry ${PN} Picpuz
	prepalldocs
	insinto /usr/share/doc/${PF}
	doins "${T}"/*pdf || die "doins failed"
	prepgamesdirs
}