wok-next annotate icedtea6-jdk/receipt @ rev 8578

imported patch get/thunderbird-langpack-pt_PT
author Antoine Bodin <gokhlayeh@slitaz.org>
date Sun Feb 13 22:57:56 2011 +0100 (2011-02-13)
parents 9fc32aa2b184
children f1207145dcb3
rev   line source
rcx@3803 1 # SliTaz package receipt.
rcx@3803 2
rcx@3803 3 PACKAGE="icedtea6-jdk"
rcx@3803 4 SOURCE="icedtea6"
slaxemulator@6861 5 VERSION="1.9.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 \
gokhlayeh@8552 17 xorg-recordproto xorg-renderproto xorg-xextproto xorg-xineramaproto xorg-xproto \
gokhlayeh@8552 18 nss"
rcx@3803 19 TARBALL="$SOURCE-$VERSION.tar.gz"
rcx@3803 20 WEB_SITE="http://www.iced-tea.org/"
rcx@3803 21 WGET_URL="http://icedtea.classpath.org/download/source/$TARBALL"
rcx@3803 22
slaxemulator@6866 23 openjdk_version="b20"
slaxemulator@6866 24 openjdk_date="21_jun_2010"
slaxemulator@6866 25 JAXWS="jdk6-jaxws-${openjdk_version}.zip"
slaxemulator@6866 26 JAXP="jdk6-jaxp-${openjdk_version}.zip"
slaxemulator@6866 27 JAF="jdk6-jaf-${openjdk_version}.zip"
slaxemulator@6866 28 OPENJDK="openjdk-6-src-${openjdk_version}-${openjdk_date}.tar.gz"
slaxemulator@6866 29 WGETJAXWS="https://jax-ws.dev.java.net/files/documents/4202/150724"
slaxemulator@6866 30 WGETJAXP="https://jaxp.dev.java.net/files/documents/913/150648"
slaxemulator@6866 31 WGETJAF="https://jax-ws.dev.java.net/files/documents/4202/150725"
slaxemulator@6866 32 WGETOPENJDK="http://download.java.net/openjdk/jdk6/promoted/${openjdk_version}"
slaxemulator@6866 33
rcx@3803 34 # Rules to configure and make the package.
rcx@3803 35 compile_rules()
rcx@3803 36 {
pascal@6031 37 # Limit memory usage
pascal@6031 38 ulimit -v $(awk '/MemTotal/ { print int(($2*80)/100) }' < /proc/meminfo)
pascal@6031 39
rcx@3803 40 local JVM_PREFIX
rcx@6017 41 JVM_PREFIX="/usr/lib/jvm/java-icedtea"
rcx@3910 42
rcx@3803 43 # NOTE: This build does not seem to work with ECJ 3.5
rcx@6017 44 local ECJ_VERSION
rcx@6017 45 ECJ_VERSION="3.6"
rcx@3803 46
rcx@3803 47 cd $src
pascal@6034 48 mkdir drops
rcx@6059 49 sed -i -e 's/mkdir -p drops/true/' -e 's/ jar xf/ fastjar xf/' Makefile*
slaxemulator@6892 50 [ -L /usr/bin/wget ] && tazpkg get-install wget --forced
slaxemulator@6894 51 for i in $JAXWS $JAXP $JAF ; do
slaxemulator@6866 52 if [ -f $SOURCES_REPOSITORY/$i ]; then
slaxemulator@6866 53 cp $SOURCES_REPOSITORY/$i drops
slaxemulator@6866 54 elif [ "$i" == "$JAXWS" ]; then
slaxemulator@6866 55 wget -O $SOURCES_REPOSITORY/$JAXWS --no-check-certificate "$WGETJAXWS/$JAXWS"
slaxemulator@6866 56 cp $SOURCES_REPOSITORY/$JAXWS drops
slaxemulator@6866 57 elif [ "$i" == "$JAXP" ]; then
slaxemulator@6866 58 wget -O $SOURCES_REPOSITORY/$JAXP --no-check-certificate "$WGETJAXP/$JAXP"
slaxemulator@6866 59 cp $SOURCES_REPOSITORY/$JAXP drops
slaxemulator@6866 60 elif [ "$i" == "$JAF" ]; then
slaxemulator@6866 61 wget -O $SOURCES_REPOSITORY/$JAF --no-check-certificate "$WGETJAF/$JAF"
slaxemulator@6866 62 cp $SOURCES_REPOSITORY/$JAF drops
slaxemulator@6894 63 fi
slaxemulator@6894 64
slaxemulator@6894 65 done
slaxemulator@6894 66
slaxemulator@6894 67 for i in $OPENJDK ; do
slaxemulator@6894 68 if [ -f $SOURCES_REPOSITORY/$i ]; then
slaxemulator@6894 69 cp $SOURCES_REPOSITORY/$i .
slaxemulator@6894 70 else
slaxemulator@6866 71 wget -O $SOURCES_REPOSITORY/$OPENJDK "$WGETOPENJDK/$OPENJDK"
slaxemulator@6866 72 cp $SOURCES_REPOSITORY/$OPENJDK .
slaxemulator@6866 73 fi
pascal@6034 74 done
pascal@6034 75 [ -L /usr/bin/find ] && tazpkg get-install findutils --forced
pascal@5915 76 [ -L /usr/bin/diff ] && tazpkg get-install diffutils --forced
pascal@6029 77 [ "$(readlink /usr/bin/awk)" == "gawk" ] ||
pascal@6029 78 tazpkg get-install gawk --forced
slaxemulator@6892 79 [ -L /usr/bin/sed ] && tazpkg get-install sed --forced
pascal@5915 80 mem=$(free | awk '/Mem:/ { printf "%d\n",$2/1024 }')
pascal@4304 81 cat > slitaz.sh <<EOT
pascal@4304 82 # Busybox compatibility
slaxemulator@6892 83 #find -name Sanity.gmk | xargs sed -i 's/--sync -kP/-k/' Makefile
pascal@6034 84 find -name Platform.gmk | xargs sed -i "s@MB_OF_MEMORY *:=.*free.*@MB_OF_MEMORY := $mem@" Makefile
pascal@4304 85 EOT
pascal@6034 86 sed -i -e 's|touch .*|&\n\tsh slitaz.sh|' \
pascal@5152 87 -e 's/--check/-c/' \
pascal@4304 88 -e 's/ln -sfv/ln -sf/' Makefile*
rcx@3803 89 autoreconf &&
rcx@3803 90 ./configure \
rcx@3803 91 --prefix=/usr \
rcx@3803 92 --disable-plugin \
rcx@3803 93 --disable-docs \
rcx@3803 94 --with-ecj \
rcx@6017 95 --with-ecj-jar=/usr/share/java/ecj-$ECJ_VERSION.jar \
rcx@3803 96 --with-gcj \
rcx@3803 97 --with-gcj-home=/usr/lib/jvm/java-gcj \
rcx@3803 98 --with-xalan2-jar=/usr/share/java/xalan.jar \
rcx@3803 99 --with-xalan2-serializer-jar=/usr/share/java/serializer.jar \
rcx@3803 100 --with-xerces2-jar=/usr/share/java/xercesImpl.jar \
rcx@3803 101 --with-rhino=/usr/share/java/js.jar \
rcx@3803 102 --with-abs-install-dir=$JVM_PREFIX \
rcx@3803 103 $CONFIGURE_ARGS &&
gokhlayeh@8523 104 make -j 1 ARCH_PREFIX= || return 1
rcx@3803 105
slaxemulator@6927 106 # NOTE: don't build with -j 4. Only build with -j 1 or tank will crash
rcx@3803 107 # NOTE: IcedTea6 does not define an "install" target
rcx@3803 108
rcx@3803 109 rm -r -f $src/_pkg
rcx@3803 110
rcx@3803 111 local JVM_BUILDDIR
slaxemulator@6927 112 JVM_BUILDDIR=$src/openjdk.build/j2sdk-image
rcx@3803 113 local JVM_DESTDIR
rcx@3803 114 JVM_DESTDIR=$src/_pkg$JVM_PREFIX
rcx@3803 115
rcx@3803 116 mkdir -p $JVM_DESTDIR
rcx@3803 117 cp -a $JVM_BUILDDIR/bin $JVM_DESTDIR
rcx@3803 118 cp -a $JVM_BUILDDIR/lib $JVM_DESTDIR
rcx@3803 119
rcx@3803 120 mkdir -p $JVM_DESTDIR/jre
rcx@3803 121 cp -a $JVM_BUILDDIR/jre/bin $JVM_DESTDIR/jre
rcx@3803 122 cp -a $JVM_BUILDDIR/jre/lib $JVM_DESTDIR/jre
rcx@3803 123
rcx@3803 124 # Delete duplicated executables from the JDK bin
rcx@3803 125 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do
rcx@3803 126 rm -f $JVM_DESTDIR/bin/$jbin
rcx@3803 127 done
rcx@3803 128
rcx@3803 129 # Create symlinks for JDK binaries
rcx@3803 130 mkdir -p $src/_pkg/usr/jdk-bin
rcx@3803 131 for jbin in $(ls -1 $JVM_DESTDIR/bin) ; do
rcx@3803 132 ln -s $JVM_PREFIX/bin/$jbin $src/_pkg/usr/jdk-bin/$jbin
rcx@3803 133 done
rcx@3803 134
rcx@3803 135 # Create symlinks for JRE binaries
rcx@3803 136 mkdir -p $src/_pkg/usr/jre-bin
rcx@3803 137 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do
rcx@3803 138 ln -s $JVM_PREFIX/jre/bin/$jbin $JVM_DESTDIR/bin/$jbin
rcx@3803 139 ln -s $JVM_PREFIX/jre/bin/$jbin $src/_pkg/usr/jre-bin
rcx@3803 140 done
rcx@3803 141 }
rcx@3803 142
rcx@3803 143 # Rules to gen a SliTaz package suitable for Tazpkg.
rcx@3803 144 genpkg_rules()
rcx@3803 145 {
rcx@3803 146 mkdir -p $fs/usr/lib/jvm/java-icedtea
rcx@3803 147 cp -a $_pkg/usr/lib/jvm/java-icedtea/bin $fs/usr/lib/jvm/java-icedtea
rcx@3803 148 cp -a $_pkg/usr/lib/jvm/java-icedtea/lib $fs/usr/lib/jvm/java-icedtea
rcx@3803 149 }