wok view gcc+gcj/receipt @ rev 3481

Add: fastjar, a C implementation of the JDK jar utility
author Matthew Sheets <rcx@zoominternet.net>
date Wed Jun 17 10:17:44 2009 +0000 (2009-06-17)
parents 68e576fc2677
children b6b443f568ae
line source
1 # SliTaz package receipt.
3 PACKAGE="gcc+gcj"
4 SOURCE="gcc"
5 VERSION="4.4.0"
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 libuuid zlib libgomp gmp mpfr python \
10 gtk+ atk cairo expat fontconfig freetype libgio pango pixman libpng \
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"
14 BUILD_DEPENDS="glibc-dev gawk flex python gmp gmp-dev mpfr mpfr-dev expat-dev \
15 zlib-dev zip gtk+-dev libart_lgpl-dev xorg-dev xorg-inputproto xorg-randrproto xorg-xextproto"
16 TARBALL="$SOURCE-$VERSION.tar.bz2"
17 WEB_SITE="http://gcc.gnu.org/"
18 WGET_URL="$GNU_MIRROR/$SOURCE/$SOURCE-$VERSION/$TARBALL"
19 PROVIDE="$SOURCE"
21 # Rules to configure and make the package.
22 compile_rules()
23 {
24 # Get ecj.jar needed to build gcj
25 # (See http://gcc.gnu.org/install/configure.html --with-ecj-jar)
26 ECJ_PRE_PATH=`pwd`
27 ECJ_VERSION="3.4.2"
28 ECJ_JAR="ecj-$ECJ_VERSION.jar"
29 # Get download link from http://download.eclipse.org/eclipse/downloads/
30 ECJ_URL="http://download.eclipse.org/eclipse/downloads/drops/R-$ECJ_VERSION-200902111700/$ECJ_JAR"
31 # ECJ_JAR="ecj-latest.jar"
32 # ECJ_URL="ftp://sourceware.org/pub/java/$ECJ_JAR"
33 if [ ! -f "$SOURCES_REPOSITORY/$ECJ_JAR" ] ; then
34 cd $SOURCES_REPOSITORY
35 download $ECJ_URL
36 # Exit if download failed to avoid errors.
37 if [ ! -f "$SOURCES_REPOSITORY/$ECJ_JAR" ] ; then
38 echo -e "\nECJ jar download failed, exiting. Please check ECJ_URL variable.\n"
39 exit 1
40 fi
41 else
42 echo -n "ECJ jar exit... "
43 status
44 fi
46 # Copy the ecj jar to the root of the gcc source directory
47 # The file name isn't versioned, so we have to remove it from the
48 # sources repository to ensure that we receive updated files
49 mv -f $SOURCES_REPOSITORY/$ECJ_JAR $src/ecj.jar
51 # Pop back to the pre-download directory
52 cd $ECJ_PRE_PATH
54 # Use libiberty.a from binutils.
55 sed -i 's/install_to_$(INSTALL_DEST) //' \
56 $SOURCE-$VERSION/libiberty/Makefile.in || exit 1
57 mkdir -p $SOURCE-$VERSION-build
58 cd $SOURCE-$VERSION-build
59 ../$SOURCE-$VERSION/configure --prefix=/usr --libexecdir=/usr/lib \
60 --infodir=/usr/share/info --mandir=/usr/share/man --enable-nls \
61 --enable-languages=c,c++,java --enable-shared --with-system-zlib \
62 --enable-clocale=gnu --enable-objc-gc --enable-__cxa_atexit \
63 --enable-threads=posix --with-tune=i486 i486-pc-linux-gnu \
64 --enable-java-home --with-arch-directory=i386 \
65 --with-python-dir=/lib/python2.5/site-packages \
66 --with-x --enable-java-awt=gtk \
67 $CONFIGURE_ARGS &&
68 make bootstrap &&
69 # Make install in the source tree to help creating derivated pkgs
70 # and keep $_pkg variable set for genpkg.
71 make DESTDIR=$src/_pkg install
72 }
74 # Rules to gen a SliTaz package suitable for Tazpkg.
75 genpkg_rules()
76 {
77 mkdir -p $fs/usr/share
78 cp -a $_pkg/usr/share/java $fs/usr/share
79 cp -a $_pkg/usr/bin $fs/usr
80 # Copy all libs. Remove libgcc_s.so and libstdc++.so
81 # they goes in gcc-lib-base-$VERSION package.
82 cp -a $_pkg/usr/lib $fs/usr
83 rm $fs/usr/lib/libgcc_s.so*
84 rm $fs/usr/lib/libstdc++.so*
85 rm $fs/usr/lib/libgomp.so*
86 # Include files.
87 cp -a $_pkg/usr/include $fs/usr
88 }
90 # Post install commands for Tazpkg.
91 post_install()
92 {
93 local root
94 root=$1
95 echo "Processing post-install commands..."
96 if [ ! -f "$root/lib/cpp" ] ; then
97 ln -s ../usr/bin/cpp $root/lib
98 fi
99 if [ ! -f "$root/usr/bin/cc" ] ; then
100 ln -s gcc $root/usr/bin/cc
101 fi
102 }
104 # Rules to clean the package
105 clean_wok()
106 {
107 rm -r $SOURCE-$VERSION-build
108 }