Lines 45-63
_MESON_ECLASS=1
Link Here
|
45 |
# FIXME: We will need to inherit toolchain-funcs as well to support crossdev. |
45 |
# FIXME: We will need to inherit toolchain-funcs as well to support crossdev. |
46 |
inherit ninja-utils |
46 |
inherit ninja-utils |
47 |
DEPEND=">=dev-util/meson-0.39.1 |
47 |
DEPEND=">=dev-util/meson-0.39.1" |
48 |
>=dev-util/ninja-1.7.2" |
|
|
49 |
# @ECLASS-VARIABLE: BUILD_DIR |
48 |
# @ECLASS-VARIABLE: BUILD_DIR |
50 |
# @DEFAULT_UNSET |
|
|
51 |
# @DESCRIPTION: |
49 |
# @DESCRIPTION: |
52 |
# Build directory, location where all generated files should be placed. |
50 |
# Build directory, location where all generated files should be placed. |
53 |
# If this isn't set, it defaults to ${WORKDIR}/${P}-build. |
51 |
# If this isn't set, it defaults to ${WORKDIR}/${P}-build. |
54 |
# @ECLASS-VARIABLE: EMESON_SOURCE |
52 |
# @ECLASS-VARIABLE: EMESON_SOURCE |
55 |
# @DEFAULT_UNSET |
|
|
56 |
# @DESCRIPTION: |
53 |
# @DESCRIPTION: |
57 |
# The location of the source files for the project;this is the source |
54 |
# The location of the source files for the project; this is the source |
58 |
# directory to pass to meson. |
55 |
# directory to pass to meson. |
59 |
# If this isn't set, it defaults to ${S} |
56 |
# 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 |
64 |
# Optional meson arguments as Bash array; this should be defined before |
68 |
# calling meson_src_configure. |
65 |
# calling meson_src_configure. |
69 |
# create a cross file for meson |
66 |
# Create a cross file for meson |
70 |
# fixme: This function should write a cross file as described at the |
67 |
# fixme: This function should write a cross file as described at the |
71 |
# following url. |
68 |
# following url. |
72 |
# http://mesonbuild.com/Cross-compilation.html |
69 |
# http://mesonbuild.com/Cross-compilation.html |
73 |
# _meson_create_cross_file() { |
70 |
# _meson_create_cross_file() { |
74 |
# touch "${T}"/meson.crossfile |
71 |
# touch "${T}"/meson.crossfile |
75 |
# } |
72 |
# } |
76 |
# @FUNCTION: meson_src_configure |
73 |
# @FUNCTION: meson_src_configure |
77 |
# @DESCRIPTION: |
74 |
# @DESCRIPTION: |
78 |
# this is the meson_src_configure function |
75 |
# This is the meson_src_configure function |
79 |
meson_src_configure() { |
76 |
meson_src_configure() { |
80 |
debug-print-function ${FUNCNAME} "$@" |
77 |
debug-print-function ${FUNCNAME} "$@" |
Lines 86-92
meson_src_configure() {
Link Here
|
86 |
--buildtype plain |
83 |
--buildtype plain |
87 |
--libdir "$(get_libdir)" |
84 |
--libdir "$(get_libdir)" |
88 |
--localstatedir "${EPREFIX}/var/lib" |
85 |
--localstatedir "${EPREFIX}/var/lib" |
89 |
--prefix "${EPREFIX}"/usr |
86 |
--prefix "${EPREFIX}/usr" |
90 |
--sysconfdir "${EPREFIX}/etc" |
87 |
--sysconfdir "${EPREFIX}/etc" |
91 |
) |
88 |
) |
Lines 114-138
meson_src_configure() {
Link Here
|
114 |
meson_src_compile() { |
111 |
meson_src_compile() { |
115 |
debug-print-function ${FUNCNAME} "$@" |
112 |
debug-print-function ${FUNCNAME} "$@" |
116 |
eninja -v -C "${BUILD_DIR}" |
113 |
eninja -C "${BUILD_DIR}" |
117 |
} |
114 |
} |
118 |
# @FUNCTION: meson_src_test |
115 |
# @FUNCTION: meson_src_test |
119 |
# @DESCRIPTION: |
116 |
# @DESCRIPTION: |
120 |
# this is the meson_src_test function. |
117 |
# This is the meson_src_test function. |
121 |
meson_src_test() { |
118 |
meson_src_test() { |
122 |
debug-print-function ${FUNCNAME} "$@" |
119 |
debug-print-function ${FUNCNAME} "$@" |
123 |
eninja -v -C "${BUILD_DIR}" test |
120 |
eninja -C "${BUILD_DIR}" test |
124 |
} |
121 |
} |
125 |
# @FUNCTION: meson_src_install |
122 |
# @FUNCTION: meson_src_install |
126 |
# @DESCRIPTION: |
123 |
# @DESCRIPTION: |
127 |
# this is the meson_src_install function. |
124 |
# This is the meson_src_install function. |
128 |
meson_src_install() { |
125 |
meson_src_install() { |
129 |
debug-print-function ${FUNCNAME} "$@" |
126 |
debug-print-function ${FUNCNAME} "$@" |
130 |
DESTDIR="${D}" eninja -v -C "${BUILD_DIR}" install |
127 |
DESTDIR="${D}" eninja -C "${BUILD_DIR}" install |
|
|
128 |
einstalldocs |
131 |
} |
129 |
} |
132 |
fi |
130 |
fi |