All pastes #15768 Raw Edit

Mine

public text v1 · immutable
#15768 ·published 2005-06-24 14:19 UTC
rendered paste body
#!/bin/sh -e
export CPPFLAGS="-I/usr/tmp/oetmp/staging/i686-linux/include"
                                                                                                                             
export sharedstatedir="/usr/tmp/oetmp/staging/com"
                                                                                                                             
export localstatedir="/usr/tmp/oetmp/staging/var"
                                                                                                                             
export prefix="/usr/tmp/oetmp/staging"
                                                                                                                             
export CPP="gcc -E"
                                                                                                                             
export mandir="/usr/tmp/oetmp/staging/i686-linux/share/man"
                                                                                                                             
export exec_prefix="/usr/tmp/oetmp/staging/i686-linux"
                                                                                                                             
export OPIEDIR="/usr/tmp/oetmp/staging/i686-linux"
                                                                                                                             
export STRIP="strip"
                                                                                                                             
export palmqtdir="/opt/QtPalmtop"
                                                                                                                             
export BUILD_CC="ccache gcc"
                                                                                                                             
export CONFIG_SITE="/home/sriram/oe/openembedded/site/i686-linux"
                                                                                                                             
export base_sbindir="/usr/tmp/oetmp/staging/i686-linux/bin"
                                                                                                                             
export CXX="ccache g++"
                                                                                                                             
export QTDIR="/usr/tmp/oetmp/staging/i686-linux/qt2"
                                                                                                                             
export BUILD_RANLIB="ranlib"
                                                                                                                             
export BUILD_LDFLAGS="-L/usr/tmp/oetmp/staging/i686-linux/lib -Wl,-rpath-link,/usr/tmp/oetmp/staging/i686-linux/lib -Wl,-rpath,/usr/tmp/oetmp/staging/i686-linux/lib -Wl,-O1"
                                                                                                                             
export BUILD_AR="ar"
                                                                                                                             
export QMAKE_MKSPEC_PATH="/usr/tmp/oetmp/staging/i686-linux/share/qmake"
                                                                                                                             


export BUILD_CXXFLAGS="-I/usr/tmp/oetmp/staging/i686-linux/include -O2 -fpermissive"
 
export PKG_CONFIG_PATH="/usr/tmp/oetmp/staging/i686-linux/share/pkgconfig"
 
export oldincludedir="/usr/tmp/oetmp/staging/i686-linux/include"
 
export BUILD_CFLAGS="-I/usr/tmp/oetmp/staging/i686-linux/include -O2"
 
export sysconfdir="/usr/tmp/oetmp/staging/etc"
 
export MANIFEST="/home/sriram/oe/openembedded/packages/quilt/files/./manifest"
 
export CCLD="ccache gcc"
 
export libexecdir="/usr/tmp/oetmp/staging/i686-linux/libexec"
 
export docdir="/usr/tmp/oetmp/staging/i686-linux/share/doc"
 
export PATCH_GET="0"
 
export QPEDIR="/usr/tmp/oetmp/staging/i686-linux"
 
export CXXFLAGS="-I/usr/tmp/oetmp/staging/i686-linux/include -O2"
 
export palmtopdir="/opt/QtPalmtop"
 
export PKG_CONFIG_DISABLE_UNINSTALLED="yes"
 
export infodir="/usr/tmp/oetmp/staging/i686-linux/share/info"
 
export BUILD_CCLD="gcc"

export libdir="/usr/tmp/oetmp/staging/i686-linux/lib"
 
export STAGING_SIPDIR="/usr/tmp/oetmp/staging/i686-linux/share/sip"
 
export base_prefix="/usr/tmp/oetmp/staging/i686-linux"
 
export datadir="/usr/tmp/oetmp/staging/i686-linux/share"
 
export CC="ccache gcc"
 
export BBPATH="/home/sriram/oe/openembedded/packages/quilt:/home/sriram/oe/openembedded/packages/quilt:/home/sriram/oe/build:/home/sriram/oe/openembedded"
 
export F77="ccache g77"
 
export RANLIB="ranlib"
 
export base_libdir="/usr/tmp/oetmp/staging/i686-linux/lib"
 
export servicedir="/usr/tmp/oetmp/staging/srv"
 
