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.
 
 
 
 
 
 

76 lines
2.0 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../eclipse/eclipse.conf
# Copyright (C) 2007 The OpenSDE Project
# Copyright (C) 2004 - 2006 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
if [ $prefix_auto -eq 1 ]; then
prefix=opt/eclipse
set_confopt
fi
# Arch conversion from t2 to the one used by eclipse.
ECLIPSE_ARCH=$arch
case "$ECLIPSE_ARCH" in
x86-64)
ECLIPSE_ARCH="x86_64" ;;
powerpc)
ECLIPSE_ARCH="ppc" ;;
powerpc*)
ECLIPSE_ARCH="ppc64" ;;
esac
# package doesn't contain a base dir
custextract=eclipse_extract
eclipse_extract() {
mkdir $pkg-$ver
var_append zipopt ' ' -d$pkg-$ver
autoextract_zip "$@"
}
makeopt=
makeinstopt=
ECJ="-Dbuild.compiler=org.eclipse.jdt.core.JDTCompilerAdapter"
# create ECJ
ANTOPT="$ECJ -lib \$PWD/jdtcoresrc/ecj.jar"
hook_add premake 2 "ant -buildfile jdtcoresrc/compilejdtcorewithjavac.xml"
hook_add premake 3 "ant -buildfile jdtcoresrc/compilejdtcore.xml $ANTOPT"
# compile & install
ANTOPT="$ECJ -lib \$PWD/ecj.jar -DinstallOs=linux -DinstallWs=gtk -DinstallArch=$ECLIPSE_ARCH"
# Custom installation.
eclipse_postmake() {
# Have eclipse put it all together.
ant $ANTOPT install
# Copy all stuff from the eclipse build to our prefix location.
# But to make sure any possible links stay intact we use
# tar | untar instead of cp.
( cd eclipse; tar -c * | tar -x -C /$prefix )
# and a $PATH friendly `eclipse`
cat <<-EOT > $bindir/eclipse
#!/bin/sh
exec \${0%/*}/../eclipse
EOT
chmod +x $bindir/eclipse
}
hook_add inmake 5 "ant $ANTOPT compilelibs"
hook_add postmake 5 eclipse_postmake