wok-next rev 3325
Add: gcc+gcj
author | Matthew Sheets <rcx@zoominternet.net> |
---|---|
date | Tue Jun 09 15:10:39 2009 +0000 (2009-06-09) |
parents | 0412810d36d9 |
children | a022b44347a2 |
files | gcc+gcj/receipt |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gcc+gcj/receipt Tue Jun 09 15:10:39 2009 +0000 1.3 @@ -0,0 +1,104 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="gcc+gcj" 1.7 +SOURCE="gcc" 1.8 +VERSION="4.4.0" 1.9 +CATEGORY="development" 1.10 +SHORT_DESC="The GNU Compiler Collection, including the gcj Compiler for Java." 1.11 +MAINTAINER="rcx@zoominternet.net" 1.12 +DEPENDS="glibc-base glib gcc-lib-base libuuid zlib libgomp gmp mpfr python \ 1.13 +gtk+ atk cairo expat fontconfig freetype libgio pango pixman libpng \ 1.14 +xorg-libICE xorg-libSM xorg-libX11 xorg-libXau xorg-libXcomposite \ 1.15 +xorg-libXcursor xorg-libXdamage xorg-libXdmcp xorg-libXext xorg-libXfixes \ 1.16 +xorg-libXinerama xorg-libXrandr xorg-libXrender xorg-libXtst" 1.17 +BUILD_DEPENDS="glibc-dev gawk flex python gmp gmp-dev mpfr mpfr-dev \ 1.18 +zlib-dev zip gtk+-dev libart_lgpl-dev xorg-dev xorg-inputproto xorg-randrproto xorg-xextproto" 1.19 +TARBALL="$SOURCE-$VERSION.tar.bz2" 1.20 +WEB_SITE="http://gcc.gnu.org/" 1.21 +WGET_URL="$GNU_MIRROR/$SOURCE/$SOURCE-$VERSION/$TARBALL" 1.22 +PROVIDE="$SOURCE" 1.23 + 1.24 +# Rules to configure and make the package. 1.25 +compile_rules() 1.26 +{ 1.27 + # Get ecj.jar needed to build gcj 1.28 + # (See http://gcc.gnu.org/install/configure.html --with-ecj-jar) 1.29 + ECJ_PRE_PATH=`pwd` 1.30 + ECJ_JAR="ecj-latest.jar" 1.31 + ECJ_URL="ftp://sourceware.org/pub/java/$ECJ_JAR" 1.32 + if [ ! -f "$SOURCES_REPOSITORY/$ECJ_JAR" ] ; then 1.33 + cd $SOURCES_REPOSITORY 1.34 + download $ECJ_URL 1.35 + # Exit if download failed to avoid errors. 1.36 + if [ ! -f "$SOURCES_REPOSITORY/$ECJ_JAR" ] ; then 1.37 + echo -e "\nECJ jar download failed, exiting. Please check ECJ_URL variable.\n" 1.38 + exit 1 1.39 + fi 1.40 + else 1.41 + echo -n "ECJ jar exit... " 1.42 + status 1.43 + fi 1.44 + 1.45 + # Copy the ecj jar to the root of the gcc source directory 1.46 + # The file name isn't versioned, so we have to remove it from the 1.47 + # sources repository to ensure that we receive updated files 1.48 + mv -f $SOURCES_REPOSITORY/$ECJ_JAR $src/ecj.jar 1.49 + 1.50 + # Pop back to the pre-download directory 1.51 + cd $ECJ_PRE_PATH 1.52 + 1.53 + # Use libiberty.a from binutils. 1.54 + sed -i 's/install_to_$(INSTALL_DEST) //' \ 1.55 + $SOURCE-$VERSION/libiberty/Makefile.in || exit 1 1.56 + mkdir -p $SOURCE-$VERSION-build 1.57 + cd $SOURCE-$VERSION-build 1.58 + ../$SOURCE-$VERSION/configure --prefix=/usr --libexecdir=/usr/lib \ 1.59 + --infodir=/usr/share/info --mandir=/usr/share/man --enable-nls \ 1.60 + --enable-languages=c,c++,java --enable-shared --with-system-zlib \ 1.61 + --enable-clocale=gnu --enable-objc-gc --enable-__cxa_atexit \ 1.62 + --enable-threads=posix --with-tune=i486 i486-pc-linux-gnu \ 1.63 + --enable-java-home --with-arch-directory=i386 \ 1.64 + --with-python-dir=/lib/python2.5/site-packages \ 1.65 + --with-x --enable-java-awt=gtk \ 1.66 + $CONFIGURE_ARGS && 1.67 + make bootstrap && 1.68 + # Make install in the source tree to help creating derivated pkgs 1.69 + # and keep $_pkg variable set for genpkg. 1.70 + make DESTDIR=$src/_pkg install 1.71 +} 1.72 + 1.73 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.74 +genpkg_rules() 1.75 +{ 1.76 + mkdir -p $fs/usr/share 1.77 + cp -a $_pkg/usr/share/java $fs/usr/share 1.78 + cp -a $_pkg/usr/bin $fs/usr 1.79 + # Copy all libs. Remove libgcc_s.so and libstdc++.so 1.80 + # they goes in gcc-lib-base-$VERSION package. 1.81 + cp -a $_pkg/usr/lib $fs/usr 1.82 + rm $fs/usr/lib/libgcc_s.so* 1.83 + rm $fs/usr/lib/libstdc++.so* 1.84 + rm $fs/usr/lib/libgomp.so* 1.85 + # Include files. 1.86 + cp -a $_pkg/usr/include $fs/usr 1.87 +} 1.88 + 1.89 +# Post install commands for Tazpkg. 1.90 +post_install() 1.91 +{ 1.92 + local root 1.93 + root=$1 1.94 + echo "Processing post-install commands..." 1.95 + if [ ! -f "$root/lib/cpp" ] ; then 1.96 + ln -s ../usr/bin/cpp $root/lib 1.97 + fi 1.98 + if [ ! -f "$root/usr/bin/cc" ] ; then 1.99 + ln -s gcc $root/usr/bin/cc 1.100 + fi 1.101 +} 1.102 + 1.103 +# Rules to clean the package 1.104 +clean_wok() 1.105 +{ 1.106 + rm -r $SOURCE-$VERSION-build 1.107 +}