wok-current annotate icedtea6-jdk/receipt @ rev 6160

Up: thunderbird (3.1.3)
author Dominique Corbex <domcox@slitaz.org>
date Fri Sep 10 12:19:45 2010 +0200 (2010-09-10)
parents bb947bcf2fa0
children c64455fbcb86
rev   line source
rcx@3803 1 # SliTaz package receipt.
rcx@3803 2
rcx@3803 3 PACKAGE="icedtea6-jdk"
rcx@3803 4 SOURCE="icedtea6"
rcx@6017 5 VERSION="1.8.1"
rcx@3803 6 CATEGORY="development"
rcx@3803 7 SHORT_DESC="A Free Software harness for OpenJDK."
rcx@3803 8 MAINTAINER="rcx@zoominternet.net"
rcx@3803 9 DEPENDS="icedtea6-jre glibc-base zlib xorg-libX11 xorg-libXau xorg-libXdmcp"
pascal@5915 10 BUILD_DEPENDS="gcc+gcj slitaz-toolchain autoconf automake m4 diffutils gawk \
rcx@3803 11 coreutils-file-special coreutils-file-summarize alsa-lib-dev cups-dev \
rcx@3803 12 gawk file patch findutils perl zip unzip bzip2 tar cpio glib-dev zlib-dev \
rcx@3807 13 fastjar rhino ecj apache-ant xalan-xerces-j \
rcx@3803 14 freetype-dev gtk+-dev giflib-dev jpeg-dev libpng-dev \
rcx@3803 15 xorg-inputproto xorg-kbproto xorg-libXi-dev xorg-libXinerama-dev \
rcx@3803 16 xorg-libXp-dev xorg-libXt-dev xorg-libXtst-dev xorg-printproto \
rcx@3803 17 xorg-recordproto xorg-renderproto xorg-xextproto xorg-xineramaproto xorg-xproto"
rcx@3803 18 TARBALL="$SOURCE-$VERSION.tar.gz"
rcx@3803 19 WEB_SITE="http://www.iced-tea.org/"
rcx@3803 20 WGET_URL="http://icedtea.classpath.org/download/source/$TARBALL"
rcx@3803 21
rcx@3803 22 # Rules to configure and make the package.
rcx@3803 23 compile_rules()
rcx@3803 24 {
pascal@6031 25 # Limit memory usage
pascal@6031 26 ulimit -v $(awk '/MemTotal/ { print int(($2*80)/100) }' < /proc/meminfo)
pascal@6031 27
rcx@3803 28 local JVM_PREFIX
rcx@6017 29 JVM_PREFIX="/usr/lib/jvm/java-icedtea"
rcx@3910 30
rcx@3803 31 # NOTE: This build does not seem to work with ECJ 3.5
rcx@6017 32 local ECJ_VERSION
rcx@6017 33 ECJ_VERSION="3.6"
rcx@3803 34
rcx@3803 35 cd $src
pascal@6034 36 mkdir drops
rcx@6059 37 sed -i -e 's/mkdir -p drops/true/' -e 's/ jar xf/ fastjar xf/' Makefile*
pascal@6034 38 for i in jdk6-jaxws-2009_10_27.zip jdk6-jaxp-2009_10_13.zip \
pascal@6034 39 jdk6-jaf-2009_10_27.zip ; do
pascal@6034 40 [ -s $SOURCES_REPOSITORY/$i ] &&
pascal@6034 41 cp $SOURCES_REPOSITORY/$i drops
pascal@6034 42 done
pascal@6034 43 for i in openjdk-6-src-b18-16_feb_2010.tar.gz ; do
pascal@6034 44 [ -s $SOURCES_REPOSITORY/$i ] &&
pascal@6034 45 cp $SOURCES_REPOSITORY/$i .
pascal@6034 46 done
pascal@6034 47 [ -L /usr/bin/find ] && tazpkg get-install findutils --forced
pascal@5915 48 [ -L /usr/bin/diff ] && tazpkg get-install diffutils --forced
pascal@6029 49 [ "$(readlink /usr/bin/awk)" == "gawk" ] ||
pascal@6029 50 tazpkg get-install gawk --forced
pascal@5915 51 mem=$(free | awk '/Mem:/ { printf "%d\n",$2/1024 }')
pascal@4304 52 cat > slitaz.sh <<EOT
pascal@4304 53 # Busybox compatibility
pascal@4307 54 find -name Sanity.gmk | xargs sed -i 's/--sync -kP/-k/' Makefile
pascal@6034 55 find -name Platform.gmk | xargs sed -i "s@MB_OF_MEMORY *:=.*free.*@MB_OF_MEMORY := $mem@" Makefile
pascal@4304 56 EOT
pascal@6034 57 sed -i -e 's|touch .*|&\n\tsh slitaz.sh|' \
pascal@5152 58 -e 's/--check/-c/' \
pascal@4304 59 -e 's/ln -sfv/ln -sf/' Makefile*
rcx@3803 60 autoreconf &&
rcx@3803 61 ./configure \
rcx@3803 62 --prefix=/usr \
rcx@3803 63 --disable-plugin \
rcx@3803 64 --disable-docs \
rcx@3803 65 --with-ecj \
rcx@6017 66 --with-ecj-jar=/usr/share/java/ecj-$ECJ_VERSION.jar \
rcx@3803 67 --with-gcj \
rcx@3803 68 --with-gcj-home=/usr/lib/jvm/java-gcj \
rcx@3803 69 --with-xalan2-jar=/usr/share/java/xalan.jar \
rcx@3803 70 --with-xalan2-serializer-jar=/usr/share/java/serializer.jar \
rcx@3803 71 --with-xerces2-jar=/usr/share/java/xercesImpl.jar \
rcx@3803 72 --with-rhino=/usr/share/java/js.jar \
rcx@3803 73 --with-abs-install-dir=$JVM_PREFIX \
rcx@3803 74 $CONFIGURE_ARGS &&
pascal@6030 75 make -j 1 ARCH_PREFIX= || exit 1
rcx@3803 76
rcx@3803 77 # NOTE: IcedTea6 does not define an "install" target
rcx@3803 78
rcx@3803 79 rm -r -f $src/_pkg
rcx@3803 80
rcx@3803 81 local JVM_BUILDDIR
rcx@3803 82 JVM_BUILDDIR=$src/openjdk/build/linux-i586/j2sdk-image
rcx@3803 83 local JVM_DESTDIR
rcx@3803 84 JVM_DESTDIR=$src/_pkg$JVM_PREFIX
rcx@3803 85
rcx@3803 86 mkdir -p $JVM_DESTDIR
rcx@3803 87 cp -a $JVM_BUILDDIR/bin $JVM_DESTDIR
rcx@3803 88 cp -a $JVM_BUILDDIR/lib $JVM_DESTDIR
rcx@3803 89
rcx@3803 90 mkdir -p $JVM_DESTDIR/jre
rcx@3803 91 cp -a $JVM_BUILDDIR/jre/bin $JVM_DESTDIR/jre
rcx@3803 92 cp -a $JVM_BUILDDIR/jre/lib $JVM_DESTDIR/jre
rcx@3803 93
rcx@3803 94 # Delete duplicated executables from the JDK bin
rcx@3803 95 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do
rcx@3803 96 rm -f $JVM_DESTDIR/bin/$jbin
rcx@3803 97 done
rcx@3803 98
rcx@3803 99 # Create symlinks for JDK binaries
rcx@3803 100 mkdir -p $src/_pkg/usr/jdk-bin
rcx@3803 101 for jbin in $(ls -1 $JVM_DESTDIR/bin) ; do
rcx@3803 102 ln -s $JVM_PREFIX/bin/$jbin $src/_pkg/usr/jdk-bin/$jbin
rcx@3803 103 done
rcx@3803 104
rcx@3803 105 # Create symlinks for JRE binaries
rcx@3803 106 mkdir -p $src/_pkg/usr/jre-bin
rcx@3803 107 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do
rcx@3803 108 ln -s $JVM_PREFIX/jre/bin/$jbin $JVM_DESTDIR/bin/$jbin
rcx@3803 109 ln -s $JVM_PREFIX/jre/bin/$jbin $src/_pkg/usr/jre-bin
rcx@3803 110 done
rcx@3803 111 }
rcx@3803 112
rcx@3803 113 # Rules to gen a SliTaz package suitable for Tazpkg.
rcx@3803 114 genpkg_rules()
rcx@3803 115 {
rcx@3803 116 mkdir -p $fs/usr/lib/jvm/java-icedtea
rcx@3803 117 cp -a $_pkg/usr/lib/jvm/java-icedtea/bin $fs/usr/lib/jvm/java-icedtea
rcx@3803 118 cp -a $_pkg/usr/lib/jvm/java-icedtea/lib $fs/usr/lib/jvm/java-icedtea
rcx@3803 119 }