wok-next annotate gcc/receipt @ rev 20180
opencc: fix wget_url
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Nov 02 12:28:56 2017 +0100 (2017-11-02) |
parents | 38cf0c75fa4c |
children | 90a5eb560fd6 |
rev | line source |
---|---|
al@19743 | 1 # SliTaz package receipt v2. |
pankso@9 | 2 |
pankso@9 | 3 PACKAGE="gcc" |
al@19743 | 4 VERSION="6.3.0" |
pankso@204 | 5 CATEGORY="development" |
al@19743 | 6 SHORT_DESC="The GNU Compiler Collection" |
pankso@9 | 7 MAINTAINER="pankso@slitaz.org" |
pascal@15000 | 8 LICENSE="GPL2" |
al@19561 | 9 WEB_SITE="http://gcc.gnu.org/" |
al@19743 | 10 #HOST_ARCH="i486 arm" |
al@19743 | 11 |
pankso@9 | 12 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
pankso@5269 | 13 WGET_URL="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$VERSION/$TARBALL" |
pankso@9 | 14 |
al@19570 | 15 BUILD_DEPENDS="mpc-library-dev mpfr-dev gmp-dev elfutils-dev zlib-dev" |
al@20176 | 16 SPLIT="gcc-lib-base gcc-lib-math libgfortran gfortran libgomp libobjc \ |
al@20176 | 17 libatomic gcc" |
pankso@9704 | 18 |
al@20176 | 19 compile_rules() { |
al@20176 | 20 # Handle cross compilation (native i486/ARM gcc) |
al@20176 | 21 case "$ARCH" in |
al@20176 | 22 i?86) |
al@20176 | 23 ARCH_ARGS="--with-tune=$ARCH" |
al@20176 | 24 pkgversion="SliTaz" |
al@20176 | 25 languages="c,c++,objc,fortran" ;; |
al@20176 | 26 arm*) |
al@20176 | 27 pkgversion="SliTaz ARM" |
al@20176 | 28 languages="c,c++" ;; |
al@20176 | 29 esac |
gokhlayeh@8181 | 30 |
pankso@9704 | 31 # Package slitaz-toolchain use 'cook --options' when rebuilding |
pankso@9707 | 32 # the full SliTaz toolchain. |
pankso@9707 | 33 [ "$2" == "--first-pass" ] && opt=$2 |
pankso@9704 | 34 [ "$3" == "--first-pass" ] && opt=$3 |
pankso@12541 | 35 |
pankso@3185 | 36 # Use libiberty.a from binutils. |
pankso@12267 | 37 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1 |
pankso@12541 | 38 |
pankso@16319 | 39 case "$ARCH" in |
pankso@16319 | 40 i?86) sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in ;; |
pankso@12267 | 41 esac |
pankso@12541 | 42 |
pankso@12267 | 43 #sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in |
pankso@12541 | 44 |
pankso@9704 | 45 mkdir -p ../gcc-build && cd ../gcc-build |
pankso@10036 | 46 |
pankso@10036 | 47 # This is the default GCC and we want a native build to cross compile after. |
pankso@10036 | 48 # SliTaz target i486 host so we need a native i486 build for GCC. |
pankso@9704 | 49 case "$opt" in |
pankso@9704 | 50 --first-pass) |
pankso@9704 | 51 # Used by slitaz-toolchain when rebuilding the full toolchain. |
pankso@9704 | 52 echo "cook: configure GCC for: toolchain first pass" |
pankso@10012 | 53 $src/configure \ |
pankso@10012 | 54 --libexecdir=/usr/lib \ |
pankso@10012 | 55 --disable-nls \ |
pankso@10012 | 56 --enable-shared \ |
pankso@10030 | 57 --enable-languages=c,c++ \ |
pankso@10012 | 58 --disable-libstdcxx-pch \ |
pankso@10012 | 59 --enable-__cxa_atexit \ |
pankso@10012 | 60 --enable-clocale=gnu \ |
pankso@10012 | 61 --enable-threads=posix \ |
pankso@10036 | 62 --disable-bootstrap \ |
al@19743 | 63 ${CONFIGURE_ARGS} |
al@19743 | 64 ;; |
pankso@9704 | 65 *) |
pankso@10036 | 66 # Used by default to produce a full featured X86 GCC compiler. |
pankso@9704 | 67 echo "cook: configure GCC for: final/full build" |
pankso@10012 | 68 $src/configure \ |
pankso@10012 | 69 --libexecdir=/usr/lib \ |
pankso@10012 | 70 --enable-nls \ |
pankso@16319 | 71 --enable-languages=${languages} \ |
pankso@10012 | 72 --enable-shared \ |
pankso@10012 | 73 --with-system-zlib \ |
pankso@10012 | 74 --enable-clocale=gnu \ |
pankso@10012 | 75 --enable-objc-gc \ |
pankso@10012 | 76 --enable-__cxa_atexit \ |
pankso@10012 | 77 --enable-lto \ |
pankso@10012 | 78 --enable-threads=posix \ |
pankso@10036 | 79 --disable-bootstrap \ |
pankso@16319 | 80 --with-pkgversion="$pkgversion" \ |
al@19743 | 81 ${CONFIGURE_ARGS} ${ARCH_ARGS} |
al@19743 | 82 ;; |
al@19743 | 83 esac && |
al@19743 | 84 make && make install |
al@19743 | 85 |
al@19743 | 86 # ARM packages use another libs... |
al@19743 | 87 case "$ARCH" in |
al@19743 | 88 arm) |
al@19743 | 89 libdir="$CROSS_TREE/tools/arm-slitaz-linux-gnueabi/lib" |
al@19743 | 90 cp -af $libdir/libgcc_s.so* $install/usr/lib # for gcc-lib-base |
al@19743 | 91 cp -af $libdir/libstdc++.so* $install/usr/lib |
al@19743 | 92 cp -af $libdir/libquadmath.so* $install/usr/lib # for gcc-lib-math |
al@19743 | 93 ;; |
pankso@9704 | 94 esac |
al@19835 | 95 |
al@19835 | 96 # Remove build directory. |
al@19835 | 97 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build |
al@19835 | 98 rm -rf $WOK/$PACKAGE/$PACKAGE-build |
pankso@9 | 99 } |
pankso@9 | 100 |
al@20176 | 101 genpkg_rules() { |
al@19743 | 102 case $PACKAGE in |
al@19743 | 103 gcc-lib-base) |
al@19743 | 104 copy libgcc_s.so* libstdc++.so* |
al@19743 | 105 rm $fs/usr/lib/*.py |
al@20176 | 106 CAT="libs|base libraries" |
al@19835 | 107 DEPENDS="glibc-base" |
al@19743 | 108 ;; |
al@19743 | 109 gcc-lib-math) |
al@19743 | 110 copy libquadmath.so* |
al@20176 | 111 CAT="libs|math libraries" |
al@19835 | 112 DEPENDS="glibc-base" |
al@19743 | 113 ;; |
al@19743 | 114 libgfortran) |
al@19743 | 115 copy libgfortran.so* |
al@19743 | 116 CAT="libdevel|fortran runtime" |
al@19835 | 117 DEPENDS="gcc-lib-base gcc-lib-math glibc-base" |
al@19835 | 118 ;; |
al@19835 | 119 gfortran) |
al@20176 | 120 copy *gfortran libgfortran.* f951 finclude/ @rm |
al@19835 | 121 CAT="development|fortran extension" |
al@19835 | 122 TAGS="compiler fortran" |
al@19835 | 123 DEPENDS="libgfortran gcc glibc-base gmp mpc-library mpfr zlib" |
al@19743 | 124 ;; |
al@19743 | 125 libgomp) |
al@19743 | 126 copy libgomp.so* |
al@20176 | 127 CAT="libs|API specification for parallel programming" |
al@19835 | 128 DEPENDS="glibc-base" |
al@19743 | 129 ;; |
al@19743 | 130 libobjc) |
al@19743 | 131 copy libobjc.so* |
al@19765 | 132 CAT="libdevel|API for gcc object" |
al@19835 | 133 DEPENDS="gcc-lib-base glibc-base" |
al@19835 | 134 ;; |
al@20176 | 135 libatomic) |
al@20176 | 136 copy libatomic.so* |
al@20176 | 137 CAT="libs|libatomic" |
al@20176 | 138 DEPENDS=" " |
al@20176 | 139 ;; |
al@19835 | 140 gcc) |
al@20176 | 141 copy bin/ lib/ include/ *.py @rm |
al@20176 | 142 DEPENDS="gcc-lib-base libgomp libobjc libatomic \ |
al@19835 | 143 glibc-base gmp mpc-library mpfr zlib binutils elfutils" |
al@19835 | 144 SUGGESTED="python" |
al@19835 | 145 TAGS="compiler C" |
al@19743 | 146 ;; |
al@19743 | 147 esac |
pankso@9 | 148 } |
pankso@9 | 149 |
al@20176 | 150 post_install_gcc() { |
al@19743 | 151 [ -f "$1/lib/cpp" ] || ln -s ../usr/bin/cpp "$1/lib" |
al@19743 | 152 [ -f "$1/usr/bin/cc" ] || ln -s gcc "$1/usr/bin/cc" |
pankso@9 | 153 } |