export BUILD_LD="ld"
 
export STAGING_IDLDIR="/usr/tmp/oetmp/staging/i686-linux/share/idl"
 
export BUILD_STRIP="strip"
 
export BUILD_F77="ccache g77"
 
export MAKE="make"
 
export BUILD_CXX="ccache g++"
 
export PATH="/usr/tmp/oetmp/staging/i686-linux/bin/i686-linux:/usr/tmp/oetmp/staging/i686-linux/bin:/usr/tmp/oetmp/cross/bin:/home/sriram/oe/bitbake/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/sriram/bin"
 
export TARGET_CFLAGS="-I/usr/tmp/oetmp/staging/i686-linux/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2"
 
export base_bindir="/usr/tmp/oetmp/staging/i686-linux/bin"
 
export LDFLAGS="-L/usr/tmp/oetmp/staging/i686-linux/lib -Wl,-rpath-link,/usr/tmp/oetmp/staging/i686-linux/lib -Wl,-rpath,/usr/tmp/oetmp/staging/i686-linux/lib -Wl,-O1"
 
export BUILD_CPP="cpp"
 
export sbindir="/usr/tmp/oetmp/staging/i686-linux/bin"
 
export bindir="/usr/tmp/oetmp/staging/i686-linux/bin"
 
export LD="ld"
 
export AS="as"
 
export AR="ar"
 
export TARGET_LDFLAGS="-L/usr/tmp/oetmp/staging/i686-linux/lib -Wl,-rpath-link,/usr/tmp/oetmp/staging/i686-linux/lib -Wl,-O1" 
export TARGET_CXXFLAGS="-I/usr/tmp/oetmp/staging/i686-linux/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -fpermissive"
 
export BUILD_CPPFLAGS="-I/usr/tmp/oetmp/staging/i686-linux/include"
 
export includedir="/usr/tmp/oetmp/staging/i686-linux/include"
 
export CFLAGS="-I/usr/tmp/oetmp/staging/i686-linux/include -O2"
 
export TARGET_CPPFLAGS="-I/usr/tmp/oetmp/staging/i686-linux/include"
 
base_do_package() {
        :
 
}
 
oewarn() {
        echo "WARNING:" "$*"
 
}
 
do_patchcmd() {
num='1'; name='install.patch'; file='/home/sriram/oe/openembedded/packages/quilt/files/install.patch'; patch -p "$num" -i "$file"
}
 
oe_soinstall() {
        # Purpose: Install shared library file and
        #          create the necessary links
        # Example:
        #
        # oe_
        #
        #oenote installing shared library $1 to $2
        #
        libname=`basename $1`
        install -m 755 $1 $2/$libname
        sonamelink=`readelf -d $1 |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'`
        solink=`echo $libname | sed -e 's/\.so\..*/.so/'`
        ln -sf $libname $2/$sonamelink
        ln -sf $libname $2/$solink
 
}
 
autotools_do_install() {
        oe_runmake 'DESTDIR=/usr/tmp/oetmp/work/quilt-native-0.39-r0/image' install
 
}
 
oe_machinstall() {
        # Purpose: Install machine dependent files, if available
        #          If not available, check if there is a default
        #          If no default, just touch the destination
        # Example:
        #                $1  $2   $3         $4
        # oe_machinstall -m 0644 fstab /usr/tmp/oetmp/work/quilt-native-0.39-r0/image/etc/fstab
        #
        # TODO: Check argument number?
        #
        filename=`basename $3`
        dirname=`dirname $3`
 
        for o in `echo task_do_patch:local:omap5912osk:generic:linux:i686 | tr ':' ' '`; do
                if [ -e $dirname/$o/$filename ]; then
                        oenote $dirname/$o/$filename present, installing to $4
                        install $1 $2 $dirname/$o/$filename $4
                        return
                fi
        done
#       oenote overrides specific file NOT present, trying default=$3...
        if [ -e $3 ]; then
                oenote $3 present, installing to $4
                install $1 $2 $3 $4
        else
                oenote $3 NOT present, touching empty $4
                touch $4
        fi
 
}
 
die() {
        oefatal "$*"
 
}
 
ldconfig_postinst_fragment() {
if [ x"$D" = "x" ]; then
        ldconfig
fi
 
}
 
