wok view icedtea6-jdk/receipt @ rev 25609

Update some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jul 20 14:03:05 2023 +0000 (16 months ago)
parents 92a3819b6bc8
children
line source
1 # SliTaz package receipt.
3 PACKAGE="icedtea6-jdk"
4 SOURCE="icedtea6"
5 VERSION="1.9.9"
6 CATEGORY="development"
7 SHORT_DESC="A Free Software harness for OpenJDK."
8 MAINTAINER="rcx@zoominternet.net"
9 LICENSE="GPL2"
10 WEB_SITE="https://en.wikipedia.org/wiki/IcedTea"
11 TARBALL="$SOURCE-$VERSION.tar.gz"
12 WGET_URL="http://icedtea.wildebeest.org/download/source/$TARBALL"
14 DEPENDS="cups icedtea6-jre xorg xorg-libXp xorg-libXtst"
15 BUILD_DEPENDS="alsa-lib-dev apache-ant autoconf automake bzip2 coreutils-file-special
16 coreutils-file-summarize cups-dev diffutils ecj fastjar file findutils gawk
17 gcc+gcj giflib-dev glib-dev gtk+-dev jdk6-jaxws jdk6-jaxp jdk6-jaf jpeg-dev
18 libpng-dev m4 nss nss-dev openjdk-6-src patch perl rhino tar unzip xorg-dev
19 xorg-dev-proto xorg-libXp-dev xorg-libXtst-dev xalan-xerces-j zip"
21 # Note to icedtea6 updaters,
22 # You should check versions in 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 current_version()
35 {
36 wget -O - $(dirname $WGET_URL) 2>/dev/null | \
37 sed "/$SOURCE-[0-9]/!d;/tar/!d;/rc[0-9]/d;s|.*$SOURCE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
38 }
40 # Rules to configure and make the package.
41 compile_rules()
42 {
43 # Limit memory usage
44 ulimit -v $(awk '/MemTotal/ { print int(($2*80)/100) }' < /proc/meminfo)
46 local JVM_PREFIX
47 JVM_PREFIX="/usr/lib/jvm/java-icedtea"
49 # NOTE: This build does not seem to work with ECJ 3.5
50 # actual ecj version is 4.14
51 local ECJ_VERSION
52 # ECJ_VERSION="3.6"
53 ECJ_VERSION="4.14"
55 makefiles=$(find $src -name '*akefile*')
56 echo $makefiles | xargs sed -i 's|uname -m|echo i486|'
57 cd $src
58 mkdir drops
59 sed -i -e 's/mkdir -p drops/true/' \
60 -e 's/ jar xf/ fastjar xf/' \
61 Makefile*
63 # Check then if all sources files are available, or exit.
64 REPO=http://icedtea.wildebeest.org/download/drops
65 if [ -x /usr/bin/cook ]
66 then
67 for i in jdk6-jaxws jdk6-jaxp jdk6-jaf
68 do
69 [ -s $SOURCES_REPOSITORY/$i-$openjdk_version.zip ] ||
70 wget -P $SOURCES_REPOSITORY $REPO/$i-$openjdk_version.zip
71 cp $SOURCES_REPOSITORY/$i-$openjdk_version.zip drops || return 1
72 done
73 # openjdk-6-src is in BUILD_DEPENDS and must be build like jdk6-* pkgs.
74 [ -s $SOURCES_REPOSITORY/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz ] ||
75 wget -P $SOURCES_REPOSITORY $REPO/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz
76 cp $SOURCES_REPOSITORY/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz .
77 else
78 report open-bloc
79 for i in jdk6-jaxws jdk6-jaxp jdk6-jaf openjdk-6-src; do
80 tazwok get-src $i
81 cp $SOURCES_REPOSITORY/$i-$openjdk_version.zip drops
82 done
83 cp $SOURCES_REPOSITORY/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz .
84 report step "Running compilation"
85 fi
87 mem=$(free | awk '/Mem:/ { printf "%d\n",$2/1024 }')
88 cat > slitaz.sh <<EOT
89 # disable currency timebomb
90 find -name GenerateCurrencyData.java | xargs sed -i 's|throw new RuntimeException("time is|System.err.println("time is|' 2> /dev/null
91 find -name CurrencyData.properties | xargs sed -i 's/TR=TRL.*/TR=TRY/' 2> /dev/null
92 # Busybox compatibility
93 #find -name Sanity.gmk | xargs sed -i 's/--sync -kP/-k/' Makefile
94 find -name Platform.gmk | xargs sed -i "s@MB_OF_MEMORY *:=.*free.*@MB_OF_MEMORY := $mem@" Makefile
95 EOT
96 sed -i -e 's|touch .*|&\n\tsh slitaz.sh|' \
97 -e 's/--check/-c/' \
98 -e 's/Bsymbolic/& -lgcj/' \
99 -e 's/ln -sfv/ln -sf/' \
100 Makefile*
101 aclocal
102 autoconf &&
103 automake --add-missing &&
104 {
105 ./configure \
106 --prefix=/usr \
107 --disable-plugin \
108 --disable-docs \
109 --with-ecj \
110 --with-ecj-jar=/usr/share/java/ecj-$ECJ_VERSION.jar \
111 --with-gcj \
112 --with-gcj-home=/usr/lib/jvm/java-gcj \
113 --with-xalan2-jar=/usr/share/java/xalan.jar \
114 --with-xalan2-serializer-jar=/usr/share/java/serializer.jar \
115 --with-xerces2-jar=/usr/share/java/xercesImpl.jar \
116 --with-rhino=/usr/share/java/js.jar \
117 --with-abs-install-dir=$JVM_PREFIX \
118 $CONFIGURE_ARGS || return 1
119 make -j 1 ARCH_PREFIX= 2>&1 | sed '/java_lang_ClassLoaderr.NativeLibrary/d'
120 } 2>&1 | sed 's/No such file/no such file/'
122 echo "Copying needed files to install dir..."
123 rm -rf $DESTDIR
125 local JVM_BUILDDIR
126 JVM_BUILDDIR=$src/openjdk.build/j2sdk-image
127 local JVM_DESTDIR
128 JVM_DESTDIR=${DESTDIR}$JVM_PREFIX
129 echo "OpenJDK build : source/openjdk.build/j2sdk-image"
130 echo "OpenJDK install : install/$JVM_PREFIX"
132 echo "Copying JDK files : bin/ lib/"
133 mkdir -p $JVM_DESTDIR
134 cp -a $JVM_BUILDDIR/bin $JVM_DESTDIR
135 cp -a $JVM_BUILDDIR/lib $JVM_DESTDIR
137 echo "Copying JRE files : bin/ lib/"
138 mkdir -p $JVM_DESTDIR/jre
139 cp -a $JVM_BUILDDIR/jre/bin $JVM_DESTDIR/jre
140 cp -a $JVM_BUILDDIR/jre/lib $JVM_DESTDIR/jre
142 # Delete duplicated executables from the JDK bin
143 echo "Deleting duplicated files..."
144 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do
145 rm -f $JVM_DESTDIR/bin/$jbin
146 done
148 # Create symlinks for JDK binaries
149 echo "Creating symlinks for JDK binaries..."
150 mkdir -p $DESTDIR/usr/jdk-bin
151 for jbin in $(ls -1 $JVM_DESTDIR/bin) ; do
152 ln -s $JVM_PREFIX/bin/$jbin $DESTDIR/usr/jdk-bin/$jbin
153 done
155 # Create symlinks for JRE binaries
156 echo "Creating symlinks for JRE binaries..."
157 mkdir -p $DESTDIR/usr/jre-bin
158 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do
159 ln -s $JVM_PREFIX/jre/bin/$jbin $JVM_DESTDIR/bin/$jbin
160 ln -s $JVM_PREFIX/jre/bin/$jbin $DESTDIR/usr/jre-bin
161 done
162 if [ ! -x /usr/bin/cook ]; then
163 report close-bloc
164 fi
165 }
167 # Rules to gen a SliTaz package suitable for Tazpkg.
168 genpkg_rules()
169 {
170 mkdir -p $fs/usr/lib/jvm/java-icedtea
171 cp -a $install/usr/lib/jvm/java-icedtea/bin $fs/usr/lib/jvm/java-icedtea
172 cp -a $install/usr/lib/jvm/java-icedtea/lib $fs/usr/lib/jvm/java-icedtea
173 }