openjdk: provide hjava launcher utility.

This commit is contained in:
Augustin Cavalier
2015-03-03 23:02:06 -05:00
parent 60323de7e2
commit 9fd0b44fdb
4 changed files with 92 additions and 6 deletions

View File

@@ -5,8 +5,7 @@ result of an effort Sun Microsystems began in 2006. The implementation is \
licensed under the GNU General Public License (GNU GPL) with a linking \
exception. Were it not for the GPL linking exception, components that linked \
to the Java class library would be subject to the terms of the GPL license. \
OpenJDK is the official Java SE 7 reference implementation.
"
OpenJDK is the official Java SE 7 reference implementation."
HOMEPAGE="http://openjdk.java.net/"
COPYRIGHT="2012 Oracle and/or its affiliates."
LICENSE="GNU GPL v2"
@@ -27,7 +26,7 @@ SRC_URI_7="hg+http://hg.openjdk.java.net/jdk7u/jdk7u/jaxws#jdk7u80-b02"
SRC_URI_8="hg+http://bitbucket.org/hamishm/haiku-jdk7u-hotspot#755ff2f"
SRC_URI_9="hg+http://bitbucket.org/hamishm/haiku-jdk7u-jdk#f39f6f6"
REVISION="1"
REVISION="2"
ARCHITECTURES="x86"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
# x86_gcc2 is fine as primary target architecture as long as we're building
@@ -65,6 +64,7 @@ PROVIDES="
cmd:jstack$secondaryArchSuffix = $portVersion compat >= 1
cmd:jstat$secondaryArchSuffix = $portVersion compat >= 1
cmd:jstatd$secondaryArchSuffix = $portVersion compat >= 1
cmd:hjava = $portVersion compat >= 1
cmd:keytool$secondaryArchSuffix = $portVersion compat >= 1
cmd:native2ascii$secondaryArchSuffix = $portVersion compat >= 1
cmd:orbd$secondaryArchSuffix = $portVersion compat >= 1
@@ -95,7 +95,7 @@ BUILD_REQUIRES="
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cpio >= 2.10
cmd:cpio
cmd:make
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
@@ -113,6 +113,10 @@ BUILD_PREREQUIRES="
BUILD()
{
# Build "hjava" command.
g++ $portDir/sources/hjava.cpp -DJAVA_BINARY=\"$binDir/java\" -o hjava
addResourcesToBinaries $portDir/sources/hjava.rdef hjava
OPENJDK_DIR=$(dirname $sourceDir)
# prepare the directory structure
@@ -147,13 +151,18 @@ BUILD()
export USE_EXTERNAL_ZLIB=true
# Build.
# Build. (multijob make sometimes fails)
cd jdk
make
}
INSTALL()
{
mkdir -p $binDir
# install hjava
cp hjava $prefix/bin/
# install the generated SDK image dir
cd ..
jdkDir=$libDir/openjdk
@@ -161,7 +170,6 @@ INSTALL()
cp -a output/j2sdk-image $jdkDir
# symlink the executables to binDir
mkdir -p $binDir
symlinkRelative -s $jdkDir/bin/* $binDir
# TODO: We should probably link only a subset.