aboutsummaryrefslogtreecommitdiff
blob: af683bfb34540599c9ba212b040e917828b996cf (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
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=5

inherit autotools xdg-utils gnome2-utils mono-env

DESCRIPTION="Simple Painting for Gtk"
HOMEPAGE="https://pinta-project.com"
SRC_URI="https://github.com/PintaProject/Pinta/archive/${PV}.tar.gz"

LICENSE="MIT CC-BY-3.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"

COMMON_DEPEND=">=dev-lang/mono-4.0.2
	>=dev-dotnet/gtk-sharp-2.12.21:2
	>=dev-dotnet/mono-addins-1.0-r1[gtk]
	"

RDEPEND="${COMMON_DEPEND}
	x11-libs/cairo[X]
	x11-libs/gdk-pixbuf[X,jpeg,tiff]
	x11-themes/gnome-icon-theme"
DEPEND="${COMMON_DEPEND}
	dev-util/intltool
	virtual/pkgconfig"

S=${WORKDIR}/Pinta-${PV}

src_prepare() {
	local i
	if [[ -n "${LINGUAS+x}" ]] ; then
		for i in $(cd "${S}"/po ; echo *.po) ; do
			if ! has ${i%.po} ${LINGUAS} ; then
				sed -i -e "/po\/${i%.po}.po/{N;N;d;}" Pinta.Install.proj || die
			fi
		done
	fi

	eautoreconf

	oldstring=Version=2.0.0.0
	newstring=Version=4.0.0.0
	einfo "updating '$oldstring'->'$newstring'"
	find "${S}" -iname "*.csproj" -print | xargs sed -i "s@${oldstring}@${newstring}@g" || die

	oldstring='ToolsVersion="3.5"'
	newstring='ToolsVersion="4.0"'
	einfo "updating '$oldstring'->'$newstring'"
	find "${S}" -iname "*.proj" -print | xargs sed -i "s@${oldstring}@${newstring}@g" || die
}

pkg_preinst() {
	gnome2_icon_savelist
}

pkg_postinst() {
	xdg_desktop_database_update
	xdg_mimeinfo_database_update
	gnome2_icon_cache_update
}

pkg_postrm() {
	xdg_desktop_database_update
	xdg_mimeinfo_database_update
	gnome2_icon_cache_update
}