wok-next view gcc/receipt @ rev 19757

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