summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>2017-11-17 14:12:02 +0200
committerArmin Kuster <akuster808@gmail.com>2018-01-16 21:41:26 -0800
commit8cef6b38e62e6c79ec857510df454cefc868b0df (patch)
treeb1848cb7b677e05f9cde97451d0c92337ad023c2 /meta-oe
parentfb08dfed3eda0511660ff28bd23cf30e0e378705 (diff)
downloadmeta-openembedded-8cef6b38e62e6c79ec857510df454cefc868b0df.tar.gz
meson: remove recipe and class
They have been moved to oe-core layer, as meson is increasingly the primary build system for many projects, particularly in the Gnome stack. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/classes/meson.bbclass106
-rw-r--r--meta-oe/recipes-devtools/meson/meson/native_bindir.patch71
-rw-r--r--meta-oe/recipes-devtools/meson/meson_0.40.1.bb20
3 files changed, 0 insertions, 197 deletions
diff --git a/meta-oe/classes/meson.bbclass b/meta-oe/classes/meson.bbclass
deleted file mode 100644
index a09bc240d..000000000
--- a/meta-oe/classes/meson.bbclass
+++ /dev/null
@@ -1,106 +0,0 @@
1inherit python3native
2
3DEPENDS_append = " meson-native ninja-native"
4
5# As Meson enforces out-of-tree builds we can just use cleandirs
6B = "${WORKDIR}/build"
7do_configure[cleandirs] = "${B}"
8
9# Where the meson.build build configuration is
10MESON_SOURCEPATH = "${S}"
11
12# These variables in the environment override the *native* tools, not the cross.
13export CPPFLAGS = "${BUILD_CPPFLAGS}"
14export CC = "${BUILD_CC}"
15export CFLAGS = "${BUILD_CFLAGS}"
16export CXX = "${BUILD_CXX}"
17export CXXFLAGS = "${BUILD_CXXFLAGS}"
18export LD = "${BUILD_LD}"
19export LDFLAGS = "${BUILD_LDFLAGS}"
20export AR = "${BUILD_AR}"
21export PKG_CONFIG = "pkg-config-native"
22
23def noprefix(var, d):
24 return d.getVar(var, True).replace(d.getVar('prefix', True) + '/', '', 1)
25
26MESONOPTS = " --prefix ${prefix} \
27 --bindir ${@noprefix('bindir', d)} \
28 --sbindir ${@noprefix('sbindir', d)} \
29 --datadir ${@noprefix('datadir', d)} \
30 --libdir ${@noprefix('libdir', d)} \
31 --libexecdir ${@noprefix('libexecdir', d)} \
32 --includedir ${@noprefix('includedir', d)} \
33 --mandir ${@noprefix('mandir', d)} \
34 --infodir ${@noprefix('infodir', d)} \
35 --sysconfdir ${sysconfdir} \
36 --localstatedir ${localstatedir} \
37 --sharedstatedir ${sharedstatedir}"
38
39MESON_C_ARGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS}"
40MESON_LINK_ARGS = "${MESON_C_ARGS} ${LDFLAGS}"
41
42MESON_HOST_ENDIAN = "${@bb.utils.contains('SITEINFO_ENDIANNESS', 'be', 'big', 'little', d)}"
43MESON_TARGET_ENDIAN = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', 'big', 'little', d)}"
44
45EXTRA_OEMESON += "${PACKAGECONFIG_CONFARGS}"
46
47MESON_CROSS_FILE = ""
48MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
49
50def meson_array(var, d):
51 return "', '".join(d.getVar(var, True).split()).join(("'", "'"))
52
53addtask write_config before do_configure
54do_write_config[vardeps] += "MESON_C_ARGS TOOLCHAIN_OPTIONS"
55do_write_config() {
56 # This needs to be Py to split the args into single-element lists
57 cat >${WORKDIR}/meson.cross <<EOF
58[binaries]
59c = '${HOST_PREFIX}gcc'
60cpp = '${HOST_PREFIX}g++'
61ar = '${HOST_PREFIX}ar'
62ld = '${HOST_PREFIX}ld'
63strip = '${HOST_PREFIX}strip'
64readelf = '${HOST_PREFIX}readelf'
65pkgconfig = 'pkg-config'
66
67[properties]
68needs_exe_wrapper = true
69c_args = [${@meson_array('MESON_C_ARGS', d)}]
70c_link_args = [${@meson_array('MESON_LINK_ARGS', d)}]
71cpp_args = [${@meson_array('MESON_C_ARGS', d)}]
72cpp_link_args = [${@meson_array('MESON_LINK_ARGS', d)}]
73
74[host_machine]
75system = '${HOST_OS}'
76cpu_family = '${HOST_ARCH}'
77cpu = '${HOST_ARCH}'
78endian = '${MESON_HOST_ENDIAN}'
79
80[target_machine]
81system = '${TARGET_OS}'
82cpu_family = '${TARGET_ARCH}'
83cpu = '${TARGET_ARCH}'
84endian = '${MESON_TARGET_ENDIAN}'
85EOF
86}
87
88CONFIGURE_FILES = "meson.build"
89
90meson_do_configure() {
91 if ! meson ${MESONOPTS} "${MESON_SOURCEPATH}" "${B}" ${MESON_CROSS_FILE} ${EXTRA_OEMESON}; then
92 cat ${B}/meson-logs/meson-log.txt
93 bbfatal_log meson failed
94 fi
95}
96
97do_compile[progress] = "outof:^\[(\d+)/(\d+)\]\s+"
98meson_do_compile() {
99 ninja ${PARALLEL_MAKE}
100}
101
102meson_do_install() {
103 DESTDIR='${D}' ninja ${PARALLEL_MAKEINST} install
104}
105
106EXPORT_FUNCTIONS do_configure do_compile do_install
diff --git a/meta-oe/recipes-devtools/meson/meson/native_bindir.patch b/meta-oe/recipes-devtools/meson/meson/native_bindir.patch
deleted file mode 100644
index 993e9750e..000000000
--- a/meta-oe/recipes-devtools/meson/meson/native_bindir.patch
+++ /dev/null
@@ -1,71 +0,0 @@
1There are some discussions upstream to merge this patch, but I presonaly believe
2that is is OE only. https://github.com/mesonbuild/meson/issues/1849#issuecomment-303730323
3
4Upstream-Status: Inappropriate [OE specific]
5Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
6diff --git a/mesonbuild/dependencies.py b/mesonbuild/dependencies.py
7index 04a22f985941..3e33bc4a79e7 100644
8--- a/mesonbuild/dependencies.py
9+++ b/mesonbuild/dependencies.py
10@@ -95,7 +95,7 @@ class Dependency:
11 def need_threads(self):
12 return False
13
14- def get_pkgconfig_variable(self, variable_name):
15+ def get_pkgconfig_variable(self, variable_name, use_native=False):
16 raise MesonException('Tried to get a pkg-config variable from a non-pkgconfig dependency.')
17
18 class InternalDependency(Dependency):
19@@ -224,8 +224,12 @@ class PkgConfigDependency(Dependency):
20 return s.format(self.__class__.__name__, self.name, self.is_found,
21 self.version_reqs)
22
23- def _call_pkgbin(self, args):
24- p, out = Popen_safe([self.pkgbin] + args, env=os.environ)[0:2]
25+ def _call_pkgbin(self, args, use_native=False):
26+ if use_native:
27+ pkgbin = [self.pkgbin + "-native"]
28+ else:
29+ pkgbin = [self.pkgbin]
30+ p, out = Popen_safe(pkgbin + args, env=os.environ)[0:2]
31 return p.returncode, out.strip()
32
33 def _set_cargs(self):
34@@ -259,8 +263,8 @@ class PkgConfigDependency(Dependency):
35 self.is_libtool = True
36 self.libs.append(lib)
37
38- def get_pkgconfig_variable(self, variable_name):
39- ret, out = self._call_pkgbin(['--variable=' + variable_name, self.name])
40+ def get_pkgconfig_variable(self, variable_name, use_native=False):
41+ ret, out = self._call_pkgbin(['--variable=' + variable_name, self.name], use_native=use_native)
42 variable = ''
43 if ret != 0:
44 if self.required:
45@@ -1091,7 +1095,7 @@ class QtBaseDependency(Dependency):
46 self.bindir = self.get_pkgconfig_host_bins(core)
47 if not self.bindir:
48 # If exec_prefix is not defined, the pkg-config file is broken
49- prefix = core.get_pkgconfig_variable('exec_prefix')
50+ prefix = core.get_pkgconfig_variable('exec_prefix', use_native=True)
51 if prefix:
52 self.bindir = os.path.join(prefix, 'bin')
53
54@@ -1202,7 +1206,7 @@ class Qt5Dependency(QtBaseDependency):
55 QtBaseDependency.__init__(self, 'qt5', env, kwargs)
56
57 def get_pkgconfig_host_bins(self, core):
58- return core.get_pkgconfig_variable('host_bins')
59+ return core.get_pkgconfig_variable('host_bins', use_native=True)
60
61 class Qt4Dependency(QtBaseDependency):
62 def __init__(self, env, kwargs):
63@@ -1216,7 +1220,7 @@ class Qt4Dependency(QtBaseDependency):
64 applications = ['moc', 'uic', 'rcc', 'lupdate', 'lrelease']
65 for application in applications:
66 try:
67- return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application))
68+ return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, use_native=True))
69 except MesonException:
70 pass
71
diff --git a/meta-oe/recipes-devtools/meson/meson_0.40.1.bb b/meta-oe/recipes-devtools/meson/meson_0.40.1.bb
deleted file mode 100644
index 14644ba9b..000000000
--- a/meta-oe/recipes-devtools/meson/meson_0.40.1.bb
+++ /dev/null
@@ -1,20 +0,0 @@
1HOMEPAGE = "http://mesonbuild.com"
2SUMMARY = "A high performance build system"
3
4LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
6
7SRC_URI = " \
8 git://github.com/mesonbuild/meson.git \
9 file://native_bindir.patch \
10"
11
12SRCREV = "b25d3e4d3f2b4d37029a507cc089bdde643c6240"
13
14S = "${WORKDIR}/git"
15
16inherit setuptools3
17
18RDEPENDS_${PN} = "ninja python3-core python3-modules"
19
20BBCLASSEXTEND = "native"