base_do_install() {
        :
 
}
 
autotools_do_configure() {
        case quilt-native in
        autoconf*)
        ;;
        automake*)
        ;;
        *)
                # WARNING: gross hack follows:
                # An autotools built package generally needs these scripts, however only
                # automake or libtoolize actually install the current versions of them.
                # This is a problem in builds that do not use libtool or automake, in the case
                # where we -need- the latest version of these scripts.  e.g. running a build
                # for a package whose autotools are old, on an x86_64 machine, which the old
                # config.sub does not support.  Work around this by installing them manually
                # regardless.
                ( for ac in `find /usr/tmp/oetmp/work/quilt-native-0.39-r0/quilt -name configure.in -o -name configure.ac`; do
                        rm -f `dirname $ac`/configure
                        done )
                if [ -e /usr/tmp/oetmp/work/quilt-native-0.39-r0/quilt/configure.in -o -e /usr/tmp/oetmp/work/quilt-native-0.39-r0/quilt/configure.ac ]; then
                        olddir=`pwd`
                        cd /usr/tmp/oetmp/work/quilt-native-0.39-r0/quilt
                        if [ x"default" = xdefault ]; then
                                acpaths=
                                for i in `find /usr/tmp/oetmp/work/quilt-native-0.39-r0/quilt -maxdepth 2 -name \*.m4|grep -v 'aclocal.m4'| \
                                        grep -v 'acinclude.m4' | sed -e 's,\(.*/\).*$,\1,'|sort -u`; do
                                        acpaths="$acpaths -I $i"
                                done
                        else
                                acpaths="default"
                        fi
                        AUTOV=`automake --version |head -n 1 |sed "s/.* //;s/\.[0-9]\+$//"`
                        automake --version
                        echo "AUTOV is $AUTOV"
                        install -d /usr/tmp/oetmp/staging/i686-linux/share/aclocal
                        install -d /usr/tmp/oetmp/staging/i686-linux/share/aclocal-$AUTOV
                        acpaths="$acpaths -I /usr/tmp/oetmp/staging/i686-linux/share/aclocal-$AUTOV -I /usr/tmp/oetmp/staging/i686-linux/share/aclocal"
                        # autoreconf is too shy to overwrite aclocal.m4 if it doesn't look
                        # like it was auto-generated.  Work around this by blowing it away
                        # by hand, unless the package specifically asked not to run aclocal.
                        if ! echo --exclude=autopoint | grep -q "aclocal"; then
                                rm -f aclocal.m4
                        fi
                        if [ -e configure.in ]; then
                          CONFIGURE_AC=configure.in
                        else
                          CONFIGURE_AC=configure.ac
                        fi
                        if grep "^AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
                          if grep "sed.*POTFILES" $CONFIGURE_AC >/dev/null; then
                            : do nothing -- we still have an old unmodified configure.ac
                          else
                            oenote Executing glib-gettextize --force --copy
                            echo "no" | glib-gettextize --force --copy
                          fi
                        fi
                        if grep "^AC_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then
                          oenote Executing intltoolize --copy --force --automake
                          intltoolize --copy --force --automake
                        fi
                        oenote Executing autoreconf --verbose --install --force --exclude=autopoint $acpaths
                        mkdir -p m4
                        autoreconf -Wcross --verbose --install --force --exclude=autopoint $acpaths || oefatal "autoreconf execution failed."
                        cd $olddir
                fi
        ;;
        esac
        if [ -e /usr/tmp/oetmp/work/quilt-native-0.39-r0/quilt/configure ]; then
                oe_runconf
        else
                oenote "nothing to configure"
        fi
 
}
 
base_do_stage() {
        :
 
}
 
oefatal() {
        echo "FATAL:" "$*"
        exit 1
 
}
 
