#!/bin/sh

__BITBAKE_LAST_LINE=0

# Emit a useful diagnostic if something fails:
bb_sh_exit_handler() {
    ret=$?
    if [ "$ret" != 0 ]; then
        echo "WARNING: exit code $ret from a shell command."
    fi
    exit $ret
}

bb_bash_exit_handler() {
    ret=$?
    { set +x; } > /dev/null
    trap "" DEBUG
    if [ "$ret" != 0 ]; then
        echo "WARNING: ${BASH_SOURCE[0]}:${__BITBAKE_LAST_LINE} exit $ret from '$1'"

        echo "WARNING: Backtrace (BB generated script): "
        for i in $(seq 1 $((${#FUNCNAME[@]} - 1))); do
            if [ "$i" -eq 1 ]; then
                echo -e "	#$((i)): ${FUNCNAME[$i]}, ${BASH_SOURCE[$((i-1))]}, line ${__BITBAKE_LAST_LINE}"
            else
                echo -e "	#$((i)): ${FUNCNAME[$i]}, ${BASH_SOURCE[$((i-1))]}, line ${BASH_LINENO[$((i-1))]}"
            fi
        done
    fi
    exit $ret
}

bb_bash_debug_handler() {
    local line=${BASH_LINENO[0]}
    # For some reason the DEBUG trap trips with lineno=1 when scripts exit; ignore it
    if [ "$line" -eq 1 ]; then
        return
    fi

    # Track the line number of commands as they execute. This is so we can have access to the failing line number
    # in the EXIT trap. See http://gnu-bash.2382.n7.nabble.com/trap-echo-quot-trap-exit-on-LINENO-quot-EXIT-gt-wrong-linenumber-td3666.html
    if [ "${FUNCNAME[1]}" != "bb_bash_exit_handler" ]; then
        __BITBAKE_LAST_LINE=$line
    fi
}

case $BASH_VERSION in
"") trap 'bb_sh_exit_handler' 0
    set -e
    ;;
*)  trap 'bb_bash_exit_handler "$BASH_COMMAND"' 0
    trap '{ bb_bash_debug_handler; } 2>/dev/null' DEBUG
    set -e
    shopt -s extdebug
    ;;
esac
export AR="ar"
export AS="as "
export BUILD_AR="ar"
export BUILD_AS="as "
export BUILD_CC="gcc "
export BUILD_CCLD="gcc "
export BUILD_CFLAGS="-isystem/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/include -O2 -pipe -std=gnu17"
export BUILD_CPP="gcc  -E"
export BUILD_CPPFLAGS="-isystem/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/include"
export BUILD_CXX="g++ "
export BUILD_CXXFLAGS="-isystem/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/include -O2 -pipe -std=gnu17"
export BUILD_FC="gfortran "
export BUILD_LD="ld "
export BUILD_LDFLAGS="-L/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib                         -L/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/lib                         -Wl,--enable-new-dtags                         -Wl,-rpath-link,/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib                         -Wl,-rpath-link,/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/lib                         -Wl,-rpath,/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib                         -Wl,-rpath,/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/lib                         -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/sim/yocto/scarthgap/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 -pthread"
export BUILD_NM="nm"
export BUILD_RANLIB="ranlib -D"
export BUILD_STRIP="strip"
export CC="gcc "
export CCLD="gcc "
export CC_FOR_BUILD="gcc "
export CFLAGS="-isystem/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/include -O2 -pipe -std=gnu17"
export CFLAGS_FOR_BUILD="-isystem/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/include -O2 -pipe -std=gnu17"
export CONFIG_SITE="/home/sim/yocto/scarthgap/poky/meta/site/endian-little /home/sim/yocto/scarthgap/poky/meta/site/common-linux /home/sim/yocto/scarthgap/poky/meta/site/common-glibc /home/sim/yocto/scarthgap/poky/meta/site/x86_64-linux /home/sim/yocto/scarthgap/poky/meta/site/common"
export CPP="gcc  -E"
export CPPFLAGS="-isystem/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/include"
export CPPFLAGS_FOR_BUILD="-isystem/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/include"
export CPP_FOR_BUILD="gcc  -E"
export CXX="g++ "
export CXXFLAGS="-isystem/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/include -O2 -pipe -std=gnu17"
export CXXFLAGS_FOR_BUILD="-isystem/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/include -O2 -pipe -std=gnu17"
export CXX_FOR_BUILD="g++ "
export FC="gfortran "
export GIT_CEILING_DIRECTORIES="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4:/home/sim/yocto/scarthgap/build/tmp"
export HOME="/home/sim"
export LC_ALL="en_US.UTF-8"
export LD="ld "
export LDFLAGS="-L/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib                         -L/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/lib                         -Wl,--enable-new-dtags                         -Wl,-rpath-link,/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib                         -Wl,-rpath-link,/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/lib                         -Wl,-rpath,/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib                         -Wl,-rpath,/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/lib                         -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/sim/yocto/scarthgap/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 -pthread"
export LDFLAGS_FOR_BUILD="-L/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib                         -L/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/lib                         -Wl,--enable-new-dtags                         -Wl,-rpath-link,/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib                         -Wl,-rpath-link,/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/lib                         -Wl,-rpath,/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib                         -Wl,-rpath,/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/lib                         -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/sim/yocto/scarthgap/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 -pthread"
export LD_FOR_BUILD="ld "
export LOGNAME="sim"
export MAKE="make"
export NM="nm"
export OBJCOPY="objcopy"
export OBJDUMP="objdump"
export OMP_NUM_THREADS="8"
export PATH="/home/sim/yocto/scarthgap/poky/scripts/native-intercept:/home/sim/yocto/scarthgap/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/sim/yocto/scarthgap/poky/scripts:/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/bin/x86_64-linux:/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/bin:/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/sbin:/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/bin:/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/sbin:/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/bin:/home/sim/yocto/scarthgap/poky/bitbake/bin:/home/sim/yocto/scarthgap/build/tmp/hosttools"
export PERL_HASH_SEED="0"
export PKG_CONFIG_DIR="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib/pkgconfig"
export PKG_CONFIG_DISABLE_UNINSTALLED="yes"
export PKG_CONFIG_LIBDIR="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib/pkgconfig"
export PKG_CONFIG_PATH="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib/pkgconfig:/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/share/pkgconfig"
export PKG_CONFIG_SYSROOT_DIR=""
unset PKG_CONFIG_SYSTEM_INCLUDE_PATH
unset PKG_CONFIG_SYSTEM_LIBRARY_PATH
export PSEUDO_DISABLED="1"
export PSEUDO_UNLOAD="1"
export PYTHONHASHSEED="0"
export RANLIB="ranlib -D"
export READELF="readelf"
unset SHELL
export SOURCE_DATE_EPOCH="1672531355"
export STRINGS="strings"
export STRIP="strip"
export TZ="UTC"
export USER="sim"
export base_bindir="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/bin"
export base_libdir="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib"
export base_prefix="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native"
export base_sbindir="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/sbin"
export bindir="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/bin"
export datadir="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/share"
export docdir="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/share/doc"
export exec_prefix="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr"
export includedir="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/include"
export infodir="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/share/info"
export libdir="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib"
export libexecdir="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/libexec"
export localstatedir="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/var"
export lt_cv_sys_lib_dlsearch_path_spec="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib /lib /lib64 /usr/lib /usr/lib64"
export mandir="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/share/man"
export nonarch_base_libdir="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/lib"
export nonarch_libdir="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib"
export prefix="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr"
export sbindir="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/sbin"
export servicedir="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/srv"
export sharedstatedir="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/com"
export sysconfdir="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/etc"
export systemd_system_unitdir="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/lib/systemd/system"
export systemd_unitdir="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/lib/systemd"
export systemd_user_unitdir="/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib/systemd/user"

# line: 166, file: /home/sim/yocto/scarthgap/poky/meta/recipes-core/ncurses/ncurses.inc
do_install() {
        # Order of installation is important; widec installs a 'curses.h'
        # header with more definitions and must be installed last hence.
        # Compatibility of these headers will be checked in 'do_test()'.
        oe_runmake -C narrowc   DESTDIR='/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image'   PKG_CONFIG_LIBDIR='/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib/pkgconfig'   install.libs install.man  \
                install.progs

        # The install.data should run after install.libs, otherwise
        # there would be a race issue in a very critical conditon, since
        # tic will be run by install.data, and tic needs libtinfo.so
        # which would be regenerated by install.libs.
        oe_runmake -C narrowc   DESTDIR='/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image'   PKG_CONFIG_LIBDIR='/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib/pkgconfig'  \
                install.data


        ! true || \
            oe_runmake -C widec   DESTDIR='/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image'   PKG_CONFIG_LIBDIR='/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib/pkgconfig'   install.libs install.man 

        cd narrowc

        # include some basic terminfo files
        # stolen ;) from gentoo and modified a bit
        for x in ansi console dumb linux rxvt screen screen-256color sun vt52 vt100 vt102 vt200 vt220 xterm-color xterm-xfree86 xterm-256color
        do
                local termfile="$(find "/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/share/terminfo/" -name "${x}" 2>/dev/null)"
                local basedir="$(basename $(dirname "${termfile}"))"

                if [ -n "${termfile}" ]
                then
                        install -d /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/etc/terminfo/${basedir}
                        mv ${termfile} /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/etc/terminfo/${basedir}/
                        ln -s /etc/terminfo/${basedir}/${x} \
                                /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/share/terminfo/${basedir}/${x}
                fi
        done
        # i think we can use xterm-color as default xterm
        if [ -e /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/etc/terminfo/x/xterm-color ]
        then
                ln -sf xterm-color /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/etc/terminfo/x/xterm
        fi

        # When changing /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib to e.g. /usr/lib/myawesomelib/ ncurses
        # still installs '/usr/lib/terminfo', so try to rm both
        # the proper path and a slightly hardcoded one
        rm -f /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib/terminfo /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib/terminfo

        # create linker scripts for libcurses.so and libncurses to
        # link against -ltinfo when needed. Some builds might break
        # else when '-Wl,--no-copy-dt-needed-entries' has been set in
        # linker flags.
        for i in libncurses libncursesw; do
                f=/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib/$i.so
                test -h $f || continue
                rm -f $f
                echo '/* GNU ld script */'  >$f
                echo "INPUT($i.so.5 AS_NEEDED(-ltinfo))" >>$f
        done

        # Make sure that libcurses is linked so that it gets -ltinfo
        # also, this should be addressed upstream really.
        ln -sf libncurses.so /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib/libcurses.so

        # create libtermcap.so linker script for backward compatibility
        f=/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib/libtermcap.so
        echo '/* GNU ld script */' >$f
        echo 'INPUT(AS_NEEDED(-ltinfo))' >>$f

        if [ ! -d "/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib" ]; then
            # Setting base_libdir to libdir as is done in the -native
            # case will skip this code
            mkdir -p /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib
            mv /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib/libncurses.so.* /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib
            ! true || \
                mv /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib/libncursesw.so.* /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib

            mv /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib/libtinfo.so.* /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib
            rm /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib/libtinfo.so

            # Use ln -rs to ensure this is a relative link despite absolute paths
            # (as we can't know the relationship between base_libdir and libdir).
            ln -rs /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib/libtinfo.so.5 /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/lib/libtinfo.so
        fi
        if [ -d "/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/include/ncurses" ]; then
            for f in `find /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/include/ncurses -name "*.h"`
            do
	        f=`basename $f`
	        test -e /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/include/$f && continue
                ln -sf ncurses/$f /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/include/$f
            done
        fi
        oe_multilib_header curses.h
	for x in /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/bin/ncurses5-config /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/bin/ncursesw5-config 	/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/bin/ncurses6-config /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/recipe-sysroot-native/usr/bin/ncursesw6-config; do
		# Make the disabled script emit invalid parameters for those configure
		# scripts which call it without checking the return code.
		echo "#!/bin/sh" > /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image$x
		echo "echo 'ERROR: $x should not be used, use an alternative such as pkg-config' >&2" >> /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image$x
		echo "echo '--should-not-have-used-$x'" >> /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image$x
		echo "exit 1" >> /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image$x
		chmod +x /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/image$x
	done
}

# line: 14, file: /home/sim/yocto/scarthgap/poky/meta/classes-recipe/multilib_header.bbclass
oe_multilib_header() {
	return
}

# line: 41, file: /home/sim/yocto/scarthgap/poky/meta/classes-global/base.bbclass
oe_runmake() {
	oe_runmake_call "$@" || die "oe_runmake failed"
}

# line: 32, file: /home/sim/yocto/scarthgap/poky/meta/classes-global/base.bbclass
die() {
	bbfatal_log "$*"
}

# line: 36, file: /home/sim/yocto/scarthgap/poky/meta/classes-global/base.bbclass
oe_runmake_call() {
	bbnote make -j 8  "$@"
	make -j 8  "$@"
}

# line: 72, file: /home/sim/yocto/scarthgap/poky/meta/classes-global/logging.bbclass
bbfatal_log() {
	if [ -p /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/temp/fifo.264060 ] ; then
		printf "%b\0" "bbfatal_log $*" > /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/temp/fifo.264060
	else
		echo "ERROR: $*"
	fi
	exit 1
}

# line: 27, file: /home/sim/yocto/scarthgap/poky/meta/classes-global/logging.bbclass
bbnote() {
	if [ -p /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/temp/fifo.264060 ] ; then
		printf "%b\0" "bbnote $*" > /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/temp/fifo.264060
	else
		echo "NOTE: $*"
	fi
}

cd '/home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/ncurses-native/6.4/build'
do_install

# cleanup
ret=$?
trap '' 0
exit $ret
