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

EAPI=7
inherit cmake eutils flag-o-matic xdg-utils

DESCRIPTION="sakura is a terminal emulator based on GTK and VTE"
HOMEPAGE="https://www.pleyades.net/david/projects/sakura"
SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.bz2"

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

RDEPEND="
	>=dev-libs/glib-2.20:2
	>=x11-libs/gtk+-3.20:3[X]
	x11-libs/libX11
	>=x11-libs/vte-0.50:2.91
"
DEPEND="
	${RDEPEND}
	>=dev-lang/perl-5.10.1
	virtual/pkgconfig
"
PATCHES=(
	"${FILESDIR}"/${PN}-3.7.0-gentoo.patch
)
DOCS=(
	AUTHORS
)

src_prepare() {
	strip-linguas -i po/
	local lingua
	for lingua in po/*.po; do
		lingua="${lingua/po\/}"
		lingua="${lingua/.po}"
		if ! has ${lingua} ${LINGUAS}; then
			rm po/${lingua}.po || die
		fi
	done

	cmake_src_prepare
	# sakura.c:1740:3: warning: implicit declaration of function ‘readlink’
	# [-Wimplicit-function-declaration]
	append-cppflags -D_DEFAULT_SOURCE

	# sakura.c:1348:9: error: ‘for’ loop initial declarations are only allowed
	# in C99 or C11 mode
	append-cflags -std=c99
}

pkg_postinst() {
	xdg_desktop_database_update
	xdg_icon_cache_update
}

pkg_postrm() {
	xdg_desktop_database_update
	xdg_icon_cache_update
}