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

Rename linux-util-ng to util-linux in all packages
author Christophe Lincoln <pankso@slitaz.org>
date Mon Apr 23 16:30:27 2012 +0200 (2012-04-23)
parents c6b6ce81e57e
children 0893b8771990
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 TARBALL="$SOURCE-$VERSION.tar.bz2"
10 WEB_SITE="http://gcc.gnu.org/java/"
11 WGET_URL="$GNU_MIRROR/$SOURCE/$SOURCE-$VERSION/$TARBALL"
12 PROVIDE="$SOURCE jre jdk"
14 DEPENDS="glibc-base glib gcc-lib-base libgio util-linux-uuid zlib libgomp gmp mpfr python \
15 gtk+ atk cairo expat fontconfig freetype pango pixman libpng libxcb xcb-util \
16 xorg-libICE xorg-libSM xorg-libX11 xorg-libXau xorg-libXcomposite \
17 xorg-libXcursor xorg-libXdamage xorg-libXdmcp xorg-libXext xorg-libXfixes \
18 xorg-libXinerama xorg-libXrandr xorg-libXrender xorg-libXtst alsa-lib elfutils"
19 BUILD_DEPENDS="glibc-dev gawk flex python perl gmp gmp-dev mpfr mpfr-dev mpc-library \
20 expat-dev zlib-dev fastjar gtk+-dev libart_lgpl-dev xorg-dev xorg-inputproto \
21 xorg-kbproto xorg-libXtst xorg-randrproto xorg-renderproto xorg-xextproto xorg-xproto \
22 elfutils elfutils-dev"
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 cd $src
28 # Set HOST_SYSTEM if not defined in tazwok.conf as it should be
29 if [ -z "$HOST_SYSTEM" ] ; then
30 HOST_SYSTEM="i486-slitaz-linux"
31 fi
32 GCC_TARGET=$HOST_SYSTEM
34 # Get ecj.jar needed to build gcj. We have to dl it each time from the
35 # sources repository to ensure that we receive the latest JAR.
36 # (See http://gcc.gnu.org/install/configure.html --with-ecj-jar)
37 ECJ_JAR="ecj-latest.jar"
38 ECJ_URL="ftp://sourceware.org/pub/java/$ECJ_JAR"
39 if [ ! -f "$ECJ_JAR" ] ; then
40 echo "Downloading ECJ jar to: $(pwd)"
41 wget -c $ECJ_URL
42 # Exit if download failed to avoid errors.
43 if [ ! -f "$ECJ_JAR" ] ; then
44 echo -e "\nECJ jar download failed, exiting. Please check ECJ_URL variable.\n"
45 return 1
46 fi
47 fi
49 # Use libiberty.a from binutils.
50 sed -i 's/install_to_$(INSTALL_DEST) //' \
51 $src/libiberty/Makefile.in || return 1
52 mkdir -p ../build && cd ../build
54 PYTHON_LIB=python$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/')
55 ../${src##*/}/configure --prefix=/usr --libexecdir=/usr/lib \
56 --infodir=/usr/share/info --mandir=/usr/share/man --enable-nls \
57 --enable-languages=c,c++,objc,java --enable-shared \
58 --with-system-zlib \
59 --enable-clocale=gnu --enable-objc-gc --enable-__cxa_atexit \
60 --enable-threads=posix --with-tune=i486 \
61 --enable-java-home --with-arch-directory=i386 \
62 --with-jvm-root-dir=/usr/lib/jvm/java-gcj \
63 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-gcj \
64 --with-python-dir=/usr/lib/$PYTHON_LIB/site-packages \
65 --with-x --enable-java-awt=gtk \
66 --enable-gtk-cairo \
67 --enable-lto \
68 $CONFIGURE_ARGS $GCC_TARGET &&
69 make bootstrap &&
70 # Make install in the source tree to help creating derived pkgs
71 # and keep $_pkg variable set for genpkg.
72 make install
73 }
75 # Rules to gen a SliTaz package suitable for Tazpkg.
76 genpkg_rules()
77 {
78 mkdir -p $fs/usr/share
79 cp -a $_pkg/usr/share/java $fs/usr/share
80 cp -a $_pkg/usr/bin $fs/usr
81 # Copy all libs. Remove libgcc_s.so and libstdc++.so
82 # they goes in gcc-lib-base-$VERSION package.
83 cp -a $_pkg/usr/lib $fs/usr
84 rm $fs/usr/lib/libgcc_s.so*
85 rm $fs/usr/lib/libstdc++.so*
86 rm $fs/usr/lib/libgomp.so*
87 rm $fs/usr/lib/gcj-$VERSION-11/*.la
88 rm $fs/usr/lib/*.la
89 # Include files.
90 cp -a $_pkg/usr/include $fs/usr
91 }
93 # Post install commands for Tazpkg.
94 post_install()
95 {
96 local root
97 root=$1
98 echo "Processing post-install commands..."
99 if [ ! -f "$root/lib/cpp" ] ; then
100 ln -s ../usr/bin/cpp $root/lib
101 fi
102 if [ ! -f "$root/usr/bin/cc" ] ; then
103 ln -s gcc $root/usr/bin/cc
104 fi
105 }