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