Browse Source

Cleanup icedtea a little

master
mid-kid 8 years ago
parent
commit
48ab146963
  1. 39
      satellites/icedtea.sat

39
satellites/icedtea.sat

@ -68,10 +68,15 @@ fi
header_end header_end
# From: https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/eclass/multiprocessing.eclass # From: https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/eclass/multiprocessing.eclass
jobs=$(echo " $MAKEFLAGS " | sed -r -n \ makeopts_jobs() {
-e 's:.*[[:space:]](-j|--jobs[=[:space:]])[[:space:]]*([0-9]+).*:\2:p' \ [[ $# -eq 0 ]] && set -- ${MAKEFLAGS}
-e 's:.*[[:space:]](-j|--jobs)[[:space:]].*:999:p') # This assumes the first .* will be more greedy than the second .*
jobs=${jobs:-1} # since POSIX doesn't specify a non-greedy match (i.e. ".*?").
local jobs=$(echo " $* " | sed -r -n \
-e 's:.*[[:space:]](-j|--jobs[=[:space:]])[[:space:]]*([0-9]+).*:\2:p' \
-e 's:.*[[:space:]](-j|--jobs)[[:space:]].*:999:p')
echo ${jobs:-1}
}
if option bootstrap; then if option bootstrap; then
# Build GCJ # Build GCJ
@ -81,17 +86,22 @@ if option bootstrap; then
sed -i -e 's/\.\/fixinc\.sh/-c true/' gcc/Makefile.in sed -i -e 's/\.\/fixinc\.sh/-c true/' gcc/Makefile.in
mkdir build; cd build mkdir build; cd build
../configure --prefix="$PWD/../install" --disable-bootstrap --enable-languages=java --enable-java-home --with-java-home="$PWD/../install/lib/jvm/jre" ../configure \
--prefix="$PWD/../install" \
--disable-bootstrap \
--enable-languages=java \
--enable-java-home \
--with-java-home="$PWD/../install/lib/jvm/jre"
make make
make install make install
) )
# Install missing javac # Install missing javac
sed -e "s#@JAVA@#$PWD/gcc-$version_gcc/install/lib/jvm/bin/java#" \ sed -e "s#@JAVA@#$PWD/gcc-$version_gcc/install/lib/jvm/bin/java#" \
-e "s#@ECJ_JAR@#$PWD/gcc-$version_gcc/install/share/java/ecj.jar#" \ -e "s#@ECJ_JAR@#$PWD/gcc-$version_gcc/install/share/java/ecj.jar#" \
-e "s#@RT_JAR@#$PWD/gcc-$version_gcc/install/lib/jvm/jre/lib/rt.jar#" \ -e "s#@RT_JAR@#$PWD/gcc-$version_gcc/install/lib/jvm/jre/lib/rt.jar#" \
-e "s#@TOOLS_JAR@#$PWD/gcc-$version_gcc/install/lib/jvm/lib/tools.jar#" \ -e "s#@TOOLS_JAR@#$PWD/gcc-$version_gcc/install/lib/jvm/lib/tools.jar#" \
javac.in > javac javac.in > javac
install -Dm755 -t "gcc-$version_gcc/install/lib/jvm/bin" javac install -Dm755 -t "gcc-$version_gcc/install/lib/jvm/bin" javac
# Set JAVA_HOME to GCJ # Set JAVA_HOME to GCJ
@ -102,9 +112,6 @@ if option bootstrap; then
./build.sh ./build.sh
) )
# Add bootstrapped version of Ant to $PATH, for use in the subsequent builds of Icedtea
export PATH="$PWD/apache-ant-$version_apache_ant/dist/bin:$PATH"
# Bootstrap Icedtea7 # Bootstrap Icedtea7
( cd "$name-$version_bootstrap" ( cd "$name-$version_bootstrap"
for module in $bootstrap_modules; do for module in $bootstrap_modules; do
@ -113,9 +120,12 @@ if option bootstrap; then
mv "icedtea-$version_bootstrap-$modname.tar.bz2" "$modname.tar.bz2" mv "icedtea-$version_bootstrap-$modname.tar.bz2" "$modname.tar.bz2"
done done
# Use the gcc with java support we just built to be able to properly compile java C modules. Add java tools and ant to $PATH as well.
export PATH="$PWD/../gcc-$version_gcc/install/bin:$JAVA_HOME/bin:$PWD/../apache-ant-$version_apache_ant/dist/bin:$PATH"
./configure \ ./configure \
--with-jdk-home="$JAVA_HOME" \ --with-jdk-home="$JAVA_HOME" \
--with-parallel-jobs=$jobs \ --with-parallel-jobs="$(makeopts_jobs)" \
--disable-downloading \ --disable-downloading \
--without-rhino \ --without-rhino \
--disable-system-kerberos \ --disable-system-kerberos \
@ -137,9 +147,10 @@ for module in $modules; do
done done
# Build # Build
export PATH="$JAVA_HOME/bin:$PATH"
./configure \ ./configure \
--with-jdk-home="$JAVA_HOME" \ --with-jdk-home="$JAVA_HOME" \
--with-parallel-jobs=$jobs \ --with-parallel-jobs="$(makeopts_jobs)" \
--disable-downloading \ --disable-downloading \
--disable-ccache \ --disable-ccache \
--disable-system-kerberos \ --disable-system-kerberos \

Loading…
Cancel
Save