wok view icedtea6-jdk/receipt @ rev 23792
updated zbar and zbar-dev (0.23 -> 0.23.1)
author | Hans-G?nter Theisgen |
---|---|
date | Fri May 22 08:05:29 2020 +0100 (2020-05-22) |
parents | e6537fd120f9 |
children | a3c45ab9082e |
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 TARBALL="$SOURCE-$VERSION.tar.gz"
11 WEB_SITE="http://www.iced-tea.org/"
12 WGET_URL="http://icedtea.wildebeest.org/download/source/$TARBALL"
14 DEPENDS="icedtea6-jre xorg xorg-libXtst xorg-libXp cups"
15 BUILD_DEPENDS="gcc+gcj autoconf automake m4 diffutils gawk cups-dev wget cpio \
16 coreutils-file-special coreutils-file-summarize alsa-lib-dev file patch perl \
17 zip unzip findutils bzip2 tar glib-dev fastjar rhino ecj apache-ant jpeg-dev \
18 xalan-xerces-j gtk+-dev giflib-dev libpng-dev xorg-dev xorg-libXtst-dev \
19 xorg-libXp-dev xorg-dev-proto nss nss-dev jdk6-jaxws jdk6-jaxp jdk6-jaf \
20 openjdk-6-src"
22 # Note to icedtea6 updaters,
23 # You should check version into receipts:
24 # * jdk6-jaxws (version: $openjdk_version)
25 # * jdk6-jaxp (version: $openjdk_version)
26 # * jdk6-jaf (version: $openjdk_version)
27 # * openjdk-6-src (version: $openjdk_version-$openjdk_date)
28 # Theses receipts allow to have source tarballs in SRC.
29 openjdk_version="b20"
30 openjdk_date="21_jun_2010"
31 EXTRA_SOURCE_FILES="jdk6-jaxws-$openjdk_version.zip \
32 jdk6-jaxp-$openjdk_version.zip jdk6-jaf-$openjdk_version.zip \
33 openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz"
35 # Rules to configure and make the package.
36 compile_rules()
37 {
38 # Limit memory usage
39 ulimit -v $(awk '/MemTotal/ { print int(($2*80)/100) }' < /proc/meminfo)
41 local JVM_PREFIX
42 JVM_PREFIX="/usr/lib/jvm/java-icedtea"
44 # NOTE: This build does not seem to work with ECJ 3.5
45 local ECJ_VERSION
46 ECJ_VERSION="3.6"
48 find $src -name '*akefile*' \; | xargs sed -i sed -i 's|uname -m|echo i486|'
49 cd $src
50 mkdir drops
51 sed -i -e 's/mkdir -p drops/true/' -e 's/ jar xf/ fastjar xf/' Makefile*
53 # Check than all sources files are available, or exit.
54 REPO=http://icedtea.wildebeest.org/download/drops
55 if [ -x /usr/bin/cook ]; then
56 for i in jdk6-jaxws jdk6-jaxp jdk6-jaf; do
57 [ -s $SOURCES_REPOSITORY/$i-$openjdk_version.zip ] ||
58 wget -P $SOURCES_REPOSITORY $REPO/$i-$openjdk_version.zip
59 cp $SOURCES_REPOSITORY/$i-$openjdk_version.zip drops || return 1
60 done
61 # openjdk-6-src is in BUILD_DEPENDS and must be build like jdk6-* pkgs.
62 [ -s $SOURCES_REPOSITORY/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz ] ||
63 wget -P $SOURCES_REPOSITORY $REPO/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz
64 cp $SOURCES_REPOSITORY/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz .
65 else
66 report open-bloc
67 for i in jdk6-jaxws jdk6-jaxp jdk6-jaf openjdk-6-src; do
68 tazwok get-src $i
69 cp $SOURCES_REPOSITORY/$i-$openjdk_version.zip drops
70 done
71 cp $SOURCES_REPOSITORY/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz .
72 report step "Running compilation"
73 fi
75 mem=$(free | awk '/Mem:/ { printf "%d\n",$2/1024 }')
76 cat > slitaz.sh <<EOT
77 # disable currency timebomb
78 find -name GenerateCurrencyData.java | xargs sed -i 's|throw new RuntimeException("time is|System.err.println("time is|' 2> /dev/null
79 find -name CurrencyData.properties | xargs sed -i 's/TR=TRL.*/TR=TRY/' 2> /dev/null
80 # Busybox compatibility
81 #find -name Sanity.gmk | xargs sed -i 's/--sync -kP/-k/' Makefile
82 find -name Platform.gmk | xargs sed -i "s@MB_OF_MEMORY *:=.*free.*@MB_OF_MEMORY := $mem@" Makefile
83 EOT
84 sed -i -e 's|touch .*|&\n\tsh slitaz.sh|' \
85 -e 's/--check/-c/' \
86 -e 's/Bsymbolic/& -lgcj/' \
87 -e 's/ln -sfv/ln -sf/' Makefile*
88 aclocal
89 autoconf &&
90 automake --add-missing &&
91 {
92 ./configure \
93 --prefix=/usr \
94 --disable-plugin \
95 --disable-docs \
96 --with-ecj \
97 --with-ecj-jar=/usr/share/java/ecj-$ECJ_VERSION.jar \
98 --with-gcj \
99 --with-gcj-home=/usr/lib/jvm/java-gcj \
100 --with-xalan2-jar=/usr/share/java/xalan.jar \
101 --with-xalan2-serializer-jar=/usr/share/java/serializer.jar \
102 --with-xerces2-jar=/usr/share/java/xercesImpl.jar \
103 --with-rhino=/usr/share/java/js.jar \
104 --with-abs-install-dir=$JVM_PREFIX \
105 $CONFIGURE_ARGS || return 1
106 make -j 1 ARCH_PREFIX= 2>&1 | sed '/java_lang_ClassLoaderr.NativeLibrary/d'
107 } 2>&1 | sed 's/No such file/no such file/'
109 echo "Copying needed files to install dir..."
110 rm -rf $DESTDIR
112 local JVM_BUILDDIR
113 JVM_BUILDDIR=$src/openjdk.build/j2sdk-image
114 local JVM_DESTDIR
115 JVM_DESTDIR=${DESTDIR}$JVM_PREFIX
116 echo "OpenJDK build : source/openjdk.build/j2sdk-image"
117 echo "OpenJDK install : install/$JVM_PREFIX"
119 echo "Copying JDK files : bin/ lib/"
120 mkdir -p $JVM_DESTDIR
121 cp -a $JVM_BUILDDIR/bin $JVM_DESTDIR
122 cp -a $JVM_BUILDDIR/lib $JVM_DESTDIR
124 echo "Copying JRE files : bin/ lib/"
125 mkdir -p $JVM_DESTDIR/jre
126 cp -a $JVM_BUILDDIR/jre/bin $JVM_DESTDIR/jre
127 cp -a $JVM_BUILDDIR/jre/lib $JVM_DESTDIR/jre
129 # Delete duplicated executables from the JDK bin
130 echo "Deleting duplicated files..."
131 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do
132 rm -f $JVM_DESTDIR/bin/$jbin
133 done
135 # Create symlinks for JDK binaries
136 echo "Creating symlinks for JDK binaries..."
137 mkdir -p $DESTDIR/usr/jdk-bin
138 for jbin in $(ls -1 $JVM_DESTDIR/bin) ; do
139 ln -s $JVM_PREFIX/bin/$jbin $DESTDIR/usr/jdk-bin/$jbin
140 done
142 # Create symlinks for JRE binaries
143 echo "Creating symlinks for JRE binaries..."
144 mkdir -p $DESTDIR/usr/jre-bin
145 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do
146 ln -s $JVM_PREFIX/jre/bin/$jbin $JVM_DESTDIR/bin/$jbin
147 ln -s $JVM_PREFIX/jre/bin/$jbin $DESTDIR/usr/jre-bin
148 done
149 if [ ! -x /usr/bin/cook ]; then
150 report close-bloc
151 fi
152 }
154 # Rules to gen a SliTaz package suitable for Tazpkg.
155 genpkg_rules()
156 {
157 mkdir -p $fs/usr/lib/jvm/java-icedtea
158 cp -a $install/usr/lib/jvm/java-icedtea/bin $fs/usr/lib/jvm/java-icedtea
159 cp -a $install/usr/lib/jvm/java-icedtea/lib $fs/usr/lib/jvm/java-icedtea
160 }