wok diff icedtea6-jdk/receipt @ rev 9223

Fix icedtea6; handle multi-sources using some new receipts
author Antoine Bodin <gokhlayeh@slitaz.org>
date Fri Mar 11 17:58:14 2011 +0100 (2011-03-11)
parents 1f48fd1fd933
children 886e00452a15
line diff
     1.1 --- a/icedtea6-jdk/receipt	Sun Feb 13 22:57:56 2011 +0100
     1.2 +++ b/icedtea6-jdk/receipt	Fri Mar 11 17:58:14 2011 +0100
     1.3 @@ -7,29 +7,28 @@
     1.4  SHORT_DESC="A Free Software harness for OpenJDK."
     1.5  MAINTAINER="rcx@zoominternet.net"
     1.6  DEPENDS="icedtea6-jre glibc-base zlib xorg-libX11 xorg-libXau xorg-libXdmcp"
     1.7 -BUILD_DEPENDS="gcc+gcj slitaz-toolchain autoconf automake m4 diffutils gawk \
     1.8 +BUILD_DEPENDS="gcc+gcj autoconf automake m4 diffutils gawk \
     1.9  coreutils-file-special coreutils-file-summarize alsa-lib-dev cups-dev \
    1.10 -gawk file patch findutils perl zip unzip bzip2 tar cpio glib-dev zlib-dev \
    1.11 -fastjar rhino ecj apache-ant xalan-xerces-j \
    1.12 +file patch findutils perl zip unzip bzip2 tar cpio glib-dev \
    1.13 +fastjar rhino ecj apache-ant xalan-xerces-j wget \
    1.14  freetype-dev gtk+-dev giflib-dev jpeg-dev libpng-dev \
    1.15  xorg-inputproto xorg-kbproto xorg-libXi-dev xorg-libXinerama-dev \
    1.16  xorg-libXp-dev xorg-libXt-dev xorg-libXtst-dev xorg-printproto \
    1.17  xorg-recordproto xorg-renderproto xorg-xextproto xorg-xineramaproto xorg-xproto \
    1.18 -nss"
    1.19 +nss jdk6-jaws jdk6-jaxp jdk6-jaf openjdk-6-src"
    1.20  TARBALL="$SOURCE-$VERSION.tar.gz"
    1.21  WEB_SITE="http://www.iced-tea.org/"
    1.22  WGET_URL="http://icedtea.classpath.org/download/source/$TARBALL"
    1.23  
    1.24 +# Note to icedtea6 updaters,
    1.25 +# You should check version into receipts:
    1.26 +# * jdk6-jaxws (version: $openjdk_version)
    1.27 +# * jdk6-jaxp (version: $openjdk_version)
    1.28 +# * jdk6-jaf (version: $openjdk_version)
    1.29 +# * openjdk-6-src (version: $openjdk_version-$openjdk_date)
    1.30 +# Theses receipts allow to have source tarballs managed by tazwok.
    1.31  openjdk_version="b20"
    1.32  openjdk_date="21_jun_2010"
    1.33 -JAXWS="jdk6-jaxws-${openjdk_version}.zip"
    1.34 -JAXP="jdk6-jaxp-${openjdk_version}.zip"
    1.35 -JAF="jdk6-jaf-${openjdk_version}.zip"
    1.36 -OPENJDK="openjdk-6-src-${openjdk_version}-${openjdk_date}.tar.gz"
    1.37 -WGETJAXWS="https://jax-ws.dev.java.net/files/documents/4202/150724"
    1.38 -WGETJAXP="https://jaxp.dev.java.net/files/documents/913/150648"
    1.39 -WGETJAF="https://jax-ws.dev.java.net/files/documents/4202/150725"
    1.40 -WGETOPENJDK="http://download.java.net/openjdk/jdk6/promoted/${openjdk_version}"
    1.41  
    1.42  # Rules to configure and make the package.
    1.43  compile_rules()
    1.44 @@ -47,36 +46,25 @@
    1.45  	cd $src
    1.46  	mkdir drops
    1.47  	sed -i -e 's/mkdir -p drops/true/' -e 's/ jar xf/ fastjar xf/'  Makefile*
    1.48 -	[ -L /usr/bin/wget ] && tazpkg get-install wget --forced
    1.49 -	for i in $JAXWS $JAXP $JAF ; do
    1.50 -		if [ -f $SOURCES_REPOSITORY/$i ]; then
    1.51 -			cp $SOURCES_REPOSITORY/$i drops
    1.52 -		elif [ "$i" == "$JAXWS" ]; then
    1.53 -			wget -O $SOURCES_REPOSITORY/$JAXWS --no-check-certificate "$WGETJAXWS/$JAXWS"
    1.54 -			cp $SOURCES_REPOSITORY/$JAXWS drops
    1.55 -		elif [ "$i" == "$JAXP" ]; then
    1.56 -			wget -O $SOURCES_REPOSITORY/$JAXP --no-check-certificate "$WGETJAXP/$JAXP"
    1.57 -			cp $SOURCES_REPOSITORY/$JAXP drops
    1.58 -		elif [ "$i" == "$JAF" ]; then
    1.59 -			wget -O $SOURCES_REPOSITORY/$JAF --no-check-certificate "$WGETJAF/$JAF"
    1.60 -			cp $SOURCES_REPOSITORY/$JAF drops
    1.61 -		fi
    1.62 -		
    1.63 +
    1.64 +	report open-bloc
    1.65 +	
    1.66 +	# Check than all sources files are available, or exit.
    1.67 +	for i in jdk6-jaxws jdk6-jaxp jdk6-jaf; do
    1.68 +		tazwok get-src $i || { report close-bloc; return 1; }
    1.69 +		cp $SOURCES_REPOSITORY/$i-$openjdk_version.zip drops
    1.70  	done
    1.71 +	tazwok get-src openjdk-6-src || { report close-bloc; return 1; }
    1.72 +	cp $SOURCES_REPOSITORY/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz .
    1.73  
    1.74 -	for i in $OPENJDK ; do
    1.75 -		if [ -f $SOURCES_REPOSITORY/$i ]; then
    1.76 -			cp $SOURCES_REPOSITORY/$i .
    1.77 -		else
    1.78 -			wget -O $SOURCES_REPOSITORY/$OPENJDK "$WGETOPENJDK/$OPENJDK"
    1.79 -			cp $SOURCES_REPOSITORY/$OPENJDK .
    1.80 -		fi
    1.81 -	done
    1.82 +	report step "Checking that all needed tools are OK"
    1.83  	[ -L /usr/bin/find ] && tazpkg get-install findutils --forced
    1.84  	[ -L /usr/bin/diff ] && tazpkg get-install diffutils --forced
    1.85  	[ "$(readlink /usr/bin/awk)" == "gawk" ] ||
    1.86  	tazpkg get-install gawk --forced
    1.87  	[ -L /usr/bin/sed ] && tazpkg get-install sed --forced
    1.88 +
    1.89 +	report step "Running compilation"
    1.90  	mem=$(free | awk '/Mem:/ { printf "%d\n",$2/1024 }')
    1.91  	cat > slitaz.sh <<EOT
    1.92  # Busybox compatibility
    1.93 @@ -101,17 +89,18 @@
    1.94  		--with-rhino=/usr/share/java/js.jar \
    1.95  		--with-abs-install-dir=$JVM_PREFIX \
    1.96  		$CONFIGURE_ARGS &&
    1.97 -	make -j 1 ARCH_PREFIX=  || return 1
    1.98 +	make -j 1 ARCH_PREFIX=  || { report close-bloc; return 1; }
    1.99  
   1.100  	# NOTE: don't build with -j 4. Only build with -j 1 or tank will crash
   1.101  	# NOTE: IcedTea6 does not define an "install" target
   1.102  	
   1.103 -	rm -r -f $src/_pkg
   1.104 +	report step "Copying needed files to install dir"
   1.105 +	rm -rf $DESTDIR
   1.106  
   1.107  	local JVM_BUILDDIR
   1.108  	JVM_BUILDDIR=$src/openjdk.build/j2sdk-image
   1.109  	local JVM_DESTDIR
   1.110 -	JVM_DESTDIR=$src/_pkg$JVM_PREFIX
   1.111 +	JVM_DESTDIR=$DESTDIR$JVM_PREFIX
   1.112  
   1.113  	mkdir -p $JVM_DESTDIR
   1.114  	cp -a $JVM_BUILDDIR/bin $JVM_DESTDIR
   1.115 @@ -127,17 +116,18 @@
   1.116  	done
   1.117  
   1.118  	# Create symlinks for JDK binaries
   1.119 -	mkdir -p $src/_pkg/usr/jdk-bin
   1.120 +	mkdir -p $DESTDIR/usr/jdk-bin
   1.121  	for jbin in $(ls -1 $JVM_DESTDIR/bin) ; do
   1.122 -		ln -s $JVM_PREFIX/bin/$jbin $src/_pkg/usr/jdk-bin/$jbin
   1.123 +		ln -s $JVM_PREFIX/bin/$jbin $DESTDIR/usr/jdk-bin/$jbin
   1.124  	done
   1.125  	
   1.126  	# Create symlinks for JRE binaries
   1.127 -	mkdir -p $src/_pkg/usr/jre-bin
   1.128 +	mkdir -p $DESTDIR/usr/jre-bin
   1.129  	for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do
   1.130  		ln -s $JVM_PREFIX/jre/bin/$jbin $JVM_DESTDIR/bin/$jbin
   1.131 -		ln -s $JVM_PREFIX/jre/bin/$jbin $src/_pkg/usr/jre-bin
   1.132 +		ln -s $JVM_PREFIX/jre/bin/$jbin $DESTDIR/usr/jre-bin
   1.133  	done
   1.134 +	report close-bloc
   1.135  }
   1.136  
   1.137  # Rules to gen a SliTaz package suitable for Tazpkg.