|
|
|
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
# From: https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/eclass/multiprocessing.eclass
|
|
|
|
makeopts_jobs() {
|
|
|
|
# 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 " $MAKEFLAGS " | 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}
|
|
|
|
}
|
|
|
|
|
|
|
|
version_icedtea8=3.29.0
|
|
|
|
|
|
|
|
dir_download="$PWD/download"
|
|
|
|
mkdir -p build; cd build
|
|
|
|
dir_install="$PWD/install-icedtea8"
|
|
|
|
|
|
|
|
# Prepare source
|
|
|
|
tar xf "$dir_download/icedtea-$version_icedtea8.tar.xz"
|
|
|
|
cd "icedtea-$version_icedtea8"
|
|
|
|
for part in openjdk-git; do
|
|
|
|
cp "$dir_download/icedtea-$version_icedtea8-$part.tar.xz" "$part.tar.xz"
|
|
|
|
done
|
|
|
|
|
|
|
|
unset _JAVA_OPTIONS
|
|
|
|
export PATH="$PWD/../install-icedtea7/bin:$PATH"
|
|
|
|
|
|
|
|
# Configure source
|
|
|
|
CONFIG_SHELL=/bin/bash ./configure \
|
|
|
|
--prefix="$dir_install" \
|
|
|
|
--with-jdk-home="$PWD/../install-icedtea7" \
|
|
|
|
--with-parallel-jobs="$(makeopts_jobs)" \
|
|
|
|
--enable-headless \
|
|
|
|
--disable-docs \
|
|
|
|
--disable-bootstrap \
|
|
|
|
--disable-ccache \
|
|
|
|
--disable-downloading \
|
|
|
|
--disable-system-kerberos \
|
|
|
|
--disable-system-pcsc \
|
|
|
|
--disable-system-sctp
|
|
|
|
|
|
|
|
# Build and install
|
|
|
|
unset MAKEFLAGS
|
|
|
|
make
|
|
|
|
make install
|