summaryrefslogtreecommitdiff
path: root/x11-themes/neutral-xcursors/neutral-xcursors-20150106.ebuild
blob: 53d70127368f6fc17b14562d069fd7f0399e3313 (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

NEUTRAL_PN="Neutral"
NEUTRAL_PV="1.13a"		# 2006-03-06
NEUTRAL_P="${NEUTRAL_PN}-${NEUTRAL_PV}"

PLUS_PN="Neutral_Plus"
PLUS_PV="1.2"			# 2007-06-23
PLUS_P="${PLUS_PN}-${PLUS_PV}"

PLUSPLUS_PN="Neutral++"
PLUSPLUS_PV="1.0.3"		# 2015-01-06
PLUSPLUS_P="${PLUSPLUS_PN}-${PLUSPLUS_PV}"

WHITE_PN="Neutral++_White"
WHITE_PV="1.1.1"		# 2015-01-06
WHITE_P="${WHITE_PN}-${WHITE_PV}"

inherit gnome2-utils vcs-snapshot

DESCRIPTION="A family of smoothed and shadowed cursors that resemble the standard X ones"
HOMEPAGE="
	https://opendesktop.org/content/show.php/Neutral?content=28310
	https://opendesktop.org/content/show.php/Neutral+Plus?content=48837
	https://opendesktop.org/content/show.php/Neutral%2B%2B?content=108142
	https://opendesktop.org/content/show.php/Neutral%2B%2B+White?content=108143
"
# Neutral++{,_White} URIs return tar.xz archives that are actually tar.bz2.
SRC_URI="
	https://opendesktop.org/CONTENT/content-files/28310-neutral-${NEUTRAL_PV}.tar.gz -> ${NEUTRAL_P}.tar.gz
	https://opendesktop.org/CONTENT/content-files/48837-Neutral_Plus_${PLUS_PV}.tar.bz2 -> ${PLUS_P}.tar.bz2
	https://opendesktop.org/CONTENT/content-files/108142-Neutral++-${PLUSPLUS_PV}.tar.xz -> ${PLUSPLUS_P}.tar.bz2
	https://opendesktop.org/CONTENT/content-files/108143-Neutral++_White-${WHITE_PV}.tar.xz -> ${WHITE_P}.tar.bz2
"

LICENSE="Artistic-2"
SLOT="0"
KEYWORDS="amd64 arm ~arm64 sparc x86 ~x86-fbsd"
IUSE=""

DEPEND="x11-apps/xcursorgen"

RESTRICT="binchecks strip"

S="${WORKDIR}"

src_prepare() {
	default_src_prepare
	sed -i -e 's|neutral|Neutral|g' ${NEUTRAL_P}/index.theme || die
	mkdir -p ${PLUS_P}/source/cursors || die
}

src_compile() {
	local cursor_dir
	for cursor_dir in ${NEUTRAL_P} ${PLUS_P} ${PLUSPLUS_P} ${WHITE_P}; do
		pushd ${cursor_dir}/source > /dev/null || die
			sh make.sh || die
		popd > /dev/null || die
	done
}

src_install() {
	pushd ${NEUTRAL_P} > /dev/null || die
		insinto /usr/share/icons/${NEUTRAL_PN}
		doins -r index.theme source/cursors/
	popd > /dev/null || die

	pushd ${PLUS_P} > /dev/null || die
		insinto /usr/share/icons/${PLUS_PN}
		# Upstream ships an invalid (as per freedesktop.org) index.theme.
		# See https://www.freedesktop.org/wiki/Specifications/icon-theme-spec/
		doins -r "${FILESDIR}/index.theme" source/cursors/
	popd > /dev/null || die

	pushd ${PLUSPLUS_P} > /dev/null || die
		insinto /usr/share/icons/${PLUSPLUS_PN}
		doins -r index.theme cursors/
	popd > /dev/null || die

	pushd ${WHITE_P} > /dev/null || die
		insinto /usr/share/icons/${WHITE_PN}
		doins -r index.theme cursors/
	popd > /dev/null || die
}

pkg_preinst() {
	gnome2_icon_savelist
}

pkg_postinst() {
	gnome2_icon_cache_update
}

pkg_postrm() {
	gnome2_icon_cache_update
}