summaryrefslogtreecommitdiff
blob: a666390423582d9a57af2cb4f0e19d3ec85226af (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
63
64
65
66
67
68
69
70
71
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5
WX_GTK_VER=3.0

PLOCALES="af am an ar ast az be@latin be bg bn br bs ca ca@valencia ckb co cs da de el en_GB eo es et eu fa fi fr fur fy_NL ga gl he hi hr hu id is it ja ka kk ko ku ky lt lv mk mn mr ms nb ne nl nn oc pa pl pt_BR pt_PT ro ru sk sl sq sr sv ta tg th tr tt ug uk ur uz vi wa zh_CN zh_TW"

inherit eutils fdo-mime flag-o-matic gnome2-utils l10n wxwidgets

DESCRIPTION="GUI editor for gettext translations files"
HOMEPAGE="https://poedit.net"
SRC_URI="https://github.com/vslavik/${PN}/releases/download/v${PV}-oss/${P}.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~ppc64 ~x86"
IUSE=""

# db/expat req for legacytm - remove in later version
RDEPEND="
	app-text/gtkspell:2
	dev-cpp/lucene++
	dev-libs/boost:=[nls]
	dev-libs/expat
	dev-libs/icu:=
	||	(
		=sys-libs/db-5*:=[cxx]
		=sys-libs/db-4*:=[cxx]
		)
	x11-libs/gtk+:2
	x11-libs/wxGTK:${WX_GTK_VER}[X]
	"

DEPEND="${RDEPEND}
	virtual/pkgconfig"

src_prepare() {
	my_rm_loc() {
		sed -i -e "/^POEDIT_LINGUAS = /s: ${1}::" locales/Makefile.in || die
		rm "locales/${1}.mo" || die
	}
	l10n_find_plocales_changes 'locales' '' '.mo'
	l10n_for_each_disabled_locale_do my_rm_loc

	append-flags -Wno-deprecated-declarations
}

src_configure() {
	econf --without-cpprest --without-cld2
}

src_install() {
	emake DESTDIR="${D}" install
	dodoc AUTHORS NEWS README
}

pkg_preinst() {
	gnome2_icon_savelist
}

pkg_postinst() {
	fdo-mime_desktop_database_update
	gnome2_icon_cache_update
}

pkg_postrm() {
	fdo-mime_desktop_database_update
	gnome2_icon_cache_update
}