SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "gcc83"

# SliTaz package receipt.

PACKAGE="gcc83"
SOURCE="gcc"
VERSION="8.3.0"
CATEGORY="development"
TAGS="compiler C C++"
SHORT_DESC="The GNU Compiler Collection."
MAINTAINER="pankso@slitaz.org"
LICENSE="GPL2"
WEB_SITE="https://gcc.gnu.org/"

TARBALL="$SOURCE-$VERSION.tar.xz"
WGET_URL="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$VERSION/$TARBALL"

# We need gawk since busybox awk is not sufficient. We have BUILD_DEPENDS
# for cookutils that are not used by tazwok/cook-toolchain since it installs
# and uses its own copy.
DEPENDS="binutils elfutils gcc-lib-base libgomp libobjc mpc-library"
BUILD_DEPENDS="elfutils-dev gmp-dev mpc-library mpfr-dev"

# What is the latest version available today?
current_version()
{
    wget -O - $GNU_MIRROR/$SOURCE 2>/dev/null | \
    sed '/gcc-8\.3/!d;s|.*gcc-||;s|.t.*||;s|/.*||' | sort -Vr | sed q
}

# Rules to configure and make the package.
compile_rules()
{
    ARCH_ARGS="--with-tune=$ARCH"
    pkgversion="SliTaz"
    languages="c,c++"

    # Use libiberty.a from binutils.
    sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1

    sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in

    mkdir -p ../gcc-build && cd ../gcc-build

    sed -i 's|\(add-gnu-debuglink.*\);|\1 2> /dev/null;|' \
        $src/libbacktrace/configure*
    $src/configure \
        --libexecdir=/usr/lib \
        --enable-nls \
        --enable-languages=${languages} \
        --enable-shared \
        --with-system-zlib \
        --enable-clocale=gnu \
        --enable-objc-gc \
        --enable-__cxa_atexit \
        --enable-lto \
        --enable-threads=posix \
        --disable-bootstrap \
        --program-suffix=-${PACKAGE#gcc} \
        --libdir=/usr/libgcc${PACKAGE#gcc} \
        --with-pkgversion="$pkgversion" \
        ${CONFIGURE_ARGS} ${ARCH_ARGS} &&
    make -j 1 &&
    make install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p  $fs/usr/share
    cp -a $install/usr/bin $fs/usr

    # Copy all libs. Do not hide gcc-lib-base.
    cp -a $install/usr/lib* $fs/usr

    # Include files.
    cp -a $install/usr/include $fs/usr

    # Remove build directory.
    rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
    rm -rf $WOK/$PACKAGE/$PACKAGE-build
}
6025 packages and 203154 files in current database (Thu Apr 25 06:17:47 2024)