#!/bin/bash # arm/build # Pre-build setup script for ARMedslack Linux's gcc # by Stuart Winter # Last modified: 03-Jan-05 source /usr/share/slackdev/buildkit.sh # Package metadata: export PKGNAM=gcc export VERSION=${VERSION:-4.8.4} # The architecture name component of the .t?z package file name: export PKGARCH=${PKGARCH:-arm} export BUILD=${BUILD:-1_slack14.1} export PKGSERIES=${PKGSERIES:-d} export SLACKPACKAGE=$PKGNAM-$VERSION-$PKGARCH-$BUILD.txz ## ******************************************************************* ## # For test packages - best to store in another location rather than # overwriting the working copy in the main tree: export PKGSTORE=/tmp/ mkdir -vpm755 $PKGSTORE/$PKGSERIES ## ******************************************************************* ## # Restore system. I can't build gcc inside Scratchbox 0.9.8 anymore :-( # I haven't investigated why and I don't have time to either. sboxsysrestore # Ensure base ARM packages are installed first: slackbasedeps # Needs { slackcheckpkgdeps infozip || installpkg $PKGSTORE/a/infozip-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps gmp || installpkg $PKGSTORE/l/gmp-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps mpfr || installpkg $PKGSTORE/l/mpfr-[0-9]*.t?z || exit 99; } # Introduced in gcc-4.5: { slackcheckpkgdeps libmpc || installpkg $PKGSTORE/l/libmpc-[0-9]*.t?z || exit 99; } { slackcheckpkgdeps libelf || installpkg $PKGSTORE/l/libelf-[0-9]*.t?z || exit 99; } # configure: error: libXtst not found, required by java.awt.Robot # Ensure the kernel headers package is installed. These should always be installed # but it doesn't hurt (unless you're in the middle of building something else) # to do this: ORIGPATH=$PWD # store this location because we change to /usr/include below #( cd /usr/include # rm -rf linux asm-arm asm-generic asm # removepkg kernel-headers # Incase I ever forget and delete them from the main ARMedslack tree, I've copied a working Kernel # headers from Linux 2.4.26. In the past I have found 2.6 headers break building gcc. # installpkg ~/tgzstash/d/kernel-headers-*.t?z # installpkg $ORIGPATH/arm/kernel-headers-2.4.26-arm-1.t?z # installpkg $ORIGPATH/arm/kernel-headers-2.4.26-arm-1.t?z # ln -s asm asm-arm ) # Launch the package build script: BUILDLOG=$( basename $SLACKPACKAGE .t?z ).build.log ( ./$PKGNAM.SlackBuild ) >& /dev/stdout | tee $BUILDLOG # Compress the build log: bzip2 -9fvz $BUILDLOG