blob: a881eae22d40dfc78ae634824f1afc09c6b9b37f (
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
|
# Copyright 2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
if [[ "${PV}" = 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://git.sr.ht/~yerinalexey/hare-gi"
SLOT="0"
else
SRC_URI="https://git.sr.ht/~yerinalexey/hare-gi/archive/${PV}.tar.gz -> ${P}.tar.gz"
SLOT="0/${PV}"
KEYWORDS="~amd64 ~arm64 ~riscv"
fi
DESCRIPTION="GObject Introspection code generator for Hare"
HOMEPAGE="https://git.sr.ht/~yerinalexey/hare-gi"
LICENSE="MPL-2.0"
IUSE="+gtk3 +gtk4"
REQUIRED_USE="|| ( gtk3 gtk4 )"
DEPEND="
>=dev-lang/hare-0.25.2
>=dev-libs/glib-2.80.5[introspection]
dev-libs/gobject-introspection
dev-libs/atk[introspection]
x11-libs/gdk-pixbuf:2[introspection]
media-libs/harfbuzz[introspection]
x11-libs/pango[introspection]
gtk3? (
x11-libs/gtk+:3[introspection]
)
gtk4? (
gui-libs/gtk:4[introspection]
media-libs/graphene[introspection]
)
"
# hare rather than C
QA_FLAGS_IGNORED="usr/bin/hare-gi"
src_prepare() {
default
sed -i 's;^PREFIX = .*;PREFIX = /usr;' Makefile || die
if ! use gtk3; then
sed -i '/^install: /s;install-gtk3;;' Makefile || die
fi
if ! use gtk4; then
sed -i '/^install: /s;install-gtk4;;' Makefile || die
fi
}
src_compile() {
emake hare-gi
if use gtk3; then
./scripts/generate-gtk3 || die
fi
if use gtk4; then
./scripts/generate-gtk4 || die
fi
touch .gen || die
}
|