wok-stable view gcc+gcj/receipt @ rev 3397
get-opera: increase lifetime a bit
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jun 12 09:34:17 2009 +0200 (2009-06-12) |
parents | |
children | eba84065e934 |
line source
1 # SliTaz package receipt.
3 PACKAGE="gcc+gcj"
4 SOURCE="gcc"
5 VERSION="4.4.0"
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 libuuid zlib libgomp gmp mpfr python \
10 gtk+ atk cairo expat fontconfig freetype libgio pango pixman libpng \
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"
14 BUILD_DEPENDS="glibc-dev gawk flex python gmp gmp-dev mpfr mpfr-dev \
15 zlib-dev zip gtk+-dev libart_lgpl-dev xorg-dev xorg-inputproto xorg-randrproto xorg-xextproto"
16 TARBALL="$SOURCE-$VERSION.tar.bz2"
17 WEB_SITE="http://gcc.gnu.org/"
18 WGET_URL="$GNU_MIRROR/$SOURCE/$SOURCE-$VERSION/$TARBALL"
19 PROVIDE="$SOURCE"
21 # Rules to configure and make the package.
22 compile_rules()
23 {
24 # Get ecj.jar needed to build gcj
25 # (See http://gcc.gnu.org/install/configure.html --with-ecj-jar)
26 ECJ_PRE_PATH=`pwd`
27 ECJ_JAR="ecj-latest.jar"
28 ECJ_URL="ftp://sourceware.org/pub/java/$ECJ_JAR"
29 if [ ! -f "$SOURCES_REPOSITORY/$ECJ_JAR" ] ; then
30 cd $SOURCES_REPOSITORY
31 download $ECJ_URL
32 # Exit if download failed to avoid errors.
33 if [ ! -f "$SOURCES_REPOSITORY/$ECJ_JAR" ] ; then
34 echo -e "\nECJ jar download failed, exiting. Please check ECJ_URL variable.\n"
35 exit 1
36 fi
37 else
38 echo -n "ECJ jar exit... "
39 status
40 fi
42 # Copy the ecj jar to the root of the gcc source directory
43 # The file name isn't versioned, so we have to remove it from the
44 # sources repository to ensure that we receive updated files
45 mv -f $SOURCES_REPOSITORY/$ECJ_JAR $src/ecj.jar
47 # Pop back to the pre-download directory
48 cd $ECJ_PRE_PATH
50 # Use libiberty.a from binutils.
51 sed -i 's/install_to_$(INSTALL_DEST) //' \
52 $SOURCE-$VERSION/libiberty/Makefile.in || exit 1
53 mkdir -p $SOURCE-$VERSION-build
54 cd $SOURCE-$VERSION-build
55 ../$SOURCE-$VERSION/configure --prefix=/usr --libexecdir=/usr/lib \
56 --infodir=/usr/share/info --mandir=/usr/share/man --enable-nls \
57 --enable-languages=c,c++,java --enable-shared --with-system-zlib \
58 --enable-clocale=gnu --enable-objc-gc --enable-__cxa_atexit \
59 --enable-threads=posix --with-tune=i486 i486-pc-linux-gnu \
60 --enable-java-home --with-arch-directory=i386 \
61 --with-python-dir=/lib/python2.5/site-packages \
62 --with-x --enable-java-awt=gtk \
63 $CONFIGURE_ARGS &&
64 make bootstrap &&
65 # Make install in the source tree to help creating derivated pkgs
66 # and keep $_pkg variable set for genpkg.
67 make DESTDIR=$src/_pkg install
68 }
70 # Rules to gen a SliTaz package suitable for Tazpkg.
71 genpkg_rules()
72 {
73 mkdir -p $fs/usr/share
74 cp -a $_pkg/usr/share/java $fs/usr/share
75 cp -a $_pkg/usr/bin $fs/usr
76 # Copy all libs. Remove libgcc_s.so and libstdc++.so
77 # they goes in gcc-lib-base-$VERSION package.
78 cp -a $_pkg/usr/lib $fs/usr
79 rm $fs/usr/lib/libgcc_s.so*
80 rm $fs/usr/lib/libstdc++.so*
81 rm $fs/usr/lib/libgomp.so*
82 # Include files.
83 cp -a $_pkg/usr/include $fs/usr
84 }
86 # Post install commands for Tazpkg.
87 post_install()
88 {
89 local root
90 root=$1
91 echo "Processing post-install commands..."
92 if [ ! -f "$root/lib/cpp" ] ; then
93 ln -s ../usr/bin/cpp $root/lib
94 fi
95 if [ ! -f "$root/usr/bin/cc" ] ; then
96 ln -s gcc $root/usr/bin/cc
97 fi
98 }
100 # Rules to clean the package
101 clean_wok()
102 {
103 rm -r $SOURCE-$VERSION-build
104 }