summaryrefslogtreecommitdiff
blob: 3d8b7f9ee468eba982a56bf2d78c0bfa69d245f9 (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-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3_{8..11} )

inherit python-any-r1 toolchain-funcs

MY_PV=${PV/_beta/-beta.}
MY_P=${PN}-${MY_PV}

DESCRIPTION="Library for making brushstrokes"
HOMEPAGE="https://github.com/mypaint/libmypaint"
SRC_URI="https://github.com/mypaint/libmypaint/releases/download/v${MY_PV}/${MY_P}.tar.xz"
S="${WORKDIR}/${MY_P}"

LICENSE="ISC"
# See https://github.com/mypaint/libmypaint/releases/tag/v1.6.1
# https://github.com/mypaint/libmypaint/compare/v1.6.0...v1.6.1
SLOT="0/0.0.0"
KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~loong ~ppc ppc64 ~riscv x86"
IUSE="gegl introspection nls openmp"

BDEPEND="
	${PYTHON_DEPS}
	nls? ( dev-util/intltool )
"
DEPEND="
	dev-libs/glib:2
	dev-libs/json-c:=
	gegl? (
		media-libs/babl[introspection?]
		>=media-libs/gegl-0.4.14:0.4[introspection?]
	)
	introspection? ( >=dev-libs/gobject-introspection-1.32 )
	nls? ( sys-devel/gettext )
"
RDEPEND="
	${DEPEND}
	!<media-gfx/mypaint-1.2.1
"

pkg_pretend() {
	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
}

pkg_setup() {
	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp

	python-any-r1_pkg_setup
}

src_configure() {
	tc-ld-disable-gold # bug 589266

	econf \
		--disable-debug \
		--disable-docs \
		$(use_enable gegl) \
		--disable-gperftools \
		$(use_enable nls i18n) \
		$(use_enable introspection) \
		$(use_enable openmp) \
		--disable-profiling
}

src_install() {
	default
	find "${ED}" -name '*.la' -type f -delete || die
}