summaryrefslogtreecommitdiffstats
path: root/rules/host-meson.make
blob: a12b03652ede4993786fb6127e7ab3fcdd199904 (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
# -*-makefile-*-
#
# Copyright (C) 2017 by Michael Olbrich <m.olbrich@pengutronix.de>
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
HOST_PACKAGES-$(PTXCONF_HOST_MESON) += host-meson

#
# Paths and names
#
HOST_MESON_VERSION	:= 0.51.2
HOST_MESON_MD5		:= d46c4a8e3cfd27f90e2c6fe4a69e574b
HOST_MESON		:= meson-$(HOST_MESON_VERSION)
HOST_MESON_SUFFIX	:= tar.gz
HOST_MESON_URL		:= https://github.com/mesonbuild/meson/releases/download/$(HOST_MESON_VERSION)/$(HOST_MESON).$(HOST_MESON_SUFFIX)
HOST_MESON_SOURCE	:= $(SRCDIR)/$(HOST_MESON).$(HOST_MESON_SUFFIX)
HOST_MESON_DIR		:= $(HOST_BUILDDIR)/$(HOST_MESON)
HOST_MESON_LICENSE	:= Apache-2.0
HOST_MESON_LICENSE_FILES	:= file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

HOST_MESON_CONF_TOOL	:= NO

# ----------------------------------------------------------------------------
# Compile
# ----------------------------------------------------------------------------

$(STATEDIR)/host-meson.compile:
	@$(call targetinfo)
	@$(call world/execute, HOST_MESON, $(SYSTEMPYTHON3) setup.py build)
	@$(call touch)

# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------

# Special dirs to avoid collisions with host-python3
HOST_MESON_INSTALL_OPT	:= \
	install \
	--prefix=/ \
	--install-lib=/lib/meson \
	--install-scripts=/lib/meson \
	--root=$(HOST_MESON_PKGDIR)

$(STATEDIR)/host-meson.install:
	@$(call targetinfo)
	@$(call world/execute, HOST_MESON, \
		$(SYSTEMPYTHON3) setup.py $(HOST_MESON_INSTALL_OPT))
	@mkdir -vp $(HOST_MESON_PKGDIR)/bin
	@ln -svf ../lib/meson/meson $(HOST_MESON_PKGDIR)/bin/meson
	@$(call touch)

$(STATEDIR)/host-meson.install.post: $(PTXDIST_MESON_CROSS_FILE)

# vim: syntax=make