milis/talimatname/temel/gcc/talimat

101 lines
2.6 KiB
Plaintext

# Description: GNU compiler collection, which includes the C, C++, fortran and objc compilers.
# URL: http://gcc.gnu.org
# Packagers: milisarge@gmail.com
# Maintainers: Jakub Jelinek (jakub at redhat dot com),Manuel López-Ibáñez (manu at gcc dot gnu.org,Giovanni Bajo,Peter Barada,Gerald Baumgartner and a lot more.
name=gcc
version=5.3.0
release=1
source=(http://ftp.gnu.org/gnu/gcc/gcc-$version/gcc-$version.tar.bz2)
build()
{
cd gcc-$version
mkdir -v ../gcc-build
cd ../gcc-build
SED=sed \
../gcc-$version/configure --prefix=/usr \
--enable-languages=c,c++,objc,fortran \
--disable-multilib --disable-bootstrap --with-system-zlib
make
make DESTDIR=$PKG install
mkdir $PKG/lib
ln -sv ../usr/bin/cpp $PKG/lib/cpp
ln -sv gcc $PKG/usr/bin/cc
install -dm755 $PKG/usr/share/gdb/auto-load/usr/lib
install -dm755 $PKG/usr/lib/bfd-plugins
cd $PKG/usr/lib/bfd-plugins
case `uname -m` in
i?86) sed -i "s|-L$SRC[^ ]* ||g" \
$PKG/usr/lib/{libstdc++.la,libsupc++.la}
mv -v $PKG/usr/lib/*gdb.py \
$PKG/usr/share/gdb/auto-load/usr/lib
ln -sfv ../../libexec/gcc/i686-pc-linux-gnu/$version/liblto_plugin.so;;
x86_64)
sed -i "s|-L$SRC[^ ]* ||g" \
$PKG/usr/lib64/{libstdc++.la,libsupc++.la}
mv -v $PKG/usr/lib64/*gdb.py \
$PKG/usr/share/gdb/auto-load/usr/lib
ln -sfv ../../libexec/gcc/x86_64-unknown-linux-gnu/$version/liblto_plugin.so;;
esac
rm -rf $PKG/usr/share/info/dir
# Move the needed runtime libraries
case `uname -m` in
i?86) mkdir -pv $PKG/usr/lib
mv -v $PKG/usr/lib/libgfortran.{a,la} \
$PKG/lib/
ln -sv ../../lib/libgfortran.{la,a} $PKG/usr/lib
mv -v $PKG/usr/lib/libgfortran.so{,.3,.3.0.0} \
$PKG/lib/
ln -svf ../../lib/libgfortran.so{,.3,.3.0.0} $PKG/usr/lib
mv -v $PKG/usr/lib/libgcc_s.so{,.1} \
$PKG/lib
ln -sv ../../lib/libgcc_s.so{,.1} $PKG/usr/lib
mv -v $PKG/usr/lib/libstdc++.* \
$PKG/lib/
mv -v $PKG/usr/lib/libsupc++.{la,a} \
$PKG/lib
ln -sv ../../lib/libstdc++.so{,.6,.6.0.30} \
$PKG/usr/lib
ln -sv ../../lib/libstdc++.{a,la} \
$PKG/usr/lib
ln -sv ../../lib/libsupc++.{la,a} \
$PKG/usr/lib;;
x86_64) mkdir -pv $PKG/usr/lib64
mv -v $PKG/usr/lib64/libgfortran.{a,la} \
$PKG/lib
ln -sv ../../lib/libgfortran.{la,a} $PKG/usr/lib64
mv -v $PKG/usr/lib64/libgfortran.so{,.3,.3.0.0} \
$PKG/lib
ln -sv ../../lib/libgfortran.so{,.3,.3.0.0} $PKG/usr/lib64
mv -v $PKG/usr/lib64/libgcc_s.so{,.1} \
$PKG/lib
ln -sv ../../lib/libgcc_s.so{,.1} $PKG/usr/lib64
mv -v $PKG/usr/lib64/libstdc++.* \
$PKG/lib
mv -v $PKG/usr/lib64/libsupc++.{la,a} \
$PKG/lib
ln -sv ../../lib/libstdc++.so{,.6,.6.0.30} \
$PKG/usr/lib64
ln -sv ../../lib/libstdc++.{a,la} \
$PKG/usr/lib64
ln -sv ../../lib/libsupc++.{la,a} \
$PKG/usr/lib64;;
esac
}