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