wok-next annotate icedtea6-jdk/receipt @ rev 21727
created recipe for vbindiff
author | Hans-G?nter Theisgen |
---|---|
date | Sat Nov 21 14:32:44 2020 +0100 (2020-11-21) |
parents | d5aab818505e |
children |
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" |
al@21017 | 7 SHORT_DESC="A Free Software harness for OpenJDK" |
al@21020 | 8 MAINTAINER="devel@slitaz.org" |
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@21078 | 19 xalan-xerces-j gtk2-dev giflib-dev libpng-dev xorg-dev libxtst-dev \ |
al@21078 | 20 libxp-dev xorg-dev-proto nss nss-dev jdk6-jaxws jdk6-jaxp jdk6-jaf \ |
pankso@10639 | 21 openjdk-6-src" |
al@21020 | 22 SPLIT="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 |
al@21017 | 37 compile_rules() { |
pascal@6031 | 38 # Limit memory usage |
al@21020 | 39 ulimit -v $(awk '/MemTotal/ { print int(($2*80)/100) }' < /proc/meminfo) #' |
pascal@6031 | 40 |
rcx@3803 | 41 local JVM_PREFIX |
rcx@6017 | 42 JVM_PREFIX="/usr/lib/jvm/java-icedtea" |
al@21020 | 43 |
rcx@3803 | 44 # NOTE: This build does not seem to work with ECJ 3.5 |
rcx@6017 | 45 local ECJ_VERSION |
rcx@6017 | 46 ECJ_VERSION="3.6" |
rcx@3803 | 47 |
rcx@3803 | 48 cd $src |
pascal@6034 | 49 mkdir drops |
rcx@6059 | 50 sed -i -e 's/mkdir -p drops/true/' -e 's/ jar xf/ fastjar xf/' Makefile* |
al@21020 | 51 |
gokhlayeh@9223 | 52 # Check than all sources files are available, or exit. |
pascal@12980 | 53 REPO=http://icedtea.classpath.org/download/drops |
gokhlayeh@12083 | 54 if [ -x /usr/bin/cook ]; then |
gokhlayeh@12083 | 55 for i in jdk6-jaxws jdk6-jaxp jdk6-jaf; do |
al@20513 | 56 [ -s $SRC/$i-$openjdk_version.zip ] || |
al@20513 | 57 wget -P $SRC $REPO/$i-$openjdk_version.zip |
al@20513 | 58 cp $SRC/$i-$openjdk_version.zip drops || return 1 |
gokhlayeh@12083 | 59 done |
gokhlayeh@12083 | 60 # openjdk-6-src is in BUILD_DEPENDS and must be build like jdk6-* pkgs. |
al@20513 | 61 [ -s $SRC/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz ] || |
al@20513 | 62 wget -P $SRC $REPO/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz |
al@20513 | 63 cp $SRC/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz . |
gokhlayeh@12083 | 64 else |
gokhlayeh@12083 | 65 report open-bloc |
gokhlayeh@12083 | 66 for i in jdk6-jaxws jdk6-jaxp jdk6-jaf openjdk-6-src; do |
gokhlayeh@12083 | 67 tazwok get-src $i |
al@20513 | 68 cp $SRC/$i-$openjdk_version.zip drops |
gokhlayeh@12083 | 69 done |
al@20513 | 70 cp $SRC/openjdk-6-src-$openjdk_version-$openjdk_date.tar.gz . |
gokhlayeh@12083 | 71 report step "Running compilation" |
gokhlayeh@12083 | 72 fi |
slaxemulator@6894 | 73 |
pascal@5915 | 74 mem=$(free | awk '/Mem:/ { printf "%d\n",$2/1024 }') |
pascal@4304 | 75 cat > slitaz.sh <<EOT |
pascal@18358 | 76 # disable currency timebomb |
pascal@18358 | 77 find -name GenerateCurrencyData.java | xargs sed -i 's|throw new RuntimeException("time is|System.err.println("time is|' 2> /dev/null |
pascal@18358 | 78 find -name CurrencyData.properties | xargs sed -i 's/TR=TRL.*/TR=TRY/' 2> /dev/null |
pascal@4304 | 79 # Busybox compatibility |
al@21020 | 80 #find -name Sanity.gmk | xargs sed -i 's/--sync -kP/-k/' Makefile |
pascal@6034 | 81 find -name Platform.gmk | xargs sed -i "s@MB_OF_MEMORY *:=.*free.*@MB_OF_MEMORY := $mem@" Makefile |
pascal@4304 | 82 EOT |
pascal@6034 | 83 sed -i -e 's|touch .*|&\n\tsh slitaz.sh|' \ |
pascal@5152 | 84 -e 's/--check/-c/' \ |
pascal@15348 | 85 -e 's/Bsymbolic/& -lgcj/' \ |
pascal@4304 | 86 -e 's/ln -sfv/ln -sf/' Makefile* |
pascal@17425 | 87 aclocal |
pascal@17425 | 88 autoconf && |
pascal@17424 | 89 automake --add-missing && |
pascal@15336 | 90 { |
rcx@3803 | 91 ./configure \ |
rcx@3803 | 92 --prefix=/usr \ |
rcx@3803 | 93 --disable-plugin \ |
rcx@3803 | 94 --disable-docs \ |
rcx@3803 | 95 --with-ecj \ |
rcx@6017 | 96 --with-ecj-jar=/usr/share/java/ecj-$ECJ_VERSION.jar \ |
rcx@3803 | 97 --with-gcj \ |
rcx@3803 | 98 --with-gcj-home=/usr/lib/jvm/java-gcj \ |
rcx@3803 | 99 --with-xalan2-jar=/usr/share/java/xalan.jar \ |
rcx@3803 | 100 --with-xalan2-serializer-jar=/usr/share/java/serializer.jar \ |
rcx@3803 | 101 --with-xerces2-jar=/usr/share/java/xercesImpl.jar \ |
rcx@3803 | 102 --with-rhino=/usr/share/java/js.jar \ |
rcx@3803 | 103 --with-abs-install-dir=$JVM_PREFIX \ |
gokhlayeh@12083 | 104 $CONFIGURE_ARGS || return 1 |
al@21020 | 105 make -j1 ARCH_PREFIX= 2>&1 | sed '/java_lang_ClassLoaderr.NativeLibrary/d' |
pascal@15337 | 106 } 2>&1 | sed 's/No such file/no such file/' |
al@21020 | 107 |
pankso@10641 | 108 echo "Copying needed files to install dir..." |
al@21020 | 109 rm -rf $install |
rcx@3803 | 110 |
rcx@3803 | 111 local JVM_BUILDDIR |
slaxemulator@6927 | 112 JVM_BUILDDIR=$src/openjdk.build/j2sdk-image |
rcx@3803 | 113 local JVM_DESTDIR |
al@21020 | 114 JVM_DESTDIR=$install$JVM_PREFIX |
pankso@10654 | 115 echo "OpenJDK build : source/openjdk.build/j2sdk-image" |
pankso@10654 | 116 echo "OpenJDK install : install/$JVM_PREFIX" |
rcx@3803 | 117 |
pankso@10654 | 118 echo "Copying JDK files : bin/ lib/" |
rcx@3803 | 119 mkdir -p $JVM_DESTDIR |
rcx@3803 | 120 cp -a $JVM_BUILDDIR/bin $JVM_DESTDIR |
rcx@3803 | 121 cp -a $JVM_BUILDDIR/lib $JVM_DESTDIR |
pankso@10641 | 122 |
pankso@10654 | 123 echo "Copying JRE files : bin/ lib/" |
rcx@3803 | 124 mkdir -p $JVM_DESTDIR/jre |
rcx@3803 | 125 cp -a $JVM_BUILDDIR/jre/bin $JVM_DESTDIR/jre |
rcx@3803 | 126 cp -a $JVM_BUILDDIR/jre/lib $JVM_DESTDIR/jre |
al@21020 | 127 |
rcx@3803 | 128 # Delete duplicated executables from the JDK bin |
pankso@10641 | 129 echo "Deleting duplicated files..." |
al@21020 | 130 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin); do |
rcx@3803 | 131 rm -f $JVM_DESTDIR/bin/$jbin |
rcx@3803 | 132 done |
rcx@3803 | 133 |
rcx@3803 | 134 # Create symlinks for JDK binaries |
pankso@10641 | 135 echo "Creating symlinks for JDK binaries..." |
al@21020 | 136 mkdir -p $install/usr/jdk-bin |
al@21020 | 137 for jbin in $(ls -1 $JVM_DESTDIR/bin); do |
al@21020 | 138 ln -s $JVM_PREFIX/bin/$jbin $install/usr/jdk-bin/$jbin |
rcx@3803 | 139 done |
al@21020 | 140 |
rcx@3803 | 141 # Create symlinks for JRE binaries |
pankso@10641 | 142 echo "Creating symlinks for JRE binaries..." |
al@21020 | 143 mkdir -p $install/usr/jre-bin |
al@21020 | 144 for jbin in $(ls -1 $JVM_DESTDIR/jre/bin); do |
rcx@3803 | 145 ln -s $JVM_PREFIX/jre/bin/$jbin $JVM_DESTDIR/bin/$jbin |
al@21020 | 146 ln -s $JVM_PREFIX/jre/bin/$jbin $install/usr/jre-bin |
rcx@3803 | 147 done |
gokhlayeh@12083 | 148 if [ ! -x /usr/bin/cook ]; then |
gokhlayeh@12083 | 149 report close-bloc |
gokhlayeh@12083 | 150 fi |
rcx@3803 | 151 } |
rcx@3803 | 152 |
al@21017 | 153 genpkg_rules() { |
pascal@20164 | 154 case $PACKAGE in |
al@21017 | 155 icedtea6-jdk) |
al@21017 | 156 mkdir -p $fs/usr/lib/jvm/java-icedtea |
al@21017 | 157 cp -a $install/usr/lib/jvm/java-icedtea/bin $fs/usr/lib/jvm/java-icedtea |
al@21017 | 158 cp -a $install/usr/lib/jvm/java-icedtea/lib $fs/usr/lib/jvm/java-icedtea |
al@21078 | 159 DEPENDS="icedtea6-jre xorg libxtst libxp cups" |
al@21017 | 160 ;; |
al@21017 | 161 icedtea6-jre) |
al@21017 | 162 mkdir -p $fs/usr/lib/jvm/java-icedtea |
al@21017 | 163 cp -a $install/usr/lib/jvm/java-icedtea/jre $fs/usr/lib/jvm/java-icedtea |
al@21017 | 164 CAT="development|JRE" |
al@21017 | 165 DEPENDS="glibc-base gcc-lib-base util-linux-uuid alsa-lib \ |
al@21078 | 166 freetype giflib libjpeg libpng zlib libice \ |
al@21078 | 167 libsm libx11 libxau libxdmcp \ |
al@21078 | 168 libxext libxi libxrender libxtst" |
al@21017 | 169 ;; |
al@21017 | 170 java-jdk) |
al@21017 | 171 mkdir -p $fs/usr |
al@21017 | 172 cp -a $install/usr/jdk-bin $fs/usr/bin |
al@21017 | 173 CAT="development|symlinks for the default Java Development Kit (icedtea6)" |
al@21017 | 174 TAGS="java" |
al@21017 | 175 DEPENDS="icedtea6-jdk" |
al@21017 | 176 ;; |
al@21017 | 177 java-jre) |
al@21017 | 178 mkdir -p $fs/usr |
al@21017 | 179 cp -a $install/usr/jre-bin $fs/usr/bin |
al@21017 | 180 CAT="development|symlinks for the default Java Runtime Environment (icedtea6)" |
al@21017 | 181 DEPENDS="icedtea6-jre" |
al@21017 | 182 ;; |
pascal@20164 | 183 esac |
rcx@3803 | 184 } |
pascal@20164 | 185 |
al@21017 | 186 post_install_icedtea6_jre() { |
pascal@20164 | 187 ln -sf /usr/lib/jvm/java-icedtea/bin/java "$1/usr/bin/java" |
pascal@20164 | 188 } |
pascal@20164 | 189 |
al@21017 | 190 post_remove_icedtea6_jre() { |
pascal@20164 | 191 rm -f "$1/usr/bin/java" |
pascal@20164 | 192 } |