From 6f72db3e92d5e6c181e8d0e5d51c780c6d37408b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Sun, 20 Dec 2020 23:07:21 +0100 Subject: [PATCH] Extent wxwidget so we ware still dunfell compatible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Almost forgot to copy this from meta-microcontroller for kicad. Tested with both layers meta-microcontrollers & meta-musicians on dunfell and master Signed-off-by: Andreas Müller --- appends/meta-oe/wxwidgets_%.bbappend | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 appends/meta-oe/wxwidgets_%.bbappend diff --git a/appends/meta-oe/wxwidgets_%.bbappend b/appends/meta-oe/wxwidgets_%.bbappend new file mode 100644 index 0000000..81d3e00 --- /dev/null +++ b/appends/meta-oe/wxwidgets_%.bbappend @@ -0,0 +1,33 @@ +# Will did send this to meta-oe master but don't expect to get it into dunfell. +# So do the necessary changes in a way that is compatibile to meta-oe dunfell +# and master + +inherit binconfig + +PACKAGECONFIG_append = " ${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}" +PACKAGECONFIG[opengl] = ",,libglu" + +do_patch[postfuncs] += "do_patch_nocross" +do_patch_nocross() { + # This one will be patched in meta-oe but we cannot do same + sed -i 's:@cross_compiling@:no:g' ${S}/wx-config.in +} + +do_compile_append() { + if [ -L ${B}/wx-config ]; then + echo "wxwidget recipe is not yet updated to wx-config adjustments so we do" + # ${B}/wx-config is a symlink for build and not needed after compile + # So for our purposes do: + # 1. make a file out of wx-config so that binconfig.bbclass detects it + # 2. make sure we do not move the file used for compiling into sysroot + cp --remove-destination `readlink ${B}/wx-config | sed 's:inplace-::'` ${B}/wx-config + fi + # 3. Set full sysroot paths so sstate can translate them when setting + # up wxwidgets's consumer sysroots + sed -i \ + -e 's,^includedir=.*,includedir="${STAGING_INCDIR}",g' \ + -e 's,^libdir=.*",libdir="${STAGING_LIBDIR}",g' \ + -e 's,^bindir=.*",bindir="${STAGING_BINDIR}",g' \ + ${B}/wx-config +} +