From 5fc9e4b4620aff88ffc4f4a092b66446524465e7 Mon Sep 17 00:00:00 2001 From: Bruce Leidl Date: Tue, 15 Jan 2019 11:33:50 -0500 Subject: [PATCH] Moved this into a class, it's still needed by a couple of recipes --- meta-gnome/classes/meson-exe-wrapper.bbclass | 25 ++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 meta-gnome/classes/meson-exe-wrapper.bbclass diff --git a/meta-gnome/classes/meson-exe-wrapper.bbclass b/meta-gnome/classes/meson-exe-wrapper.bbclass new file mode 100644 index 0000000..60eec40 --- /dev/null +++ b/meta-gnome/classes/meson-exe-wrapper.bbclass @@ -0,0 +1,25 @@ +# +# 1) write out a wrapper script that can execute target binaries +# +# 2) add exe_wrapper line to the end of [binaries] section in the +# meson.cross file that meson.bbclass generated +# +setup_wrapper() { + if [ ! -e ${B}/wrapper ]; then + cat > ${B}/wrapper << EOF +#!/bin/sh +${STAGING_LIBDIR}/ld-linux-x86-64.so.2 --library-path ${STAGING_LIBDIR} \$@ +EOF + chmod +x ${B}/wrapper + fi + + if ! grep -q "^exe_wrapper" ${WORKDIR}/meson.cross; then + cat ${WORKDIR}/meson.cross | sed "/pkgconfig/ a\ +exe_wrapper = '${B}/wrapper'" > ${WORKDIR}/meson.cross.tmp + mv ${WORKDIR}/meson.cross.tmp ${WORKDIR}/meson.cross + fi +} + +do_configure_prepend() { + setup_wrapper +}