wok annotate gcc+gcj/receipt @ rev 15213

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