MIRRORS() {
ftp://ftp.debian.org/debian/pool/main   http://snapshot.debian.net/archive/pool
ftp://ftp.debian.org/debian/pool        ftp://ftp.de.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool        ftp://ftp.au.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool        ftp://ftp.cl.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool        ftp://ftp.hr.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool        ftp://ftp.fi.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool        ftp://ftp.hk.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool        ftp://ftp.hu.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool        ftp://ftp.ie.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool        ftp://ftp.it.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool        ftp://ftp.jp.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool        ftp://ftp.no.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool        ftp://ftp.pl.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool        ftp://ftp.ro.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool        ftp://ftp.si.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool        ftp://ftp.es.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool        ftp://ftp.se.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool        ftp://ftp.tr.debian.org/debian/pool
ftp://ftp.gnu.org/gnu   ftp://mirrors.kernel.org/gnu
ftp://ftp.gnu.org/gnu   ftp://ftp.matrix.com.br/pub/gnu
ftp://ftp.gnu.org/gnu   ftp://ftp.cs.ubc.ca/mirror2/gnu
ftp://ftp.gnu.org/gnu   ftp://sunsite.ust.hk/pub/gnu
ftp://ftp.gnu.org/gnu   ftp://ftp.ayamura.org/pub/gnu
ftp://ftp.kernel.org/pub        http://www.kernel.org/pub
ftp://ftp.kernel.org/pub        ftp://ftp.us.kernel.org/pub
ftp://ftp.kernel.org/pub        ftp://ftp.uk.kernel.org/pub
ftp://ftp.kernel.org/pub        ftp://ftp.hk.kernel.org/pub
ftp://ftp.kernel.org/pub        ftp://ftp.au.kernel.org/pub
ftp://ftp.kernel.org/pub        ftp://ftp.jp.kernel.org/pub
ftp://.*/.*/    http://www.oesources.org/source/current/
http://.*/.*/   http://www.oesources.org/source/current/
 
}
 
base_do_compile() {
        if [ -e Makefile -o -e makefile ]; then
                oe_runmake || die "make failed"
        else
                oenote "nothing to compile"
        fi
 
}
 
base_do_configure() {
        :
 
}
 
oedebug() {
        test $# -ge 2 || {
                echo "Usage: oedebug level \"message\""
                exit 1
        }
 
        test ${OEDEBUG:-0} -ge $1 && {
                shift
                echo "DEBUG:" $*
        }
 
}
 
do_compile() {
        base_do_compile
 
}
 
oe_runconf() {
        if [ -x /usr/tmp/oetmp/work/quilt-native-0.39-r0/quilt/configure ] ; then
                cfgcmd="/usr/tmp/oetmp/work/quilt-native-0.39-r0/quilt/configure \
                    --build=i686-linux \
                    --host=i686-linux \
                    --target=i686-linux \
                    --prefix=/usr/tmp/oetmp/staging \
                    --exec_prefix=/usr/tmp/oetmp/staging/i686-linux \
                    --bindir=/usr/tmp/oetmp/staging/i686-linux/bin \
                    --sbindir=/usr/tmp/oetmp/staging/i686-linux/bin \
                    --libexecdir=/usr/tmp/oetmp/staging/i686-linux/libexec \
                    --datadir=/usr/tmp/oetmp/staging/i686-linux/share \
                    --sysconfdir=/usr/tmp/oetmp/staging/etc \
                    --sharedstatedir=/usr/tmp/oetmp/staging/com \
                    --localstatedir=/usr/tmp/oetmp/staging/var \
                    --libdir=/usr/tmp/oetmp/staging/i686-linux/lib \
                    --includedir=/usr/tmp/oetmp/staging/i686-linux/include \
                    --oldincludedir=/usr/tmp/oetmp/staging/i686-linux/include \
                    --infodir=/usr/tmp/oetmp/staging/i686-linux/share/info \
                    --mandir=/usr/tmp/oetmp/staging/i686-linux/share/man \
                        --disable-nls \
                    $@"
                oenote "Running $cfgcmd..."
                $cfgcmd || oefatal "oe_runconf failed"
        else
                oefatal "no configure script found"
        fi
 
}
 
