|
@ -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() { |
|
|
|
|
|
[[ $# -eq 0 ]] && set -- ${MAKEFLAGS} |
|
|
|
|
|
# This assumes the first .* will be more greedy than the second .* |
|
|
|
|
|
# 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:]])[[:space:]]*([0-9]+).*:\2:p' \ |
|
|
-e 's:.*[[:space:]](-j|--jobs)[[:space:]].*:999:p') |
|
|
-e 's:.*[[:space:]](-j|--jobs)[[:space:]].*:999:p') |
|
|
jobs=${jobs:-1} |
|
|
echo ${jobs:-1} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if option bootstrap; then |
|
|
if option bootstrap; then |
|
|
# Build GCJ |
|
|
# Build GCJ |
|
@ -81,7 +86,12 @@ 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 |
|
|
) |
|
|
) |
|
@ -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 \ |
|
|