Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 619178 | Differences between
and this patch

Collapse All | Expand All

(-)a/eclass/meson.eclass (-13 / +19 lines)
Lines 37-50 case ${EAPI:-0} in Link Here
37
	*) die "EAPI=${EAPI} is not supported" ;;
37
	*) die "EAPI=${EAPI} is not supported" ;;
38
esac
38
esac
39
EXPORT_FUNCTIONS src_configure src_compile src_test src_install
40
41
if [[ -z ${_MESON_ECLASS} ]]; then
39
if [[ -z ${_MESON_ECLASS} ]]; then
42
_MESON_ECLASS=1
43
# FIXME: We will need to inherit toolchain-funcs as well to support crossdev.
40
# FIXME: We will need to inherit toolchain-funcs as well to support crossdev.
44
inherit ninja-utils
41
inherit ninja-utils
42
fi
43
44
EXPORT_FUNCTIONS src_configure src_compile src_test src_install
45
46
if [[ -z ${_MESON_ECLASS} ]]; then
47
45
DEPEND=">=dev-util/meson-0.39.1
48
DEPEND=">=dev-util/meson-0.39.1
46
	>=dev-util/ninja-1.7.2"
49
	>=dev-util/ninja-1.7.2"
Lines 57-63 DEPEND=">=dev-util/meson-0.39.1 Link Here
57
# @ECLASS-VARIABLE: EMESON_SOURCE
60
# @ECLASS-VARIABLE: EMESON_SOURCE
58
# @DEFAULT_UNSET
61
# @DEFAULT_UNSET
59
# @DESCRIPTION:
62
# @DESCRIPTION:
60
# The location of the source files for the project;this is the source
63
# The location of the source files for the project; this is the source
61
# directory to pass to meson.
64
# directory to pass to meson.
62
# If this isn't set, it defaults to ${S}
65
# If this isn't set, it defaults to ${S}
Lines 67-83 DEPEND=">=dev-util/meson-0.39.1 Link Here
67
# Optional meson arguments as Bash array; this should be defined before
70
# Optional meson arguments as Bash array; this should be defined before
68
# calling meson_src_configure.
71
# calling meson_src_configure.
69
# create a cross file for meson
72
# Create a cross file for meson
70
# fixme: This function should write a cross file as described at the
73
# fixme: This function should write a cross file as described at the
71
# following url.
74
# following url.
72
#	http://mesonbuild.com/Cross-compilation.html
75
# http://mesonbuild.com/Cross-compilation.html
73
# _meson_create_cross_file() {
76
# _meson_create_cross_file() {
74
#	touch "${T}"/meson.crossfile
77
#	touch "${T}"/meson.crossfile
75
# }
78
# }
76
# @FUNCTION: meson_src_configure
79
# @FUNCTION: meson_src_configure
77
# @DESCRIPTION:
80
# @DESCRIPTION:
78
# this is the meson_src_configure function
81
# This is the meson_src_configure function
79
meson_src_configure() {
82
meson_src_configure() {
80
	debug-print-function ${FUNCNAME} "$@"
83
	debug-print-function ${FUNCNAME} "$@"
Lines 86-92 meson_src_configure() { Link Here
86
		--buildtype plain
89
		--buildtype plain
87
		--libdir "$(get_libdir)"
90
		--libdir "$(get_libdir)"
88
		--localstatedir "${EPREFIX}/var/lib"
91
		--localstatedir "${EPREFIX}/var/lib"
89
		--prefix "${EPREFIX}"/usr
92
		--prefix "${EPREFIX}/usr"
90
		--sysconfdir "${EPREFIX}/etc"
93
		--sysconfdir "${EPREFIX}/etc"
91
		)
94
		)
Lines 114-138 meson_src_configure() { Link Here
114
meson_src_compile() {
117
meson_src_compile() {
115
	debug-print-function ${FUNCNAME} "$@"
118
	debug-print-function ${FUNCNAME} "$@"
116
	eninja -v -C "${BUILD_DIR}"
119
	eninja -C "${BUILD_DIR}"
117
}
120
}
118
# @FUNCTION: meson_src_test
121
# @FUNCTION: meson_src_test
119
# @DESCRIPTION:
122
# @DESCRIPTION:
120
# this is the meson_src_test function.
123
# This is the meson_src_test function.
121
meson_src_test() {
124
meson_src_test() {
122
	debug-print-function ${FUNCNAME} "$@"
125
	debug-print-function ${FUNCNAME} "$@"
123
	eninja -v -C "${BUILD_DIR}" test
126
	eninja -C "${BUILD_DIR}" test
124
}
127
}
125
# @FUNCTION: meson_src_install
128
# @FUNCTION: meson_src_install
126
# @DESCRIPTION:
129
# @DESCRIPTION:
127
# this is the meson_src_install function.
130
# This is the meson_src_install function.
128
meson_src_install() {
131
meson_src_install() {
129
	debug-print-function ${FUNCNAME} "$@"
132
	debug-print-function ${FUNCNAME} "$@"
130
	DESTDIR="${D}" eninja -v -C "${BUILD_DIR}" install
133
	DESTDIR="${D}" eninja -C "${BUILD_DIR}" install
134
	einstalldocs
131
}
135
}
136
_MESON_ECLASS=1
137
132
fi
138
fi

Return to bug 619178