|
|
IUSE="gnome mozilla jikes gcj nosrc nodoc" | IUSE="gnome mozilla jikes gcj nosrc nodoc" |
SLOT="3.1" | SLOT="3.1" |
LICENSE="CPL-1.0" | LICENSE="CPL-1.0" |
KEYWORDS="~x86 ~ppc" |
KEYWORDS="~x86 ~ppc ~amd64" |
| |
RDEPEND=" | RDEPEND=" |
|| ( >=virtual/jre-1.4.2 =dev-java/blackdown-jdk-1.4.2* ) | || ( >=virtual/jre-1.4.2 =dev-java/blackdown-jdk-1.4.2* ) |
|
|
| |
java-utils_ensure-vm-version-ge 1 4 2 | java-utils_ensure-vm-version-ge 1 4 2 |
| |
if (java-utils_is-vm-version-ge 1 5 0) ; then |
# all other gentoo archs match except amd64->x86_64 |
die "${P} cannot be compiled with a 1.5.x VM, set your system VM to a 1.4.x VM." |
if [ ${ARCH} == 'amd64' ] ; then |
|
ECLIPSEARCH=x86_64 |
|
else |
|
ECLIPSEARCH=${ARCH} |
fi | fi |
|
|
} | } |
| |
src_unpack() { | src_unpack() { |
|
|
| |
einfo "Set build version in Help->About" | einfo "Set build version in Help->About" |
patch-about | patch-about |
|
|
|
# patch one source file in 3.1M6 to build with Java 5.0 |
|
epatch ${FILESDIR}/05-java5-build.patch |
} | } |
| |
src_compile() { | src_compile() { |
|
|
| |
einfo "Installing features and plugins" | einfo "Installing features and plugins" |
| |
[ -f result/org.eclipse.sdk-I*-linux.gtk.${ARCH}.tar.gz ] || die "gtk zip bundle was not build properly!" |
[ -f result/org.eclipse.sdk-I*-linux.gtk.${ECLIPSEARCH}.tar.gz ] || die "gtk zip bundle was not build properly!" |
tar zxf result/org.eclipse.sdk-I*-linux.gtk.${ARCH}.tar.gz -C ${D}/usr/lib |
tar zxf result/org.eclipse.sdk-I*-linux.gtk.${ECLIPSEARCH}.tar.gz -C ${D}/usr/lib |
| |
mv ${D}/usr/lib/eclipse ${D}/${eclipse_dir} | mv ${D}/usr/lib/eclipse ${D}/${eclipse_dir} |
| |
|
|
| |
core_src_dir="plugins/org.eclipse.core.resources.linux/src" | core_src_dir="plugins/org.eclipse.core.resources.linux/src" |
| |
case ${ARCH} in |
swt_dest_dir="plugins/org.eclipse.swt.gtk/os/linux/${ECLIPSEARCH}" |
x86) |
core_dest_dir="plugins/org.eclipse.core.resources.linux/os/linux/${ECLIPSEARCH}" |
swt_dest_dir="plugins/org.eclipse.swt.gtk/os/linux/x86" |
|
core_dest_dir="plugins/org.eclipse.core.resources.linux/os/linux/x86" |
|
;; |
|
ppc) |
|
swt_dest_dir="plugins/org.eclipse.swt.gtk/os/linux/ppc" |
|
core_dest_dir="plugins/org.eclipse.core.resources.linux/os/linux/ppc/" |
|
;; |
|
esac |
|
} | } |
| |
function process-build-xmls() { | function process-build-xmls() { |
|
|
-e 's/failonerror="[^"]+"/failonerror="true"/' \ | -e 's/failonerror="[^"]+"/failonerror="true"/' \ |
-e 's/verbose="[^"]+"/verbose="false"/' "$x" | -e 's/verbose="[^"]+"/verbose="false"/' "$x" |
done | done |
|
|
|
# Turn off jikes specific serial warning which doesn't work with |
|
# other java compilers |
|
sed -e 's|<compilerarg value="-warn:-serial" />||' \ |
|
-i "plugins/org.eclipse.help.webapp/build.xml" |
} | } |
| |
function patch-frontend() { | function patch-frontend() { |
|
|
-DcollPlace="eclipse-${SLOT}" \ | -DcollPlace="eclipse-${SLOT}" \ |
-DinstallOs=linux \ | -DinstallOs=linux \ |
-DinstallWs=gtk \ | -DinstallWs=gtk \ |
-DinstallArch=$ARCH \ |
-DinstallArch=$ECLIPSEARCH \ |
${ant_extra_opts} ${target} \ | ${ant_extra_opts} ${target} \ |
|| die "Failed to ${target} Java code (gtk+)" | || die "Failed to ${target} Java code (gtk+)" |
} | } |
|
|
cd ${S}/${launcher_src_dir} | cd ${S}/${launcher_src_dir} |
PROGRAM_OUTPUT=eclipse-gtk \ | PROGRAM_OUTPUT=eclipse-gtk \ |
DEFAULT_OS=linux \ | DEFAULT_OS=linux \ |
DEFAULT_OS_ARCH=${ARCH} \ |
DEFAULT_OS_ARCH=${ECLIPSEARCH} \ |
DEFAULT_WS=gtk \ | DEFAULT_WS=gtk \ |
make -f make_linux.mak || die "Failed to build eclipse-gtk" | make -f make_linux.mak || die "Failed to build eclipse-gtk" |
| |
|
|
| |
local awt_lib_path | local awt_lib_path |
| |
[ ${ARCH} == 'x86' ] && awt_lib_path=${JAVA_HOME}/jre/lib/i386 |
awt_lib_path=${JAVA_HOME}/jre/lib/${ECLIPSEARCH} |
[ ${ARCH} == 'amd64' ] && awt_lib_path=${JAVA_HOME}/jre/lib/amd64 |
|
| |
[ ${ARCH} == 'amd64' ] && swt_ptr_cflags=-DSWT_PTR_SIZE_64 | [ ${ARCH} == 'amd64' ] && swt_ptr_cflags=-DSWT_PTR_SIZE_64 |
| |