wok-current view icedtea6-jdk/receipt @ rev 10613
centerim: update bdeps
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu May 26 17:58:24 2011 +0200 (2011-05-26) |
parents | 886e00452a15 |
children | 16413729582c |
line source
1 # SliTaz package receipt.
3 PACKAGE="icedtea6-jdk"
4 SOURCE="icedtea6"
5 VERSION="1.9.7"
6 CATEGORY="development"
7 SHORT_DESC="A Free Software harness for OpenJDK."
8 MAINTAINER="rcx@zoominternet.net"
9 DEPENDS="icedtea6-jre glibc-base zlib xorg-libX11 xorg-libXau xorg-libXdmcp"
10 BUILD_DEPENDS="gcc+gcj autoconf automake m4 diffutils gawk \
11 coreutils-file-special coreutils-file-summarize alsa-lib-dev cups-dev \
12 file patch findutils perl zip unzip bzip2 tar cpio glib-dev \
13 fastjar rhino ecj apache-ant xalan-xerces-j wget \
14 freetype-dev gtk+-dev giflib-dev jpeg-dev libpng-dev \
15 xorg-inputproto xorg-kbproto xorg-libXi-dev xorg-libXinerama-dev \
16 xorg-libXp-dev xorg-libXt-dev xorg-libXtst-dev xorg-printproto \
17 xorg-recordproto xorg-renderproto xorg-xextproto xorg-xineramaproto xorg-xproto \
18 nss jdk6-jaxws jdk6-jaxp jdk6-jaf openjdk-6-src"
19 TARBALL="$SOURCE-$VERSION.tar.gz"
20 WEB_SITE="http://www.iced-tea.org/"
21 WGET_URL="http://icedtea.classpath.org/download/source/$TARBALL"
23 # Note to icedtea6 updaters,
24 # You should check version into receipts:
25 # * jdk6-jaxws (version: $openjdk_version)
26 # * jdk6-jaxp (version: $openjdk_version)
27 # * jdk6-jaf (version: $openjdk_version)
28 # * openjdk-6-src (version: $openjdk_version-$openjdk_date)
29 # Theses receipts allow to have source tarballs managed by tazwok.
30 openjdk_version="b20"
31 openjdk_date="21_jun_2010"
33 # Rules to configure and make the package.
34 compile_rules()
35 {
36 # Limit memory usage
37 ulimit -v $(awk '/MemTotal/ { print int(($2*80)/100) }' < /proc/meminfo)
39 local JVM_PREFIX
40 JVM_PREFIX="/usr/lib/jvm/java-icedtea"
42 # NOTE: This build does not seem to work with ECJ 3.5
43 local ECJ_VERSION
44 ECJ_VERSION="3.6"
46 cd $src
47 mkdir drops
48 sed -i -e 's/mkdir -p drops/true/' -e 's/ jar xf/ fastjar xf/' Makefile*
50 report open-bloc
52 # Check than all sources files are available, or exit.
53 for i in jdk6-jaxws jdk6-jaxp jdk6-jaf; do
54 tazwok get-src $i || { report close-bloc; return 1; }
55 cp $SOURCES_REPOSITORY/$i-$openjdk_version.zip drops
56 done
57 tazwok get-src openjdk-6-src || { report close-bloc; return 1; }
58 cp $SOURCES_REPOSITORY/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz .
60 report step "Checking that all needed tools are OK"
61 [ -L /usr/bin/find ] && tazpkg get-install findutils --forced
62 [ -L /usr/bin/diff ] && tazpkg get-install diffutils --forced
63 [ "$(readlink /usr/bin/awk)" == "gawk" ] ||
64 tazpkg get-install gawk --forced
65 [ -L /usr/bin/sed ] && tazpkg get-install sed --forced
67 report step "Running compilation"
68 mem=$(free | awk '/Mem:/ { printf "%d\n",$2/1024 }')
69 cat > slitaz.sh <<EOT
70 # Busybox compatibility
71 #find -name Sanity.gmk | xargs sed -i 's/--sync -kP/-k/' Makefile
72 find -name Platform.gmk | xargs sed -i "s@MB_OF_MEMORY *:=.*free.*@MB_OF_MEMORY := $mem@" Makefile
73 EOT
74 sed -i -e 's|touch .*|&\n\tsh slitaz.sh|' \
75 -e 's/--check/-c/' \
76 -e 's/ln -sfv/ln -sf/' Makefile*
77 autoreconf &&
78 ./configure \
79 --prefix=/usr \
80 --disable-plugin \
81 --disable-docs \
82 --with-ecj \
83 --with-ecj-jar=/usr/share/java/ecj-$ECJ_VERSION.jar \
84 --with-gcj \
85 --with-gcj-home=/usr/lib/jvm/java-gcj \
86 --with-xalan2-jar=/usr/share/java/xalan.jar \
87 --with-xalan2-serializer-jar=/usr/share/java/serializer.jar \
88 --with-xerces2-jar=/usr/share/java/xercesImpl.jar \
89 --with-rhino=/usr/share/java/js.jar \
90 --with-abs-install-dir=$JVM_PREFIX \
91 $CONFIGURE_ARGS &&
92 make -j 1 ARCH_PREFIX= || { report close-bloc; return 1; }
94 # NOTE: don't build with -j 4. Only build with -j 1 or tank will crash
95 # NOTE: IcedTea6 does not define an "install" target
97 report step "Copying needed files to install dir"
98 rm -rf $DESTDIR
100 local JVM_BUILDDIR
101 JVM_BUILDDIR=$src/openjdk.build/j2sdk-image
102 local JVM_DESTDIR
103 JVM_DESTDIR=$DESTDIR$JVM_PREFIX
105 mkdir -p $JVM_DESTDIR
106 cp -a $JVM_BUILDDIR/bin $JVM_DESTDIR
107 cp -a $JVM_BUILDDIR/lib $JVM_DESTDIR
109 mkdir -p $JVM_DESTDIR/jre
110 cp -a $JVM_BUILDDIR/jre/bin $JVM_DESTDIR/jre
111 cp -a $JVM_BUILDDIR/jre/lib $JVM_DESTDIR/jre
113 # Delete duplicated executables from the JDK bin
114 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do
115 rm -f $JVM_DESTDIR/bin/$jbin
116 done
118 # Create symlinks for JDK binaries
119 mkdir -p $DESTDIR/usr/jdk-bin
120 for jbin in $(ls -1 $JVM_DESTDIR/bin) ; do
121 ln -s $JVM_PREFIX/bin/$jbin $DESTDIR/usr/jdk-bin/$jbin
122 done
124 # Create symlinks for JRE binaries
125 mkdir -p $DESTDIR/usr/jre-bin
126 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do
127 ln -s $JVM_PREFIX/jre/bin/$jbin $JVM_DESTDIR/bin/$jbin
128 ln -s $JVM_PREFIX/jre/bin/$jbin $DESTDIR/usr/jre-bin
129 done
130 report close-bloc
131 }
133 # Rules to gen a SliTaz package suitable for Tazpkg.
134 genpkg_rules()
135 {
136 mkdir -p $fs/usr/lib/jvm/java-icedtea
137 cp -a $_pkg/usr/lib/jvm/java-icedtea/bin $fs/usr/lib/jvm/java-icedtea
138 cp -a $_pkg/usr/lib/jvm/java-icedtea/lib $fs/usr/lib/jvm/java-icedtea
139 }