wok view icedtea6-jdk/receipt @ rev 14893

Add: libbsd* (0.6.0)
author Claudinei Pereira <claudinei@slitaz.org>
date Thu Jul 25 21:38:42 2013 -0300 (2013-07-25)
parents b2a632fc9587
children 380ffe05937a
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"
30 EXTRA_SOURCE_FILES="jdk6-jaxws-$openjdk_version.zip \
31 jdk6-jaxp-$openjdk_version.zip jdk6-jaf-$openjdk_version.zip \
32 openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz"
34 # Rules to configure and make the package.
35 compile_rules()
36 {
37 # Limit memory usage
38 ulimit -v $(awk '/MemTotal/ { print int(($2*80)/100) }' < /proc/meminfo)
40 local JVM_PREFIX
41 JVM_PREFIX="/usr/lib/jvm/java-icedtea"
43 # NOTE: This build does not seem to work with ECJ 3.5
44 local ECJ_VERSION
45 ECJ_VERSION="3.6"
47 cd $src
48 mkdir drops
49 sed -i -e 's/mkdir -p drops/true/' -e 's/ jar xf/ fastjar xf/' Makefile*
51 # Check than all sources files are available, or exit.
52 REPO=http://icedtea.classpath.org/download/drops
53 if [ -x /usr/bin/cook ]; then
54 for i in jdk6-jaxws jdk6-jaxp jdk6-jaf; do
55 [ -s $SOURCES_REPOSITORY/$i-$openjdk_version.zip ] ||
56 wget -P $SOURCES_REPOSITORY $REPO/$i-$openjdk_version.zip
57 cp $SOURCES_REPOSITORY/$i-$openjdk_version.zip drops || return 1
58 done
59 # openjdk-6-src is in BUILD_DEPENDS and must be build like jdk6-* pkgs.
60 [ -s $SOURCES_REPOSITORY/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz ] ||
61 wget -P $SOURCES_REPOSITORY $REPO/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz
62 cp $SOURCES_REPOSITORY/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz .
63 else
64 report open-bloc
65 for i in jdk6-jaxws jdk6-jaxp jdk6-jaf openjdk-6-src; do
66 tazwok get-src $i
67 cp $SOURCES_REPOSITORY/$i-$openjdk_version.zip drops
68 done
69 cp $SOURCES_REPOSITORY/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz .
70 report step "Running compilation"
71 fi
73 mem=$(free | awk '/Mem:/ { printf "%d\n",$2/1024 }')
74 cat > slitaz.sh <<EOT
75 # Busybox compatibility
76 #find -name Sanity.gmk | xargs sed -i 's/--sync -kP/-k/' Makefile
77 find -name Platform.gmk | xargs sed -i "s@MB_OF_MEMORY *:=.*free.*@MB_OF_MEMORY := $mem@" Makefile
78 EOT
79 sed -i -e 's|touch .*|&\n\tsh slitaz.sh|' \
80 -e 's/--check/-c/' \
81 -e 's/ln -sfv/ln -sf/' Makefile*
82 autoreconf &&
83 ./configure \
84 --prefix=/usr \
85 --disable-plugin \
86 --disable-docs \
87 --with-ecj \
88 --with-ecj-jar=/usr/share/java/ecj-$ECJ_VERSION.jar \
89 --with-gcj \
90 --with-gcj-home=/usr/lib/jvm/java-gcj \
91 --with-xalan2-jar=/usr/share/java/xalan.jar \
92 --with-xalan2-serializer-jar=/usr/share/java/serializer.jar \
93 --with-xerces2-jar=/usr/share/java/xercesImpl.jar \
94 --with-rhino=/usr/share/java/js.jar \
95 --with-abs-install-dir=$JVM_PREFIX \
96 $CONFIGURE_ARGS || return 1
97 make -j 1 ARCH_PREFIX= 2>&1 | sed '/java_lang_ClassLoaderr.NativeLibrary/d;s/ERROR/error/'
99 echo "Copying needed files to install dir..."
100 rm -rf $DESTDIR
102 local JVM_BUILDDIR
103 JVM_BUILDDIR=$src/openjdk.build/j2sdk-image
104 local JVM_DESTDIR
105 JVM_DESTDIR=${DESTDIR}$JVM_PREFIX
106 echo "OpenJDK build : source/openjdk.build/j2sdk-image"
107 echo "OpenJDK install : install/$JVM_PREFIX"
109 echo "Copying JDK files : bin/ lib/"
110 mkdir -p $JVM_DESTDIR
111 cp -a $JVM_BUILDDIR/bin $JVM_DESTDIR
112 cp -a $JVM_BUILDDIR/lib $JVM_DESTDIR
114 echo "Copying JRE files : bin/ lib/"
115 mkdir -p $JVM_DESTDIR/jre
116 cp -a $JVM_BUILDDIR/jre/bin $JVM_DESTDIR/jre
117 cp -a $JVM_BUILDDIR/jre/lib $JVM_DESTDIR/jre
119 # Delete duplicated executables from the JDK bin
120 echo "Deleting duplicated files..."
121 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do
122 rm -f $JVM_DESTDIR/bin/$jbin
123 done
125 # Create symlinks for JDK binaries
126 echo "Creating symlinks for JDK binaries..."
127 mkdir -p $DESTDIR/usr/jdk-bin
128 for jbin in $(ls -1 $JVM_DESTDIR/bin) ; do
129 ln -s $JVM_PREFIX/bin/$jbin $DESTDIR/usr/jdk-bin/$jbin
130 done
132 # Create symlinks for JRE binaries
133 echo "Creating symlinks for JRE binaries..."
134 mkdir -p $DESTDIR/usr/jre-bin
135 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do
136 ln -s $JVM_PREFIX/jre/bin/$jbin $JVM_DESTDIR/bin/$jbin
137 ln -s $JVM_PREFIX/jre/bin/$jbin $DESTDIR/usr/jre-bin
138 done
139 if [ ! -x /usr/bin/cook ]; then
140 report close-bloc
141 fi
142 }
144 # Rules to gen a SliTaz package suitable for Tazpkg.
145 genpkg_rules()
146 {
147 mkdir -p $fs/usr/lib/jvm/java-icedtea
148 cp -a $install/usr/lib/jvm/java-icedtea/bin $fs/usr/lib/jvm/java-icedtea
149 cp -a $install/usr/lib/jvm/java-icedtea/lib $fs/usr/lib/jvm/java-icedtea
150 }