wok view icedtea6-jdk/receipt @ rev 6917
Added portmidi. Needed for mixxx.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Fri Oct 22 05:08:14 2010 +0000 (2010-10-22) |
parents | 8ad8877e8d87 |
children | bdaad1113991 |
line source
1 # SliTaz package receipt.
3 PACKAGE="icedtea6-jdk"
4 SOURCE="icedtea6"
5 VERSION="1.9.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 openjdk_version="b20"
23 openjdk_date="21_jun_2010"
24 JAXWS="jdk6-jaxws-${openjdk_version}.zip"
25 JAXP="jdk6-jaxp-${openjdk_version}.zip"
26 JAF="jdk6-jaf-${openjdk_version}.zip"
27 OPENJDK="openjdk-6-src-${openjdk_version}-${openjdk_date}.tar.gz"
28 WGETJAXWS="https://jax-ws.dev.java.net/files/documents/4202/150724"
29 WGETJAXP="https://jaxp.dev.java.net/files/documents/913/150648"
30 WGETJAF="https://jax-ws.dev.java.net/files/documents/4202/150725"
31 WGETOPENJDK="http://download.java.net/openjdk/jdk6/promoted/${openjdk_version}"
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 export ALT_PARALLEL_COMPILE_JOBS="4"
47 export HOTSPOT_BUILD_JOBS="${ALT_PARALLEL_COMPILE_JOBS}"
49 cd $src
50 mkdir drops
51 sed -i -e 's/mkdir -p drops/true/' -e 's/ jar xf/ fastjar xf/' Makefile*
52 [ -L /usr/bin/wget ] && tazpkg get-install wget --forced
53 for i in $JAXWS $JAXP $JAF ; do
54 if [ -f $SOURCES_REPOSITORY/$i ]; then
55 cp $SOURCES_REPOSITORY/$i drops
56 elif [ "$i" == "$JAXWS" ]; then
57 wget -O $SOURCES_REPOSITORY/$JAXWS --no-check-certificate "$WGETJAXWS/$JAXWS"
58 cp $SOURCES_REPOSITORY/$JAXWS drops
59 elif [ "$i" == "$JAXP" ]; then
60 wget -O $SOURCES_REPOSITORY/$JAXP --no-check-certificate "$WGETJAXP/$JAXP"
61 cp $SOURCES_REPOSITORY/$JAXP drops
62 elif [ "$i" == "$JAF" ]; then
63 wget -O $SOURCES_REPOSITORY/$JAF --no-check-certificate "$WGETJAF/$JAF"
64 cp $SOURCES_REPOSITORY/$JAF drops
65 fi
67 done
69 for i in $OPENJDK ; do
70 if [ -f $SOURCES_REPOSITORY/$i ]; then
71 cp $SOURCES_REPOSITORY/$i .
72 else
73 wget -O $SOURCES_REPOSITORY/$OPENJDK "$WGETOPENJDK/$OPENJDK"
74 cp $SOURCES_REPOSITORY/$OPENJDK .
75 fi
76 done
77 [ -L /usr/bin/find ] && tazpkg get-install findutils --forced
78 [ -L /usr/bin/diff ] && tazpkg get-install diffutils --forced
79 [ "$(readlink /usr/bin/awk)" == "gawk" ] ||
80 tazpkg get-install gawk --forced
81 [ -L /usr/bin/sed ] && tazpkg get-install sed --forced
82 mem=$(free | awk '/Mem:/ { printf "%d\n",$2/1024 }')
83 cat > slitaz.sh <<EOT
84 # Busybox compatibility
85 #find -name Sanity.gmk | xargs sed -i 's/--sync -kP/-k/' Makefile
86 find -name Platform.gmk | xargs sed -i "s@MB_OF_MEMORY *:=.*free.*@MB_OF_MEMORY := $mem@" Makefile
87 EOT
88 sed -i -e 's|touch .*|&\n\tsh slitaz.sh|' \
89 -e 's/--check/-c/' \
90 -e 's/ln -sfv/ln -sf/' Makefile*
91 autoreconf &&
92 ./configure \
93 --prefix=/usr \
94 --with-parallel-jobs=${HOTSPOT_BUILD_JOBS} \
95 --disable-plugin \
96 --disable-docs \
97 --with-ecj \
98 --with-ecj-jar=/usr/share/java/ecj-$ECJ_VERSION.jar \
99 --with-gcj \
100 --with-gcj-home=/usr/lib/jvm/java-gcj \
101 --with-xalan2-jar=/usr/share/java/xalan.jar \
102 --with-xalan2-serializer-jar=/usr/share/java/serializer.jar \
103 --with-xerces2-jar=/usr/share/java/xercesImpl.jar \
104 --with-rhino=/usr/share/java/js.jar \
105 --with-abs-install-dir=$JVM_PREFIX \
106 $CONFIGURE_ARGS &&
107 make ARCH_PREFIX= || exit 1
109 # NOTE: IcedTea6 does not define an "install" target
111 rm -r -f $src/_pkg
113 local JVM_BUILDDIR
114 JVM_BUILDDIR=$src/openjdk/build/linux-i586/j2sdk-image
115 local JVM_DESTDIR
116 JVM_DESTDIR=$src/_pkg$JVM_PREFIX
118 mkdir -p $JVM_DESTDIR
119 cp -a $JVM_BUILDDIR/bin $JVM_DESTDIR
120 cp -a $JVM_BUILDDIR/lib $JVM_DESTDIR
122 mkdir -p $JVM_DESTDIR/jre
123 cp -a $JVM_BUILDDIR/jre/bin $JVM_DESTDIR/jre
124 cp -a $JVM_BUILDDIR/jre/lib $JVM_DESTDIR/jre
126 # Delete duplicated executables from the JDK bin
127 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do
128 rm -f $JVM_DESTDIR/bin/$jbin
129 done
131 # Create symlinks for JDK binaries
132 mkdir -p $src/_pkg/usr/jdk-bin
133 for jbin in $(ls -1 $JVM_DESTDIR/bin) ; do
134 ln -s $JVM_PREFIX/bin/$jbin $src/_pkg/usr/jdk-bin/$jbin
135 done
137 # Create symlinks for JRE binaries
138 mkdir -p $src/_pkg/usr/jre-bin
139 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do
140 ln -s $JVM_PREFIX/jre/bin/$jbin $JVM_DESTDIR/bin/$jbin
141 ln -s $JVM_PREFIX/jre/bin/$jbin $src/_pkg/usr/jre-bin
142 done
143 }
145 # Rules to gen a SliTaz package suitable for Tazpkg.
146 genpkg_rules()
147 {
148 mkdir -p $fs/usr/lib/jvm/java-icedtea
149 cp -a $_pkg/usr/lib/jvm/java-icedtea/bin $fs/usr/lib/jvm/java-icedtea
150 cp -a $_pkg/usr/lib/jvm/java-icedtea/lib $fs/usr/lib/jvm/java-icedtea
151 }