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