mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-21 19:20:08 +02:00
Updated bep for openjdk, from Frédéric Gaillard.
(cherry picked from commit 5875e10c5a)
Conflicts:
dev-lang/openjdk/openjdk-1.7.bep
This commit is contained in:
committed by
Oliver Tappe
parent
45561e67fa
commit
739bda9be2
@@ -1,15 +1,14 @@
|
||||
DESCRIPTION="openjdk"
|
||||
HOMEPAGE="http://openjdk.java.net/"
|
||||
SRC_URI="http://ports-space.haiku-files.org/dev-lang/j2sdk-july-r2.tar.xz"
|
||||
REVISION="1"
|
||||
SRC_URI="http://ports-space.haiku-files.org/source/openjdk/j2sdk-april-2013.tar"
|
||||
REVISION="2"
|
||||
STATUS_HAIKU="stable"
|
||||
DEPEND="app-arch/cpio >= 2.10
|
||||
media-libs/freetype >= 2.4.6"
|
||||
DEPEND="app-arch/cpio = 2.10
|
||||
media-libs/freetype >= 2.4.9"
|
||||
|
||||
CHECKSUM_MD5="28b8630373769e1e897a75bf81f2e1eb"
|
||||
CHECKSUM_MD5="e38b939c34b04427336245397fa43c9c"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
BUILD {
|
||||
OPENJDK_DIR=`haikuporter -t`/dev-lang/openjdk/work
|
||||
|
||||
# Get and build Apache Ant.
|
||||
@@ -27,21 +26,85 @@ BUILD()
|
||||
cd ..
|
||||
|
||||
# Clone latest JDK repositories.
|
||||
if [ "$(ls -A jdk)" ]; then
|
||||
echo "jdk directory is not empty"
|
||||
else
|
||||
hg clone http://hg.openjdk.java.net/haiku/haiku jdk --debug
|
||||
fi
|
||||
|
||||
hg clone http://hg.openjdk.java.net/haiku/haiku jdk --debug
|
||||
hg clone http://hg.openjdk.java.net/haiku/haiku/corba jdk/corba --debug
|
||||
hg clone http://hg.openjdk.java.net/haiku/haiku/hotspot jdk/hotspot --debug
|
||||
hg clone http://hg.openjdk.java.net/haiku/haiku/jaxp jdk/jaxp --debug
|
||||
hg clone http://hg.openjdk.java.net/haiku/haiku/jaxws jdk/jaxws --debug
|
||||
hg clone http://hg.openjdk.java.net/haiku/haiku/jdk jdk/jdk --debug
|
||||
hg clone http://hg.openjdk.java.net/haiku/haiku/langtools jdk/langtools --debug
|
||||
if [ "$(ls -A jdk/corba)" ]; then
|
||||
echo "jdk/corba directory is not empty"
|
||||
else
|
||||
hg clone http://hg.openjdk.java.net/haiku/haiku/corba jdk/corba --debug
|
||||
fi
|
||||
|
||||
if [ "$(ls -A jdk/hotspot)" ]; then
|
||||
echo "jdk/hotspot directory is not empty"
|
||||
else
|
||||
hg clone http://hg.openjdk.java.net/haiku/haiku/hotspot jdk/hotspot --debug
|
||||
fi
|
||||
|
||||
if [ "$(ls -A jdk/jaxp)" ]; then
|
||||
echo "jdk/jaxp directory is not empty"
|
||||
else
|
||||
hg clone http://hg.openjdk.java.net/haiku/haiku/jaxp jdk/jaxp --debug
|
||||
fi
|
||||
|
||||
if [ "$(ls -A jdk/jaxws)" ]; then
|
||||
echo "jdk/jaxws directory is not empty"
|
||||
else
|
||||
hg clone http://hg.openjdk.java.net/haiku/haiku/jaxws jdk/jaxws --debug
|
||||
fi
|
||||
|
||||
if [ "$(ls -A jdk/jdk)" ]; then
|
||||
echo "jdk/jdk directory is not empty"
|
||||
else
|
||||
hg clone http://hg.openjdk.java.net/haiku/haiku/jdk jdk/jdk --debug
|
||||
fi
|
||||
|
||||
if [ "$(ls -A jdk/langtools)" ]; then
|
||||
echo "jdk/langtools directory is not empty"
|
||||
else
|
||||
hg clone http://hg.openjdk.java.net/haiku/haiku/langtools jdk/langtools --debug
|
||||
fi
|
||||
|
||||
export ALT_BOOTDIR=${OPENJDK_DIR}/j2sdk-image
|
||||
export ALT_JDK_IMPORT_PATH=${OPENJDK_DIR}/j2sdk-image
|
||||
|
||||
# don't set ALT_JDK_IMPORT for a full build
|
||||
# set jdk/README-build.html
|
||||
# export ALT_JDK_IMPORT_PATH=${OPENJDK_DIR}/j2sdk-image
|
||||
|
||||
export ANT=${OPENJDK_DIR}/ant
|
||||
export ALT_OUTPUTDIR=${OPENJDK_DIR}/output
|
||||
|
||||
# set jdk/README-build.html
|
||||
export LANG=C
|
||||
|
||||
# add $ANT_HOME/bin to PATH
|
||||
export PATH=$PATH:$ANT_HOME/bin
|
||||
|
||||
# use PATH to search commands rather than explicitly set path for each commands
|
||||
# so that grep, egrep & readelf are automaticly found
|
||||
# see Defs-haiku.gmk
|
||||
export ALT_UNIXCOMMAND_PATH=
|
||||
|
||||
# mandatory GCC4 [requires at least 4.5.3]
|
||||
setgcc gcc4
|
||||
|
||||
mkdir -p ${ALT_OUTPUTDIR}
|
||||
export ALLOW_DOWNLOADS=true
|
||||
|
||||
# some sources downloaded while building have moved
|
||||
# so we have to provide a directory where they have to reside to
|
||||
export ALT_DROPS_DIR=${OPENJDK_DIR}/drop
|
||||
mkdir -p ${ALT_DROPS_DIR}
|
||||
export ALLOW_DOWNLOADS=false
|
||||
|
||||
# grab relocated sources
|
||||
cd ${ALT_DROPS_DIR}
|
||||
wget -nc http://ports-space.haiku-files.org/source/openjdk/jaxp145_01.zip
|
||||
wget -nc http://ports-space.haiku-files.org/source/openjdk/jdk7-jaf-2010_08_19.zip
|
||||
wget -nc http://ports-space.haiku-files.org/source/openjdk/jdk7-jaxws2_2_4-b03-2011_05_27.zip
|
||||
cd ..
|
||||
|
||||
# Deploy certain headers, if they are missing.
|
||||
|
||||
@@ -66,10 +129,21 @@ BUILD()
|
||||
echo SoundUtils.h was not found. Deployed private file instead.
|
||||
fi
|
||||
|
||||
# Build.
|
||||
# small patch allowing to finish build without errors
|
||||
# this modification already exists in another dev branch
|
||||
# if someone fix it in current branch, using sed rathan than patch should not brake
|
||||
# the whole build
|
||||
if [ -e jdk/make/Defs-internal.gmk.org ];
|
||||
then
|
||||
echo Defs-internal exists.
|
||||
else
|
||||
mv jdk/make/Defs-internal.gmk jdk/make/Defs-internal.gmk.org
|
||||
fi
|
||||
cat jdk/make/Defs-internal.gmk.org | sed s/'$(PRINTF) "--'/'$(PRINTF) -- "--'/ >jdk/make/Defs-internal.gmk
|
||||
|
||||
# Build.
|
||||
cd jdk
|
||||
make NO_DOCS=true
|
||||
make
|
||||
|
||||
# Cleanup private files, if any were deployed.
|
||||
# I don't really think it would harm anyone if we don't clean them up after compiling.
|
||||
@@ -87,14 +161,16 @@ BUILD()
|
||||
# fi
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
INSTALL {
|
||||
export DESTDIR=`finddir B_COMMON_DIRECTORY`
|
||||
cp -r -f -v output ${DESTDIR}/jdk
|
||||
echo "you should add this lines to \$HOME/.profile"
|
||||
echo "export JAVA_HOME=/boot/common/jdk"
|
||||
echo "export PATH=\$JAVA_HOME/bin:\$PATH"
|
||||
echo "export LIBRARY_PATH=\$JAVA_HOME/lib/i386/:\$LIBRARY_PATH"
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
TEST {
|
||||
echo "OpenJDK tests are not yet ported to Haiku."
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user