Scripts for bootstrapping various programming languages
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.9 KiB

#!/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_icedtea7=2.6.28
dir_download="$PWD/download"
dir_files="$PWD/files"
mkdir -p build; cd build
dir_install="$PWD/install-icedtea7"
## Prepare source
tar xf "$dir_download/icedtea-$version_icedtea7.tar.xz"
cd "icedtea-$version_icedtea7"
for part in corba hotspot jaxp jaxws jdk langtools openjdk; do
cp "$dir_download/icedtea-$version_icedtea7-$part.tar.bz2" "$part.tar.bz2"
done
cp "$dir_files/icedtea-2.6.28-fix-includes.patch" .
cp "$dir_files/icedtea-2.6.28-fix-bootstrap.patch" .
unset _JAVA_OPTIONS
unset JAVA_HOME BOOTDIR ALT_BOOTDIR # openjdk-boot/hotspot/make/linux/makefiles/sa.make
export PATH="$PWD/../install-ant/bin:$PWD/../install-gcc/lib/jvm/bin:$PWD/../install-gcc/bin:$PATH"
# Configure source
CONFIG_SHELL=/bin/bash ./configure \
--prefix="$dir_install" \
--with-jdk-home="$PWD/../install-gcc/lib/jvm" \
--with-parallel-jobs="$(makeopts_jobs)" \
--disable-docs \
--disable-downloading \
--without-rhino \
--disable-system-jpeg \
--disable-system-png \
--disable-system-gif \
--disable-system-lcms \
--disable-system-gio \
--disable-system-gconf \
--disable-system-fontconfig \
--disable-system-gtk \
--disable-system-kerberos \
--disable-system-pcsc \
--disable-system-sctp
# Build and install
11 months ago
unset MAKEFLAGS
make \
DISTRIBUTION_PATCHES=icedtea-2.6.28-fix-includes.patch \
DISTRIBUTION_BOOT_PATCHES=icedtea-2.6.28-fix-bootstrap.patch
make install