oe_libinstall() {
        # Purpose: Install a library, in all its forms
        # Example
        #
        # oe_libinstall libltdl /usr/tmp/oetmp/staging/i686-linux/lib/
        # oe_libinstall -C src/libblah libblah /usr/tmp/oetmp/work/quilt-native-0.39-r0/image//usr/tmp/oetmp/staging/i686-linux/lib/
        dir=""
        libtool=""
        silent=""
        require_static=""
        require_shared=""
        while [ "$#" -gt 0 ]; do
                case "$1" in
                -C)
                        shift
                        dir="$1"
                        ;;
                -s)
                        silent=1
                        ;;
                -a)
                        require_static=1
                        ;;
                -so)
                        require_shared=1
                        ;;
                -*)
                        oefatal "oe_libinstall: unknown option: $1"
                        ;;
                *)
                        break;
                        ;;
                esac
                shift
        done
 
        libname="$1"
        shift
        destpath="$1"
        if [ -z "$destpath" ]; then
                oefatal "oe_libinstall: no destination path specified"
        fi
 
        __runcmd () {
                if [ -z "$silent" ]; then
                        echo >&2 "oe_libinstall: $*"
                fi
                $*
        }
 
        if [ -z "$dir" ]; then
                dir=`pwd`
        fi
        if [ -d "$dir/.libs" ]; then
                dir=$dir/.libs
        fi
        olddir=`pwd`
        __runcmd cd $dir
 
        lafile=$libname.la
        if [ -f "$lafile" ]; then
                # libtool archive
                eval `cat $lafile|grep "^library_names="`
                libtool=1
        else
                library_names="$libname.so* $libname.dll.a"
        fi
 
        __runcmd install -d $destpath/
        dota=$libname.a
        if [ -f "$dota" -o -n "$require_static" ]; then
                __runcmd install -m 0644 $dota $destpath/
        fi
        dotlai=$libname.lai
        if [ -f "$dotlai" -o -n "$libtool" ]; then
                __runcmd install -m 0644 $dotlai $destpath/$libname.la
        fi
 
        for name in $library_names; do
                files=`eval echo $name`
                for f in $files; do
                        if [ ! -e "$f" ]; then
                                if [ -n "$libtool" ]; then
                                        oefatal "oe_libinstall: $dir/$f not found."
                                fi
                        elif [ -L "$f" ]; then
                                __runcmd cp --no-dereference "$f" $destpath/
                        elif [ ! -L "$f" ]; then
                                libfile="$f"
                                __runcmd install -m 0755 $libfile $destpath/
                        fi
                done
        done
 
        if [ -z "$libfile" ]; then
                if  [ -n "$require_shared" ]; then
                        oefatal "oe_libinstall: unable to locate shared library"
                fi
        elif [ -z "$libtool" ]; then
                # special case hack for non-libtool .so.#.#.# links
                baselibfile=`basename "$libfile"`
                if (echo $baselibfile | grep -qE '^lib.*\.so\.[0-9.]*$'); then
                        sonamelink=`readelf -d $libfile |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'`
                        solink=`echo $baselibfile | sed -e 's/\.so\..*/.so/'`
                        if [ -n "$sonamelink" -a x"$baselibfile" != x"$sonamelink" ]; then
                                __runcmd ln -sf $baselibfile $destpath/$sonamelink
                        fi
                        __runcmd ln -sf $baselibfile $destpath/$solink
                fi
        fi
 
        __runcmd cd "$olddir"
 
}
 
oe_runmake() {
        if [ x"$MAKE" = x ]; then MAKE=make; fi
        oenote make  "$@"
        make  "$@" || die "oe_runmake failed"
 
}
 
do_install() {
        true
 
}
 
autotools_stage_includes() {
        rm -rf /usr/tmp/oetmp/work/quilt-native-0.39-r0/temp-staging
        mkdir -p /usr/tmp/oetmp/work/quilt-native-0.39-r0/temp-staging
        make DESTDIR="/usr/tmp/oetmp/work/quilt-native-0.39-r0/temp-staging" install
        cp -a /usr/tmp/oetmp/work/quilt-native-0.39-r0/temp-staging//usr/tmp/oetmp/staging/i686-linux/include/* /usr/tmp/oetmp/staging/i686-linux/include
        rm -rf /usr/tmp/oetmp/work/quilt-native-0.39-r0/temp-staging
 
}
 
do_configure() {
        chmod 755 configure
        oe_runconf
 
}
 
do_stage() {
        oe_runmake install
 
}
 
oenote() {
        echo "NOTE:" "$*"
 
}
 
cd /var/tmp/oetmp/work/quilt-native-0.39-r0/quilt
do_patchcmd