Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 701104
Collapse All | Expand All

(-)mypaint-1.2.1-r3.ebuild (-34 / +37 lines)
Lines 1-70 Link Here
1
# Copyright 1999-2019 Gentoo Authors
1
# Copyright 1999-2019 Gentoo Authors
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
3
4
EAPI=6
4
EAPI=7
5
PYTHON_COMPAT=( python2_7 )
5
PYTHON_COMPAT=( python2_7 python3_{6,7} )
6
DISTUTILS_SINGLE_IMPL=yes
6
7
7
inherit flag-o-matic gnome2-utils scons-utils toolchain-funcs python-single-r1 xdg
8
inherit flag-o-matic gnome2-utils toolchain-funcs distutils-r1 xdg
8
9
9
DESCRIPTION="fast and easy graphics application for digital painters"
10
DESCRIPTION="fast and easy graphics application for digital painters"
10
HOMEPAGE="http://mypaint.org/"
11
HOMEPAGE="http://mypaint.org/"
11
SRC_URI="https://github.com/mypaint/${PN}/releases/download/v${PV}/${P}.tar.xz"
12
12
13
LICENSE="GPL-2"
13
if [[ ${PV} != ${PV/beta/} ]] || [[ ${PV} != ${PV/alpha/} ]]; then
14
	MYPAINT_PV=$( ver_rs 3 - 4 .)
15
else
16
	MYPAINT_PV=${PV}
17
fi
18
19
SRC_URI="https://github.com/${PN}/${PN}/archive/v${MYPAINT_PV}.tar.gz
20
	->
21
	${P}.tar.gz"
22
23
LICENSE="CC0-1.0 GPL-2 GPL-2+ GPL-3 CC-BY-3.0"
14
SLOT="0"
24
SLOT="0"
15
KEYWORDS="amd64 x86"
25
KEYWORDS="~amd64 ~x86"
16
26
17
IUSE=""
27
IUSE=""
18
REQUIRED_USE=${PYTHON_REQUIRED_USE}
28
REQUIRED_USE=${PYTHON_REQUIRED_USE}
19
29
20
LANGS="cs de en_CA en_GB es fr hu id it ja ko nb nn_NO pl pt_BR ro ru sl sv uk zh_CN zh_TW"
30
LANGS="	af ar as ast az be bg bn br brx bs ca ca@valencia ckb cs csb da de dz el
31
	en_CA en_GB eo es et eu fa fi fr fy ga gl gu he hi hr hu hy id is it ja
32
	ka kab kk kn ko lt lv mai ml mn mr ms nb nl nn_NO oc pa pl pt pt_BR ro
33
	ru se sk sl sq sr sr@latin sv ta te tg th tr uk uz vi wa zh_CN zh_HK
34
	zh_TW"
21
35
22
RDEPEND="${PYTHON_DEPS}
36
RDEPEND="${PYTHON_DEPS}
23
	dev-python/pygobject:3[${PYTHON_USEDEP}]
37
	dev-python/pygobject:3[${PYTHON_USEDEP}]
24
	dev-python/numpy[${PYTHON_USEDEP}]
38
	dev-python/numpy[${PYTHON_USEDEP}]
25
	>=dev-python/pycairo-1.4[${PYTHON_USEDEP}]
39
	>=dev-python/pycairo-1.4[${PYTHON_USEDEP}]
26
	dev-python/protobuf-python[${PYTHON_USEDEP}]
40
	dev-python/protobuf-python[${PYTHON_USEDEP}]
27
	>=dev-libs/json-c-0.11:=
41
	>=dev-libs/json-c-0.11:=
28
	media-libs/lcms:2
42
	media-libs/lcms:2
29
	>=media-libs/libmypaint-1.3.0
43
	media-libs/libmypaint:2.0
44
	media-gfx/mypaint-brushes:2.0
30
	media-libs/libpng:0=
45
	media-libs/libpng:0=
31
	gnome-base/librsvg
46
	gnome-base/librsvg
32
	sys-libs/libomp
47
	sys-libs/libomp
33
	x11-libs/gtk+:3
48
	x11-libs/gtk+:3
34
"
49
	"
50
35
DEPEND="${RDEPEND}
51
DEPEND="${RDEPEND}
36
	dev-lang/swig
52
	dev-lang/swig
37
	virtual/pkgconfig
53
	virtual/pkgconfig
38
"
54
	"
39
55
S=${WORKDIR}/${PN}-${MYPAINT_PV}
40
pkg_setup() {
41
	python-single-r1_pkg_setup
42
}
43
56
44
src_compile() {
57
src_prepare() {
45
	# Workaround scons bug with locales. Bug #352700
58
	distutils-r1_src_prepare
46
	export LANG="en_US.UTF-8"
59
	sed -i "s|lib/mypaint|$(get_libdir)/mypaint|g" mypaint.py
47
	tc-export CC CXX
60
	sed -i "s|'lib', 'mypaint'|'$(get_libdir)', 'mypaint'|" mypaint.py
48
	strip-flags  # scons upstream issue #3017
49
	escons
50
}
61
}
51
62
52
src_install () {
63
src_install() {
53
	escons prefix="${D}/usr" install
64
	distutils-r1_src_install
54
	newicon pixmaps/${PN}_logo.png ${PN}.png
65
	if [[ "$(get_libdir)" != "lib" ]]; then
55
	for x in ${LANGS}; do
66
		einfo "Moving /usr/lib to /usr/$(get_libdir)"
56
		if ! has ${x} ${LINGUAS}; then
67
		mv "${D}/usr/lib" "${D}/usr/$(get_libdir)" || die '${D}/usr/lib doesn''t exist?'
57
			rm -rf "${ED}"/usr/share/locale/${x} || die
68
	fi
58
		fi
59
	done
60
61
	python_optimize "${D}"usr/share/${PN}
62
	# not used and broken
63
	rm -r "${ED}"/usr/{include/,lib/libmypaint.a,lib/pkgconfig/} || die
64
	# already provided by system-libmypaint
65
	rm "${ED}"/usr/share/locale/*/LC_MESSAGES/libmypaint* || die
66
}
69
}
67
70
68
pkg_preinst() {
71
pkg_preinst() {
69
	xdg_pkg_preinst
72
	xdg_pkg_preinst
70
	gnome2_icon_savelist
73
	gnome2_icon_savelist

Return to bug 701104