wok annotate gcc+gcj/receipt @ rev 18334

Updates licenses
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Sep 10 10:00:06 2015 +0200 (2015-09-10)
parents 861d91e915a4
children 9e01bc6321ea
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@15643 24 elfutils elfutils-dev util-linux-uuid-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
pascal@15357 30 sed -i 's/@mkdir_p@/mkdir -p/' libjava/classpath/lib/copy-vmresources.sh.in
slaxemulator@10421 31 # Set HOST_SYSTEM if not defined in tazwok.conf as it should be
slaxemulator@10421 32 if [ -z "$HOST_SYSTEM" ] ; then
pascal@13878 33 HOST_SYSTEM="$ARCH-slitaz-linux"
rcx@3686 34 fi
slaxemulator@10421 35 GCC_TARGET=$HOST_SYSTEM
rcx@3686 36
pankso@9970 37 # Get ecj.jar needed to build gcj. We have to dl it each time from the
pankso@9970 38 # sources repository to ensure that we receive the latest JAR.
rcx@3325 39 # (See http://gcc.gnu.org/install/configure.html --with-ecj-jar)
rcx@3482 40 ECJ_JAR="ecj-latest.jar"
rcx@3482 41 ECJ_URL="ftp://sourceware.org/pub/java/$ECJ_JAR"
pankso@9970 42 if [ ! -f "$ECJ_JAR" ] ; then
pankso@9970 43 echo "Downloading ECJ jar to: $(pwd)"
pankso@9970 44 wget -c $ECJ_URL
rcx@3325 45 # Exit if download failed to avoid errors.
pankso@9970 46 if [ ! -f "$ECJ_JAR" ] ; then
rcx@3325 47 echo -e "\nECJ jar download failed, exiting. Please check ECJ_URL variable.\n"
gokhlayeh@8504 48 return 1
rcx@3325 49 fi
rcx@3325 50 fi
rcx@3325 51
rcx@3325 52 # Use libiberty.a from binutils.
rcx@3325 53 sed -i 's/install_to_$(INSTALL_DEST) //' \
gokhlayeh@8504 54 $src/libiberty/Makefile.in || return 1
pankso@9970 55 mkdir -p ../build && cd ../build
pankso@12541 56
pascal@6594 57 PYTHON_LIB=python$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/')
gokhlayeh@8504 58 ../${src##*/}/configure --prefix=/usr --libexecdir=/usr/lib \
rcx@3325 59 --infodir=/usr/share/info --mandir=/usr/share/man --enable-nls \
pascal@6401 60 --enable-languages=c,c++,objc,java --enable-shared \
pascal@6401 61 --with-system-zlib \
rcx@3325 62 --enable-clocale=gnu --enable-objc-gc --enable-__cxa_atexit \
pascal@13878 63 --enable-threads=posix --with-tune=$ARCH \
rcx@3325 64 --enable-java-home --with-arch-directory=i386 \
rcx@3686 65 --with-jvm-root-dir=/usr/lib/jvm/java-gcj \
rcx@3686 66 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-gcj \
pascal@6593 67 --with-python-dir=/usr/lib/$PYTHON_LIB/site-packages \
rcx@3325 68 --with-x --enable-java-awt=gtk \
rcx@3686 69 --enable-gtk-cairo \
slaxemulator@6751 70 --enable-lto \
pankso@9970 71 $CONFIGURE_ARGS $GCC_TARGET &&
gokhlayeh@8504 72 make bootstrap &&
rcx@3686 73 # Make install in the source tree to help creating derived pkgs
rcx@3325 74 # and keep $_pkg variable set for genpkg.
gokhlayeh@8504 75 make install
rcx@3325 76 }
rcx@3325 77
rcx@3325 78 # Rules to gen a SliTaz package suitable for Tazpkg.
rcx@3325 79 genpkg_rules()
rcx@3325 80 {
rcx@3325 81 mkdir -p $fs/usr/share
pascal@13878 82 cp -a $install/usr/share/java $fs/usr/share
pascal@13878 83 cp -a $install/usr/bin $fs/usr
rcx@3325 84 # Copy all libs. Remove libgcc_s.so and libstdc++.so
rcx@3325 85 # they goes in gcc-lib-base-$VERSION package.
pascal@13878 86 cp -a $install/usr/lib $fs/usr
rcx@3325 87 rm $fs/usr/lib/libgcc_s.so*
rcx@3325 88 rm $fs/usr/lib/libstdc++.so*
rcx@3325 89 rm $fs/usr/lib/libgomp.so*
pascal@15291 90 #rm $fs/usr/lib/gcj-$VERSION-11/*.la
slaxemulator@9439 91 rm $fs/usr/lib/*.la
rcx@3325 92 # Include files.
pascal@13878 93 cp -a $install/usr/include $fs/usr
rcx@3325 94 }
rcx@3325 95
rcx@3325 96 # Post install commands for Tazpkg.
rcx@3325 97 post_install()
rcx@3325 98 {
rcx@3325 99 local root
rcx@3325 100 root=$1
rcx@3325 101 echo "Processing post-install commands..."
rcx@3325 102 if [ ! -f "$root/lib/cpp" ] ; then
rcx@3325 103 ln -s ../usr/bin/cpp $root/lib
rcx@3325 104 fi
rcx@3325 105 if [ ! -f "$root/usr/bin/cc" ] ; then
rcx@3325 106 ln -s gcc $root/usr/bin/cc
rcx@3325 107 fi
rcx@3325 108 }