wok view gcc+gcj/receipt @ rev 8396

Up: gcc+gcj to 4.5.2. Added SRC_WANTED to it.
author Christopher Rogers <slaxemulator@gmail.com>
date Sat Feb 05 00:39:11 2011 +0000 (2011-02-05)
parents 136bc077dd05
children eefa66c18286
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 exit 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 $SOURCE-$VERSION/libiberty/Makefile.in || exit 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 ../$SOURCE-$VERSION/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 -j 4 bootstrap &&
81 # Make install in the source tree to help creating derived pkgs
82 # and keep $_pkg variable set for genpkg.
83 make -j 4 DESTDIR=$src/_pkg 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 }
102 # Post install commands for Tazpkg.
103 post_install()
104 {
105 local root
106 root=$1
107 echo "Processing post-install commands..."
108 if [ ! -f "$root/lib/cpp" ] ; then
109 ln -s ../usr/bin/cpp $root/lib
110 fi
111 if [ ! -f "$root/usr/bin/cc" ] ; then
112 ln -s gcc $root/usr/bin/cc
113 fi
114 }
116 # Rules to clean the package
117 clean_wok()
118 {
119 rm -r $SOURCE-$VERSION-build
120 }
122 TAZBB_NO_INSTALL="because it does not support objc and gfortran (yet)"