wok-6.x view icedtea6-jdk/receipt @ rev 6211
Up: libarchive, libarchive-dev to 2.8.4.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sat Sep 11 10:10:13 2010 +0000 (2010-09-11) |
parents | bb947bcf2fa0 |
children | c64455fbcb86 |
line source
1 # SliTaz package receipt.
3 PACKAGE="icedtea6-jdk"
4 SOURCE="icedtea6"
5 VERSION="1.8.1"
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 slitaz-toolchain autoconf automake m4 diffutils gawk \
11 coreutils-file-special coreutils-file-summarize alsa-lib-dev cups-dev \
12 gawk file patch findutils perl zip unzip bzip2 tar cpio glib-dev zlib-dev \
13 fastjar rhino ecj apache-ant xalan-xerces-j \
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 TARBALL="$SOURCE-$VERSION.tar.gz"
19 WEB_SITE="http://www.iced-tea.org/"
20 WGET_URL="http://icedtea.classpath.org/download/source/$TARBALL"
22 # Rules to configure and make the package.
23 compile_rules()
24 {
25 # Limit memory usage
26 ulimit -v $(awk '/MemTotal/ { print int(($2*80)/100) }' < /proc/meminfo)
28 local JVM_PREFIX
29 JVM_PREFIX="/usr/lib/jvm/java-icedtea"
31 # NOTE: This build does not seem to work with ECJ 3.5
32 local ECJ_VERSION
33 ECJ_VERSION="3.6"
35 cd $src
36 mkdir drops
37 sed -i -e 's/mkdir -p drops/true/' -e 's/ jar xf/ fastjar xf/' Makefile*
38 for i in jdk6-jaxws-2009_10_27.zip jdk6-jaxp-2009_10_13.zip \
39 jdk6-jaf-2009_10_27.zip ; do
40 [ -s $SOURCES_REPOSITORY/$i ] &&
41 cp $SOURCES_REPOSITORY/$i drops
42 done
43 for i in openjdk-6-src-b18-16_feb_2010.tar.gz ; do
44 [ -s $SOURCES_REPOSITORY/$i ] &&
45 cp $SOURCES_REPOSITORY/$i .
46 done
47 [ -L /usr/bin/find ] && tazpkg get-install findutils --forced
48 [ -L /usr/bin/diff ] && tazpkg get-install diffutils --forced
49 [ "$(readlink /usr/bin/awk)" == "gawk" ] ||
50 tazpkg get-install gawk --forced
51 mem=$(free | awk '/Mem:/ { printf "%d\n",$2/1024 }')
52 cat > slitaz.sh <<EOT
53 # Busybox compatibility
54 find -name Sanity.gmk | xargs sed -i 's/--sync -kP/-k/' Makefile
55 find -name Platform.gmk | xargs sed -i "s@MB_OF_MEMORY *:=.*free.*@MB_OF_MEMORY := $mem@" Makefile
56 EOT
57 sed -i -e 's|touch .*|&\n\tsh slitaz.sh|' \
58 -e 's/--check/-c/' \
59 -e 's/ln -sfv/ln -sf/' Makefile*
60 autoreconf &&
61 ./configure \
62 --prefix=/usr \
63 --disable-plugin \
64 --disable-docs \
65 --with-ecj \
66 --with-ecj-jar=/usr/share/java/ecj-$ECJ_VERSION.jar \
67 --with-gcj \
68 --with-gcj-home=/usr/lib/jvm/java-gcj \
69 --with-xalan2-jar=/usr/share/java/xalan.jar \
70 --with-xalan2-serializer-jar=/usr/share/java/serializer.jar \
71 --with-xerces2-jar=/usr/share/java/xercesImpl.jar \
72 --with-rhino=/usr/share/java/js.jar \
73 --with-abs-install-dir=$JVM_PREFIX \
74 $CONFIGURE_ARGS &&
75 make -j 1 ARCH_PREFIX= || exit 1
77 # NOTE: IcedTea6 does not define an "install" target
79 rm -r -f $src/_pkg
81 local JVM_BUILDDIR
82 JVM_BUILDDIR=$src/openjdk/build/linux-i586/j2sdk-image
83 local JVM_DESTDIR
84 JVM_DESTDIR=$src/_pkg$JVM_PREFIX
86 mkdir -p $JVM_DESTDIR
87 cp -a $JVM_BUILDDIR/bin $JVM_DESTDIR
88 cp -a $JVM_BUILDDIR/lib $JVM_DESTDIR
90 mkdir -p $JVM_DESTDIR/jre
91 cp -a $JVM_BUILDDIR/jre/bin $JVM_DESTDIR/jre
92 cp -a $JVM_BUILDDIR/jre/lib $JVM_DESTDIR/jre
94 # Delete duplicated executables from the JDK bin
95 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do
96 rm -f $JVM_DESTDIR/bin/$jbin
97 done
99 # Create symlinks for JDK binaries
100 mkdir -p $src/_pkg/usr/jdk-bin
101 for jbin in $(ls -1 $JVM_DESTDIR/bin) ; do
102 ln -s $JVM_PREFIX/bin/$jbin $src/_pkg/usr/jdk-bin/$jbin
103 done
105 # Create symlinks for JRE binaries
106 mkdir -p $src/_pkg/usr/jre-bin
107 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do
108 ln -s $JVM_PREFIX/jre/bin/$jbin $JVM_DESTDIR/bin/$jbin
109 ln -s $JVM_PREFIX/jre/bin/$jbin $src/_pkg/usr/jre-bin
110 done
111 }
113 # Rules to gen a SliTaz package suitable for Tazpkg.
114 genpkg_rules()
115 {
116 mkdir -p $fs/usr/lib/jvm/java-icedtea
117 cp -a $_pkg/usr/lib/jvm/java-icedtea/bin $fs/usr/lib/jvm/java-icedtea
118 cp -a $_pkg/usr/lib/jvm/java-icedtea/lib $fs/usr/lib/jvm/java-icedtea
119 }