# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /share/cvs/otherone/portage/dev-util/eclipse-sdk/eclipse-sdk-3.1.ebuild,v 1.11 2005/06/30 14:28:14 mokki Exp $ inherit eutils java-utils MY_A="eclipse-sourceBuild-srcIncluded-3.1.zip" DESCRIPTION="Eclipse Tools Platform" HOMEPAGE="http://www.eclipse.org/" SRC_URI="http://download.eclipse.org/eclipse/downloads/drops/R-3.1-200506271435/${MY_A}" IUSE="gnome mozilla firefox cairo gcj src doc atk" SLOT="3.1" LICENSE="CPL-1.0" KEYWORDS="x86 ~ppc amd64" RDEPEND=" >=virtual/jdk-1.4.2 >=x11-libs/gtk+-2.2.4 mozilla? ( >=www-client/mozilla-1.7 ) atk? ( >=dev-libs/atk-1.6 ) firefox? ( >=www-client/mozilla-firefox-1.0.2 ) gcj? ( >=sys-devel/gcc-4.0.0_beta20050305 ) cairo? ( >=x11-libs/cairo-0.3.0-r2 eclipse-${SLOT}.desktop || die "Failed to create desktop entry" } function install-desktop-entry() { dodir /usr/share/applications insinto /usr/share/applications doins eclipse-${SLOT}.desktop } function clean-prebuilt-code() { find ${S} -type f \( -name '*.class' -o -name '*.so' -o -name '*.so.*' -o -name 'eclipse' \) -delete } function get-memory-total() { cat /proc/meminfo | grep MemTotal | sed -r "s/[^0-9]*([0-9]+).*/\1/" } function check-ram() { local mem=$(get-memory-total) [ $(get-memory-total) -lt 775000 ] && ( echo ewarn "To build Eclipse, at least 768MB of RAM is recommended." ewarn "Your machine has less RAM. Continuing anyway." echo ) } function install-link-files() { einfo "Installing link files" dodir /usr/lib/eclipse-${SLOT}/links echo "path=/opt/eclipse-extensions-3" > ${D}/${eclipse_dir}/links/eclipse-binary-extensions-3.link echo "path=/opt/eclipse-extensions-3.1" > ${D}/${eclipse_dir}/links/eclipse-binary-extensions-3.1.link echo "path=/usr/lib/eclipse-extensions-3" > ${D}/${eclipse_dir}/links/eclipse-extensions-3.link echo "path=/usr/lib/eclipse-extensions-3.1" > ${D}/${eclipse_dir}/links/eclipse-extensions-3.1.link } function patch_amd64_ibm_jvm() { # the ibm jdk ebuild should have fixed headers, but until then # we just fix the compiling here (see bug #97421) if [ ${ARCH} == 'amd64' ]; then if [ ! -z "`java-config --java-version | grep IBM`" ] ; then einfo "Fixing IBM jdk header problem" find plugins -name "make_linux.mak" -print0 | xargs -0 sed -i -e 's/^CFLAGS =/CFLAGS = -D_JNI_IMPORT_OR_EXPORT_= /' fi fi } function setup-jvm-opts() { # Figure out correct boot classpath # karltk: this should be handled by the java-pkg eclass in setup-vm if [ ! -z "`java-config --java-version | grep IBM`" ] ; then # IBM JRE local bp="$(java-config --jdk-home)/jre/lib" bootclasspath="${bp}/core.jar:${bp}/xml.jar:${bp}/graphics.jar:${bp}/security.jar:${bp}/server.jar" JAVA_LIB_DIR="$(java-config --jdk-home)/jre/bin" else # Sun derived JREs (Blackdown, Sun) local bp="$(java-config --jdk-home)/jre/lib" bootclasspath="${bp}/rt.jar:${bp}/jsse.jar" JAVA_LIB_DIR="$(java-config --jdk-home)/jre/lib/${jvmarch}" fi einfo "Using bootclasspath ${bootclasspath}" einfo "Using JVM library path ${JAVA_LIB_DIR}" if [ ! -f ${JAVA_LIB_DIR}/libawt.so ] ; then die "Could not find libawt.so native library" fi export AWT_LIB_PATH=${JAVA_LIB_DIR} } function strip-src() { local bp=${D}/${eclipse_dir} rm -rf ${bp}/plugins/org.eclipse.pde.source_3* rm -rf ${bp}/plugins/org.eclipse.jdt.source_3* rm -rf ${bp}/plugins/org.eclipse.platform.source.linux.* rm -rf ${bp}/plugins/org.eclipse.platform.source_3* rm -rf ${bp}/features/org.eclipse.jdt.source_3*/ rm -rf ${bp}/features/org.eclipse.pde.source_3*/ rm -rf ${bp}/features/org.eclipse.platform.source_3*/ } function strip-docs() { local bp=${D}/${eclipse_dir} rm -rf ${bp}/plugins/org.eclipse.platform.doc.* rm -rf ${bp}/plugins/org.eclipse.jdt.doc.* rm -rf ${bp}/plugins/org.eclipse.pde.doc.* } function recompile-with-gcj() { :; }