summaryrefslogtreecommitdiff
path: root/dev-build/muon/muon-0.3.0.ebuild
blob: 0d59cb98c195780051ac8f8a66d3e8660ee04a87 (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 2022-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit edo meson

MESON_TESTS_HASH=1e565931348f15f3f9b654f46ab4bf5fa009ca4f
MESON_TESTS_DIRNAME="meson-tests-${MESON_TESTS_HASH}"

DESCRIPTION="A meson-compatible build system"
HOMEPAGE="https://muon.build/"
SRC_URI="
	https://muon.build/releases/v${PV}/${PN}-v${PV}.tar.gz
	test? (
		 https://git.sr.ht/~lattis/meson-tests/archive/${MESON_TESTS_HASH}.tar.gz
			-> ${MESON_TESTS_DIRNAME}.tar.gz
	)
"
S="${WORKDIR}/${PN}-v${PV}"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64"
IUSE="+archive +curl +libpkgconf test"

DEPEND="
	curl? ( net-misc/curl )
	archive? ( app-arch/libarchive:= )
	libpkgconf? ( dev-util/pkgconf:= )
"
RDEPEND="${DEPEND}"
BDEPEND="
	app-text/scdoc
"
RESTRICT="!test? ( test )"

PATCHES=(
	"${FILESDIR}/${PN}"-0.3.0-fix-summary-call.patch
)

src_unpack() {
	default

	if use test; then
		edo mv "${WORKDIR}/${MESON_TESTS_DIRNAME}" \
			"${S}"/tests/project/meson-tests
	fi
}

src_prepare() {
	default
}

src_configure() {
	cat >"${T}/program-file.ini" <<-EOF
	[binaries]
	git = 'if this exists youre a bad person'
	EOF
	local emesonargs=(
		--native-file="${T}/program-file.ini"
		$(meson_feature curl libcurl)
		$(meson_feature archive libarchive)
		$(meson_feature libpkgconf)
		-Ddocs=enabled
		-Dtracy=disabled    # not in repos
		-Dsamurai=disabled  # patched version of samurai downloaded via wraps
		-Dreadline=bestline # small vendored dependency
	)
	meson_src_configure
}