wok-current annotate gcc+gcj/receipt @ rev 7658

Up: mysql to 5.1.54.
author Christopher Rogers <slaxemulator@gmail.com>
date Wed Dec 15 20:31:38 2010 +0000 (2010-12-15)
parents 6b5b70397945
children 2d6d7969ffcd
rev   line source
rcx@3325 1 # SliTaz package receipt.
rcx@3325 2
rcx@3325 3 PACKAGE="gcc+gcj"
rcx@3325 4 SOURCE="gcc"
pascal@5940 5 VERSION="4.5.1"
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"
pankso@4052 9 DEPENDS="glibc-base glib gcc-lib-base libgio util-linux-ng-uuid zlib libgomp gmp mpfr python \
rcx@3686 10 gtk+ atk cairo expat fontconfig freetype pango pixman libpng libxcb xcb-util \
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 \
pascal@5960 13 xorg-libXinerama xorg-libXrandr xorg-libXrender xorg-libXtst alsa-lib elfutils"
pascal@5399 14 BUILD_DEPENDS="glibc-dev gawk flex python perl gmp gmp-dev mpfr mpfr-dev mpc-library \
rcx@3781 15 expat-dev zlib-dev fastjar gtk+-dev libart_lgpl-dev xorg-dev xorg-inputproto \
pascal@5943 16 xorg-kbproto xorg-libXtst xorg-randrproto xorg-renderproto xorg-xextproto xorg-xproto \
pascal@5943 17 elfutils elfutils-dev"
rcx@3325 18 TARBALL="$SOURCE-$VERSION.tar.bz2"
rcx@3781 19 WEB_SITE="http://gcc.gnu.org/java/"
rcx@3325 20 WGET_URL="$GNU_MIRROR/$SOURCE/$SOURCE-$VERSION/$TARBALL"
rcx@3781 21 PROVIDE="$SOURCE jre jdk"
rcx@3325 22
rcx@3325 23 # Rules to configure and make the package.
rcx@3325 24 compile_rules()
rcx@3325 25 {
rcx@3686 26 # Set BUILD_HOST if not defined in tazwok.conf as it should be
rcx@3686 27 if [ -z "$BUILD_HOST" ] ; then
rcx@3686 28 BUILD_HOST="i486-pc-linux-gnu"
rcx@3686 29 fi
rcx@3686 30 GCC_TARGET=$BUILD_HOST
rcx@3686 31
rcx@3325 32 # Get ecj.jar needed to build gcj
rcx@3325 33 # (See http://gcc.gnu.org/install/configure.html --with-ecj-jar)
rcx@3325 34 ECJ_PRE_PATH=`pwd`
rcx@3482 35 ECJ_JAR="ecj-latest.jar"
rcx@3482 36 ECJ_URL="ftp://sourceware.org/pub/java/$ECJ_JAR"
rcx@3325 37 if [ ! -f "$SOURCES_REPOSITORY/$ECJ_JAR" ] ; then
rcx@3325 38 cd $SOURCES_REPOSITORY
rcx@3325 39 download $ECJ_URL
rcx@3325 40 # Exit if download failed to avoid errors.
rcx@3325 41 if [ ! -f "$SOURCES_REPOSITORY/$ECJ_JAR" ] ; then
rcx@3325 42 echo -e "\nECJ jar download failed, exiting. Please check ECJ_URL variable.\n"
rcx@3325 43 exit 1
rcx@3325 44 fi
rcx@3325 45 else
rcx@3325 46 echo -n "ECJ jar exit... "
rcx@3325 47 status
rcx@3325 48 fi
rcx@3325 49
rcx@3325 50 # Copy the ecj jar to the root of the gcc source directory
rcx@3325 51 # The file name isn't versioned, so we have to remove it from the
rcx@3325 52 # sources repository to ensure that we receive updated files
rcx@3325 53 mv -f $SOURCES_REPOSITORY/$ECJ_JAR $src/ecj.jar
rcx@3325 54
rcx@3325 55 # Pop back to the pre-download directory
rcx@3325 56 cd $ECJ_PRE_PATH
rcx@3325 57
rcx@3325 58 # Use libiberty.a from binutils.
rcx@3325 59 sed -i 's/install_to_$(INSTALL_DEST) //' \
rcx@3325 60 $SOURCE-$VERSION/libiberty/Makefile.in || exit 1
rcx@3325 61 mkdir -p $SOURCE-$VERSION-build
rcx@3325 62 cd $SOURCE-$VERSION-build
rcx@3686 63
pascal@6594 64 PYTHON_LIB=python$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/')
rcx@3325 65 ../$SOURCE-$VERSION/configure --prefix=/usr --libexecdir=/usr/lib \
rcx@3325 66 --infodir=/usr/share/info --mandir=/usr/share/man --enable-nls \
pascal@6401 67 --enable-languages=c,c++,objc,java --enable-shared \
pascal@6401 68 --with-system-zlib \
rcx@3325 69 --enable-clocale=gnu --enable-objc-gc --enable-__cxa_atexit \
rcx@3686 70 --enable-threads=posix --with-tune=i486 \
rcx@3325 71 --enable-java-home --with-arch-directory=i386 \
rcx@3686 72 --with-jvm-root-dir=/usr/lib/jvm/java-gcj \
rcx@3686 73 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-gcj \
pascal@6593 74 --with-python-dir=/usr/lib/$PYTHON_LIB/site-packages \
rcx@3325 75 --with-x --enable-java-awt=gtk \
rcx@3686 76 --enable-gtk-cairo \
slaxemulator@6751 77 --enable-lto \
rcx@3686 78 $CONFIGURE_ARGS $GCC_TARGET &&
pascal@5781 79 make -j 4 bootstrap &&
rcx@3686 80 # Make install in the source tree to help creating derived pkgs
rcx@3325 81 # and keep $_pkg variable set for genpkg.
pascal@5781 82 make -j 4 DESTDIR=$src/_pkg install
rcx@3325 83 }
rcx@3325 84
rcx@3325 85 # Rules to gen a SliTaz package suitable for Tazpkg.
rcx@3325 86 genpkg_rules()
rcx@3325 87 {
rcx@3325 88 mkdir -p $fs/usr/share
rcx@3325 89 cp -a $_pkg/usr/share/java $fs/usr/share
rcx@3325 90 cp -a $_pkg/usr/bin $fs/usr
rcx@3325 91 # Copy all libs. Remove libgcc_s.so and libstdc++.so
rcx@3325 92 # they goes in gcc-lib-base-$VERSION package.
rcx@3325 93 cp -a $_pkg/usr/lib $fs/usr
rcx@3325 94 rm $fs/usr/lib/libgcc_s.so*
rcx@3325 95 rm $fs/usr/lib/libstdc++.so*
rcx@3325 96 rm $fs/usr/lib/libgomp.so*
rcx@3325 97 # Include files.
rcx@3325 98 cp -a $_pkg/usr/include $fs/usr
rcx@3325 99 }
rcx@3325 100
rcx@3325 101 # Post install commands for Tazpkg.
rcx@3325 102 post_install()
rcx@3325 103 {
rcx@3325 104 local root
rcx@3325 105 root=$1
rcx@3325 106 echo "Processing post-install commands..."
rcx@3325 107 if [ ! -f "$root/lib/cpp" ] ; then
rcx@3325 108 ln -s ../usr/bin/cpp $root/lib
rcx@3325 109 fi
rcx@3325 110 if [ ! -f "$root/usr/bin/cc" ] ; then
rcx@3325 111 ln -s gcc $root/usr/bin/cc
rcx@3325 112 fi
rcx@3325 113 }
rcx@3325 114
rcx@3325 115 # Rules to clean the package
rcx@3325 116 clean_wok()
rcx@3325 117 {
rcx@3325 118 rm -r $SOURCE-$VERSION-build
rcx@3325 119 }
pascal@5013 120
pascal@5013 121 TAZBB_NO_INSTALL="because it does not support objc and gfortran (yet)"