From: Grazvydas Ignotas Date: Wed, 1 Oct 2014 01:33:05 +0000 (+0300) Subject: backport some stuff for newer recipe compat X-Git-Tag: sz_173~122 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57f59fe9abf9de30eaffeb7aa7461487c095303f;p=openembedded.git backport some stuff for newer recipe compat --- diff --git a/classes/utils.bbclass b/classes/utils.bbclass index 6ff11dd4a7..c106fb72b1 100644 --- a/classes/utils.bbclass +++ b/classes/utils.bbclass @@ -496,6 +496,30 @@ oe_machinstall() { fi } +create_wrapper () { + # Create a wrapper script + # + # These are useful to work around relocation issues, by setting environment + # variables which point to paths in the filesystem. + # + # Usage: create_wrapper FILENAME [[VAR=VALUE]..] + + cmd=$1 + shift + + # run echo via env to test syntactic validity of the variable arguments + env $@ echo "Generating wrapper script for $cmd" + + mv $cmd $cmd.real + cmdname=`basename $cmd`.real + cat <$cmd +#!/bin/sh +realpath=\`readlink -fn \$0\` +exec env $@ \`dirname \$realpath\`/$cmdname "\$@" +END + chmod +x $cmd +} + def check_app_exists(app, d): from bb import which, data diff --git a/conf/bitbake.conf b/conf/bitbake.conf index 25b87822d4..3003222a8d 100644 --- a/conf/bitbake.conf +++ b/conf/bitbake.conf @@ -85,6 +85,10 @@ bindir_cross = "/bin" # := is used carefully here # target_datadir := "${datadir}" +# Used to find env/perl/python +USRBINPATH = "${bindir}" +USRBINPATH_class-native = "/usr/bin" +USRBINPATH_class-nativesdk = "/usr/bin" ################################################################## # Architecture-dependent build variables.