wok-6.x 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 | 37ae88f35e4d |
children | e9a6c865f8a7 |
files | gcc+gcj/receipt |
line diff
1.1 --- a/gcc+gcj/receipt Wed May 18 17:49:44 2011 +0200 1.2 +++ b/gcc+gcj/receipt Wed May 18 17:57:35 2011 +0200 1.3 @@ -24,43 +24,32 @@ 1.4 # Rules to configure and make the package. 1.5 compile_rules() 1.6 { 1.7 + cd $src 1.8 # Set BUILD_HOST if not defined in tazwok.conf as it should be 1.9 if [ -z "$BUILD_HOST" ] ; then 1.10 BUILD_HOST="i486-pc-linux-gnu" 1.11 fi 1.12 GCC_TARGET=$BUILD_HOST 1.13 1.14 - # Get ecj.jar needed to build gcj 1.15 + # Get ecj.jar needed to build gcj. We have to dl it each time from the 1.16 + # sources repository to ensure that we receive the latest JAR. 1.17 # (See http://gcc.gnu.org/install/configure.html --with-ecj-jar) 1.18 - ECJ_PRE_PATH=`pwd` 1.19 ECJ_JAR="ecj-latest.jar" 1.20 ECJ_URL="ftp://sourceware.org/pub/java/$ECJ_JAR" 1.21 - if [ ! -f "$SOURCES_REPOSITORY/$ECJ_JAR" ] ; then 1.22 - cd $SOURCES_REPOSITORY 1.23 - wget $ECJ_URL 1.24 + if [ ! -f "$ECJ_JAR" ] ; then 1.25 + echo "Downloading ECJ jar to: $(pwd)" 1.26 + wget -c $ECJ_URL 1.27 # Exit if download failed to avoid errors. 1.28 - if [ ! -f "$SOURCES_REPOSITORY/$ECJ_JAR" ] ; then 1.29 + if [ ! -f "$ECJ_JAR" ] ; then 1.30 echo -e "\nECJ jar download failed, exiting. Please check ECJ_URL variable.\n" 1.31 return 1 1.32 fi 1.33 - else 1.34 - echo -n "ECJ jar exit... " 1.35 - status 1.36 fi 1.37 - 1.38 - # Copy the ecj jar to the root of the gcc source directory 1.39 - # The file name isn't versioned, so we have to remove it from the 1.40 - # sources repository to ensure that we receive updated files 1.41 - mv -f $SOURCES_REPOSITORY/$ECJ_JAR $src/ecj.jar 1.42 - 1.43 - # Pop back to the pre-download directory 1.44 - cd $ECJ_PRE_PATH 1.45 1.46 # Use libiberty.a from binutils. 1.47 sed -i 's/install_to_$(INSTALL_DEST) //' \ 1.48 $src/libiberty/Makefile.in || return 1 1.49 - mkdir -p $SOURCE-$VERSION-build 1.50 - cd $SOURCE-$VERSION-build 1.51 + mkdir -p ../build && cd ../build 1.52 1.53 PYTHON_LIB=python$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/') 1.54 ../${src##*/}/configure --prefix=/usr --libexecdir=/usr/lib \ 1.55 @@ -76,7 +65,7 @@ 1.56 --with-x --enable-java-awt=gtk \ 1.57 --enable-gtk-cairo \ 1.58 --enable-lto \ 1.59 - $CONFIGURE_ARGS $GCC_TARGET && 1.60 + $CONFIGURE_ARGS $GCC_TARGET && 1.61 make bootstrap && 1.62 # Make install in the source tree to help creating derived pkgs 1.63 # and keep $_pkg variable set for genpkg. 1.64 @@ -99,7 +88,6 @@ 1.65 rm $fs/usr/lib/*.la 1.66 # Include files. 1.67 cp -a $_pkg/usr/include $fs/usr 1.68 - rm -r $WOK/$PACKAGE/$SOURCE-$VERSION-build 1.69 } 1.70 1.71 # Post install commands for Tazpkg.