Draft version for building openjdk

Don't run this on a separate filesystem, or you will see weird errors :)

create a source directory
pfexec mkdir /source
pfexec chown -R builduser /source

cd /source
download the sunstudio12u1-patched-ii-2010Feb-sol-x86.tar.gz
cp sunstudio* /opt
cd /opt
pfexec tar -xvzf sunstudio*

pfexec pkg install SUNWgmake SUNWj6dev SUNWant SUNWcups SUNWzip SUNWunzip SUNWxwhl SUNWxorg-headers SUNWaudh SUNWfreetype2
pfexec pkg install mercurial
pfexec pkg install gcc-43
For openjdk6 you need this extra library:
pfexec pkg install SUNWmfrun

Get the forest extension for mercurial
hg clone http://bitbucket.org/pmezard/hgforest-crew

Edit .hgrc in your home directory and add this:
username = First and Last Name <e-mailaddress>

hg fclone http://hg.openjdk.java.net/jdk7/jdk7

for openjdk6

hg fclone http://hg.openjdk.java.net/jdk6/jdk6

Create a build script:


cd /source/jdk6
env -i PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/ccs/bin:/usr/gnu/bin:/opt/sunstud
io12.1/bin \
gmake \
 ALT_BOOTDIR=/usr/java \
 ALT_JDK_IMPORT_PATH=/usr/java \
 ALT_CUPS_HEADERS_PATH=/usr/include \
 NO_DOCS=true \
 ALT_COMPILER_PATH=/opt/sunstudio12.1/bin \

chmod +x build.sh


The build will take quite a while to complete, when finished the builds are avaialble in the /source/jdk6/build directory