wok-6.x view gcc+gcj/receipt @ rev 6675

get-OpenOffice3: fix tazball name
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Oct 12 20:31:06 2010 +0200 (2010-10-12)
parents 7c1f2a196c26
children 6b5b70397945
line source
1 # SliTaz package receipt.
3 PACKAGE="gcc+gcj"
4 SOURCE="gcc"
5 VERSION="4.5.1"
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"
23 # Rules to configure and make the package.
24 compile_rules()
25 {
26 # Set BUILD_HOST if not defined in tazwok.conf as it should be
27 if [ -z "$BUILD_HOST" ] ; then
28 BUILD_HOST="i486-pc-linux-gnu"
29 fi
30 GCC_TARGET=$BUILD_HOST
32 # Get ecj.jar needed to build gcj
33 # (See http://gcc.gnu.org/install/configure.html --with-ecj-jar)
34 ECJ_PRE_PATH=`pwd`
35 ECJ_JAR="ecj-latest.jar"
36 ECJ_URL="ftp://sourceware.org/pub/java/$ECJ_JAR"
37 if [ ! -f "$SOURCES_REPOSITORY/$ECJ_JAR" ] ; then
38 cd $SOURCES_REPOSITORY
39 download $ECJ_URL
40 # Exit if download failed to avoid errors.
41 if [ ! -f "$SOURCES_REPOSITORY/$ECJ_JAR" ] ; then
42 echo -e "\nECJ jar download failed, exiting. Please check ECJ_URL variable.\n"
43 exit 1
44 fi
45 else
46 echo -n "ECJ jar exit... "
47 status
48 fi
50 # Copy the ecj jar to the root of the gcc source directory
51 # The file name isn't versioned, so we have to remove it from the
52 # sources repository to ensure that we receive updated files
53 mv -f $SOURCES_REPOSITORY/$ECJ_JAR $src/ecj.jar
55 # Pop back to the pre-download directory
56 cd $ECJ_PRE_PATH
58 # Use libiberty.a from binutils.
59 sed -i 's/install_to_$(INSTALL_DEST) //' \
60 $SOURCE-$VERSION/libiberty/Makefile.in || exit 1
61 mkdir -p $SOURCE-$VERSION-build
62 cd $SOURCE-$VERSION-build
64 PYTHON_LIB=python$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/')
65 ../$SOURCE-$VERSION/configure --prefix=/usr --libexecdir=/usr/lib \
66 --infodir=/usr/share/info --mandir=/usr/share/man --enable-nls \
67 --enable-languages=c,c++,objc,java --enable-shared \
68 --with-system-zlib \
69 --enable-clocale=gnu --enable-objc-gc --enable-__cxa_atexit \
70 --enable-threads=posix --with-tune=i486 \
71 --enable-java-home --with-arch-directory=i386 \
72 --with-jvm-root-dir=/usr/lib/jvm/java-gcj \
73 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-gcj \
74 --with-python-dir=/usr/lib/$PYTHON_LIB/site-packages \
75 --with-x --enable-java-awt=gtk \
76 --enable-gtk-cairo \
77 --enable-lto \
78 $CONFIGURE_ARGS $GCC_TARGET &&
79 make -j 4 bootstrap &&
80 # Make install in the source tree to help creating derived pkgs
81 # and keep $_pkg variable set for genpkg.
82 make -j 4 DESTDIR=$src/_pkg install
83 }
85 # Rules to gen a SliTaz package suitable for Tazpkg.
86 genpkg_rules()
87 {
88 mkdir -p $fs/usr/share
89 cp -a $_pkg/usr/share/java $fs/usr/share
90 cp -a $_pkg/usr/bin $fs/usr
91 # Copy all libs. Remove libgcc_s.so and libstdc++.so
92 # they goes in gcc-lib-base-$VERSION package.
93 cp -a $_pkg/usr/lib $fs/usr
94 rm $fs/usr/lib/libgcc_s.so*
95 rm $fs/usr/lib/libstdc++.so*
96 rm $fs/usr/lib/libgomp.so*
97 # Include files.
98 cp -a $_pkg/usr/include $fs/usr
99 }
101 # Post install commands for Tazpkg.
102 post_install()
103 {
104 local root
105 root=$1
106 echo "Processing post-install commands..."
107 if [ ! -f "$root/lib/cpp" ] ; then
108 ln -s ../usr/bin/cpp $root/lib
109 fi
110 if [ ! -f "$root/usr/bin/cc" ] ; then
111 ln -s gcc $root/usr/bin/cc
112 fi
113 }
115 # Rules to clean the package
116 clean_wok()
117 {
118 rm -r $SOURCE-$VERSION-build
119 }
121 TAZBB_NO_INSTALL="because it does not support objc and gfortran (yet)"