wok-next annotate icedtea6-jdk/receipt @ rev 20891

cookutils: up (1085); syslinux: remove docs
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu Jul 19 18:27:17 2018 +0300 (2018-07-19)
parents d43bf7aae921
children f48456621a9d
rev   line source
pascal@20164 1 # SliTaz package receipt v2.
rcx@3803 2
rcx@3803 3 PACKAGE="icedtea6-jdk"
rcx@3803 4 SOURCE="icedtea6"
yuripourre@18355 5 VERSION="1.9.9"
rcx@3803 6 CATEGORY="development"
rcx@3803 7 SHORT_DESC="A Free Software harness for OpenJDK."
rcx@3803 8 MAINTAINER="rcx@zoominternet.net"
pascal@15000 9 LICENSE="GPL2"
al@20883 10 WEB_SITE="http://www.iced-tea.org/"
al@20883 11 REPOLOGY="icedtea6"
al@20883 12
rcx@3803 13 TARBALL="$SOURCE-$VERSION.tar.gz"
yuripourre@18355 14 WGET_URL="http://icedtea.wildebeest.org/download/source/$TARBALL"
rcx@3803 15
al@20513 16 BUILD_DEPENDS="gcc+gcj autoconf automake m4 diffutils gawk cups-dev cpio \
pankso@10639 17 coreutils-file-special coreutils-file-summarize alsa-lib-dev file patch perl \
pankso@10639 18 zip unzip findutils bzip2 tar glib-dev fastjar rhino ecj apache-ant jpeg-dev \
al@20454 19 xalan-xerces-j gtk+-dev giflib-dev libpng16-dev xorg-dev xorg-libXtst-dev \
pankso@10639 20 xorg-libXp-dev xorg-dev-proto nss nss-dev jdk6-jaxws jdk6-jaxp jdk6-jaf \
pankso@10639 21 openjdk-6-src"
pascal@20164 22 SPLIT="icedtea6-jdk icedtea6-jre java-jdk java-jre"
pankso@10639 23
gokhlayeh@9223 24 # Note to icedtea6 updaters,
gokhlayeh@9223 25 # You should check version into receipts:
gokhlayeh@9223 26 # * jdk6-jaxws (version: $openjdk_version)
gokhlayeh@9223 27 # * jdk6-jaxp (version: $openjdk_version)
gokhlayeh@9223 28 # * jdk6-jaf (version: $openjdk_version)
gokhlayeh@9223 29 # * openjdk-6-src (version: $openjdk_version-$openjdk_date)
pankso@10639 30 # Theses receipts allow to have source tarballs in SRC.
slaxemulator@6866 31 openjdk_version="b20"
slaxemulator@6866 32 openjdk_date="21_jun_2010"
pascal@14337 33 EXTRA_SOURCE_FILES="jdk6-jaxws-$openjdk_version.zip \
pascal@14337 34 jdk6-jaxp-$openjdk_version.zip jdk6-jaf-$openjdk_version.zip \
pascal@14337 35 openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz"
slaxemulator@6866 36
rcx@3803 37 # Rules to configure and make the package.
rcx@3803 38 compile_rules()
rcx@3803 39 {
pascal@6031 40 # Limit memory usage
pascal@6031 41 ulimit -v $(awk '/MemTotal/ { print int(($2*80)/100) }' < /proc/meminfo)
pascal@6031 42
rcx@3803 43 local JVM_PREFIX
rcx@6017 44 JVM_PREFIX="/usr/lib/jvm/java-icedtea"
rcx@3910 45
rcx@3803 46 # NOTE: This build does not seem to work with ECJ 3.5
rcx@6017 47 local ECJ_VERSION
rcx@6017 48 ECJ_VERSION="3.6"
rcx@3803 49
rcx@3803 50 cd $src
pascal@6034 51 mkdir drops
rcx@6059 52 sed -i -e 's/mkdir -p drops/true/' -e 's/ jar xf/ fastjar xf/' Makefile*
gokhlayeh@9223 53
gokhlayeh@9223 54 # Check than all sources files are available, or exit.
pascal@12980 55 REPO=http://icedtea.classpath.org/download/drops
gokhlayeh@12083 56 if [ -x /usr/bin/cook ]; then
gokhlayeh@12083 57 for i in jdk6-jaxws jdk6-jaxp jdk6-jaf; do
al@20513 58 [ -s $SRC/$i-$openjdk_version.zip ] ||
al@20513 59 wget -P $SRC $REPO/$i-$openjdk_version.zip
al@20513 60 cp $SRC/$i-$openjdk_version.zip drops || return 1
gokhlayeh@12083 61 done
gokhlayeh@12083 62 # openjdk-6-src is in BUILD_DEPENDS and must be build like jdk6-* pkgs.
al@20513 63 [ -s $SRC/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz ] ||
al@20513 64 wget -P $SRC $REPO/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz
al@20513 65 cp $SRC/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz .
gokhlayeh@12083 66 else
gokhlayeh@12083 67 report open-bloc
gokhlayeh@12083 68 for i in jdk6-jaxws jdk6-jaxp jdk6-jaf openjdk-6-src; do
gokhlayeh@12083 69 tazwok get-src $i
al@20513 70 cp $SRC/$i-$openjdk_version.zip drops
gokhlayeh@12083 71 done
al@20513 72 cp $SRC/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz .
gokhlayeh@12083 73 report step "Running compilation"
gokhlayeh@12083 74 fi
slaxemulator@6894 75
pascal@5915 76 mem=$(free | awk '/Mem:/ { printf "%d\n",$2/1024 }')
pascal@4304 77 cat > slitaz.sh <<EOT
pascal@18358 78 # disable currency timebomb
pascal@18358 79 find -name GenerateCurrencyData.java | xargs sed -i 's|throw new RuntimeException("time is|System.err.println("time is|' 2> /dev/null
pascal@18358 80 find -name CurrencyData.properties | xargs sed -i 's/TR=TRL.*/TR=TRY/' 2> /dev/null
pascal@4304 81 # Busybox compatibility
slaxemulator@6892 82 #find -name Sanity.gmk | xargs sed -i 's/--sync -kP/-k/' Makefile
pascal@6034 83 find -name Platform.gmk | xargs sed -i "s@MB_OF_MEMORY *:=.*free.*@MB_OF_MEMORY := $mem@" Makefile
pascal@4304 84 EOT
pascal@6034 85 sed -i -e 's|touch .*|&\n\tsh slitaz.sh|' \
pascal@5152 86 -e 's/--check/-c/' \
pascal@15348 87 -e 's/Bsymbolic/& -lgcj/' \
pascal@4304 88 -e 's/ln -sfv/ln -sf/' Makefile*
pascal@17425 89 aclocal
pascal@17425 90 autoconf &&
pascal@17424 91 automake --add-missing &&
pascal@15336 92 {
rcx@3803 93 ./configure \
rcx@3803 94 --prefix=/usr \
rcx@3803 95 --disable-plugin \
rcx@3803 96 --disable-docs \
rcx@3803 97 --with-ecj \
rcx@6017 98 --with-ecj-jar=/usr/share/java/ecj-$ECJ_VERSION.jar \
rcx@3803 99 --with-gcj \
rcx@3803 100 --with-gcj-home=/usr/lib/jvm/java-gcj \
rcx@3803 101 --with-xalan2-jar=/usr/share/java/xalan.jar \
rcx@3803 102 --with-xalan2-serializer-jar=/usr/share/java/serializer.jar \
rcx@3803 103 --with-xerces2-jar=/usr/share/java/xercesImpl.jar \
rcx@3803 104 --with-rhino=/usr/share/java/js.jar \
rcx@3803 105 --with-abs-install-dir=$JVM_PREFIX \
gokhlayeh@12083 106 $CONFIGURE_ARGS || return 1
pascal@15348 107 make -j 1 ARCH_PREFIX= 2>&1 | sed '/java_lang_ClassLoaderr.NativeLibrary/d'
pascal@15337 108 } 2>&1 | sed 's/No such file/no such file/'
rcx@3803 109
pankso@10641 110 echo "Copying needed files to install dir..."
gokhlayeh@9223 111 rm -rf $DESTDIR
rcx@3803 112
rcx@3803 113 local JVM_BUILDDIR
slaxemulator@6927 114 JVM_BUILDDIR=$src/openjdk.build/j2sdk-image
rcx@3803 115 local JVM_DESTDIR
pankso@10639 116 JVM_DESTDIR=${DESTDIR}$JVM_PREFIX
pankso@10654 117 echo "OpenJDK build : source/openjdk.build/j2sdk-image"
pankso@10654 118 echo "OpenJDK install : install/$JVM_PREFIX"
rcx@3803 119
pankso@10654 120 echo "Copying JDK files : bin/ lib/"
rcx@3803 121 mkdir -p $JVM_DESTDIR
rcx@3803 122 cp -a $JVM_BUILDDIR/bin $JVM_DESTDIR
rcx@3803 123 cp -a $JVM_BUILDDIR/lib $JVM_DESTDIR
pankso@10641 124
pankso@10654 125 echo "Copying JRE files : bin/ lib/"
rcx@3803 126 mkdir -p $JVM_DESTDIR/jre
rcx@3803 127 cp -a $JVM_BUILDDIR/jre/bin $JVM_DESTDIR/jre
rcx@3803 128 cp -a $JVM_BUILDDIR/jre/lib $JVM_DESTDIR/jre
rcx@3803 129
rcx@3803 130 # Delete duplicated executables from the JDK bin
pankso@10641 131 echo "Deleting duplicated files..."
rcx@3803 132 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do
rcx@3803 133 rm -f $JVM_DESTDIR/bin/$jbin
rcx@3803 134 done
rcx@3803 135
rcx@3803 136 # Create symlinks for JDK binaries
pankso@10641 137 echo "Creating symlinks for JDK binaries..."
gokhlayeh@9223 138 mkdir -p $DESTDIR/usr/jdk-bin
rcx@3803 139 for jbin in $(ls -1 $JVM_DESTDIR/bin) ; do
gokhlayeh@9223 140 ln -s $JVM_PREFIX/bin/$jbin $DESTDIR/usr/jdk-bin/$jbin
rcx@3803 141 done
rcx@3803 142
rcx@3803 143 # Create symlinks for JRE binaries
pankso@10641 144 echo "Creating symlinks for JRE binaries..."
gokhlayeh@9223 145 mkdir -p $DESTDIR/usr/jre-bin
rcx@3803 146 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin) ; do
rcx@3803 147 ln -s $JVM_PREFIX/jre/bin/$jbin $JVM_DESTDIR/bin/$jbin
gokhlayeh@9223 148 ln -s $JVM_PREFIX/jre/bin/$jbin $DESTDIR/usr/jre-bin
rcx@3803 149 done
gokhlayeh@12083 150 if [ ! -x /usr/bin/cook ]; then
gokhlayeh@12083 151 report close-bloc
gokhlayeh@12083 152 fi
rcx@3803 153 }
rcx@3803 154
rcx@3803 155 # Rules to gen a SliTaz package suitable for Tazpkg.
rcx@3803 156 genpkg_rules()
rcx@3803 157 {
pascal@20164 158 case $PACKAGE in
pascal@20164 159 icedtea6-jdk)
pascal@20164 160 DEPENDS="icedtea6-jre xorg xorg-libXtst xorg-libXp cups"
pascal@20164 161 mkdir -p $fs/usr/lib/jvm/java-icedtea
pascal@20164 162 cp -a $install/usr/lib/jvm/java-icedtea/bin $fs/usr/lib/jvm/java-icedtea
pascal@20164 163 cp -a $install/usr/lib/jvm/java-icedtea/lib $fs/usr/lib/jvm/java-icedtea
pascal@20164 164 ;;
pascal@20164 165 icedtea6-jre)
pascal@20164 166 CAT="development|A Free Software harness for OpenJDK JRE."
pascal@20164 167 DEPENDS="glibc-base gcc-lib-base util-linux-uuid alsa-lib \
al@20454 168 freetype giflib libjpeg libpng16 zlib xorg-libICE \
pascal@20164 169 xorg-libSM xorg-libX11 xorg-libXau xorg-libXdmcp \
pascal@20164 170 xorg-libXext xorg-libXi xorg-libXrender xorg-libXtst"
pascal@20164 171 mkdir -p $fs/usr/lib/jvm/java-icedtea
pascal@20164 172 cp -a $install/usr/lib/jvm/java-icedtea/jre $fs/usr/lib/jvm/java-icedtea
pascal@20164 173 ;;
pascal@20164 174 java-jdk)
pascal@20164 175 CAT="development|Symlinks for the default Java Development Kit (icedtea6)."
pascal@20164 176 TAGS="java"
pascal@20164 177 DEPENDS="icedtea6-jdk"
pascal@20164 178 mkdir -p $fs/usr
pascal@20164 179 cp -a $install/usr/jdk-bin $fs/usr/bin
pascal@20164 180 ;;
pascal@20164 181 java-jre)
pascal@20164 182 CAT="development|Symlinks for the default Java Runtime Environment (icedtea6)."
pascal@20164 183 DEPENDS="icedtea6-jre"
pascal@20164 184 mkdir -p $fs/usr
pascal@20164 185 cp -a $install/usr/jre-bin $fs/usr/bin
pascal@20164 186 ;;
pascal@20164 187 esac
rcx@3803 188 }
pascal@20164 189
pascal@20164 190 # Post install/remove commands for Tazpkg.
pascal@20164 191 post_install_icedtea6_jre()
pascal@20164 192 {
pascal@20164 193 ln -sf /usr/lib/jvm/java-icedtea/bin/java "$1/usr/bin/java"
pascal@20164 194 }
pascal@20164 195
pascal@20164 196 post_remove_icedtea6_jre()
pascal@20164 197 {
pascal@20164 198 rm -f "$1/usr/bin/java"
pascal@20164 199 }