wok rev 12083

icedtea6-jdk: fix compiles_rules to work with tazwok. I know it's a bit messy but I need this.
author Antoine Bodin <gokhlayeh@slitaz.org>
date Fri Mar 09 18:19:26 2012 +0100 (2012-03-09)
parents 0a352dc005b7
children a5fbfa5737a6
files icedtea6-jdk/receipt
line diff
     1.1 --- a/icedtea6-jdk/receipt	Fri Mar 09 14:58:49 2012 +0100
     1.2 +++ b/icedtea6-jdk/receipt	Fri Mar 09 18:19:26 2012 +0100
     1.3 @@ -46,11 +46,21 @@
     1.4  	sed -i -e 's/mkdir -p drops/true/' -e 's/ jar xf/ fastjar xf/'  Makefile*
     1.5  	
     1.6  	# Check than all sources files are available, or exit.
     1.7 -	for i in jdk6-jaxws jdk6-jaxp jdk6-jaf; do
     1.8 -		cp $SOURCES_REPOSITORY/$i-$openjdk_version.zip drops || exit 1
     1.9 -	done
    1.10 -	# openjdk-6-src is in BUILD_DEPENDS and must be build like jdk6-* pkgs.
    1.11 -	cp $SOURCES_REPOSITORY/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz .
    1.12 +	if [ -x /usr/bin/cook ]; then
    1.13 +		for i in jdk6-jaxws jdk6-jaxp jdk6-jaf; do
    1.14 +			cp $SOURCES_REPOSITORY/$i-$openjdk_version.zip drops || return 1
    1.15 +		done
    1.16 +		# openjdk-6-src is in BUILD_DEPENDS and must be build like jdk6-* pkgs.
    1.17 +		cp $SOURCES_REPOSITORY/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz .
    1.18 +	else
    1.19 +		report open-bloc
    1.20 +		for i in jdk6-jaxws jdk6-jaxp jdk6-jaf openjdk-6-src; do
    1.21 +			tazwok get-src $i
    1.22 +			cp $SOURCES_REPOSITORY/$i-$openjdk_version.zip drops
    1.23 +		done
    1.24 +		cp $SOURCES_REPOSITORY/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz .
    1.25 +		report step "Running compilation"
    1.26 +	fi
    1.27  
    1.28  	mem=$(free | awk '/Mem:/ { printf "%d\n",$2/1024 }')
    1.29  	cat > slitaz.sh <<EOT
    1.30 @@ -75,7 +85,7 @@
    1.31  		--with-xerces2-jar=/usr/share/java/xercesImpl.jar \
    1.32  		--with-rhino=/usr/share/java/js.jar \
    1.33  		--with-abs-install-dir=$JVM_PREFIX \
    1.34 -		$CONFIGURE_ARGS || exit 1
    1.35 +		$CONFIGURE_ARGS || return 1
    1.36  	make -j 1 ARCH_PREFIX= 2>&1 | sed s/ERROR/error/
    1.37  	
    1.38  	echo "Copying needed files to install dir..."
    1.39 @@ -118,6 +128,9 @@
    1.40  		ln -s $JVM_PREFIX/jre/bin/$jbin $JVM_DESTDIR/bin/$jbin
    1.41  		ln -s $JVM_PREFIX/jre/bin/$jbin $DESTDIR/usr/jre-bin
    1.42  	done
    1.43 +	if [ ! -x /usr/bin/cook ]; then
    1.44 +		report close-bloc
    1.45 +	fi
    1.46  }
    1.47  
    1.48  # Rules to gen a SliTaz package suitable for Tazpkg.