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