Receipt for: h8300-gcc
source
PACKAGE="h8300-gcc"
SOURCE="gcc"
VERSION="4.4.4"
CATEGORY="development"
SHORT_DESC="gcc targeting the H8/300"
MAINTAINER="rcx@zoominternet.net"
LICENSE="GPL2"
TARBALL="$SOURCE-$VERSION.tar.bz2"
WEB_SITE="http://www.gnu.org/software/gcc/"
WGET_URL="$GNU_MIRROR/$SOURCE/$SOURCE-$VERSION/$TARBALL"
TAGS="compiler C C++"
DEPENDS="h8300-binutils glibc-base gmp mpfr"
BUILD_DEPENDS="slitaz-toolchain gawk flex gmp gmp-dev mpfr mpfr-dev h8300-binutils"
current_version()
{
wget -O - 'https://gcc.gnu.org/git/?p=gcc.git;a=summary' 2>/dev/null | \
sed '/ release/!d;s|.*GCC ||;s| release.*||' | sort -Vr | sed q
}
're in the build/wok environment
if [ -e $WOK/h8300-toolchain/stuff/h8300.conf ] ; then
. $WOK/h8300-toolchain/stuff/h8300.conf
fi
compile_rules()
{
rm -f -r $src/libssp $src/libstdc++-v3 $src/binutils
mkdir -p $SOURCE-$VERSION-build
cd $SOURCE-$VERSION-build
$src/configure \
--target=$H8300_TARGET \
--enable-languages=c,c++ \
--disable-nls \
--enable-target-optspace \
--enable-obsolete \
--prefix=/usr \
--libexecdir=/usr/lib \
--infodir=/usr/share/info \
--mandir=/usr/share/man \
$CONFIGURE_ARGS &&
make $MAKEFLAGS &&
make DESTDIR=$DESTDIR install
}
genpkg_rules()
{
mkdir -p $fs/usr
cp -a $install/usr/bin $fs/usr
cp -a $install/usr/include $fs/usr
# do not need to copy lib/libiberty.a
mkdir -p $fs/usr/lib
cp -a $install/usr/lib/gcc $fs/usr/lib
# Do not include the h8* variant folders; create separate packages if they are needed
rm -r -f $fs/usr/lib/gcc/$H8300_TARGET/$VERSION/h8300h
rm -r -f $fs/usr/lib/gcc/$H8300_TARGET/$VERSION/h8300s
rm -r -f $fs/usr/lib/gcc/$H8300_TARGET/$VERSION/h8sx
}
clean_wok()
{
rm -r $SOURCE-$VERSION-build
}