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

EAPI=8

inherit desktop flag-o-matic toolchain-funcs

DESCRIPTION="Jigsaw puzzle program"
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
SRC_URI="mirror://gentoo/${P}.tar.gz"

LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~x86"

RDEPEND="x11-libs/gtk+:3"
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"

PATCHES=(
	"${FILESDIR}"/${P}-docdir.patch
)

src_compile() {
	tc-export CXX

	append-cppflags $($(tc-getPKG_CONFIG) --cflags gtk+-3.0) -DDOCDIR="'\"${PF}\"'"
	append-ldflags -pthread
	append-libs $($(tc-getPKG_CONFIG) --libs gtk+-3.0)

	emake PREFIX="${EPREFIX}/usr" CFLAGS="${CXXFLAGS} ${CPPFLAGS} -c" LIBS="${LIBS}"
}

src_install() {
	dobin ${PN}
	newman doc/${PN}.man ${PN}.1

	insinto /usr/share/${PN}
	doins -r icons locales

	dodoc doc/{README,changelog,translations}

	docinto html
	dodoc -r doc/{images,userguide-en.html}

	doicon icons/${PN}.png
	make_desktop_entry ${PN} Picpuz
}