* [PATCH 0/7] Introduce meson build system
@ 2017-08-23 17:06 Alexander Kanavin
0 siblings, 0 replies; 14+ messages in thread
From: Alexander Kanavin @ 2017-08-23 17:06 UTC (permalink / raw)
To: openembedded-core
This patch series introduces meson recipe and class (that recipes
should inherit in order to be built with meson).
It also converts a few recipes from autotools to meson to establish
that things basically work. Note that I haven't tackled the bigger
items: gstreamer family of recipes, systed and gdk-pixbuf. I'd like
to request that maintainers of these recipes start looking into
the conversion, based on this patchset.
I also didn't test this super-well; there might well be corner cases
where things break down.
The following changes since commit 5f6945f5031e1a4ca116cc1eccf4c2f9dc228547:
buildhistory.bbclass: add ptest (2017-08-23 14:16:01 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib akanavin/meson
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=akanavin/meson
Alexander Kanavin (7):
meson: add a recipe and class from meta-oe
gnomebase.bbclass: split into autotools and meson versions
gtk-doc.bbclass: add all directories where .so files are found to
library search path
json-glib: convert to meson build
libepoxy: convert to meson build
libinput: convert to meson build
sysprof: convert to meson build
meta/classes/gnomebase-meson.bbclass | 1 +
meta/classes/gnomebase-nobuildsystem.bbclass | 27 +++++
meta/classes/gnomebase.bbclass | 30 +-----
meta/classes/gtk-doc.bbclass | 1 +
meta/classes/meson.bbclass | 103 +++++++++++++++++++
...ix-issues-that-arise-when-cross-compiling.patch | 113 +++++++++++++++++++++
...rospection-determine-g-ir-scanner-and-g-i.patch | 41 ++++++++
meta/recipes-devtools/meson/meson_0.42.0.bb | 18 ++++
...ble-gobject-introspection-when-cross-comp.patch | 32 ++++++
meta/recipes-gnome/json-glib/json-glib_1.2.8.bb | 23 ++++-
meta/recipes-graphics/libepoxy/libepoxy_1.4.3.bb | 6 +-
.../0001-tools-Fix-race-in-autotools-install.patch | 37 -------
meta/recipes-graphics/wayland/libinput_1.8.1.bb | 10 +-
.../sysprof/files/0001-Avoid-building-docs.patch | 42 --------
.../0001-Disable-check-for-polkit-for-UI.patch | 32 ------
...d-anything-in-help-as-it-requires-itstool.patch | 26 +++++
...igure-Add-option-to-enable-disable-polkit.patch | 41 --------
...-not-prepend-the-current-dir-path-to-util.patch | 30 ++++++
meta/recipes-kernel/sysprof/sysprof_3.24.1.bb | 22 ++--
19 files changed, 433 insertions(+), 202 deletions(-)
create mode 100644 meta/classes/gnomebase-meson.bbclass
create mode 100644 meta/classes/gnomebase-nobuildsystem.bbclass
create mode 100644 meta/classes/meson.bbclass
create mode 100644 meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
create mode 100644 meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch
create mode 100644 meta/recipes-devtools/meson/meson_0.42.0.bb
create mode 100644 meta/recipes-gnome/json-glib/json-glib/0001-Do-not-disable-gobject-introspection-when-cross-comp.patch
delete mode 100644 meta/recipes-graphics/wayland/libinput/0001-tools-Fix-race-in-autotools-install.patch
delete mode 100644 meta/recipes-kernel/sysprof/files/0001-Avoid-building-docs.patch
delete mode 100644 meta/recipes-kernel/sysprof/files/0001-Disable-check-for-polkit-for-UI.patch
create mode 100644 meta/recipes-kernel/sysprof/files/0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch
delete mode 100644 meta/recipes-kernel/sysprof/files/0001-configure-Add-option-to-enable-disable-polkit.patch
create mode 100644 meta/recipes-kernel/sysprof/files/0002-Do-not-prepend-the-current-dir-path-to-util.patch
--
2.14.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 0/7] Introduce meson build system
@ 2017-10-12 14:51 Alexander Kanavin
0 siblings, 0 replies; 14+ messages in thread
From: Alexander Kanavin @ 2017-10-12 14:51 UTC (permalink / raw)
To: openembedded-core
NB: this patchset must be applied on top of the recipe update
patchset I sent yesterday.
This patch series introduces meson recipe and class (that recipes
should inherit in order to be built with meson).
It also converts a few recipes from autotools to meson to establish
that things basically work. Note that I haven't tackled the bigger
items: gstreamer family of recipes, systed and gdk-pixbuf. I'd like
to request that maintainers of these recipes start looking into
the conversion, based on this patchset.
I also didn't test this super-well; there might well be corner cases
where things break down.
The following changes since commit 17f8c9f7ce12adb33f9bfdb49f76908fcfe4e65a:
maintainers.inc: add Otavio Salvador for go-dep (2017-10-12 15:55:20 +0300)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib akanavin/meson
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=akanavin/meson
Alexander Kanavin (6):
meson: add a recipe and class from meta-oe
gnomebase.bbclass: split into autotools and meson versions
json-glib: convert to meson build
libepoxy: convert to meson build
libinput: convert to meson build
sysprof: convert to meson build
Jussi Kukkonen (1):
gst-player: Upgrade, rename to gst-examples
meta/classes/gnomebase-meson.bbclass | 1 +
meta/classes/gnomebase-nobuildsystem.bbclass | 27 +++++
meta/classes/gnomebase.bbclass | 30 +-----
meta/classes/meson.bbclass | 103 +++++++++++++++++++
.../packagegroup-core-tools-testapps.bb | 2 +-
...ix-issues-that-arise-when-cross-compiling.patch | 113 +++++++++++++++++++++
...rospection-determine-g-ir-scanner-and-g-i.patch | 41 ++++++++
meta/recipes-devtools/meson/meson_0.43.0.bb | 19 ++++
...ble-gobject-introspection-when-cross-comp.patch | 32 ++++++
meta/recipes-gnome/json-glib/json-glib_1.2.8.bb | 23 ++++-
meta/recipes-graphics/libepoxy/libepoxy_1.4.3.bb | 6 +-
.../0001-Fix-meson-options-default-values.patch | 50 +++++++++
meta/recipes-graphics/wayland/libinput_1.8.3.bb | 13 +--
.../sysprof/files/0001-Avoid-building-docs.patch | 42 --------
.../0001-Disable-check-for-polkit-for-UI.patch | 32 ------
...d-anything-in-help-as-it-requires-itstool.patch | 26 +++++
...igure-Add-option-to-enable-disable-polkit.patch | 41 --------
meta/recipes-kernel/sysprof/sysprof_3.26.1.bb | 23 ++---
.../0001-Make-player-examples-installable.patch | 39 +++++++
.../gst-player.desktop | 0
.../{gst-player_git.bb => gst-examples_git.bb} | 18 ++--
.../packagegroups/packagegroup-core-x11-sato.bb | 2 +-
22 files changed, 504 insertions(+), 179 deletions(-)
create mode 100644 meta/classes/gnomebase-meson.bbclass
create mode 100644 meta/classes/gnomebase-nobuildsystem.bbclass
create mode 100644 meta/classes/meson.bbclass
create mode 100644 meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
create mode 100644 meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch
create mode 100644 meta/recipes-devtools/meson/meson_0.43.0.bb
create mode 100644 meta/recipes-gnome/json-glib/json-glib/0001-Do-not-disable-gobject-introspection-when-cross-comp.patch
create mode 100644 meta/recipes-graphics/wayland/libinput/0001-Fix-meson-options-default-values.patch
delete mode 100644 meta/recipes-kernel/sysprof/files/0001-Avoid-building-docs.patch
delete mode 100644 meta/recipes-kernel/sysprof/files/0001-Disable-check-for-polkit-for-UI.patch
create mode 100644 meta/recipes-kernel/sysprof/files/0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch
delete mode 100644 meta/recipes-kernel/sysprof/files/0001-configure-Add-option-to-enable-disable-polkit.patch
create mode 100644 meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch
rename meta/recipes-multimedia/gstreamer/{gst-player => gst-examples}/gst-player.desktop (100%)
rename meta/recipes-multimedia/gstreamer/{gst-player_git.bb => gst-examples_git.bb} (65%)
--
2.14.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 0/7] Introduce meson build system
@ 2017-11-15 11:08 Alexander Kanavin
2017-11-15 11:08 ` [PATCH 1/7] meson: add a recipe and class from meta-oe Alexander Kanavin
` (6 more replies)
0 siblings, 7 replies; 14+ messages in thread
From: Alexander Kanavin @ 2017-11-15 11:08 UTC (permalink / raw)
To: openembedded-core
This patch series introduces meson recipe and class (that recipes
should inherit in order to be built with meson).
It also converts a few recipes from autotools to meson to establish
that things basically work. Note that I haven't tackled the bigger
items: gstreamer family of recipes, systed and gdk-pixbuf. I'd like
to request that maintainers of these recipes start looking into
the conversion, based on this patchset.
I also didn't test this super-well; there might well be corner cases
where things break down.
The following changes since commit 4ed19ac8c19afd56d445d84e02b622cb056b8359:
poky: Switch to post release name/version (2017-11-14 17:26:58 +0000)
are available in the Git repository at:
git://git.yoctoproject.org/poky-contrib akanavin/meson
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=akanavin/meson
Alexander Kanavin (6):
meson: add a recipe and class from meta-oe
gnomebase.bbclass: split into autotools and meson versions
json-glib: convert to meson build
libepoxy: convert to meson build
libinput: convert to meson build
sysprof: convert to meson build
Jussi Kukkonen (1):
gst-player: Upgrade, rename to gst-examples
meta/classes/gnomebase-meson.bbclass | 1 +
meta/classes/gnomebase-nobuildsystem.bbclass | 27 +++++
meta/classes/gnomebase.bbclass | 30 +-----
meta/classes/meson.bbclass | 103 +++++++++++++++++++
.../packagegroup-core-tools-testapps.bb | 2 +-
...ix-issues-that-arise-when-cross-compiling.patch | 113 +++++++++++++++++++++
...rospection-determine-g-ir-scanner-and-g-i.patch | 41 ++++++++
meta/recipes-devtools/meson/meson_0.43.0.bb | 19 ++++
...ble-gobject-introspection-when-cross-comp.patch | 32 ++++++
meta/recipes-gnome/json-glib/json-glib_1.2.8.bb | 23 ++++-
...sible-to-disable-the-use-of-dlvsym-needed.patch | 55 ++++++++++
meta/recipes-graphics/libepoxy/libepoxy_1.4.3.bb | 12 ++-
.../0001-Fix-meson-options-default-values.patch | 50 +++++++++
meta/recipes-graphics/wayland/libinput_1.8.3.bb | 13 +--
.../sysprof/files/0001-Avoid-building-docs.patch | 42 --------
.../0001-Disable-check-for-polkit-for-UI.patch | 32 ------
...d-anything-in-help-as-it-requires-itstool.patch | 26 +++++
...igure-Add-option-to-enable-disable-polkit.patch | 41 --------
meta/recipes-kernel/sysprof/sysprof_3.26.1.bb | 23 ++---
.../0001-Make-player-examples-installable.patch | 39 +++++++
.../gst-player.desktop | 0
.../{gst-player_git.bb => gst-examples_git.bb} | 18 ++--
.../packagegroups/packagegroup-core-x11-sato.bb | 2 +-
23 files changed, 564 insertions(+), 180 deletions(-)
create mode 100644 meta/classes/gnomebase-meson.bbclass
create mode 100644 meta/classes/gnomebase-nobuildsystem.bbclass
create mode 100644 meta/classes/meson.bbclass
create mode 100644 meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
create mode 100644 meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch
create mode 100644 meta/recipes-devtools/meson/meson_0.43.0.bb
create mode 100644 meta/recipes-gnome/json-glib/json-glib/0001-Do-not-disable-gobject-introspection-when-cross-comp.patch
create mode 100644 meta/recipes-graphics/libepoxy/libepoxy/0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch
create mode 100644 meta/recipes-graphics/wayland/libinput/0001-Fix-meson-options-default-values.patch
delete mode 100644 meta/recipes-kernel/sysprof/files/0001-Avoid-building-docs.patch
delete mode 100644 meta/recipes-kernel/sysprof/files/0001-Disable-check-for-polkit-for-UI.patch
create mode 100644 meta/recipes-kernel/sysprof/files/0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch
delete mode 100644 meta/recipes-kernel/sysprof/files/0001-configure-Add-option-to-enable-disable-polkit.patch
create mode 100644 meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch
rename meta/recipes-multimedia/gstreamer/{gst-player => gst-examples}/gst-player.desktop (100%)
rename meta/recipes-multimedia/gstreamer/{gst-player_git.bb => gst-examples_git.bb} (65%)
--
2.15.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/7] meson: add a recipe and class from meta-oe
2017-11-15 11:08 [PATCH 0/7] Introduce meson build system Alexander Kanavin
@ 2017-11-15 11:08 ` Alexander Kanavin
2017-11-15 11:42 ` Martin Hundebøll
` (2 more replies)
2017-11-15 11:08 ` [PATCH 2/7] gnomebase.bbclass: split into autotools and meson versions Alexander Kanavin
` (5 subsequent siblings)
6 siblings, 3 replies; 14+ messages in thread
From: Alexander Kanavin @ 2017-11-15 11:08 UTC (permalink / raw)
To: openembedded-core
The original recipe has been provided and improved by:
Ross Burton <ross.burton@intel.com>
Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Adam C. Foltzer <acfoltzer@galois.com>
Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Linus Svensson <linussn@axis.com>
I have added a couple patches to fix up gtk-doc and
gobject-introspection in cross-compilation environments.
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
meta/classes/meson.bbclass | 103 +++++++++++++++++++
...ix-issues-that-arise-when-cross-compiling.patch | 113 +++++++++++++++++++++
...rospection-determine-g-ir-scanner-and-g-i.patch | 41 ++++++++
meta/recipes-devtools/meson/meson_0.43.0.bb | 19 ++++
4 files changed, 276 insertions(+)
create mode 100644 meta/classes/meson.bbclass
create mode 100644 meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
create mode 100644 meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch
create mode 100644 meta/recipes-devtools/meson/meson_0.43.0.bb
diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
new file mode 100644
index 00000000000..f6cf24c33a7
--- /dev/null
+++ b/meta/classes/meson.bbclass
@@ -0,0 +1,103 @@
+inherit python3native
+
+DEPENDS_append = " meson-native ninja-native"
+
+# As Meson enforces out-of-tree builds we can just use cleandirs
+B = "${WORKDIR}/build"
+do_configure[cleandirs] = "${B}"
+
+# Where the meson.build build configuration is
+MESON_SOURCEPATH = "${S}"
+
+# These variables in the environment override meson's *native* tools settings.
+# We have to unset them, so that meson doesn't pick up the cross tools and
+# use them for native builds.
+unset CC
+unset CXX
+unset AR
+
+def noprefix(var, d):
+ return d.getVar(var, True).replace(d.getVar('prefix', True) + '/', '', 1)
+
+MESONOPTS = " --prefix ${prefix} \
+ --bindir ${@noprefix('bindir', d)} \
+ --sbindir ${@noprefix('sbindir', d)} \
+ --datadir ${@noprefix('datadir', d)} \
+ --libdir ${@noprefix('libdir', d)} \
+ --libexecdir ${@noprefix('libexecdir', d)} \
+ --includedir ${@noprefix('includedir', d)} \
+ --mandir ${@noprefix('mandir', d)} \
+ --infodir ${@noprefix('infodir', d)} \
+ --sysconfdir ${sysconfdir} \
+ --localstatedir ${localstatedir} \
+ --sharedstatedir ${sharedstatedir}"
+
+MESON_C_ARGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS}"
+MESON_LINK_ARGS = "${MESON_C_ARGS} ${LDFLAGS}"
+
+MESON_HOST_ENDIAN = "${@bb.utils.contains('SITEINFO_ENDIANNESS', 'be', 'big', 'little', d)}"
+MESON_TARGET_ENDIAN = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', 'big', 'little', d)}"
+
+EXTRA_OEMESON += "${PACKAGECONFIG_CONFARGS}"
+
+MESON_CROSS_FILE = ""
+MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
+
+def meson_array(var, d):
+ return "', '".join(d.getVar(var, True).split()).join(("'", "'"))
+
+addtask write_config before do_configure
+do_write_config[vardeps] += "MESON_C_ARGS TOOLCHAIN_OPTIONS"
+do_write_config() {
+ # This needs to be Py to split the args into single-element lists
+ cat >${WORKDIR}/meson.cross <<EOF
+[binaries]
+c = '${HOST_PREFIX}gcc'
+cpp = '${HOST_PREFIX}g++'
+ar = '${HOST_PREFIX}ar'
+ld = '${HOST_PREFIX}ld'
+strip = '${HOST_PREFIX}strip'
+readelf = '${HOST_PREFIX}readelf'
+pkgconfig = 'pkg-config'
+
+[properties]
+needs_exe_wrapper = true
+c_args = [${@meson_array('MESON_C_ARGS', d)}]
+c_link_args = [${@meson_array('MESON_LINK_ARGS', d)}]
+cpp_args = [${@meson_array('MESON_C_ARGS', d)}]
+cpp_link_args = [${@meson_array('MESON_LINK_ARGS', d)}]
+gtkdoc_exe_wrapper = '${B}/gtkdoc-qemuwrapper'
+
+[host_machine]
+system = '${HOST_OS}'
+cpu_family = '${HOST_ARCH}'
+cpu = '${HOST_ARCH}'
+endian = '${MESON_HOST_ENDIAN}'
+
+[target_machine]
+system = '${TARGET_OS}'
+cpu_family = '${TARGET_ARCH}'
+cpu = '${TARGET_ARCH}'
+endian = '${MESON_TARGET_ENDIAN}'
+EOF
+}
+
+CONFIGURE_FILES = "meson.build"
+
+meson_do_configure() {
+ if ! meson ${MESONOPTS} "${MESON_SOURCEPATH}" "${B}" ${MESON_CROSS_FILE} ${EXTRA_OEMESON}; then
+ cat ${B}/meson-logs/meson-log.txt
+ bbfatal_log meson failed
+ fi
+}
+
+do_compile[progress] = "outof:^\[(\d+)/(\d+)\]\s+"
+meson_do_compile() {
+ ninja ${PARALLEL_MAKE}
+}
+
+meson_do_install() {
+ DESTDIR='${D}' ninja ${PARALLEL_MAKEINST} install
+}
+
+EXPORT_FUNCTIONS do_configure do_compile do_install
diff --git a/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch b/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
new file mode 100644
index 00000000000..ca3d7095066
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
@@ -0,0 +1,113 @@
+From 15e054dce6ff11d2cb219c8c09a31b26f0e58b62 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 4 Aug 2017 16:16:41 +0300
+Subject: [PATCH 1/3] gtkdoc: fix issues that arise when cross-compiling
+
+Specifically:
+1) Make it possible to specify a wrapper for executing binaries
+(usually, some kind of target hardware emulator, such as qemu)
+2) Explicitly provide CC and LD via command line, as otherwise gtk-doc will
+try to guess them, incorrectly.
+3) If things break down, print the full command with arguments,
+not just the binary name.
+4) Correctly determine the compiler/linker executables and cross-options when cross-compiling
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ mesonbuild/modules/gnome.py | 18 +++++++++++++++---
+ mesonbuild/scripts/gtkdochelper.py | 9 +++++++--
+ 2 files changed, 22 insertions(+), 5 deletions(-)
+
+diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
+index 6ec7040..4cfaefd 100644
+--- a/mesonbuild/modules/gnome.py
++++ b/mesonbuild/modules/gnome.py
+@@ -713,6 +713,10 @@ class GnomeModule(ExtensionModule):
+ '--mode=' + mode]
+ if namespace:
+ args.append('--namespace=' + namespace)
++ gtkdoc_exe_wrapper = state.environment.cross_info.config["properties"].get('gtkdoc_exe_wrapper', None)
++ if gtkdoc_exe_wrapper is not None:
++ args.append('--gtkdoc-exe-wrapper=' + gtkdoc_exe_wrapper)
++
+ args += self._unpack_args('--htmlargs=', 'html_args', kwargs)
+ args += self._unpack_args('--scanargs=', 'scan_args', kwargs)
+ args += self._unpack_args('--scanobjsargs=', 'scanobjs_args', kwargs)
+@@ -741,14 +745,22 @@ class GnomeModule(ExtensionModule):
+ raise MesonException(
+ 'Gir include dirs should be include_directories().')
+ cflags.update(get_include_args(inc_dirs))
++
++ cross_c_args = " ".join(state.environment.cross_info.config["properties"].get('c_args', ""))
++ cross_link_args = " ".join(state.environment.cross_info.config["properties"].get('c_link_args', ""))
++
+ if cflags:
+- args += ['--cflags=%s' % ' '.join(cflags)]
++ args += ['--cflags=%s %s' % (cross_c_args,' '.join(cflags))]
+ if ldflags:
+- args += ['--ldflags=%s' % ' '.join(ldflags)]
++ args += ['--ldflags=%s %s' % (cross_link_args, ' '.join(ldflags))]
+ compiler = state.environment.coredata.compilers.get('c')
+- if compiler:
++ cross_compiler = state.environment.coredata.cross_compilers.get('c')
++ if compiler and not state.environment.is_cross_build():
+ args += ['--cc=%s' % ' '.join(compiler.get_exelist())]
+ args += ['--ld=%s' % ' '.join(compiler.get_linker_exelist())]
++ elif cross_compiler and state.environment.is_cross_build():
++ args += ['--cc=%s' % ' '.join(cross_compiler.get_exelist())]
++ args += ['--ld=%s' % ' '.join(cross_compiler.get_linker_exelist())]
+
+ return args
+
+diff --git a/mesonbuild/scripts/gtkdochelper.py b/mesonbuild/scripts/gtkdochelper.py
+index a2cbf5a..19331bd 100644
+--- a/mesonbuild/scripts/gtkdochelper.py
++++ b/mesonbuild/scripts/gtkdochelper.py
+@@ -44,13 +44,14 @@ parser.add_argument('--ignore-headers', dest='ignore_headers', default='')
+ parser.add_argument('--namespace', dest='namespace', default='')
+ parser.add_argument('--mode', dest='mode', default='')
+ parser.add_argument('--installdir', dest='install_dir')
++parser.add_argument('--gtkdoc-exe-wrapper', dest='gtkdoc_exe_wrapper')
+
+ def gtkdoc_run_check(cmd, cwd):
+ # Put stderr into stdout since we want to print it out anyway.
+ # This preserves the order of messages.
+ p, out = Popen_safe(cmd, cwd=cwd, stderr=subprocess.STDOUT)[0:2]
+ if p.returncode != 0:
+- err_msg = ["{!r} failed with status {:d}".format(cmd[0], p.returncode)]
++ err_msg = ["{!r} failed with status {:d}".format(cmd, p.returncode)]
+ if out:
+ err_msg.append(out)
+ raise MesonException('\n'.join(err_msg))
+@@ -58,7 +59,7 @@ def gtkdoc_run_check(cmd, cwd):
+ def build_gtkdoc(source_root, build_root, doc_subdir, src_subdirs,
+ main_file, module,
+ html_args, scan_args, fixxref_args, mkdb_args,
+- gobject_typesfile, scanobjs_args, ld, cc, ldflags, cflags,
++ gobject_typesfile, scanobjs_args, gtkdoc_exe_wrapper, ld, cc, ldflags, cflags,
+ html_assets, content_files, ignore_headers, namespace,
+ expand_content_files, mode):
+ print("Building documentation for %s" % module)
+@@ -111,6 +112,9 @@ def build_gtkdoc(source_root, build_root, doc_subdir, src_subdirs,
+ if gobject_typesfile:
+ scanobjs_cmd = ['gtkdoc-scangobj'] + scanobjs_args + ['--types=' + gobject_typesfile,
+ '--module=' + module,
++ '--run=' + gtkdoc_exe_wrapper,
++ '--cc=' + cc,
++ '--ld=' + ld,
+ '--cflags=' + cflags,
+ '--ldflags=' + ldflags]
+
+@@ -206,6 +210,7 @@ def run(args):
+ mkdbargs,
+ options.gobject_typesfile,
+ scanobjsargs,
++ options.gtkdoc_exe_wrapper,
+ options.ld,
+ options.cc,
+ options.ldflags,
+--
+2.14.1
+
diff --git a/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch b/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch
new file mode 100644
index 00000000000..f00b9b2a2d1
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch
@@ -0,0 +1,41 @@
+From 84cb251a33190ec82faeaad321518af4b309c55e Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 4 Aug 2017 16:18:47 +0300
+Subject: [PATCH 2/2] gobject-introspection: determine g-ir-scanner and
+ g-ir-compiler paths from pkgconfig
+
+Do not hardcode the name of those binaries; gobject-introspection
+provides them via pkgconfig, and they can be set to something else
+(for example when cross-compiling).
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ mesonbuild/modules/gnome.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
+index ba7e4cd..00472af 100644
+--- a/mesonbuild/modules/gnome.py
++++ b/mesonbuild/modules/gnome.py
+@@ -380,8 +380,6 @@ class GnomeModule(ExtensionModule):
+ raise MesonException('Gir takes one argument')
+ if kwargs.get('install_dir'):
+ raise MesonException('install_dir is not supported with generate_gir(), see "install_dir_gir" and "install_dir_typelib"')
+- giscanner = find_program('g-ir-scanner', 'Gir')
+- gicompiler = find_program('g-ir-compiler', 'Gir')
+ girtarget = args[0]
+ while hasattr(girtarget, 'held_object'):
+ girtarget = girtarget.held_object
+@@ -392,6 +390,8 @@ class GnomeModule(ExtensionModule):
+ self.gir_dep = PkgConfigDependency('gobject-introspection-1.0',
+ state.environment,
+ {'native': True})
++ giscanner = os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_scanner')
++ gicompiler = os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_compiler')
+ pkgargs = self.gir_dep.get_compile_args()
+ except Exception:
+ raise MesonException('gobject-introspection dependency was not found, gir cannot be generated.')
+--
+2.13.2
+
diff --git a/meta/recipes-devtools/meson/meson_0.43.0.bb b/meta/recipes-devtools/meson/meson_0.43.0.bb
new file mode 100644
index 00000000000..bbb48d9197c
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson_0.43.0.bb
@@ -0,0 +1,19 @@
+HOMEPAGE = "http://mesonbuild.com"
+SUMMARY = "A high performance build system"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/${BP}.tar.gz \
+ file://0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch \
+ file://0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch \
+ "
+SRC_URI[md5sum] = "b0d389cc5937928c2f5114656dc5a99a"
+SRC_URI[sha256sum] = "c513eca90e0d70bf14cd1eaafea2fa91cf40a73326a7ff61f08a005048057340"
+UPSTREAM_CHECK_URI = "https://github.com/mesonbuild/meson/releases"
+
+inherit setuptools3
+
+RDEPENDS_${PN} = "ninja python3-core python3-modules"
+
+BBCLASSEXTEND = "native"
--
2.15.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/7] gnomebase.bbclass: split into autotools and meson versions
2017-11-15 11:08 [PATCH 0/7] Introduce meson build system Alexander Kanavin
2017-11-15 11:08 ` [PATCH 1/7] meson: add a recipe and class from meta-oe Alexander Kanavin
@ 2017-11-15 11:08 ` Alexander Kanavin
2017-11-15 11:08 ` [PATCH 3/7] json-glib: convert to meson build Alexander Kanavin
` (4 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Alexander Kanavin @ 2017-11-15 11:08 UTC (permalink / raw)
To: openembedded-core
gnomebase.bbclass unfortunately hardcodes the autotools inherit,
so we have to introduce gnomebase-nobuildsystem.bbclass where
the common bits between autotools and meson classes can be placed.
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
meta/classes/gnomebase-meson.bbclass | 1 +
meta/classes/gnomebase-nobuildsystem.bbclass | 27 +++++++++++++++++++++++++
meta/classes/gnomebase.bbclass | 30 +---------------------------
3 files changed, 29 insertions(+), 29 deletions(-)
create mode 100644 meta/classes/gnomebase-meson.bbclass
create mode 100644 meta/classes/gnomebase-nobuildsystem.bbclass
diff --git a/meta/classes/gnomebase-meson.bbclass b/meta/classes/gnomebase-meson.bbclass
new file mode 100644
index 00000000000..6cb97397572
--- /dev/null
+++ b/meta/classes/gnomebase-meson.bbclass
@@ -0,0 +1 @@
+inherit meson gnomebase-nobuildsystem
diff --git a/meta/classes/gnomebase-nobuildsystem.bbclass b/meta/classes/gnomebase-nobuildsystem.bbclass
new file mode 100644
index 00000000000..2ea7367a83a
--- /dev/null
+++ b/meta/classes/gnomebase-nobuildsystem.bbclass
@@ -0,0 +1,27 @@
+def gnome_verdir(v):
+ return oe.utils.trim_version(v, 2)
+
+GNOME_COMPRESS_TYPE ?= "xz"
+SECTION ?= "x11/gnome"
+GNOMEBN ?= "${BPN}"
+SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive"
+
+FILES_${PN} += "${datadir}/application-registry \
+ ${datadir}/mime-info \
+ ${datadir}/mime/packages \
+ ${datadir}/mime/application \
+ ${datadir}/gnome-2.0 \
+ ${datadir}/polkit* \
+ ${datadir}/GConf \
+ ${datadir}/glib-2.0/schemas \
+ ${datadir}/appdata \
+ ${datadir}/icons \
+"
+
+FILES_${PN}-doc += "${datadir}/devhelp"
+
+do_install_append() {
+ rm -rf ${D}${localstatedir}/lib/scrollkeeper/*
+ rm -rf ${D}${localstatedir}/scrollkeeper/*
+ rm -f ${D}${datadir}/applications/*.cache
+}
diff --git a/meta/classes/gnomebase.bbclass b/meta/classes/gnomebase.bbclass
index 4ccc8e07814..84756aea1ec 100644
--- a/meta/classes/gnomebase.bbclass
+++ b/meta/classes/gnomebase.bbclass
@@ -1,29 +1 @@
-def gnome_verdir(v):
- return oe.utils.trim_version(v, 2)
-
-GNOME_COMPRESS_TYPE ?= "xz"
-SECTION ?= "x11/gnome"
-GNOMEBN ?= "${BPN}"
-SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive"
-
-FILES_${PN} += "${datadir}/application-registry \
- ${datadir}/mime-info \
- ${datadir}/mime/packages \
- ${datadir}/mime/application \
- ${datadir}/gnome-2.0 \
- ${datadir}/polkit* \
- ${datadir}/GConf \
- ${datadir}/glib-2.0/schemas \
- ${datadir}/appdata \
- ${datadir}/icons \
-"
-
-FILES_${PN}-doc += "${datadir}/devhelp"
-
-inherit autotools pkgconfig
-
-do_install_append() {
- rm -rf ${D}${localstatedir}/lib/scrollkeeper/*
- rm -rf ${D}${localstatedir}/scrollkeeper/*
- rm -f ${D}${datadir}/applications/*.cache
-}
+inherit autotools pkgconfig gnomebase-nobuildsystem
--
2.15.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 3/7] json-glib: convert to meson build
2017-11-15 11:08 [PATCH 0/7] Introduce meson build system Alexander Kanavin
2017-11-15 11:08 ` [PATCH 1/7] meson: add a recipe and class from meta-oe Alexander Kanavin
2017-11-15 11:08 ` [PATCH 2/7] gnomebase.bbclass: split into autotools and meson versions Alexander Kanavin
@ 2017-11-15 11:08 ` Alexander Kanavin
2017-11-15 11:08 ` [PATCH 4/7] libepoxy: " Alexander Kanavin
` (3 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Alexander Kanavin @ 2017-11-15 11:08 UTC (permalink / raw)
To: openembedded-core
Note that meson flags for gobject introspection and gtk-doc
appear to be non-standardized; going forward we should devise
a common way to deal with it.
gettext inherit is removed, as there is no equivalent functionality
in meson; NLS bits are always built and installed.
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
...ble-gobject-introspection-when-cross-comp.patch | 32 ++++++++++++++++++++++
meta/recipes-gnome/json-glib/json-glib_1.2.8.bb | 23 ++++++++++++++--
2 files changed, 53 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-gnome/json-glib/json-glib/0001-Do-not-disable-gobject-introspection-when-cross-comp.patch
diff --git a/meta/recipes-gnome/json-glib/json-glib/0001-Do-not-disable-gobject-introspection-when-cross-comp.patch b/meta/recipes-gnome/json-glib/json-glib/0001-Do-not-disable-gobject-introspection-when-cross-comp.patch
new file mode 100644
index 00000000000..849bb9d3165
--- /dev/null
+++ b/meta/recipes-gnome/json-glib/json-glib/0001-Do-not-disable-gobject-introspection-when-cross-comp.patch
@@ -0,0 +1,32 @@
+From 293452c963188666dae99521294f09a0cf9582e2 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 4 Aug 2017 16:01:11 +0300
+Subject: [PATCH] Do not disable gobject introspection when cross-compiling.
+
+Introspection does work fine for instance in Open Embedded,
+one of the most prominent cross-compilation frameworks
+(through qemu emulating target hardware), so let the user
+decide if he wants the feature or not.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 43cbfd9..8a32f26 100644
+--- a/meson.build
++++ b/meson.build
+@@ -147,7 +147,7 @@ root_dir = include_directories('.')
+
+ gnome = import('gnome')
+ gir = find_program('g-ir-scanner', required: false)
+-build_gir = gir.found() and not meson.is_cross_build() and not get_option('disable_introspection')
++build_gir = gir.found() and not get_option('disable_introspection')
+
+ subdir('json-glib')
+
+--
+2.13.2
+
diff --git a/meta/recipes-gnome/json-glib/json-glib_1.2.8.bb b/meta/recipes-gnome/json-glib/json-glib_1.2.8.bb
index 2c5d3817ba7..bf37015b03f 100644
--- a/meta/recipes-gnome/json-glib/json-glib_1.2.8.bb
+++ b/meta/recipes-gnome/json-glib/json-glib_1.2.8.bb
@@ -10,11 +10,30 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
DEPENDS = "glib-2.0"
+SRC_URI += " \
+ file://0001-Do-not-disable-gobject-introspection-when-cross-comp.patch \
+ "
SRC_URI[archive.md5sum] = "ff31e7d0594df44318e12facda3d086e"
SRC_URI[archive.sha256sum] = "fd55a9037d39e7a10f0db64309f5f0265fa32ec962bf85066087b83a2807f40a"
-inherit gnomebase gettext lib_package gobject-introspection gtk-doc manpages
+inherit gnomebase-meson lib_package gobject-introspection gtk-doc manpages
-PACKAGECONFIG[manpages] = "--enable-man --with-xml-catalog=${STAGING_ETCDIR_NATIVE}/xml/catalog.xml, --disable-man, libxslt-native xmlto-native"
+GTKDOC_ENABLE_FLAG = "-Denable-gtk-doc=true"
+GTKDOC_DISABLE_FLAG = "-Denable-gtk-doc=false"
+
+GI_ENABLE_FLAG = "-Ddisable_introspection=false"
+GI_DISABLE_FLAG = "-Ddisable_introspection=true"
+
+EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_ENABLE_FLAG}', \
+ '${GTKDOC_DISABLE_FLAG}', d)} "
+EXTRA_OEMESON_append_class-target = " ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '${GI_ENABLE_FLAG}', \
+ '${GI_DISABLE_FLAG}', d)} "
+
+PACKAGECONFIG[manpages] = "-Denable-man=true, -Denable-man=false, libxslt-native xmlto-native"
+
+do_install_append() {
+ # FIXME: these need to be provided via ptest
+ rm -rf ${D}${datadir}/installed-tests ${D}${libexecdir}
+}
BBCLASSEXTEND = "native nativesdk"
--
2.15.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 4/7] libepoxy: convert to meson build
2017-11-15 11:08 [PATCH 0/7] Introduce meson build system Alexander Kanavin
` (2 preceding siblings ...)
2017-11-15 11:08 ` [PATCH 3/7] json-glib: convert to meson build Alexander Kanavin
@ 2017-11-15 11:08 ` Alexander Kanavin
2017-11-15 11:08 ` [PATCH 5/7] libinput: " Alexander Kanavin
` (2 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Alexander Kanavin @ 2017-11-15 11:08 UTC (permalink / raw)
To: openembedded-core
Add a patch to work around absence of dlvsym() on musl
(wasn't previously a problem as autotools weren't building tests by default)
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
...sible-to-disable-the-use-of-dlvsym-needed.patch | 55 ++++++++++++++++++++++
meta/recipes-graphics/libepoxy/libepoxy_1.4.3.bb | 12 +++--
2 files changed, 63 insertions(+), 4 deletions(-)
create mode 100644 meta/recipes-graphics/libepoxy/libepoxy/0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch
diff --git a/meta/recipes-graphics/libepoxy/libepoxy/0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch b/meta/recipes-graphics/libepoxy/libepoxy/0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch
new file mode 100644
index 00000000000..c2a2fa34535
--- /dev/null
+++ b/meta/recipes-graphics/libepoxy/libepoxy/0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch
@@ -0,0 +1,55 @@
+From 7bcefd311cd696955376fe2c5298ec85e8f954ce Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 15 Nov 2017 12:48:27 +0200
+Subject: [PATCH] Make it possible to disable the use of dlvsym() (needed for
+ musl)
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ meson_options.txt | 3 +++
+ test/meson.build | 6 +++---
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/meson_options.txt b/meson_options.txt
+index 244476a..071f0b6 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,6 +1,9 @@
+ option('enable-docs',
+ type: 'boolean', value: false,
+ description: 'Enable generating the Epoxy API reference (depends on Doxygen)')
++option('has-dlvsym',
++ type: 'boolean', value: true,
++ description: 'Whether dlvsym() is available (it is not when using musl C library)')
+ option('enable-glx',
+ type: 'combo',
+ choices: [ 'auto', 'yes', 'no' ],
+diff --git a/test/meson.build b/test/meson.build
+index 2340fc6..bc4330b 100644
+--- a/test/meson.build
++++ b/test/meson.build
+@@ -86,8 +86,8 @@ if build_glx
+ [ 'glx_has_extension_nocontext', [ 'glx_has_extension_nocontext.c' ], [], [], true ],
+ [ 'glx_static', [ 'glx_static.c' ], [ '-DNEEDS_TO_BE_STATIC'], [ '-static' ], libtype == 'static' ],
+ [ 'glx_shared_znow', [ 'glx_static.c', ], [], [ '-Wl,-z,now' ], has_znow ],
+- [ 'glx_alias_prefer_same_name', [ 'glx_alias_prefer_same_name.c', 'dlwrap.c', 'dlwrap.h' ], [], [ '-rdynamic' ], not build_apple ],
+- [ 'glx_gles2', [ 'glx_gles2.c', 'dlwrap.c', 'dlwrap.h' ], [], [ '-rdynamic' ], not build_apple ],
++ [ 'glx_alias_prefer_same_name', [ 'glx_alias_prefer_same_name.c', 'dlwrap.c', 'dlwrap.h' ], [], [ '-rdynamic' ], not build_apple and get_option('has-dlvsym') == true ],
++ [ 'glx_gles2', [ 'glx_gles2.c', 'dlwrap.c', 'dlwrap.h' ], [], [ '-rdynamic' ], not build_apple and get_option('has-dlvsym') == true ],
+ ]
+
+ foreach test: glx_tests
+@@ -108,7 +108,7 @@ if build_glx
+ endif
+ endforeach
+
+- if not build_apple
++ if not build_apple and get_option('has-dlvsym') == true
+ # GLX/EGL tests
+ if build_egl
+ glx_egl_sources = [
+--
+2.15.0
+
diff --git a/meta/recipes-graphics/libepoxy/libepoxy_1.4.3.bb b/meta/recipes-graphics/libepoxy/libepoxy_1.4.3.bb
index c8b398f1766..b327e001564 100644
--- a/meta/recipes-graphics/libepoxy/libepoxy_1.4.3.bb
+++ b/meta/recipes-graphics/libepoxy/libepoxy_1.4.3.bb
@@ -5,17 +5,21 @@ SECTION = "libs"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=58ef4c80d401e07bd9ee8b6b58cf464b"
-SRC_URI = "https://github.com/anholt/${BPN}/releases/download/${PV}/${BP}.tar.xz"
+SRC_URI = "https://github.com/anholt/${BPN}/releases/download/${PV}/${BP}.tar.xz \
+ file://0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch \
+ "
SRC_URI[md5sum] = "af4c3ce0fb1143bdc4e43f85695a9bed"
SRC_URI[sha256sum] = "0b808a06c9685a62fca34b680abb8bc7fb2fda074478e329b063c1f872b826f6"
UPSTREAM_CHECK_URI = "https://github.com/anholt/libepoxy/releases"
-inherit autotools pkgconfig distro_features_check
+inherit meson pkgconfig distro_features_check
REQUIRED_DISTRO_FEATURES = "opengl"
DEPENDS = "util-macros"
-PACKAGECONFIG[egl] = "--enable-egl, --disable-egl, virtual/egl"
-PACKAGECONFIG[x11] = "--enable-glx, --disable-glx, virtual/libx11"
+PACKAGECONFIG[egl] = "-Denable-egl=yes, -Denable-egl=no, virtual/egl"
+PACKAGECONFIG[x11] = "-Denable-glx=yes, -Denable-glx=no, virtual/libx11"
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} egl"
+
+EXTRA_OEMESON_append_libc-musl = " -Dhas-dlvsym=false "
--
2.15.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 5/7] libinput: convert to meson build
2017-11-15 11:08 [PATCH 0/7] Introduce meson build system Alexander Kanavin
` (3 preceding siblings ...)
2017-11-15 11:08 ` [PATCH 4/7] libepoxy: " Alexander Kanavin
@ 2017-11-15 11:08 ` Alexander Kanavin
2017-11-15 11:08 ` [PATCH 6/7] sysprof: " Alexander Kanavin
2017-11-15 11:08 ` [PATCH 7/7] gst-player: Upgrade, rename to gst-examples Alexander Kanavin
6 siblings, 0 replies; 14+ messages in thread
From: Alexander Kanavin @ 2017-11-15 11:08 UTC (permalink / raw)
To: openembedded-core
Drop autotools-specific patch.
Drop libunwind option, as it is only used if tests are enabled
(and they're unconditionally not enabled).
Add a backported upstream fix for invalid meson options.
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
.../0001-Fix-meson-options-default-values.patch | 50 ++++++++++++++++++++++
meta/recipes-graphics/wayland/libinput_1.8.3.bb | 13 +++---
2 files changed, 57 insertions(+), 6 deletions(-)
create mode 100644 meta/recipes-graphics/wayland/libinput/0001-Fix-meson-options-default-values.patch
diff --git a/meta/recipes-graphics/wayland/libinput/0001-Fix-meson-options-default-values.patch b/meta/recipes-graphics/wayland/libinput/0001-Fix-meson-options-default-values.patch
new file mode 100644
index 00000000000..615bbcd3f96
--- /dev/null
+++ b/meta/recipes-graphics/wayland/libinput/0001-Fix-meson-options-default-values.patch
@@ -0,0 +1,50 @@
+From 10e022a2b18a089265d07b9d0887dba157e066b9 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue, 10 Oct 2017 08:04:35 +1000
+Subject: [PATCH] Fix meson options default values
+
+The keyword is 'value', not 'default'. With meson 0.43 this now stops
+building.
+
+https://bugs.freedesktop.org/show_bug.cgi?id=103162
+
+Upstream-Status: Backport
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ meson_options.txt | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/meson_options.txt b/meson_options.txt
+index 9861d2d..144f916 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,20 +1,20 @@
+ option('udev-dir',
+ type: 'string',
+- default: '',
++ value: '',
+ description: 'udev base directory [default=$prefix/lib/udev]')
+ option('libwacom',
+ type: 'boolean',
+- default: true,
++ value: true,
+ description: 'Use libwacom for tablet identification (default=true)')
+ option('debug-gui',
+ type: 'boolean',
+- default: true,
++ value: true,
+ description: 'Enable the "debug-gui" feature in the libinput tool [default=true]')
+ option('tests',
+ type: 'boolean',
+- default: true,
++ value: true,
+ description: 'Build the tests [default=true]')
+ option('documentation',
+ type: 'boolean',
+- default: true,
++ value: true,
+ description: 'Build the documentation [default=true]')
+--
+2.14.1
+
diff --git a/meta/recipes-graphics/wayland/libinput_1.8.3.bb b/meta/recipes-graphics/wayland/libinput_1.8.3.bb
index 3a02c4b1d24..ce59e30582e 100644
--- a/meta/recipes-graphics/wayland/libinput_1.8.3.bb
+++ b/meta/recipes-graphics/wayland/libinput_1.8.3.bb
@@ -7,21 +7,22 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=2184aef38ff137ed33ce9a63b9d1eb8f"
DEPENDS = "libevdev udev mtdev"
-SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz"
+SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz \
+ file://0001-Fix-meson-options-default-values.patch \
+ "
SRC_URI[md5sum] = "5265244853ad7cf41232b0d3ee805ab9"
SRC_URI[sha256sum] = "2fe2e2f52f0971a9c43541b8f26582ca8df6ed4bb9050e85eb40d4ff6b13142d"
-inherit autotools pkgconfig lib_package
+inherit meson pkgconfig lib_package
PACKAGECONFIG ??= ""
-PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
-PACKAGECONFIG[libwacom] = "--enable-libwacom,--disable-libwacom,libwacom"
-PACKAGECONFIG[gui] = "--enable-debug-gui,--disable-debug-gui,cairo gtk+3"
+PACKAGECONFIG[libwacom] = "-Dlibwacom=true,-Dlibwacom=false,libwacom"
+PACKAGECONFIG[gui] = "-Ddebug-gui=true,-Ddebug-gui=false,cairo gtk+3"
UDEVDIR = "`pkg-config --variable=udevdir udev`"
-EXTRA_OECONF += "--with-udev-dir=${UDEVDIR} --disable-documentation --disable-tests"
+EXTRA_OEMESON += "-Dudev-dir=${UDEVDIR} -Ddocumentation=false -Dtests=false"
# package name changed in 1.8.1 upgrade: make sure package upgrades work
RPROVIDES_${PN} = "libinput"
--
2.15.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 6/7] sysprof: convert to meson build
2017-11-15 11:08 [PATCH 0/7] Introduce meson build system Alexander Kanavin
` (4 preceding siblings ...)
2017-11-15 11:08 ` [PATCH 5/7] libinput: " Alexander Kanavin
@ 2017-11-15 11:08 ` Alexander Kanavin
2017-11-15 11:08 ` [PATCH 7/7] gst-player: Upgrade, rename to gst-examples Alexander Kanavin
6 siblings, 0 replies; 14+ messages in thread
From: Alexander Kanavin @ 2017-11-15 11:08 UTC (permalink / raw)
To: openembedded-core
Drop autotools-specific patches.
Rename polkit packageconfig option to sysprofd as 'polkit' does not
at all match what is happening.
Remove --enable-compiler-warnings, as the equivalent in meson
could not be found.
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
.../sysprof/files/0001-Avoid-building-docs.patch | 42 ----------------------
.../0001-Disable-check-for-polkit-for-UI.patch | 32 -----------------
...d-anything-in-help-as-it-requires-itstool.patch | 26 ++++++++++++++
...igure-Add-option-to-enable-disable-polkit.patch | 41 ---------------------
meta/recipes-kernel/sysprof/sysprof_3.26.1.bb | 23 ++++++------
5 files changed, 37 insertions(+), 127 deletions(-)
delete mode 100644 meta/recipes-kernel/sysprof/files/0001-Avoid-building-docs.patch
delete mode 100644 meta/recipes-kernel/sysprof/files/0001-Disable-check-for-polkit-for-UI.patch
create mode 100644 meta/recipes-kernel/sysprof/files/0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch
delete mode 100644 meta/recipes-kernel/sysprof/files/0001-configure-Add-option-to-enable-disable-polkit.patch
diff --git a/meta/recipes-kernel/sysprof/files/0001-Avoid-building-docs.patch b/meta/recipes-kernel/sysprof/files/0001-Avoid-building-docs.patch
deleted file mode 100644
index 202f354d29c..00000000000
--- a/meta/recipes-kernel/sysprof/files/0001-Avoid-building-docs.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 27df521c68e7c8b5b050dab15f40aa15fd03623a Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Wed, 4 May 2016 14:58:24 +0300
-Subject: [PATCH] Avoid building docs
-
-Upstream-Status: Inappropriate
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- Makefile.am | 2 +-
- m4/yelp.m4 | 6 ------
- 2 files changed, 1 insertion(+), 7 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index b919a3f..3a3851d 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -1,4 +1,4 @@
--SUBDIRS = daemon data help lib po src tools tests
-+SUBDIRS = daemon data lib po src tools tests
-
- EXTRA_DIST = AUTHORS tap-test COPYING.gpl-2
-
-diff --git a/m4/yelp.m4 b/m4/yelp.m4
-index 5db847f..1b6ede4 100644
---- a/m4/yelp.m4
-+++ b/m4/yelp.m4
-@@ -27,12 +27,6 @@ AC_ARG_WITH([help-dir],
- HELP_DIR="$with_help_dir"
- AC_SUBST(HELP_DIR)
-
--AC_ARG_VAR([ITSTOOL], [Path to the `itstool` command])
--AC_CHECK_PROG([ITSTOOL], [itstool], [itstool])
--if test x"$ITSTOOL" = x; then
-- AC_MSG_ERROR([itstool not found])
--fi
--
- AC_ARG_VAR([XMLLINT], [Path to the `xmllint` command])
- AC_CHECK_PROG([XMLLINT], [xmllint], [xmllint])
- if test x"$XMLLINT" = x; then
---
-2.1.4
-
diff --git a/meta/recipes-kernel/sysprof/files/0001-Disable-check-for-polkit-for-UI.patch b/meta/recipes-kernel/sysprof/files/0001-Disable-check-for-polkit-for-UI.patch
deleted file mode 100644
index 608523272ad..00000000000
--- a/meta/recipes-kernel/sysprof/files/0001-Disable-check-for-polkit-for-UI.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 765d578145e31ddc9495adfab8037ade33c6a9cc Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Wed, 4 May 2016 10:59:36 +0300
-Subject: [PATCH] Disable check for polkit for UI
-
-The check is not technically required: sysprof just needs
-to be able to access system perf counters at runtime.
-
-Upstream-Status: Pending
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
----
- configure.ac | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 8559597..ecf93ad 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -131,8 +131,8 @@ AS_IF([test "$enable_gtk" = auto],[
- AS_IF([test "$have_gtk" = "yes" && test "$have_polkit" = "yes"],[enable_gtk=yes],[enable_gtk=no])
- ])
- AS_IF([test "$enable_gtk" = "yes"],[
-- AS_IF([test "$have_gtk" = "yes" && test "$have_polkit" = "yes"],[],[
-- AC_MSG_ERROR([--enable-gtk requires gtk+-3.0 >= gtk_required_version and polkit-gobject-1])
-+ AS_IF([test "$have_gtk" = "yes"],[],[
-+ AC_MSG_ERROR([--enable-gtk requires gtk+-3.0 >= gtk_required_version])
- ])
- ])
- AM_CONDITIONAL(ENABLE_GTK, test "$enable_gtk" = "yes")
---
-2.8.1
-
diff --git a/meta/recipes-kernel/sysprof/files/0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch b/meta/recipes-kernel/sysprof/files/0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch
new file mode 100644
index 00000000000..e28fdcad948
--- /dev/null
+++ b/meta/recipes-kernel/sysprof/files/0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch
@@ -0,0 +1,26 @@
+From c2495a4c042e6a675da69bab20cc3669391e8e2a Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 23 Aug 2017 18:38:26 +0300
+Subject: [PATCH 1/2] Do not build anything in help/ as it requires itstool.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ meson.build | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 4ac3934..8c4369a 100644
+--- a/meson.build
++++ b/meson.build
+@@ -116,7 +116,6 @@ subdir('tools')
+ subdir('tests')
+
+ subdir('data')
+-subdir('help')
+ subdir('po')
+
+ meson.add_install_script('build-aux/meson_post_install.sh')
+--
+2.14.1
+
diff --git a/meta/recipes-kernel/sysprof/files/0001-configure-Add-option-to-enable-disable-polkit.patch b/meta/recipes-kernel/sysprof/files/0001-configure-Add-option-to-enable-disable-polkit.patch
deleted file mode 100644
index 158d9975f29..00000000000
--- a/meta/recipes-kernel/sysprof/files/0001-configure-Add-option-to-enable-disable-polkit.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 2b4005d72d3393933a7914be102ea65505c536cc Mon Sep 17 00:00:00 2001
-From: "Maxin B. John" <maxin.john@intel.com>
-Date: Thu, 21 Jul 2016 11:53:31 +0300
-Subject: [PATCH] configure: Add option to enable/disable polkit
-
-Changes the configure behaviour from autodetecting the polkit by default
-to having an option to disable it explicitly
-
-Upstream-Status: Pending
-
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- configure.ac | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index 2246d5a..3d3fe0f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -104,10 +104,18 @@ PKG_CHECK_MODULES(GTK,
- [gtk+-3.0 >= gtk_required_version],
- [have_gtk=yes],
- [have_gtk=no])
-+AC_ARG_ENABLE([polkit],
-+ AS_HELP_STRING([--disable-polkit], [Do not use Polkit]),
-+ [enable_polkit="$enableval"], [enable_polkit="yes"])
-+
-+AS_IF([test "x$enable_polkit" = "xyes"], [
- PKG_CHECK_MODULES(POLKIT,
- [polkit-gobject-1],
- [have_polkit=yes],
- [have_polkit=no])
-+ ])
-+AM_CONDITIONAL([HAVE_POLKIT], [test "x$enable_polkit" = "xyes"])
-+
- PKG_CHECK_MODULES(SYSTEMD,
- [libsystemd >= systemd_required_version],
- [have_systemd=yes],
---
-2.4.0
-
diff --git a/meta/recipes-kernel/sysprof/sysprof_3.26.1.bb b/meta/recipes-kernel/sysprof/sysprof_3.26.1.bb
index dbce3d74399..90e00c95c9f 100644
--- a/meta/recipes-kernel/sysprof/sysprof_3.26.1.bb
+++ b/meta/recipes-kernel/sysprof/sysprof_3.26.1.bb
@@ -4,7 +4,7 @@ LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
file://src/sp-application.c;endline=17;md5=40e55577ef122c88fe20052acda64875"
-inherit gnomebase gettext systemd upstream-version-is-even
+inherit gnomebase-meson gettext systemd upstream-version-is-even
DEPENDS = "glib-2.0 libxml2-native glib-2.0-native"
@@ -12,23 +12,22 @@ SRC_URI[archive.md5sum] = "6f9f947960ba79bb1269d8ee49b7db78"
SRC_URI[archive.sha256sum] = "d8b9d5c2246696e4a3776a312731dc7c014fbd33478bb14d5512c6f1f35a3b11"
SRC_URI += " \
file://define-NT_GNU_BUILD_ID.patch \
- file://0001-configure-Add-option-to-enable-disable-polkit.patch \
- file://0001-Disable-check-for-polkit-for-UI.patch \
- file://0001-Avoid-building-docs.patch \
- "
-
-AUTOTOOLS_AUXDIR = "${S}/build-aux"
-
-EXTRA_OECONF = "--enable-compile-warnings"
+ file://0001-Do-not-build-anything-in-help-as-it-requires-itstool.patch \
+ "
PACKAGECONFIG ?= "${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'gtk', '', d)}"
-PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+3"
-PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,polkit dbus"
+PACKAGECONFIG[gtk] = "-Denable-gtk=true,-Denable-gtk=false,gtk+3"
+PACKAGECONFIG[sysprofd] = "-Dwith_sysprofd=bundled,-Dwith_sysprofd=none,polkit"
SOLIBS = ".so"
FILES_SOLIBSDEV = ""
-SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'sysprof2.service', '', d)}"
+SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'sysprofd', 'sysprof2.service', '', d)}"
# We do not yet work for aarch64.
COMPATIBLE_HOST = "^(?!aarch64).*"
+
+FILES_${PN} += " \
+ ${datadir}/dbus-1/system-services \
+ ${datadir}/dbus-1/system.d \
+ "
--
2.15.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 7/7] gst-player: Upgrade, rename to gst-examples
2017-11-15 11:08 [PATCH 0/7] Introduce meson build system Alexander Kanavin
` (5 preceding siblings ...)
2017-11-15 11:08 ` [PATCH 6/7] sysprof: " Alexander Kanavin
@ 2017-11-15 11:08 ` Alexander Kanavin
6 siblings, 0 replies; 14+ messages in thread
From: Alexander Kanavin @ 2017-11-15 11:08 UTC (permalink / raw)
To: openembedded-core
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
Switch to using current repository, switch to meson (following
upstream), rename the recipe like upstream.
Add a patch to install the player binaries.
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
.../packagegroup-core-tools-testapps.bb | 2 +-
.../0001-Make-player-examples-installable.patch | 39 ++++++++++++++++++++++
.../gst-player.desktop | 0
.../{gst-player_git.bb => gst-examples_git.bb} | 18 +++++-----
.../packagegroups/packagegroup-core-x11-sato.bb | 2 +-
5 files changed, 49 insertions(+), 12 deletions(-)
create mode 100644 meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch
rename meta/recipes-multimedia/gstreamer/{gst-player => gst-examples}/gst-player.desktop (100%)
rename meta/recipes-multimedia/gstreamer/{gst-player_git.bb => gst-examples_git.bb} (65%)
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb b/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
index 317097854f2..3cf84c56ed7 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
@@ -25,7 +25,7 @@ X11GLTOOLS = "\
X11TOOLS = "\
fstests \
- gst-player \
+ gst-examples \
x11perf \
xrestop \
xwininfo \
diff --git a/meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch b/meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch
new file mode 100644
index 00000000000..0338bad1c03
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch
@@ -0,0 +1,39 @@
+From 755f6dab07565aca7b6aefacad8be65de364ff75 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Thu, 17 Aug 2017 11:07:02 +0300
+Subject: [PATCH] Make player examples installable
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Upstream-Status: Denied [Upstream considers these code examples, for now a least]
+
+https://bugzilla.gnome.org/show_bug.cgi?id=777827
+---
+ playback/player/gst-play/meson.build | 1 +
+ playback/player/gtk/meson.build | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/playback/player/gst-play/meson.build b/playback/player/gst-play/meson.build
+index 719b55b..a56fe13 100644
+--- a/playback/player/gst-play/meson.build
++++ b/playback/player/gst-play/meson.build
+@@ -8,5 +8,6 @@ executable('gst-play',
+ ['gst-play.c',
+ 'gst-play-kb.c',
+ 'gst-play-kb.h'],
++ install: true,
+ dependencies : [gst_dep, gstplayer_dep, m_dep])
+
+diff --git a/playback/player/gtk/meson.build b/playback/player/gtk/meson.build
+index 08aae4f..671a65d 100644
+--- a/playback/player/gtk/meson.build
++++ b/playback/player/gtk/meson.build
+@@ -18,5 +18,6 @@ executable('gtk-play',
+ gtk_play_resources,
+ 'gtk-video-renderer.h',
+ 'gtk-video-renderer.c'],
++ install: true,
+ dependencies : [glib_dep, gobject_dep, gmodule_dep, gst_dep, gsttag_dep, gstplayer_dep, gtk_dep, x11_dep])
+
+--
+2.13.3
+
diff --git a/meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop b/meta/recipes-multimedia/gstreamer/gst-examples/gst-player.desktop
similarity index 100%
rename from meta/recipes-multimedia/gstreamer/gst-player/gst-player.desktop
rename to meta/recipes-multimedia/gstreamer/gst-examples/gst-player.desktop
diff --git a/meta/recipes-multimedia/gstreamer/gst-player_git.bb b/meta/recipes-multimedia/gstreamer/gst-examples_git.bb
similarity index 65%
rename from meta/recipes-multimedia/gstreamer/gst-player_git.bb
rename to meta/recipes-multimedia/gstreamer/gst-examples_git.bb
index 4fe8fdef4a2..a3acf9cafa9 100644
--- a/meta/recipes-multimedia/gstreamer/gst-player_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-examples_git.bb
@@ -1,25 +1,23 @@
-SUMMARY = "GStreamer playback helper library and examples"
+SUMMARY = "GStreamer examples (including gtk-play, gst-play)"
LICENSE = "LGPL-2.0+"
-LIC_FILES_CHKSUM = "file://gtk/gtk-play.c;beginline=1;endline=20;md5=f8c72dae3d36823ec716a9ebcae593b9"
+LIC_FILES_CHKSUM = "file://playback/player/gtk/gtk-play.c;beginline=1;endline=20;md5=f8c72dae3d36823ec716a9ebcae593b9"
DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gtk+3 glib-2.0-native"
-SRC_URI = "git://github.com/sdroege/gst-player.git \
+SRC_URI = "git://anongit.freedesktop.org/gstreamer/gst-examples \
+ file://0001-Make-player-examples-installable.patch \
file://gst-player.desktop"
-SRCREV = "ee3c226c82767a089743e4e06058743e67f73cdb"
+SRCREV = "e88c04ff34cf56984e62a524a0bcc16ab51b282d"
PV = "0.0.1+git${SRCPV}"
UPSTREAM_VERSION_UNKNOWN = "1"
S = "${WORKDIR}/git"
-inherit autotools pkgconfig distro_features_check
+inherit meson pkgconfig distro_features_check
-ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
-do_configure_prepend() {
- touch ${S}/ChangeLog
-}
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
do_install_append() {
install -m 0644 -D ${WORKDIR}/gst-player.desktop ${D}${datadir}/applications/gst-player.desktop
@@ -31,4 +29,4 @@ RRECOMMENDS_${PN} = "gstreamer1.0-plugins-base-meta \
gstreamer1.0-plugins-bad-meta \
${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-libav", "", d)} \
${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "gstreamer1.0-plugins-ugly-meta", "", d)}"
-RPROVIDES_${PN} += "${PN}-bin"
+RPROVIDES_${PN} += "gst-player gst-player-bin"
diff --git a/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb b/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
index 97cced7cc34..224428ddda5 100644
--- a/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
+++ b/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
@@ -46,7 +46,7 @@ WEB ?= ""
SUMMARY_${PN}-apps = "Sato desktop - applications"
RDEPENDS_${PN}-apps = "\
l3afpad \
- gst-player \
+ gst-examples \
matchbox-terminal \
sato-screenshot \
${FILEMANAGER} \
--
2.15.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 1/7] meson: add a recipe and class from meta-oe
2017-11-15 11:08 ` [PATCH 1/7] meson: add a recipe and class from meta-oe Alexander Kanavin
@ 2017-11-15 11:42 ` Martin Hundebøll
2017-11-15 16:09 ` Burton, Ross
2017-11-15 17:27 ` Martin Kelly
2 siblings, 0 replies; 14+ messages in thread
From: Martin Hundebøll @ 2017-11-15 11:42 UTC (permalink / raw)
To: Alexander Kanavin, openembedded-core
Hi,
On 2017-11-15 12:08, Alexander Kanavin wrote:
> The original recipe has been provided and improved by:
>
> Ross Burton <ross.burton@intel.com>
> Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
> Adam C. Foltzer <acfoltzer@galois.com>
> Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> Linus Svensson <linussn@axis.com>
>
> I have added a couple patches to fix up gtk-doc and
> gobject-introspection in cross-compilation environments.
>
> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
> ---
> meta/classes/meson.bbclass | 103 +++++++++++++++++++
> ...ix-issues-that-arise-when-cross-compiling.patch | 113 +++++++++++++++++++++
> ...rospection-determine-g-ir-scanner-and-g-i.patch | 41 ++++++++
> meta/recipes-devtools/meson/meson_0.43.0.bb | 19 ++++
> 4 files changed, 276 insertions(+)
> create mode 100644 meta/classes/meson.bbclass
> create mode 100644 meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
> create mode 100644 meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch
> create mode 100644 meta/recipes-devtools/meson/meson_0.43.0.bb
>
> diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
> new file mode 100644
> index 00000000000..f6cf24c33a7
> --- /dev/null
> +++ b/meta/classes/meson.bbclass
> @@ -0,0 +1,103 @@
> +inherit python3native
> +
> +DEPENDS_append = " meson-native ninja-native"
> +
> +# As Meson enforces out-of-tree builds we can just use cleandirs
> +B = "${WORKDIR}/build"
> +do_configure[cleandirs] = "${B}"
> +
> +# Where the meson.build build configuration is
> +MESON_SOURCEPATH = "${S}"
> +
> +# These variables in the environment override meson's *native* tools settings.
> +# We have to unset them, so that meson doesn't pick up the cross tools and
> +# use them for native builds.
> +unset CC
> +unset CXX
> +unset AR
> +
> +def noprefix(var, d):
> + return d.getVar(var, True).replace(d.getVar('prefix', True) + '/', '', 1)
> +
> +MESONOPTS = " --prefix ${prefix} \
> + --bindir ${@noprefix('bindir', d)} \
> + --sbindir ${@noprefix('sbindir', d)} \
> + --datadir ${@noprefix('datadir', d)} \
> + --libdir ${@noprefix('libdir', d)} \
> + --libexecdir ${@noprefix('libexecdir', d)} \
> + --includedir ${@noprefix('includedir', d)} \
> + --mandir ${@noprefix('mandir', d)} \
> + --infodir ${@noprefix('infodir', d)} \
> + --sysconfdir ${sysconfdir} \
> + --localstatedir ${localstatedir} \
> + --sharedstatedir ${sharedstatedir}"
> +
> +MESON_C_ARGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS}"
> +MESON_LINK_ARGS = "${MESON_C_ARGS} ${LDFLAGS}"
> +
> +MESON_HOST_ENDIAN = "${@bb.utils.contains('SITEINFO_ENDIANNESS', 'be', 'big', 'little', d)}"
> +MESON_TARGET_ENDIAN = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', 'big', 'little', d)}"
> +
> +EXTRA_OEMESON += "${PACKAGECONFIG_CONFARGS}"
> +
> +MESON_CROSS_FILE = ""
> +MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
Shouldn't nativesdk builds use a meson.cross file too?
> +
> +def meson_array(var, d):
> + return "', '".join(d.getVar(var, True).split()).join(("'", "'"))
> +
> +addtask write_config before do_configure
> +do_write_config[vardeps] += "MESON_C_ARGS TOOLCHAIN_OPTIONS"
> +do_write_config() {
> + # This needs to be Py to split the args into single-element lists
> + cat >${WORKDIR}/meson.cross <<EOF
> +[binaries]
> +c = '${HOST_PREFIX}gcc'
> +cpp = '${HOST_PREFIX}g++'
> +ar = '${HOST_PREFIX}ar'
> +ld = '${HOST_PREFIX}ld'
> +strip = '${HOST_PREFIX}strip'
> +readelf = '${HOST_PREFIX}readelf'
> +pkgconfig = 'pkg-config'
> +
> +[properties]
> +needs_exe_wrapper = true
> +c_args = [${@meson_array('MESON_C_ARGS', d)}]
> +c_link_args = [${@meson_array('MESON_LINK_ARGS', d)}]
> +cpp_args = [${@meson_array('MESON_C_ARGS', d)}]
> +cpp_link_args = [${@meson_array('MESON_LINK_ARGS', d)}]
> +gtkdoc_exe_wrapper = '${B}/gtkdoc-qemuwrapper'
> +
> +[host_machine]
> +system = '${HOST_OS}'
> +cpu_family = '${HOST_ARCH}'
> +cpu = '${HOST_ARCH}'
> +endian = '${MESON_HOST_ENDIAN}'
> +
> +[target_machine]
> +system = '${TARGET_OS}'
> +cpu_family = '${TARGET_ARCH}'
> +cpu = '${TARGET_ARCH}'
> +endian = '${MESON_TARGET_ENDIAN}'
> +EOF
> +}
Is meson.cross also written for native builds? If so, isn't there a way
to avoid that?
> +
> +CONFIGURE_FILES = "meson.build"
> +
> +meson_do_configure() {
> + if ! meson ${MESONOPTS} "${MESON_SOURCEPATH}" "${B}" ${MESON_CROSS_FILE} ${EXTRA_OEMESON}; then
> + cat ${B}/meson-logs/meson-log.txt
> + bbfatal_log meson failed
> + fi
> +}
> +
> +do_compile[progress] = "outof:^\[(\d+)/(\d+)\]\s+"
> +meson_do_compile() {
> + ninja ${PARALLEL_MAKE}
> +}
> +
> +meson_do_install() {
> + DESTDIR='${D}' ninja ${PARALLEL_MAKEINST} install
> +}
> +
> +EXPORT_FUNCTIONS do_configure do_compile do_install
// Martin
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/7] meson: add a recipe and class from meta-oe
2017-11-15 11:08 ` [PATCH 1/7] meson: add a recipe and class from meta-oe Alexander Kanavin
2017-11-15 11:42 ` Martin Hundebøll
@ 2017-11-15 16:09 ` Burton, Ross
2017-11-15 17:27 ` Martin Kelly
2 siblings, 0 replies; 14+ messages in thread
From: Burton, Ross @ 2017-11-15 16:09 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 15741 bytes --]
This series was just ran on the autobuilder and there's a few failures:
http://errors.yoctoproject.org/Errors/Latest//?filter=21d01e923239ab32116bf526cc2c5afee9052476&type=commit
Anyone interested in getting Meson merged into oe-core is welcome to work
with Alex to resolve these.
Ross
On 15 November 2017 at 11:08, Alexander Kanavin <
alexander.kanavin@linux.intel.com> wrote:
> The original recipe has been provided and improved by:
>
> Ross Burton <ross.burton@intel.com>
> Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
> Adam C. Foltzer <acfoltzer@galois.com>
> Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> Linus Svensson <linussn@axis.com>
>
> I have added a couple patches to fix up gtk-doc and
> gobject-introspection in cross-compilation environments.
>
> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
> ---
> meta/classes/meson.bbclass | 103
> +++++++++++++++++++
> ...ix-issues-that-arise-when-cross-compiling.patch | 113
> +++++++++++++++++++++
> ...rospection-determine-g-ir-scanner-and-g-i.patch | 41 ++++++++
> meta/recipes-devtools/meson/meson_0.43.0.bb | 19 ++++
> 4 files changed, 276 insertions(+)
> create mode 100644 meta/classes/meson.bbclass
> create mode 100644 meta/recipes-devtools/meson/
> meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
> create mode 100644 meta/recipes-devtools/meson/meson/0002-gobject-
> introspection-determine-g-ir-scanner-and-g-i.patch
> create mode 100644 meta/recipes-devtools/meson/meson_0.43.0.bb
>
> diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
> new file mode 100644
> index 00000000000..f6cf24c33a7
> --- /dev/null
> +++ b/meta/classes/meson.bbclass
> @@ -0,0 +1,103 @@
> +inherit python3native
> +
> +DEPENDS_append = " meson-native ninja-native"
> +
> +# As Meson enforces out-of-tree builds we can just use cleandirs
> +B = "${WORKDIR}/build"
> +do_configure[cleandirs] = "${B}"
> +
> +# Where the meson.build build configuration is
> +MESON_SOURCEPATH = "${S}"
> +
> +# These variables in the environment override meson's *native* tools
> settings.
> +# We have to unset them, so that meson doesn't pick up the cross tools and
> +# use them for native builds.
> +unset CC
> +unset CXX
> +unset AR
> +
> +def noprefix(var, d):
> + return d.getVar(var, True).replace(d.getVar('prefix', True) + '/',
> '', 1)
> +
> +MESONOPTS = " --prefix ${prefix} \
> + --bindir ${@noprefix('bindir', d)} \
> + --sbindir ${@noprefix('sbindir', d)} \
> + --datadir ${@noprefix('datadir', d)} \
> + --libdir ${@noprefix('libdir', d)} \
> + --libexecdir ${@noprefix('libexecdir', d)} \
> + --includedir ${@noprefix('includedir', d)} \
> + --mandir ${@noprefix('mandir', d)} \
> + --infodir ${@noprefix('infodir', d)} \
> + --sysconfdir ${sysconfdir} \
> + --localstatedir ${localstatedir} \
> + --sharedstatedir ${sharedstatedir}"
> +
> +MESON_C_ARGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS}"
> +MESON_LINK_ARGS = "${MESON_C_ARGS} ${LDFLAGS}"
> +
> +MESON_HOST_ENDIAN = "${@bb.utils.contains('SITEINFO_ENDIANNESS', 'be',
> 'big', 'little', d)}"
> +MESON_TARGET_ENDIAN = "${@bb.utils.contains('TUNE_FEATURES',
> 'bigendian', 'big', 'little', d)}"
> +
> +EXTRA_OEMESON += "${PACKAGECONFIG_CONFARGS}"
> +
> +MESON_CROSS_FILE = ""
> +MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
> +
> +def meson_array(var, d):
> + return "', '".join(d.getVar(var, True).split()).join(("'", "'"))
> +
> +addtask write_config before do_configure
> +do_write_config[vardeps] += "MESON_C_ARGS TOOLCHAIN_OPTIONS"
> +do_write_config() {
> + # This needs to be Py to split the args into single-element lists
> + cat >${WORKDIR}/meson.cross <<EOF
> +[binaries]
> +c = '${HOST_PREFIX}gcc'
> +cpp = '${HOST_PREFIX}g++'
> +ar = '${HOST_PREFIX}ar'
> +ld = '${HOST_PREFIX}ld'
> +strip = '${HOST_PREFIX}strip'
> +readelf = '${HOST_PREFIX}readelf'
> +pkgconfig = 'pkg-config'
> +
> +[properties]
> +needs_exe_wrapper = true
> +c_args = [${@meson_array('MESON_C_ARGS', d)}]
> +c_link_args = [${@meson_array('MESON_LINK_ARGS', d)}]
> +cpp_args = [${@meson_array('MESON_C_ARGS', d)}]
> +cpp_link_args = [${@meson_array('MESON_LINK_ARGS', d)}]
> +gtkdoc_exe_wrapper = '${B}/gtkdoc-qemuwrapper'
> +
> +[host_machine]
> +system = '${HOST_OS}'
> +cpu_family = '${HOST_ARCH}'
> +cpu = '${HOST_ARCH}'
> +endian = '${MESON_HOST_ENDIAN}'
> +
> +[target_machine]
> +system = '${TARGET_OS}'
> +cpu_family = '${TARGET_ARCH}'
> +cpu = '${TARGET_ARCH}'
> +endian = '${MESON_TARGET_ENDIAN}'
> +EOF
> +}
> +
> +CONFIGURE_FILES = "meson.build"
> +
> +meson_do_configure() {
> + if ! meson ${MESONOPTS} "${MESON_SOURCEPATH}" "${B}"
> ${MESON_CROSS_FILE} ${EXTRA_OEMESON}; then
> + cat ${B}/meson-logs/meson-log.txt
> + bbfatal_log meson failed
> + fi
> +}
> +
> +do_compile[progress] = "outof:^\[(\d+)/(\d+)\]\s+"
> +meson_do_compile() {
> + ninja ${PARALLEL_MAKE}
> +}
> +
> +meson_do_install() {
> + DESTDIR='${D}' ninja ${PARALLEL_MAKEINST} install
> +}
> +
> +EXPORT_FUNCTIONS do_configure do_compile do_install
> diff --git a/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-
> that-arise-when-cross-compiling.patch b/meta/recipes-devtools/meson/
> meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
> new file mode 100644
> index 00000000000..ca3d7095066
> --- /dev/null
> +++ b/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-
> that-arise-when-cross-compiling.patch
> @@ -0,0 +1,113 @@
> +From 15e054dce6ff11d2cb219c8c09a31b26f0e58b62 Mon Sep 17 00:00:00 2001
> +From: Alexander Kanavin <alex.kanavin@gmail.com>
> +Date: Fri, 4 Aug 2017 16:16:41 +0300
> +Subject: [PATCH 1/3] gtkdoc: fix issues that arise when cross-compiling
> +
> +Specifically:
> +1) Make it possible to specify a wrapper for executing binaries
> +(usually, some kind of target hardware emulator, such as qemu)
> +2) Explicitly provide CC and LD via command line, as otherwise gtk-doc
> will
> +try to guess them, incorrectly.
> +3) If things break down, print the full command with arguments,
> +not just the binary name.
> +4) Correctly determine the compiler/linker executables and cross-options
> when cross-compiling
> +
> +Upstream-Status: Pending
> +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> +
> +---
> + mesonbuild/modules/gnome.py | 18 +++++++++++++++---
> + mesonbuild/scripts/gtkdochelper.py | 9 +++++++--
> + 2 files changed, 22 insertions(+), 5 deletions(-)
> +
> +diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
> +index 6ec7040..4cfaefd 100644
> +--- a/mesonbuild/modules/gnome.py
> ++++ b/mesonbuild/modules/gnome.py
> +@@ -713,6 +713,10 @@ class GnomeModule(ExtensionModule):
> + '--mode=' + mode]
> + if namespace:
> + args.append('--namespace=' + namespace)
> ++ gtkdoc_exe_wrapper = state.environment.cross_info.
> config["properties"].get('gtkdoc_exe_wrapper', None)
> ++ if gtkdoc_exe_wrapper is not None:
> ++ args.append('--gtkdoc-exe-wrapper=' + gtkdoc_exe_wrapper)
> ++
> + args += self._unpack_args('--htmlargs=', 'html_args', kwargs)
> + args += self._unpack_args('--scanargs=', 'scan_args', kwargs)
> + args += self._unpack_args('--scanobjsargs=', 'scanobjs_args',
> kwargs)
> +@@ -741,14 +745,22 @@ class GnomeModule(ExtensionModule):
> + raise MesonException(
> + 'Gir include dirs should be include_directories().')
> + cflags.update(get_include_args(inc_dirs))
> ++
> ++ cross_c_args = " ".join(state.environment.
> cross_info.config["properties"].get('c_args', ""))
> ++ cross_link_args = " ".join(state.environment.
> cross_info.config["properties"].get('c_link_args', ""))
> ++
> + if cflags:
> +- args += ['--cflags=%s' % ' '.join(cflags)]
> ++ args += ['--cflags=%s %s' % (cross_c_args,' '.join(cflags))]
> + if ldflags:
> +- args += ['--ldflags=%s' % ' '.join(ldflags)]
> ++ args += ['--ldflags=%s %s' % (cross_link_args, '
> '.join(ldflags))]
> + compiler = state.environment.coredata.compilers.get('c')
> +- if compiler:
> ++ cross_compiler = state.environment.coredata.
> cross_compilers.get('c')
> ++ if compiler and not state.environment.is_cross_build():
> + args += ['--cc=%s' % ' '.join(compiler.get_exelist())]
> + args += ['--ld=%s' % ' '.join(compiler.get_linker_
> exelist())]
> ++ elif cross_compiler and state.environment.is_cross_build():
> ++ args += ['--cc=%s' % ' '.join(cross_compiler.get_exelist())]
> ++ args += ['--ld=%s' % ' '.join(cross_compiler.get_
> linker_exelist())]
> +
> + return args
> +
> +diff --git a/mesonbuild/scripts/gtkdochelper.py b/mesonbuild/scripts/
> gtkdochelper.py
> +index a2cbf5a..19331bd 100644
> +--- a/mesonbuild/scripts/gtkdochelper.py
> ++++ b/mesonbuild/scripts/gtkdochelper.py
> +@@ -44,13 +44,14 @@ parser.add_argument('--ignore-headers',
> dest='ignore_headers', default='')
> + parser.add_argument('--namespace', dest='namespace', default='')
> + parser.add_argument('--mode', dest='mode', default='')
> + parser.add_argument('--installdir', dest='install_dir')
> ++parser.add_argument('--gtkdoc-exe-wrapper', dest='gtkdoc_exe_wrapper')
> +
> + def gtkdoc_run_check(cmd, cwd):
> + # Put stderr into stdout since we want to print it out anyway.
> + # This preserves the order of messages.
> + p, out = Popen_safe(cmd, cwd=cwd, stderr=subprocess.STDOUT)[0:2]
> + if p.returncode != 0:
> +- err_msg = ["{!r} failed with status {:d}".format(cmd[0],
> p.returncode)]
> ++ err_msg = ["{!r} failed with status {:d}".format(cmd,
> p.returncode)]
> + if out:
> + err_msg.append(out)
> + raise MesonException('\n'.join(err_msg))
> +@@ -58,7 +59,7 @@ def gtkdoc_run_check(cmd, cwd):
> + def build_gtkdoc(source_root, build_root, doc_subdir, src_subdirs,
> + main_file, module,
> + html_args, scan_args, fixxref_args, mkdb_args,
> +- gobject_typesfile, scanobjs_args, ld, cc, ldflags,
> cflags,
> ++ gobject_typesfile, scanobjs_args, gtkdoc_exe_wrapper,
> ld, cc, ldflags, cflags,
> + html_assets, content_files, ignore_headers, namespace,
> + expand_content_files, mode):
> + print("Building documentation for %s" % module)
> +@@ -111,6 +112,9 @@ def build_gtkdoc(source_root, build_root, doc_subdir,
> src_subdirs,
> + if gobject_typesfile:
> + scanobjs_cmd = ['gtkdoc-scangobj'] + scanobjs_args + ['--types='
> + gobject_typesfile,
> +
> '--module=' + module,
> ++ '--run=' +
> gtkdoc_exe_wrapper,
> ++ '--cc=' +
> cc,
> ++ '--ld=' +
> ld,
> +
> '--cflags=' + cflags,
> +
> '--ldflags=' + ldflags]
> +
> +@@ -206,6 +210,7 @@ def run(args):
> + mkdbargs,
> + options.gobject_typesfile,
> + scanobjsargs,
> ++ options.gtkdoc_exe_wrapper,
> + options.ld,
> + options.cc,
> + options.ldflags,
> +--
> +2.14.1
> +
> diff --git a/meta/recipes-devtools/meson/meson/0002-gobject-
> introspection-determine-g-ir-scanner-and-g-i.patch
> b/meta/recipes-devtools/meson/meson/0002-gobject-
> introspection-determine-g-ir-scanner-and-g-i.patch
> new file mode 100644
> index 00000000000..f00b9b2a2d1
> --- /dev/null
> +++ b/meta/recipes-devtools/meson/meson/0002-gobject-
> introspection-determine-g-ir-scanner-and-g-i.patch
> @@ -0,0 +1,41 @@
> +From 84cb251a33190ec82faeaad321518af4b309c55e Mon Sep 17 00:00:00 2001
> +From: Alexander Kanavin <alex.kanavin@gmail.com>
> +Date: Fri, 4 Aug 2017 16:18:47 +0300
> +Subject: [PATCH 2/2] gobject-introspection: determine g-ir-scanner and
> + g-ir-compiler paths from pkgconfig
> +
> +Do not hardcode the name of those binaries; gobject-introspection
> +provides them via pkgconfig, and they can be set to something else
> +(for example when cross-compiling).
> +
> +Upstream-Status: Pending
> +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> +---
> + mesonbuild/modules/gnome.py | 4 ++--
> + 1 file changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
> +index ba7e4cd..00472af 100644
> +--- a/mesonbuild/modules/gnome.py
> ++++ b/mesonbuild/modules/gnome.py
> +@@ -380,8 +380,6 @@ class GnomeModule(ExtensionModule):
> + raise MesonException('Gir takes one argument')
> + if kwargs.get('install_dir'):
> + raise MesonException('install_dir is not supported with
> generate_gir(), see "install_dir_gir" and "install_dir_typelib"')
> +- giscanner = find_program('g-ir-scanner', 'Gir')
> +- gicompiler = find_program('g-ir-compiler', 'Gir')
> + girtarget = args[0]
> + while hasattr(girtarget, 'held_object'):
> + girtarget = girtarget.held_object
> +@@ -392,6 +390,8 @@ class GnomeModule(ExtensionModule):
> + self.gir_dep = PkgConfigDependency('gobject-
> introspection-1.0',
> + state.environment,
> + {'native': True})
> ++ giscanner = os.environ['PKG_CONFIG_SYSROOT_DIR'] +
> self.gir_dep.get_pkgconfig_variable('g_ir_scanner')
> ++ gicompiler = os.environ['PKG_CONFIG_SYSROOT_DIR'] +
> self.gir_dep.get_pkgconfig_variable('g_ir_compiler')
> + pkgargs = self.gir_dep.get_compile_args()
> + except Exception:
> + raise MesonException('gobject-introspection dependency was
> not found, gir cannot be generated.')
> +--
> +2.13.2
> +
> diff --git a/meta/recipes-devtools/meson/meson_0.43.0.bb
> b/meta/recipes-devtools/meson/meson_0.43.0.bb
> new file mode 100644
> index 00000000000..bbb48d9197c
> --- /dev/null
> +++ b/meta/recipes-devtools/meson/meson_0.43.0.bb
> @@ -0,0 +1,19 @@
> +HOMEPAGE = "http://mesonbuild.com"
> +SUMMARY = "A high performance build system"
> +
> +LICENSE = "Apache-2.0"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
> +
> +SRC_URI = "https://github.com/mesonbuild/meson/releases/
> download/${PV}/${BP}.tar.gz \
> + file://0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
> \
> + file://0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch
> \
> + "
> +SRC_URI[md5sum] = "b0d389cc5937928c2f5114656dc5a99a"
> +SRC_URI[sha256sum] = "c513eca90e0d70bf14cd1eaafea2fa
> 91cf40a73326a7ff61f08a005048057340"
> +UPSTREAM_CHECK_URI = "https://github.com/mesonbuild/meson/releases"
> +
> +inherit setuptools3
> +
> +RDEPENDS_${PN} = "ninja python3-core python3-modules"
> +
> +BBCLASSEXTEND = "native"
> --
> 2.15.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
[-- Attachment #2: Type: text/html, Size: 20875 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/7] meson: add a recipe and class from meta-oe
2017-11-15 11:08 ` [PATCH 1/7] meson: add a recipe and class from meta-oe Alexander Kanavin
2017-11-15 11:42 ` Martin Hundebøll
2017-11-15 16:09 ` Burton, Ross
@ 2017-11-15 17:27 ` Martin Kelly
2017-11-15 17:33 ` Martin Kelly
2 siblings, 1 reply; 14+ messages in thread
From: Martin Kelly @ 2017-11-15 17:27 UTC (permalink / raw)
To: Alexander Kanavin, openembedded-core
Hi,
It looks to me like there are some changes here on top of a forked
meson.bbclass from meta-oe. Did you rebase the changes on top of current
meta-oe's meson? From a look at the git logs and file contents, it looks
like it needs a rebase or we may drop some patches.
On 11/15/2017 03:08 AM, Alexander Kanavin wrote:
> The original recipe has been provided and improved by:
>
> Ross Burton <ross.burton@intel.com>
> Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
> Adam C. Foltzer <acfoltzer@galois.com>
> Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> Linus Svensson <linussn@axis.com>
>
> I have added a couple patches to fix up gtk-doc and
> gobject-introspection in cross-compilation environments.
>
> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
> ---
> meta/classes/meson.bbclass | 103 +++++++++++++++++++
> ...ix-issues-that-arise-when-cross-compiling.patch | 113 +++++++++++++++++++++
> ...rospection-determine-g-ir-scanner-and-g-i.patch | 41 ++++++++
> meta/recipes-devtools/meson/meson_0.43.0.bb | 19 ++++
> 4 files changed, 276 insertions(+)
> create mode 100644 meta/classes/meson.bbclass
> create mode 100644 meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
> create mode 100644 meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch
> create mode 100644 meta/recipes-devtools/meson/meson_0.43.0.bb
>
> diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
> new file mode 100644
> index 00000000000..f6cf24c33a7
> --- /dev/null
> +++ b/meta/classes/meson.bbclass
> @@ -0,0 +1,103 @@
> +inherit python3native
> +
> +DEPENDS_append = " meson-native ninja-native"
> +
> +# As Meson enforces out-of-tree builds we can just use cleandirs
> +B = "${WORKDIR}/build"
> +do_configure[cleandirs] = "${B}"
> +
> +# Where the meson.build build configuration is
> +MESON_SOURCEPATH = "${S}"
> +
> +# These variables in the environment override meson's *native* tools settings.
> +# We have to unset them, so that meson doesn't pick up the cross tools and
> +# use them for native builds.
> +unset CC
> +unset CXX
> +unset AR
> +
> +def noprefix(var, d):
> + return d.getVar(var, True).replace(d.getVar('prefix', True) + '/', '', 1)
> +
> +MESONOPTS = " --prefix ${prefix} \
> + --bindir ${@noprefix('bindir', d)} \
> + --sbindir ${@noprefix('sbindir', d)} \
> + --datadir ${@noprefix('datadir', d)} \
> + --libdir ${@noprefix('libdir', d)} \
> + --libexecdir ${@noprefix('libexecdir', d)} \
> + --includedir ${@noprefix('includedir', d)} \
> + --mandir ${@noprefix('mandir', d)} \
> + --infodir ${@noprefix('infodir', d)} \
> + --sysconfdir ${sysconfdir} \
> + --localstatedir ${localstatedir} \
> + --sharedstatedir ${sharedstatedir}"
> +
> +MESON_C_ARGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS}"
> +MESON_LINK_ARGS = "${MESON_C_ARGS} ${LDFLAGS}"
> +
> +MESON_HOST_ENDIAN = "${@bb.utils.contains('SITEINFO_ENDIANNESS', 'be', 'big', 'little', d)}"
> +MESON_TARGET_ENDIAN = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', 'big', 'little', d)}"
> +
> +EXTRA_OEMESON += "${PACKAGECONFIG_CONFARGS}"
> +
> +MESON_CROSS_FILE = ""
> +MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
> +
> +def meson_array(var, d):
> + return "', '".join(d.getVar(var, True).split()).join(("'", "'"))
> +
> +addtask write_config before do_configure
> +do_write_config[vardeps] += "MESON_C_ARGS TOOLCHAIN_OPTIONS"
> +do_write_config() {
> + # This needs to be Py to split the args into single-element lists
> + cat >${WORKDIR}/meson.cross <<EOF
> +[binaries]
> +c = '${HOST_PREFIX}gcc'
> +cpp = '${HOST_PREFIX}g++'
> +ar = '${HOST_PREFIX}ar'
> +ld = '${HOST_PREFIX}ld'
> +strip = '${HOST_PREFIX}strip'
> +readelf = '${HOST_PREFIX}readelf'
> +pkgconfig = 'pkg-config'
> +
> +[properties]
> +needs_exe_wrapper = true
> +c_args = [${@meson_array('MESON_C_ARGS', d)}]
> +c_link_args = [${@meson_array('MESON_LINK_ARGS', d)}]
> +cpp_args = [${@meson_array('MESON_C_ARGS', d)}]
> +cpp_link_args = [${@meson_array('MESON_LINK_ARGS', d)}]
> +gtkdoc_exe_wrapper = '${B}/gtkdoc-qemuwrapper'
> +
> +[host_machine]
> +system = '${HOST_OS}'
> +cpu_family = '${HOST_ARCH}'
> +cpu = '${HOST_ARCH}'
> +endian = '${MESON_HOST_ENDIAN}'
> +
> +[target_machine]
> +system = '${TARGET_OS}'
> +cpu_family = '${TARGET_ARCH}'
> +cpu = '${TARGET_ARCH}'
> +endian = '${MESON_TARGET_ENDIAN}'
> +EOF
> +}
> +
> +CONFIGURE_FILES = "meson.build"
> +
> +meson_do_configure() {
> + if ! meson ${MESONOPTS} "${MESON_SOURCEPATH}" "${B}" ${MESON_CROSS_FILE} ${EXTRA_OEMESON}; then
> + cat ${B}/meson-logs/meson-log.txt
> + bbfatal_log meson failed
> + fi
> +}
> +
> +do_compile[progress] = "outof:^\[(\d+)/(\d+)\]\s+"
> +meson_do_compile() {
> + ninja ${PARALLEL_MAKE}
> +}
> +
> +meson_do_install() {
> + DESTDIR='${D}' ninja ${PARALLEL_MAKEINST} install
> +}
> +
> +EXPORT_FUNCTIONS do_configure do_compile do_install
> diff --git a/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch b/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
> new file mode 100644
> index 00000000000..ca3d7095066
> --- /dev/null
> +++ b/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
> @@ -0,0 +1,113 @@
> +From 15e054dce6ff11d2cb219c8c09a31b26f0e58b62 Mon Sep 17 00:00:00 2001
> +From: Alexander Kanavin <alex.kanavin@gmail.com>
> +Date: Fri, 4 Aug 2017 16:16:41 +0300
> +Subject: [PATCH 1/3] gtkdoc: fix issues that arise when cross-compiling
> +
> +Specifically:
> +1) Make it possible to specify a wrapper for executing binaries
> +(usually, some kind of target hardware emulator, such as qemu)
> +2) Explicitly provide CC and LD via command line, as otherwise gtk-doc will
> +try to guess them, incorrectly.
> +3) If things break down, print the full command with arguments,
> +not just the binary name.
> +4) Correctly determine the compiler/linker executables and cross-options when cross-compiling
> +
> +Upstream-Status: Pending
> +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> +
> +---
> + mesonbuild/modules/gnome.py | 18 +++++++++++++++---
> + mesonbuild/scripts/gtkdochelper.py | 9 +++++++--
> + 2 files changed, 22 insertions(+), 5 deletions(-)
> +
> +diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
> +index 6ec7040..4cfaefd 100644
> +--- a/mesonbuild/modules/gnome.py
> ++++ b/mesonbuild/modules/gnome.py
> +@@ -713,6 +713,10 @@ class GnomeModule(ExtensionModule):
> + '--mode=' + mode]
> + if namespace:
> + args.append('--namespace=' + namespace)
> ++ gtkdoc_exe_wrapper = state.environment.cross_info.config["properties"].get('gtkdoc_exe_wrapper', None)
> ++ if gtkdoc_exe_wrapper is not None:
> ++ args.append('--gtkdoc-exe-wrapper=' + gtkdoc_exe_wrapper)
> ++
> + args += self._unpack_args('--htmlargs=', 'html_args', kwargs)
> + args += self._unpack_args('--scanargs=', 'scan_args', kwargs)
> + args += self._unpack_args('--scanobjsargs=', 'scanobjs_args', kwargs)
> +@@ -741,14 +745,22 @@ class GnomeModule(ExtensionModule):
> + raise MesonException(
> + 'Gir include dirs should be include_directories().')
> + cflags.update(get_include_args(inc_dirs))
> ++
> ++ cross_c_args = " ".join(state.environment.cross_info.config["properties"].get('c_args', ""))
> ++ cross_link_args = " ".join(state.environment.cross_info.config["properties"].get('c_link_args', ""))
> ++
> + if cflags:
> +- args += ['--cflags=%s' % ' '.join(cflags)]
> ++ args += ['--cflags=%s %s' % (cross_c_args,' '.join(cflags))]
> + if ldflags:
> +- args += ['--ldflags=%s' % ' '.join(ldflags)]
> ++ args += ['--ldflags=%s %s' % (cross_link_args, ' '.join(ldflags))]
> + compiler = state.environment.coredata.compilers.get('c')
> +- if compiler:
> ++ cross_compiler = state.environment.coredata.cross_compilers.get('c')
> ++ if compiler and not state.environment.is_cross_build():
> + args += ['--cc=%s' % ' '.join(compiler.get_exelist())]
> + args += ['--ld=%s' % ' '.join(compiler.get_linker_exelist())]
> ++ elif cross_compiler and state.environment.is_cross_build():
> ++ args += ['--cc=%s' % ' '.join(cross_compiler.get_exelist())]
> ++ args += ['--ld=%s' % ' '.join(cross_compiler.get_linker_exelist())]
> +
> + return args
> +
> +diff --git a/mesonbuild/scripts/gtkdochelper.py b/mesonbuild/scripts/gtkdochelper.py
> +index a2cbf5a..19331bd 100644
> +--- a/mesonbuild/scripts/gtkdochelper.py
> ++++ b/mesonbuild/scripts/gtkdochelper.py
> +@@ -44,13 +44,14 @@ parser.add_argument('--ignore-headers', dest='ignore_headers', default='')
> + parser.add_argument('--namespace', dest='namespace', default='')
> + parser.add_argument('--mode', dest='mode', default='')
> + parser.add_argument('--installdir', dest='install_dir')
> ++parser.add_argument('--gtkdoc-exe-wrapper', dest='gtkdoc_exe_wrapper')
> +
> + def gtkdoc_run_check(cmd, cwd):
> + # Put stderr into stdout since we want to print it out anyway.
> + # This preserves the order of messages.
> + p, out = Popen_safe(cmd, cwd=cwd, stderr=subprocess.STDOUT)[0:2]
> + if p.returncode != 0:
> +- err_msg = ["{!r} failed with status {:d}".format(cmd[0], p.returncode)]
> ++ err_msg = ["{!r} failed with status {:d}".format(cmd, p.returncode)]
> + if out:
> + err_msg.append(out)
> + raise MesonException('\n'.join(err_msg))
> +@@ -58,7 +59,7 @@ def gtkdoc_run_check(cmd, cwd):
> + def build_gtkdoc(source_root, build_root, doc_subdir, src_subdirs,
> + main_file, module,
> + html_args, scan_args, fixxref_args, mkdb_args,
> +- gobject_typesfile, scanobjs_args, ld, cc, ldflags, cflags,
> ++ gobject_typesfile, scanobjs_args, gtkdoc_exe_wrapper, ld, cc, ldflags, cflags,
> + html_assets, content_files, ignore_headers, namespace,
> + expand_content_files, mode):
> + print("Building documentation for %s" % module)
> +@@ -111,6 +112,9 @@ def build_gtkdoc(source_root, build_root, doc_subdir, src_subdirs,
> + if gobject_typesfile:
> + scanobjs_cmd = ['gtkdoc-scangobj'] + scanobjs_args + ['--types=' + gobject_typesfile,
> + '--module=' + module,
> ++ '--run=' + gtkdoc_exe_wrapper,
> ++ '--cc=' + cc,
> ++ '--ld=' + ld,
> + '--cflags=' + cflags,
> + '--ldflags=' + ldflags]
> +
> +@@ -206,6 +210,7 @@ def run(args):
> + mkdbargs,
> + options.gobject_typesfile,
> + scanobjsargs,
> ++ options.gtkdoc_exe_wrapper,
> + options.ld,
> + options.cc,
> + options.ldflags,
> +--
> +2.14.1
> +
> diff --git a/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch b/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch
> new file mode 100644
> index 00000000000..f00b9b2a2d1
> --- /dev/null
> +++ b/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch
> @@ -0,0 +1,41 @@
> +From 84cb251a33190ec82faeaad321518af4b309c55e Mon Sep 17 00:00:00 2001
> +From: Alexander Kanavin <alex.kanavin@gmail.com>
> +Date: Fri, 4 Aug 2017 16:18:47 +0300
> +Subject: [PATCH 2/2] gobject-introspection: determine g-ir-scanner and
> + g-ir-compiler paths from pkgconfig
> +
> +Do not hardcode the name of those binaries; gobject-introspection
> +provides them via pkgconfig, and they can be set to something else
> +(for example when cross-compiling).
> +
> +Upstream-Status: Pending
> +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> +---
> + mesonbuild/modules/gnome.py | 4 ++--
> + 1 file changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
> +index ba7e4cd..00472af 100644
> +--- a/mesonbuild/modules/gnome.py
> ++++ b/mesonbuild/modules/gnome.py
> +@@ -380,8 +380,6 @@ class GnomeModule(ExtensionModule):
> + raise MesonException('Gir takes one argument')
> + if kwargs.get('install_dir'):
> + raise MesonException('install_dir is not supported with generate_gir(), see "install_dir_gir" and "install_dir_typelib"')
> +- giscanner = find_program('g-ir-scanner', 'Gir')
> +- gicompiler = find_program('g-ir-compiler', 'Gir')
> + girtarget = args[0]
> + while hasattr(girtarget, 'held_object'):
> + girtarget = girtarget.held_object
> +@@ -392,6 +390,8 @@ class GnomeModule(ExtensionModule):
> + self.gir_dep = PkgConfigDependency('gobject-introspection-1.0',
> + state.environment,
> + {'native': True})
> ++ giscanner = os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_scanner')
> ++ gicompiler = os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_compiler')
> + pkgargs = self.gir_dep.get_compile_args()
> + except Exception:
> + raise MesonException('gobject-introspection dependency was not found, gir cannot be generated.')
> +--
> +2.13.2
> +
> diff --git a/meta/recipes-devtools/meson/meson_0.43.0.bb b/meta/recipes-devtools/meson/meson_0.43.0.bb
> new file mode 100644
> index 00000000000..bbb48d9197c
> --- /dev/null
> +++ b/meta/recipes-devtools/meson/meson_0.43.0.bb
> @@ -0,0 +1,19 @@
> +HOMEPAGE = "http://mesonbuild.com"
> +SUMMARY = "A high performance build system"
> +
> +LICENSE = "Apache-2.0"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
> +
> +SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/${BP}.tar.gz \
> + file://0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch \
> + file://0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch \
> + "
> +SRC_URI[md5sum] = "b0d389cc5937928c2f5114656dc5a99a"
> +SRC_URI[sha256sum] = "c513eca90e0d70bf14cd1eaafea2fa91cf40a73326a7ff61f08a005048057340"
> +UPSTREAM_CHECK_URI = "https://github.com/mesonbuild/meson/releases"
> +
> +inherit setuptools3
> +
> +RDEPENDS_${PN} = "ninja python3-core python3-modules"
> +
> +BBCLASSEXTEND = "native"
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/7] meson: add a recipe and class from meta-oe
2017-11-15 17:27 ` Martin Kelly
@ 2017-11-15 17:33 ` Martin Kelly
0 siblings, 0 replies; 14+ messages in thread
From: Martin Kelly @ 2017-11-15 17:33 UTC (permalink / raw)
To: Alexander Kanavin, openembedded-core
Correction: I took another look after merging in my meson patch, and I
think your branch is fully current.
On 11/15/2017 09:27 AM, Martin Kelly wrote:
> Hi,
>
> It looks to me like there are some changes here on top of a forked
> meson.bbclass from meta-oe. Did you rebase the changes on top of current
> meta-oe's meson? From a look at the git logs and file contents, it looks
> like it needs a rebase or we may drop some patches.
>
> On 11/15/2017 03:08 AM, Alexander Kanavin wrote:
>> The original recipe has been provided and improved by:
>>
>> Ross Burton <ross.burton@intel.com>
>> Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
>> Adam C. Foltzer <acfoltzer@galois.com>
>> Peter Kjellerstedt <peter.kjellerstedt@axis.com>
>> Linus Svensson <linussn@axis.com>
>>
>> I have added a couple patches to fix up gtk-doc and
>> gobject-introspection in cross-compilation environments.
>>
>> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
>> ---
>> meta/classes/meson.bbclass | 103
>> +++++++++++++++++++
>> ...ix-issues-that-arise-when-cross-compiling.patch | 113
>> +++++++++++++++++++++
>> ...rospection-determine-g-ir-scanner-and-g-i.patch | 41 ++++++++
>> meta/recipes-devtools/meson/meson_0.43.0.bb | 19 ++++
>> 4 files changed, 276 insertions(+)
>> create mode 100644 meta/classes/meson.bbclass
>> create mode 100644
>> meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
>>
>> create mode 100644
>> meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch
>>
>> create mode 100644 meta/recipes-devtools/meson/meson_0.43.0.bb
>>
>> diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
>> new file mode 100644
>> index 00000000000..f6cf24c33a7
>> --- /dev/null
>> +++ b/meta/classes/meson.bbclass
>> @@ -0,0 +1,103 @@
>> +inherit python3native
>> +
>> +DEPENDS_append = " meson-native ninja-native"
>> +
>> +# As Meson enforces out-of-tree builds we can just use cleandirs
>> +B = "${WORKDIR}/build"
>> +do_configure[cleandirs] = "${B}"
>> +
>> +# Where the meson.build build configuration is
>> +MESON_SOURCEPATH = "${S}"
>> +
>> +# These variables in the environment override meson's *native* tools
>> settings.
>> +# We have to unset them, so that meson doesn't pick up the cross
>> tools and
>> +# use them for native builds.
>> +unset CC
>> +unset CXX
>> +unset AR
>> +
>> +def noprefix(var, d):
>> + return d.getVar(var, True).replace(d.getVar('prefix', True) +
>> '/', '', 1)
>> +
>> +MESONOPTS = " --prefix ${prefix} \
>> + --bindir ${@noprefix('bindir', d)} \
>> + --sbindir ${@noprefix('sbindir', d)} \
>> + --datadir ${@noprefix('datadir', d)} \
>> + --libdir ${@noprefix('libdir', d)} \
>> + --libexecdir ${@noprefix('libexecdir', d)} \
>> + --includedir ${@noprefix('includedir', d)} \
>> + --mandir ${@noprefix('mandir', d)} \
>> + --infodir ${@noprefix('infodir', d)} \
>> + --sysconfdir ${sysconfdir} \
>> + --localstatedir ${localstatedir} \
>> + --sharedstatedir ${sharedstatedir}"
>> +
>> +MESON_C_ARGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS}"
>> +MESON_LINK_ARGS = "${MESON_C_ARGS} ${LDFLAGS}"
>> +
>> +MESON_HOST_ENDIAN = "${@bb.utils.contains('SITEINFO_ENDIANNESS',
>> 'be', 'big', 'little', d)}"
>> +MESON_TARGET_ENDIAN = "${@bb.utils.contains('TUNE_FEATURES',
>> 'bigendian', 'big', 'little', d)}"
>> +
>> +EXTRA_OEMESON += "${PACKAGECONFIG_CONFARGS}"
>> +
>> +MESON_CROSS_FILE = ""
>> +MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
>> +
>> +def meson_array(var, d):
>> + return "', '".join(d.getVar(var, True).split()).join(("'", "'"))
>> +
>> +addtask write_config before do_configure
>> +do_write_config[vardeps] += "MESON_C_ARGS TOOLCHAIN_OPTIONS"
>> +do_write_config() {
>> + # This needs to be Py to split the args into single-element lists
>> + cat >${WORKDIR}/meson.cross <<EOF
>> +[binaries]
>> +c = '${HOST_PREFIX}gcc'
>> +cpp = '${HOST_PREFIX}g++'
>> +ar = '${HOST_PREFIX}ar'
>> +ld = '${HOST_PREFIX}ld'
>> +strip = '${HOST_PREFIX}strip'
>> +readelf = '${HOST_PREFIX}readelf'
>> +pkgconfig = 'pkg-config'
>> +
>> +[properties]
>> +needs_exe_wrapper = true
>> +c_args = [${@meson_array('MESON_C_ARGS', d)}]
>> +c_link_args = [${@meson_array('MESON_LINK_ARGS', d)}]
>> +cpp_args = [${@meson_array('MESON_C_ARGS', d)}]
>> +cpp_link_args = [${@meson_array('MESON_LINK_ARGS', d)}]
>> +gtkdoc_exe_wrapper = '${B}/gtkdoc-qemuwrapper'
>> +
>> +[host_machine]
>> +system = '${HOST_OS}'
>> +cpu_family = '${HOST_ARCH}'
>> +cpu = '${HOST_ARCH}'
>> +endian = '${MESON_HOST_ENDIAN}'
>> +
>> +[target_machine]
>> +system = '${TARGET_OS}'
>> +cpu_family = '${TARGET_ARCH}'
>> +cpu = '${TARGET_ARCH}'
>> +endian = '${MESON_TARGET_ENDIAN}'
>> +EOF
>> +}
>> +
>> +CONFIGURE_FILES = "meson.build"
>> +
>> +meson_do_configure() {
>> + if ! meson ${MESONOPTS} "${MESON_SOURCEPATH}" "${B}"
>> ${MESON_CROSS_FILE} ${EXTRA_OEMESON}; then
>> + cat ${B}/meson-logs/meson-log.txt
>> + bbfatal_log meson failed
>> + fi
>> +}
>> +
>> +do_compile[progress] = "outof:^\[(\d+)/(\d+)\]\s+"
>> +meson_do_compile() {
>> + ninja ${PARALLEL_MAKE}
>> +}
>> +
>> +meson_do_install() {
>> + DESTDIR='${D}' ninja ${PARALLEL_MAKEINST} install
>> +}
>> +
>> +EXPORT_FUNCTIONS do_configure do_compile do_install
>> diff --git
>> a/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
>> b/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
>>
>> new file mode 100644
>> index 00000000000..ca3d7095066
>> --- /dev/null
>> +++
>> b/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
>>
>> @@ -0,0 +1,113 @@
>> +From 15e054dce6ff11d2cb219c8c09a31b26f0e58b62 Mon Sep 17 00:00:00 2001
>> +From: Alexander Kanavin <alex.kanavin@gmail.com>
>> +Date: Fri, 4 Aug 2017 16:16:41 +0300
>> +Subject: [PATCH 1/3] gtkdoc: fix issues that arise when cross-compiling
>> +
>> +Specifically:
>> +1) Make it possible to specify a wrapper for executing binaries
>> +(usually, some kind of target hardware emulator, such as qemu)
>> +2) Explicitly provide CC and LD via command line, as otherwise
>> gtk-doc will
>> +try to guess them, incorrectly.
>> +3) If things break down, print the full command with arguments,
>> +not just the binary name.
>> +4) Correctly determine the compiler/linker executables and
>> cross-options when cross-compiling
>> +
>> +Upstream-Status: Pending
>> +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>> +
>> +---
>> + mesonbuild/modules/gnome.py | 18 +++++++++++++++---
>> + mesonbuild/scripts/gtkdochelper.py | 9 +++++++--
>> + 2 files changed, 22 insertions(+), 5 deletions(-)
>> +
>> +diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
>> +index 6ec7040..4cfaefd 100644
>> +--- a/mesonbuild/modules/gnome.py
>> ++++ b/mesonbuild/modules/gnome.py
>> +@@ -713,6 +713,10 @@ class GnomeModule(ExtensionModule):
>> + '--mode=' + mode]
>> + if namespace:
>> + args.append('--namespace=' + namespace)
>> ++ gtkdoc_exe_wrapper =
>> state.environment.cross_info.config["properties"].get('gtkdoc_exe_wrapper',
>> None)
>> ++ if gtkdoc_exe_wrapper is not None:
>> ++ args.append('--gtkdoc-exe-wrapper=' + gtkdoc_exe_wrapper)
>> ++
>> + args += self._unpack_args('--htmlargs=', 'html_args', kwargs)
>> + args += self._unpack_args('--scanargs=', 'scan_args', kwargs)
>> + args += self._unpack_args('--scanobjsargs=',
>> 'scanobjs_args', kwargs)
>> +@@ -741,14 +745,22 @@ class GnomeModule(ExtensionModule):
>> + raise MesonException(
>> + 'Gir include dirs should be
>> include_directories().')
>> + cflags.update(get_include_args(inc_dirs))
>> ++
>> ++ cross_c_args = "
>> ".join(state.environment.cross_info.config["properties"].get('c_args',
>> ""))
>> ++ cross_link_args = "
>> ".join(state.environment.cross_info.config["properties"].get('c_link_args',
>> ""))
>> ++
>> + if cflags:
>> +- args += ['--cflags=%s' % ' '.join(cflags)]
>> ++ args += ['--cflags=%s %s' % (cross_c_args,'
>> '.join(cflags))]
>> + if ldflags:
>> +- args += ['--ldflags=%s' % ' '.join(ldflags)]
>> ++ args += ['--ldflags=%s %s' % (cross_link_args, '
>> '.join(ldflags))]
>> + compiler = state.environment.coredata.compilers.get('c')
>> +- if compiler:
>> ++ cross_compiler =
>> state.environment.coredata.cross_compilers.get('c')
>> ++ if compiler and not state.environment.is_cross_build():
>> + args += ['--cc=%s' % ' '.join(compiler.get_exelist())]
>> + args += ['--ld=%s' % '
>> '.join(compiler.get_linker_exelist())]
>> ++ elif cross_compiler and state.environment.is_cross_build():
>> ++ args += ['--cc=%s' % '
>> '.join(cross_compiler.get_exelist())]
>> ++ args += ['--ld=%s' % '
>> '.join(cross_compiler.get_linker_exelist())]
>> +
>> + return args
>> +
>> +diff --git a/mesonbuild/scripts/gtkdochelper.py
>> b/mesonbuild/scripts/gtkdochelper.py
>> +index a2cbf5a..19331bd 100644
>> +--- a/mesonbuild/scripts/gtkdochelper.py
>> ++++ b/mesonbuild/scripts/gtkdochelper.py
>> +@@ -44,13 +44,14 @@ parser.add_argument('--ignore-headers',
>> dest='ignore_headers', default='')
>> + parser.add_argument('--namespace', dest='namespace', default='')
>> + parser.add_argument('--mode', dest='mode', default='')
>> + parser.add_argument('--installdir', dest='install_dir')
>> ++parser.add_argument('--gtkdoc-exe-wrapper', dest='gtkdoc_exe_wrapper')
>> +
>> + def gtkdoc_run_check(cmd, cwd):
>> + # Put stderr into stdout since we want to print it out anyway.
>> + # This preserves the order of messages.
>> + p, out = Popen_safe(cmd, cwd=cwd, stderr=subprocess.STDOUT)[0:2]
>> + if p.returncode != 0:
>> +- err_msg = ["{!r} failed with status {:d}".format(cmd[0],
>> p.returncode)]
>> ++ err_msg = ["{!r} failed with status {:d}".format(cmd,
>> p.returncode)]
>> + if out:
>> + err_msg.append(out)
>> + raise MesonException('\n'.join(err_msg))
>> +@@ -58,7 +59,7 @@ def gtkdoc_run_check(cmd, cwd):
>> + def build_gtkdoc(source_root, build_root, doc_subdir, src_subdirs,
>> + main_file, module,
>> + html_args, scan_args, fixxref_args, mkdb_args,
>> +- gobject_typesfile, scanobjs_args, ld, cc, ldflags,
>> cflags,
>> ++ gobject_typesfile, scanobjs_args,
>> gtkdoc_exe_wrapper, ld, cc, ldflags, cflags,
>> + html_assets, content_files, ignore_headers, namespace,
>> + expand_content_files, mode):
>> + print("Building documentation for %s" % module)
>> +@@ -111,6 +112,9 @@ def build_gtkdoc(source_root, build_root,
>> doc_subdir, src_subdirs,
>> + if gobject_typesfile:
>> + scanobjs_cmd = ['gtkdoc-scangobj'] + scanobjs_args +
>> ['--types=' + gobject_typesfile,
>> +
>> '--module=' + module,
>> ++
>> '--run=' + gtkdoc_exe_wrapper,
>> ++
>> '--cc=' + cc,
>> ++
>> '--ld=' + ld,
>> +
>> '--cflags=' + cflags,
>> +
>> '--ldflags=' + ldflags]
>> +
>> +@@ -206,6 +210,7 @@ def run(args):
>> + mkdbargs,
>> + options.gobject_typesfile,
>> + scanobjsargs,
>> ++ options.gtkdoc_exe_wrapper,
>> + options.ld,
>> + options.cc,
>> + options.ldflags,
>> +--
>> +2.14.1
>> +
>> diff --git
>> a/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch
>> b/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch
>>
>> new file mode 100644
>> index 00000000000..f00b9b2a2d1
>> --- /dev/null
>> +++
>> b/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch
>>
>> @@ -0,0 +1,41 @@
>> +From 84cb251a33190ec82faeaad321518af4b309c55e Mon Sep 17 00:00:00 2001
>> +From: Alexander Kanavin <alex.kanavin@gmail.com>
>> +Date: Fri, 4 Aug 2017 16:18:47 +0300
>> +Subject: [PATCH 2/2] gobject-introspection: determine g-ir-scanner and
>> + g-ir-compiler paths from pkgconfig
>> +
>> +Do not hardcode the name of those binaries; gobject-introspection
>> +provides them via pkgconfig, and they can be set to something else
>> +(for example when cross-compiling).
>> +
>> +Upstream-Status: Pending
>> +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
>> +---
>> + mesonbuild/modules/gnome.py | 4 ++--
>> + 1 file changed, 2 insertions(+), 2 deletions(-)
>> +
>> +diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
>> +index ba7e4cd..00472af 100644
>> +--- a/mesonbuild/modules/gnome.py
>> ++++ b/mesonbuild/modules/gnome.py
>> +@@ -380,8 +380,6 @@ class GnomeModule(ExtensionModule):
>> + raise MesonException('Gir takes one argument')
>> + if kwargs.get('install_dir'):
>> + raise MesonException('install_dir is not supported with
>> generate_gir(), see "install_dir_gir" and "install_dir_typelib"')
>> +- giscanner = find_program('g-ir-scanner', 'Gir')
>> +- gicompiler = find_program('g-ir-compiler', 'Gir')
>> + girtarget = args[0]
>> + while hasattr(girtarget, 'held_object'):
>> + girtarget = girtarget.held_object
>> +@@ -392,6 +390,8 @@ class GnomeModule(ExtensionModule):
>> + self.gir_dep =
>> PkgConfigDependency('gobject-introspection-1.0',
>> + state.environment,
>> + {'native': True})
>> ++ giscanner = os.environ['PKG_CONFIG_SYSROOT_DIR'] +
>> self.gir_dep.get_pkgconfig_variable('g_ir_scanner')
>> ++ gicompiler = os.environ['PKG_CONFIG_SYSROOT_DIR'] +
>> self.gir_dep.get_pkgconfig_variable('g_ir_compiler')
>> + pkgargs = self.gir_dep.get_compile_args()
>> + except Exception:
>> + raise MesonException('gobject-introspection dependency
>> was not found, gir cannot be generated.')
>> +--
>> +2.13.2
>> +
>> diff --git a/meta/recipes-devtools/meson/meson_0.43.0.bb
>> b/meta/recipes-devtools/meson/meson_0.43.0.bb
>> new file mode 100644
>> index 00000000000..bbb48d9197c
>> --- /dev/null
>> +++ b/meta/recipes-devtools/meson/meson_0.43.0.bb
>> @@ -0,0 +1,19 @@
>> +HOMEPAGE = "http://mesonbuild.com"
>> +SUMMARY = "A high performance build system"
>> +
>> +LICENSE = "Apache-2.0"
>> +LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
>> +
>> +SRC_URI =
>> "https://github.com/mesonbuild/meson/releases/download/${PV}/${BP}.tar.gz
>> \
>> +
>> file://0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch \
>> +
>> file://0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch \
>> + "
>> +SRC_URI[md5sum] = "b0d389cc5937928c2f5114656dc5a99a"
>> +SRC_URI[sha256sum] =
>> "c513eca90e0d70bf14cd1eaafea2fa91cf40a73326a7ff61f08a005048057340"
>> +UPSTREAM_CHECK_URI = "https://github.com/mesonbuild/meson/releases"
>> +
>> +inherit setuptools3
>> +
>> +RDEPENDS_${PN} = "ninja python3-core python3-modules"
>> +
>> +BBCLASSEXTEND = "native"
>>
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2017-11-15 17:43 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-15 11:08 [PATCH 0/7] Introduce meson build system Alexander Kanavin
2017-11-15 11:08 ` [PATCH 1/7] meson: add a recipe and class from meta-oe Alexander Kanavin
2017-11-15 11:42 ` Martin Hundebøll
2017-11-15 16:09 ` Burton, Ross
2017-11-15 17:27 ` Martin Kelly
2017-11-15 17:33 ` Martin Kelly
2017-11-15 11:08 ` [PATCH 2/7] gnomebase.bbclass: split into autotools and meson versions Alexander Kanavin
2017-11-15 11:08 ` [PATCH 3/7] json-glib: convert to meson build Alexander Kanavin
2017-11-15 11:08 ` [PATCH 4/7] libepoxy: " Alexander Kanavin
2017-11-15 11:08 ` [PATCH 5/7] libinput: " Alexander Kanavin
2017-11-15 11:08 ` [PATCH 6/7] sysprof: " Alexander Kanavin
2017-11-15 11:08 ` [PATCH 7/7] gst-player: Upgrade, rename to gst-examples Alexander Kanavin
-- strict thread matches above, loose matches on Subject: below --
2017-10-12 14:51 [PATCH 0/7] Introduce meson build system Alexander Kanavin
2017-08-23 17:06 Alexander Kanavin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox