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