wok-4.x view icedtea6-jdk/receipt @ rev 12065
fix gtk-engine-nodoka bdeps & genpkg_rules
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Fri Mar 09 02:01:06 2012 +0100 (2012-03-09) |
parents | 5b3eacdcc59d |
children | 0adddcc6b227 |
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 TARBALL="$SOURCE-$VERSION.tar.gz"
10 WEB_SITE="http://www.iced-tea.org/"
11 WGET_URL="http://icedtea.classpath.org/download/source/$TARBALL"
13 DEPENDS="icedtea6-jre xorg xorg-libXtst xorg-libXp cups"
14 BUILD_DEPENDS="gcc+gcj autoconf automake m4 diffutils gawk cups-dev wget cpio \
15 coreutils-file-special coreutils-file-summarize alsa-lib-dev file patch perl \
16 zip unzip findutils bzip2 tar glib-dev fastjar rhino ecj apache-ant jpeg-dev \
17 xalan-xerces-j gtk+-dev giflib-dev libpng-dev xorg-dev xorg-libXtst-dev \
18 xorg-libXp-dev xorg-dev-proto nss nss-dev jdk6-jaxws jdk6-jaxp jdk6-jaf \
19 openjdk-6-src"
21 # Note to icedtea6 updaters,
22 # You should check version into receipts:
23 # * jdk6-jaxws (version: $openjdk_version)
24 # * jdk6-jaxp (version: $openjdk_version)
25 # * jdk6-jaf (version: $openjdk_version)
26 # * openjdk-6-src (version: $openjdk_version-$openjdk_date)
27 # Theses receipts allow to have source tarballs in SRC.
28 openjdk_version="b20"
29 openjdk_date="21_jun_2010"
31 # Rules to configure and make the package.
32 compile_rules()
33 {
34 # Limit memory usage
35 ulimit -v $(awk '/MemTotal/ { print int(($2*80)/100) }' < /proc/meminfo)
37 local JVM_PREFIX
38 JVM_PREFIX="/usr/lib/jvm/java-icedtea"
40 # NOTE: This build does not seem to work with ECJ 3.5
41 local ECJ_VERSION
42 ECJ_VERSION="3.6"
44 cd $src
45 mkdir drops
46 sed -i -e 's/mkdir -p drops/true/' -e 's/ jar xf/ fastjar xf/' Makefile*
48 # Check than all sources files are available, or exit.
49 for i in jdk6-jaxws jdk6-jaxp jdk6-jaf; do
50 cp $SOURCES_REPOSITORY/$i-$openjdk_version.zip drops || exit 1
51 done
52 # openjdk-6-src is in BUILD_DEPENDS and must be build like jdk6-* pkgs.
53 cp $SOURCES_REPOSITORY/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz .
55 mem=$(free | awk '/Mem:/ { printf "%d\n",$2/1024 }')
56 cat > slitaz.sh <<EOT
57 # Busybox compatibility
58 #find -name Sanity.gmk | xargs sed -i 's/--sync -kP/-k/' Makefile
59 find -name Platform.gmk | xargs sed -i "s@MB_OF_MEMORY *:=.*free.*@MB_OF_MEMORY := $mem@" Makefile
60 EOT
61 sed -i -e 's|touch .*|&\n\tsh slitaz.sh|' \
62 -e 's/--check/-c/' \
63 -e 's/ln -sfv/ln -sf/' Makefile*
64 autoreconf &&
65 ./configure \
66 --prefix=/usr \
67 --disable-plugin \
68 --disable-docs \
69 --with-ecj \
70 --with-ecj-jar=/usr/share/java/ecj-$ECJ_VERSION.jar \
71 --with-gcj \
72 --with-gcj-home=/usr/lib/jvm/java-gcj \
73 --with-xalan2-jar=/usr/share/java/xalan.jar \
74 --with-xalan2-serializer-jar=/usr/share/java/serializer.jar \
75 --with-xerces2-jar=/usr/share/java/xercesImpl.jar \
76 --with-rhino=/usr/share/java/js.jar \
77 --with-abs-install-dir=$JVM_PREFIX \
78 $CONFIGURE_ARGS || exit 1
79 make -j 1 ARCH_PREFIX= 2>&1 | sed s/ERROR/error/
81 echo "Copying needed files to install dir..."
82 rm -rf $DESTDIR
84 local JVM_BUILDDIR
85 JVM_BUILDDIR=$src/openjdk.build/j2sdk-image
86 local JVM_DESTDIR
87 JVM_DESTDIR=${DESTDIR}$JVM_PREFIX
88 echo "OpenJDK build : source/openjdk.build/j2sdk-image"
89 echo "OpenJDK install : install/$JVM_PREFIX"
91 echo "Copying JDK files : bin/ lib/"
92 mkdir -p $JVM_DESTDIR
93 cp -a $JVM_BUILDDIR/bin $JVM_DESTDIR
94 cp -a $JVM_BUILDDIR/lib $JVM_DESTDIR
96 echo "Copying JRE files : bin/ lib/"
97 mkdir -p $JVM_DESTDIR/jre
98 cp -a $JVM_BUILDDIR/jre/bin $JVM_DESTDIR/jre
99 cp -a $JVM_BUILDDIR/jre/lib $JVM_DESTDIR/jre
101 # Delete duplicated executables from the JDK bin
102 echo "Deleting duplicated files..."
103 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do
104 rm -f $JVM_DESTDIR/bin/$jbin
105 done
107 # Create symlinks for JDK binaries
108 echo "Creating symlinks for JDK binaries..."
109 mkdir -p $DESTDIR/usr/jdk-bin
110 for jbin in $(ls -1 $JVM_DESTDIR/bin) ; do
111 ln -s $JVM_PREFIX/bin/$jbin $DESTDIR/usr/jdk-bin/$jbin
112 done
114 # Create symlinks for JRE binaries
115 echo "Creating symlinks for JRE binaries..."
116 mkdir -p $DESTDIR/usr/jre-bin
117 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do
118 ln -s $JVM_PREFIX/jre/bin/$jbin $JVM_DESTDIR/bin/$jbin
119 ln -s $JVM_PREFIX/jre/bin/$jbin $DESTDIR/usr/jre-bin
120 done
121 }
123 # Rules to gen a SliTaz package suitable for Tazpkg.
124 genpkg_rules()
125 {
126 mkdir -p $fs/usr/lib/jvm/java-icedtea
127 cp -a $_pkg/usr/lib/jvm/java-icedtea/bin $fs/usr/lib/jvm/java-icedtea
128 cp -a $_pkg/usr/lib/jvm/java-icedtea/lib $fs/usr/lib/jvm/java-icedtea
129 }