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