wok view gcc+gcj/receipt @ rev 8913
busybox: wget speedup
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Feb 28 15:05:05 2011 +0100 (2011-02-28) |
parents | 2d6d7969ffcd |
children | 129bb5b11a7e |
line source
1 # SliTaz package receipt.
3 PACKAGE="gcc+gcj"
4 SOURCE="gcc"
5 VERSION="4.5.2"
6 CATEGORY="development"
7 SHORT_DESC="The GNU Compiler Collection, including the gcj Compiler for Java."
8 MAINTAINER="rcx@zoominternet.net"
9 DEPENDS="glibc-base glib gcc-lib-base libgio util-linux-ng-uuid zlib libgomp gmp mpfr python \
10 gtk+ atk cairo expat fontconfig freetype pango pixman libpng libxcb xcb-util \
11 xorg-libICE xorg-libSM xorg-libX11 xorg-libXau xorg-libXcomposite \
12 xorg-libXcursor xorg-libXdamage xorg-libXdmcp xorg-libXext xorg-libXfixes \
13 xorg-libXinerama xorg-libXrandr xorg-libXrender xorg-libXtst alsa-lib elfutils"
14 BUILD_DEPENDS="glibc-dev gawk flex python perl gmp gmp-dev mpfr mpfr-dev mpc-library \
15 expat-dev zlib-dev fastjar gtk+-dev libart_lgpl-dev xorg-dev xorg-inputproto \
16 xorg-kbproto xorg-libXtst xorg-randrproto xorg-renderproto xorg-xextproto xorg-xproto \
17 elfutils elfutils-dev"
18 TARBALL="$SOURCE-$VERSION.tar.bz2"
19 WEB_SITE="http://gcc.gnu.org/java/"
20 WGET_URL="$GNU_MIRROR/$SOURCE/$SOURCE-$VERSION/$TARBALL"
21 PROVIDE="$SOURCE jre jdk"
22 SRC_WANTED="$SOURCE"
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 # Set BUILD_HOST if not defined in tazwok.conf as it should be
28 if [ -z "$BUILD_HOST" ] ; then
29 BUILD_HOST="i486-pc-linux-gnu"
30 fi
31 GCC_TARGET=$BUILD_HOST
33 # Get ecj.jar needed to build gcj
34 # (See http://gcc.gnu.org/install/configure.html --with-ecj-jar)
35 ECJ_PRE_PATH=`pwd`
36 ECJ_JAR="ecj-latest.jar"
37 ECJ_URL="ftp://sourceware.org/pub/java/$ECJ_JAR"
38 if [ ! -f "$SOURCES_REPOSITORY/$ECJ_JAR" ] ; then
39 cd $SOURCES_REPOSITORY
40 download $ECJ_URL
41 # Exit if download failed to avoid errors.
42 if [ ! -f "$SOURCES_REPOSITORY/$ECJ_JAR" ] ; then
43 echo -e "\nECJ jar download failed, exiting. Please check ECJ_URL variable.\n"
44 return 1
45 fi
46 else
47 echo -n "ECJ jar exit... "
48 status
49 fi
51 # Copy the ecj jar to the root of the gcc source directory
52 # The file name isn't versioned, so we have to remove it from the
53 # sources repository to ensure that we receive updated files
54 mv -f $SOURCES_REPOSITORY/$ECJ_JAR $src/ecj.jar
56 # Pop back to the pre-download directory
57 cd $ECJ_PRE_PATH
59 # Use libiberty.a from binutils.
60 sed -i 's/install_to_$(INSTALL_DEST) //' \
61 $src/libiberty/Makefile.in || return 1
62 mkdir -p $SOURCE-$VERSION-build
63 cd $SOURCE-$VERSION-build
65 PYTHON_LIB=python$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/')
66 ../${src##*/}/configure --prefix=/usr --libexecdir=/usr/lib \
67 --infodir=/usr/share/info --mandir=/usr/share/man --enable-nls \
68 --enable-languages=c,c++,objc,java --enable-shared \
69 --with-system-zlib \
70 --enable-clocale=gnu --enable-objc-gc --enable-__cxa_atexit \
71 --enable-threads=posix --with-tune=i486 \
72 --enable-java-home --with-arch-directory=i386 \
73 --with-jvm-root-dir=/usr/lib/jvm/java-gcj \
74 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-gcj \
75 --with-python-dir=/usr/lib/$PYTHON_LIB/site-packages \
76 --with-x --enable-java-awt=gtk \
77 --enable-gtk-cairo \
78 --enable-lto \
79 $CONFIGURE_ARGS $GCC_TARGET &&
80 make bootstrap &&
81 # Make install in the source tree to help creating derived pkgs
82 # and keep $_pkg variable set for genpkg.
83 make install
84 }
86 # Rules to gen a SliTaz package suitable for Tazpkg.
87 genpkg_rules()
88 {
89 mkdir -p $fs/usr/share
90 cp -a $_pkg/usr/share/java $fs/usr/share
91 cp -a $_pkg/usr/bin $fs/usr
92 # Copy all libs. Remove libgcc_s.so and libstdc++.so
93 # they goes in gcc-lib-base-$VERSION package.
94 cp -a $_pkg/usr/lib $fs/usr
95 rm $fs/usr/lib/libgcc_s.so*
96 rm $fs/usr/lib/libstdc++.so*
97 rm $fs/usr/lib/libgomp.so*
98 # Include files.
99 cp -a $_pkg/usr/include $fs/usr
100 rm -r $WOK/$PACKAGE/$SOURCE-$VERSION-build
101 }
103 # Post install commands for Tazpkg.
104 post_install()
105 {
106 local root
107 root=$1
108 echo "Processing post-install commands..."
109 if [ ! -f "$root/lib/cpp" ] ; then
110 ln -s ../usr/bin/cpp $root/lib
111 fi
112 if [ ! -f "$root/usr/bin/cc" ] ; then
113 ln -s gcc $root/usr/bin/cc
114 fi
115 }
117 TAZBB_NO_INSTALL="because it does not support objc and gfortran (yet)"