backport some stuff for newer recipe compat
authorGrazvydas Ignotas <notasas@gmail.com>
Wed, 1 Oct 2014 01:33:05 +0000 (04:33 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Wed, 1 Oct 2014 01:33:41 +0000 (04:33 +0300)
classes/utils.bbclass
conf/bitbake.conf

index 6ff11dd..c106fb7 100644 (file)
@@ -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 <<END >$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
 
index 25b8782..3003222 100644 (file)
@@ -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.