wok-next diff gcc/receipt @ rev 19743
Remake/fix: alsa-lib, alsaplayer; update base (LFS) packages: bash, binutils, bison, bzip2, diffutils, file, findutils, gawk, gcc, gettext, glibc, gmp, m4, mpc-library, mpfr, ncurses, patch, xz; update: tazpkg, cookutils, svgcleaner.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue Jun 06 17:37:54 2017 +0300 (2017-06-06) |
parents | 10e3347b5a0d |
children | 4a77163a85ba |
line diff
1.1 --- a/gcc/receipt Thu Dec 22 07:11:01 2016 +0200 1.2 +++ b/gcc/receipt Tue Jun 06 17:37:54 2017 +0300 1.3 @@ -1,22 +1,19 @@ 1.4 -# SliTaz package receipt. 1.5 +# SliTaz package receipt v2. 1.6 1.7 PACKAGE="gcc" 1.8 -VERSION="6.2.0" 1.9 +VERSION="6.3.0" 1.10 CATEGORY="development" 1.11 -SHORT_DESC="The GNU Compiler Collection." 1.12 +SHORT_DESC="The GNU Compiler Collection" 1.13 MAINTAINER="pankso@slitaz.org" 1.14 LICENSE="GPL2" 1.15 WEB_SITE="http://gcc.gnu.org/" 1.16 +#HOST_ARCH="i486 arm" 1.17 + 1.18 TARBALL="$PACKAGE-$VERSION.tar.bz2" 1.19 WGET_URL="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$VERSION/$TARBALL" 1.20 -TAGS="compiler C" 1.21 -#HOST_ARCH="i486 arm" 1.22 1.23 -# We need gawk since busybox awk is not sufficient. We have BUILD_DEPENDS 1.24 -# for cookutils that are not used by tazwok/cook-toolchain since it installs 1.25 -# and uses its own copy. 1.26 -DEPENDS="binutils libgomp libobjc gcc-lib-base mpc-library elfutils" 1.27 BUILD_DEPENDS="mpc-library-dev mpfr-dev gmp-dev elfutils-dev zlib-dev" 1.28 +SPLIT="gcc-lib-base gcc-lib-math gfortran libgfortran libgomp libobjc" 1.29 1.30 # Handle cross compilation (native i486/ARM gcc) 1.31 case "$ARCH" in 1.32 @@ -64,8 +61,8 @@ 1.33 --enable-clocale=gnu \ 1.34 --enable-threads=posix \ 1.35 --disable-bootstrap \ 1.36 - ${CONFIGURE_ARGS} && 1.37 - make && make install ;; 1.38 + ${CONFIGURE_ARGS} 1.39 + ;; 1.40 *) 1.41 # Used by default to produce a full featured X86 GCC compiler. 1.42 echo "cook: configure GCC for: final/full build" 1.43 @@ -82,44 +79,81 @@ 1.44 --enable-threads=posix \ 1.45 --disable-bootstrap \ 1.46 --with-pkgversion="$pkgversion" \ 1.47 - ${CONFIGURE_ARGS} ${ARCH_ARGS} && 1.48 - make && make install ;; 1.49 + ${CONFIGURE_ARGS} ${ARCH_ARGS} 1.50 + ;; 1.51 + esac && 1.52 + make && make install 1.53 + 1.54 + # ARM packages use another libs... 1.55 + case "$ARCH" in 1.56 + arm) 1.57 + libdir="$CROSS_TREE/tools/arm-slitaz-linux-gnueabi/lib" 1.58 + cp -af $libdir/libgcc_s.so* $install/usr/lib # for gcc-lib-base 1.59 + cp -af $libdir/libstdc++.so* $install/usr/lib 1.60 + cp -af $libdir/libquadmath.so* $install/usr/lib # for gcc-lib-math 1.61 + ;; 1.62 esac 1.63 } 1.64 1.65 # Rules to gen a SliTaz package suitable for Tazpkg. 1.66 genpkg_rules() 1.67 { 1.68 - mkdir -p $fs/usr/share 1.69 - cp -a $install/usr/bin $fs/usr 1.70 + case $PACKAGE in 1.71 + gcc) 1.72 + copy bin/ lib/ include/ 1.73 + rm -f \ 1.74 + $fs/usr/lib/libgcc_s.so* \ 1.75 + $fs/usr/lib/libstdc++.so* \ 1.76 + $fs/usr/lib/libquadmath.so* \ 1.77 + $fs/usr/lib/libgfortran.* \ 1.78 + $fs/usr/lib/libgomp.so* \ 1.79 + $fs/usr/lib/libobjc.so* 1.80 + $fs/usr/bin/*gfortran \ 1.81 + $fs/usr/lib/gcc/$HOST_SYSTEM/$VERSION/f951 1.82 + rm -rf \ 1.83 + $fs/usr/lib/gcc/$HOST_SYSTEM/$VERSION/finclude 1.84 1.85 - # Copy all libs. Remove libgcc_s.so and libstdc++.so they goes in 1.86 - # the gcc-lib-base package. 1.87 - cp -a $install/usr/lib $fs/usr 1.88 - rm -f $fs/usr/lib/libgcc_s.so* 1.89 - rm -f $fs/usr/lib/libstdc++.so* 1.90 - rm -f $fs/usr/lib/libgomp.so* 1.91 - rm -f $fs/usr/lib/libobjc.so* 1.92 - 1.93 - # Include files. 1.94 - cp -a $install/usr/include $fs/usr 1.95 - 1.96 - # Gfortran goes in gfortran package. 1.97 - rm -f $fs/usr/bin/*gfortran 1.98 - rm -f $fs/usr/lib/libgfortran* 1.99 - rm -f $fs/usr/lib/gcc/*/$VERSION/libgfortran* 1.100 - rm -rf $fs/usr/lib/gcc/*/$VERSION/f* 1.101 - 1.102 - # Remove build directory. 1.103 - rm -rf $WOK/$PACKAGE/source/$PACKAGE-build 1.104 - rm -rf $WOK/$PACKAGE/$PACKAGE-build 1.105 + # Remove build directory. 1.106 + rm -rf $WOK/$PACKAGE/source/$PACKAGE-build 1.107 + rm -rf $WOK/$PACKAGE/$PACKAGE-build 1.108 + DEPENDS="binutils libgomp libobjc gcc-lib-base mpc-library elfutils" 1.109 + TAGS="compiler C" 1.110 + ;; 1.111 + gcc-lib-base) 1.112 + copy libgcc_s.so* libstdc++.so* 1.113 + rm $fs/usr/lib/*.py 1.114 + CAT="development|base libraries" 1.115 + ;; 1.116 + gcc-lib-math) 1.117 + copy libquadmath.so* 1.118 + CAT="development|math libraries" 1.119 + ;; 1.120 + gfortran) 1.121 + copy *gfortran libgfortran.* f951 finclude/ 1.122 + rm $fs/usr/lib/libgfortran.so* 1.123 + CAT="development|fortran extension" 1.124 + TAGS="compiler fortran" 1.125 + DEPENDS="gcc libgfortran" 1.126 + ;; 1.127 + libgfortran) 1.128 + copy libgfortran.so* 1.129 + CAT="libdevel|fortran runtime" 1.130 + ;; 1.131 + libgomp) 1.132 + copy libgomp.so* 1.133 + CAT="development|API specification for parallel programming" 1.134 + ;; 1.135 + libobjc) 1.136 + copy libobjc.so* 1.137 + CATEGORY="libdevel|API for gcc object" 1.138 + DEPENDS="gcc-lib-base" 1.139 + ;; 1.140 + esac 1.141 } 1.142 1.143 # Post install commands for Tazpkg. 1.144 -post_install() 1.145 +post_install_gcc() 1.146 { 1.147 - [ -f "$1/lib/cpp" ] || 1.148 - ln -s ../usr/bin/cpp "$1/lib" 1.149 - [ -f "$1/usr/bin/cc" ] || 1.150 - ln -s gcc "$1/usr/bin/cc" 1.151 + [ -f "$1/lib/cpp" ] || ln -s ../usr/bin/cpp "$1/lib" 1.152 + [ -f "$1/usr/bin/cc" ] || ln -s gcc "$1/usr/bin/cc" 1.153 }