diff options
author | Joshua Nichols <nichoj@gentoo.org> | 2006-07-04 18:04:25 +0000 |
---|---|---|
committer | Joshua Nichols <nichoj@gentoo.org> | 2006-07-04 18:04:25 +0000 |
commit | a77525e3685262197c9064b2b40f1c7952c5e4ce (patch) | |
tree | 66668806597b7dc82d8f24106617ff3c86ab77e6 /dev-util/eclipse-sdk | |
parent | Updating eclipse-sdk use flags (diff) | |
download | gentoo-2-a77525e3685262197c9064b2b40f1c7952c5e4ce.tar.gz gentoo-2-a77525e3685262197c9064b2b40f1c7952c5e4ce.tar.bz2 gentoo-2-a77525e3685262197c9064b2b40f1c7952c5e4ce.zip |
Version bump. Uses seamonkey instead of gecko-sdk. bug #112537
(Portage version: 2.1.1_pre1)
Diffstat (limited to 'dev-util/eclipse-sdk')
-rw-r--r-- | dev-util/eclipse-sdk/ChangeLog | 8 | ||||
-rw-r--r-- | dev-util/eclipse-sdk/eclipse-sdk-3.2_rc7-r1.ebuild | 306 | ||||
-rw-r--r-- | dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.2_rc7-r1 | 6 | ||||
-rw-r--r-- | dev-util/eclipse-sdk/files/eclipse-3.2 | 36 |
4 files changed, 355 insertions, 1 deletions
diff --git a/dev-util/eclipse-sdk/ChangeLog b/dev-util/eclipse-sdk/ChangeLog index c8e849ceb034..98464920c093 100644 --- a/dev-util/eclipse-sdk/ChangeLog +++ b/dev-util/eclipse-sdk/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-util/eclipse-sdk # Copyright 2003-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/eclipse-sdk/ChangeLog,v 1.106 2006/07/03 10:54:06 betelgeuse Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/eclipse-sdk/ChangeLog,v 1.107 2006/07/04 18:04:24 nichoj Exp $ + +*eclipse-sdk-3.2_rc7-r1 (04 Jul 2006) + + 04 Jul 2006; Joshua Nichols <nichoj@gentoo.org> +files/eclipse-3.2, + +eclipse-sdk-3.2_rc7-r1.ebuild: + Version bump. Uses seamonkey instead of gecko-sdk. bug #112537 03 Jul 2006; Petteri Räty <betelgeuse@gentoo.org> -files/01-distribute_ant_target-2.1.patch, diff --git a/dev-util/eclipse-sdk/eclipse-sdk-3.2_rc7-r1.ebuild b/dev-util/eclipse-sdk/eclipse-sdk-3.2_rc7-r1.ebuild new file mode 100644 index 000000000000..7f4f0811a955 --- /dev/null +++ b/dev-util/eclipse-sdk/eclipse-sdk-3.2_rc7-r1.ebuild @@ -0,0 +1,306 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/eclipse-sdk/eclipse-sdk-3.2_rc7-r1.ebuild,v 1.1 2006/07/04 18:04:24 nichoj Exp $ + +inherit eutils java-pkg-2 flag-o-matic check-reqs multilib + +MY_PV=${PV/_rc/RC} +DATESTAMP=200606021317 +MY_A="eclipse-sourceBuild-srcIncluded-${MY_PV}.zip" +DESCRIPTION="Eclipse Tools Platform" +HOMEPAGE="http://www.eclipse.org/" +#SRC_URI="http://ftp.osuosl.org/pub/eclipse/eclipse/downloads/drops/S-${MY_PV}-${DATESTAMP}/${MY_A}" +SRC_URI="http://download.eclipse.org/eclipse/downloads/drops/S-${MY_PV}-${DATESTAMP}/${MY_A} +mirror://gentoo/${P}-patches.tar.bz2" +IUSE="no-seamonkey gnome cairo opengl" +SLOT="3.2" +LICENSE="EPL-1.0" +# TODO might be able to have ia64 and ppc64 support +KEYWORDS="~x86 ~ppc ~amd64" +S="${WORKDIR}" + +COMMON_DEP=" + >=x11-libs/gtk+-2.2.4 + !no-seamonkey? ( www-client/seamonkey ) + gnome? ( =gnome-base/gnome-vfs-2* =gnome-base/libgnomeui-2* ) + opengl? ( virtual/opengl ) + >=dev-java/ant-core-1.6.5 + >=dev-java/ant-tasks-1.6.5 + =dev-java/lucene-1*" + +RDEPEND=">=virtual/jre-1.4 + ${COMMON_DEP}" +DEPEND=" + ${COMMON_DEP} + =virtual/jdk-1.4* + >=virtual/jdk-1.5 + >=sys-apps/findutils-4.1.7 + app-arch/unzip + app-arch/zip" +# Force 1.4 to be used for building +JAVA_PKG_NV_DEPEND="=virtual/jdk-1.4*" + +ECLIPSE_DIR="/usr/lib/eclipse-${SLOT}" +ECLIPSE_LINKS_DIR="${ECLIPSE_DIR}/links" + +# TODO: +# - use CFLAGS from make.conf when building native libraries +# - must patch eclipse build files +# - also submit patch to bugs.eclipse.org +# - ppc support not tested, but not explicitly broken either +# - make a extension location in /var/lib that's writable by 'eclipse' group +# - update man page + +pkg_setup() { + java-pkg-2_pkg_setup + + debug-print "Checking for sufficient physical RAM" + CHECKREQS_MEMORY="768" + check_reqs + + # All other gentoo archs match in eclipse build system except amd64 + if use amd64 ; then + eclipsearch=x86_64 + else + eclipsearch=${ARCH} + fi + + if use x86 ; then + jvmarch=i386 + else + jvmarch=${ARCH} + fi + + # Add the eclipse group, for our plugins/features directories + enewgroup eclipse +} + +src_unpack() { + unpack ${A} + + fix-swt-targets + + pushd plugins/org.apache.ant/lib >/dev/null + rm *.jar + java-pkg_jar-from ant-core,ant-tasks + popd >/dev/null + + pushd plugins/org.junit >/dev/null + rm *.jar + java-pkg_jar-from junit + popd >/dev/null + + pushd plugins/org.apache.lucene >/dev/null + rm *.jar + java-pkg_jar-from lucene-1 lucene.jar lucene-1.4.3.jar + popd >/dev/null + + # TODO replace stuff in plugins/org.eclipse.team.cvs.ssh2 + # TODO replace stuff in plugins/org.eclipse.tomcat + # TODO replace stuff in plugins/org.junit4 + + # begin: patches/comments from fedora + + # Build JNI libs + # FIXME: these should be built by upstream build method + # http://www.bagu.org/eclipse/plugin-source-drops.html + # https://bugs.eclipse.org/bugs/show_bug.cgi?id=71637 + # https://bugs.eclipse.org/bugs/show_bug.cgi?id=86848 + # GNU XML issue identified by Michael Koch + # patches 2, 4, 5 + epatch ${WORKDIR}/${P}-build.patch + epatch ${WORKDIR}/${P}-libupdatebuild.patch + epatch ${WORKDIR}/${P}-libupdatebuild2.patch + + # Build swttools.jar + # https://bugs.eclipse.org/bugs/show_bug.cgi?id=90364 + pushd plugins/org.eclipse.swt.gtk.linux.x86_64 >/dev/null + epatch ${WORKDIR}/${P}-swttools.patch # patch18 + popd >/dev/null + + # install location should automatically be added to homedir + # if ECLIPSE_HOME is not writable + # https://bugs.eclipse.org/bugs/show_bug.cgi?id=90630 + epatch ${WORKDIR}/${P}-updatehomedir.patch # patch22 + + # .so files installed in a strange location + # https://bugs.eclipse.org/bugs/show_bug.cgi?id=90535 + pushd plugins/org.eclipse.core.runtime >/dev/null + epatch ${WORKDIR}/${P}-fileinitializer.patch # patch24 + popd >/dev/null + + # https://bugs.eclipse.org/bugs/show_bug.cgi?id=98707 + # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=178726 +# TODO figure out why this doesn't apply +# pushd plugins/org.eclipse.compare >/dev/null +# epatch ${WORKDIR}/${P}-compare-create-api.patch # patch 33 +# popd >/dev/null + + # JPackage []s in names of symlinks ... + # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=162177 + pushd plugins/org.eclipse.jdt.core >/dev/null + epatch ${WORKDIR}/${P}-bz162177.patch # patch34 + popd >/dev/null + + epatch ${WORKDIR}/${P}-genjavadocoutput.patch # patch35 + + # buildHelpIndex caused a OutOfMemoryException + # https://bugs.eclipse.org/bugs/show_bug.cgi?id=114001 + epatch ${WORKDIR}/${P}-helpindexbuilder.patch # patch38 + + epatch ${WORKDIR}/${P}-usebuiltlauncher.patch # patch40 + + # Eclipse launcher does not follow symlinks + # https://bugs.eclipse.org/bugs/show_bug.cgi?id=79592 + # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=168726 + mkdir launchertmp + unzip -d launchertmp \ + plugins/org.eclipse.platform/launchersrc.zip >/dev/null || die "unzip failed" + pushd launchertmp >/dev/null + epatch ${WORKDIR}/${P}-launcher-link.patch # patch47 + zip -9 -r ../launchersrc.zip * >/dev/null || die "zip failed" + popd >/dev/null + mv launchersrc.zip plugins/org.eclipse.platform + rm -rf launchertmp + + pushd features/org.eclipse.platform.launchers >/dev/null + epatch ${WORKDIR}/${P}-launcher-link.patch # patch47 + popd >/dev/null + + # Don't attempt to link to Sun's javadocs + epatch ${WORKDIR}/${P}-javadoclinks.patch # patch48 + + # generic releng plugins that can be used to build plugins + # see this thread for deails: + # https://www.redhat.com/archives/fedora-devel-java-list/2006-April/msg00048.html + pushd plugins/org.eclipse.pde.build >/dev/null + epatch ${WORKDIR}/${P}-pde.build-add-package-build.patch # patch53 + sed --in-place "s:@eclipse_base@:${ECLIPSE_DIR}:" templates/package-build/build.properties + popd >/dev/null + + # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=191536 + # https://bugs.eclipse.org/bugs/show_bug.cgi?id=142861 + pushd plugins/org.eclipse.swt/Eclipse\ SWT >/dev/null + epatch ${WORKDIR}/${P}-swt-rm-ON_TOP.patch # patch54 + popd >/dev/null + + # We need to disable junit4 and apt until GCJ can handle Java5 code + # FIXME for some reason junit isn't using java5... + epatch ${WORKDIR}/${P}-disable-junit4-apt.patch # patch55 +} + +src_compile() { + # Figure out VM, set up ant classpath and native library paths + setup-jvm-opts + + if ! use no-seamonkey ; then + einfo "Will compile embedded seamonkey support against www-client/seamonkey" + setup-mozilla-opts + else + einfo "Not building embedded seamonkey support" + fi + + local java5vm=$(depend-java-query --get-vm ">=virtual/jdk-1.5") + local java5home=$(GENTOO_VM=${java5vm} java-config --jdk-home) + einfo "Using ${java5home} for java5home" + # TODO patch build to take buildId + ./build -os linux \ + -arch ${eclipsearch} \ + -ws gtk \ + -java5home ${java5home} || die "build failed" +} + +src_install() { + dodir /usr/lib + + # TODO maybe there's a better way of installing than extracting the tar? + [[ -f result/linux-gtk-${eclipsearch}-sdk.tar.gz ]] || die "tar.gz bundle was not built properly!" + tar zxf result/linux-gtk-${eclipsearch}-sdk.tar.gz -C ${D}/usr/lib \ + || die "Failed to extract the built package" + + mv ${D}/usr/lib/eclipse ${D}/${ECLIPSE_DIR} + insinto ${ECLIPSE_DIR} + exeinto ${ECLIPSE_DIR} + echo "-Djava.library.path=/usr/lib" >> ${D}/${ECLIPSE_DIR}/eclipse.ini + + debug-print "Installing eclipse-gtk binary" + doexe eclipse || die "Failed to install eclipse binary" + + # Install startup script + exeinto /usr/bin + doexe ${FILESDIR}/eclipse-${SLOT} + + make_desktop_entry eclipse-${SLOT} "Eclipse ${PV}" "${ECLIPSE_DIR}/icon.xpm" +} + +# ----------------------------------------------------------------------------- +# Helper functions +# ----------------------------------------------------------------------------- + +fix-swt-targets() { + # Select the set of native libraries to compile + local targets="make_swt make_awt make_atk" + + if use gnome ; then + einfo "Enabling GNOME VFS support" + targets="${targets} make_gnome" + fi + + if ! use no-seamonkey ; then + einfo "Enabling embedded Mozilla support" + targets="${targets} make_mozilla" + fi + + if use cairo ; then + einfo "Enabling CAIRO support" + targets="${targets} make_cairo" + fi + + if use opengl ; then + einfo "Enabling OpenGL support" + targets="${targets} make_glx" + fi + + sed -i "s/^all:.*/all: ${targets}/" \ + "plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak" \ + || die "Failed to tweak make_linux.mak" +} + +setup-jvm-opts() { + # Figure out correct boot classpath + # karltk: this should be handled by the java-pkg eclass in setup-vm + local bp="$(java-config --jdk-home)/jre/lib" + local bootclasspath=$(java-config --runtime) + if [[ ! -z "`java-config --java-version | grep IBM`" ]] ; then + # IBM JDK + JAVA_LIB_DIR="$(java-config --jdk-home)/jre/bin" + else + # Sun derived JDKs (Blackdown, Sun) + 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} +} + +setup-mozilla-opts() { + export GECKO_SDK="/usr/$(get_libdir)/seamonkey" + # TODO should this be using pkg-config? + export GECKO_INCLUDES=$(pkg-config seamonkey-gtkmozembed --cflags) + export GECKO_LIBS=$(pkg-config seamonkey-gtkmozembed --libs) +} + +pkg_postinst() { + einfo "Users can now install plugins via Update Manager without any" + einfo "tweaking." + echo + einfo "Eclipse plugin packages (ie eclipse-cdt) will likely go away in" + einfo "the near future until they can be properly packaged. Update Manager" + einfo "is prefered in the meantime." +} diff --git a/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.2_rc7-r1 b/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.2_rc7-r1 new file mode 100644 index 000000000000..6650416262f5 --- /dev/null +++ b/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.2_rc7-r1 @@ -0,0 +1,6 @@ +MD5 d5f9df81a83b9844c1a7ffeafb6c48d9 eclipse-sdk-3.2_rc7-patches.tar.bz2 24935 +RMD160 88423e6e04eda1b5d1d87ffded8c91f2034c45ad eclipse-sdk-3.2_rc7-patches.tar.bz2 24935 +SHA256 7c204cef97110f8018fd13212ddf48f915bed7fea7b95e11b40ff1e8a4c528d8 eclipse-sdk-3.2_rc7-patches.tar.bz2 24935 +MD5 9fa62b56c209713a32296f3ac65cf1d0 eclipse-sourceBuild-srcIncluded-3.2RC7.zip 82030272 +RMD160 1e7e6107f791d023dc9c2a6ba8c1f3d6d0cfaf80 eclipse-sourceBuild-srcIncluded-3.2RC7.zip 82030272 +SHA256 fbf6956fef7223e770e8362d7d388a99a9ff209f3c9ec6e0143d70c38a99ef1c eclipse-sourceBuild-srcIncluded-3.2RC7.zip 82030272 diff --git a/dev-util/eclipse-sdk/files/eclipse-3.2 b/dev-util/eclipse-sdk/files/eclipse-3.2 new file mode 100644 index 000000000000..b8dfc7b0c6b5 --- /dev/null +++ b/dev-util/eclipse-sdk/files/eclipse-3.2 @@ -0,0 +1,36 @@ +#! /bin/bash +# +# Tiny startup wrapper for the Eclipse 3.2.x series +# +# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org> +# Copyright (c) 2004, Gentoo Foundation +# +# Licensed under the GNU General Public License, version 2 +# + +[[ -f $HOME/.eclipserc ]] && $HOME/.eclipserc + +ECLIPSE_HOME=${ECLIPSE_HOME:="/usr/lib/eclipse-3.2"} +ECLIPSE_BIN="${ECLIPSE_HOME}/eclipse" + +if [ ! -x ${ECLIPSE_BIN} ] ; then + echo "Failed to find executable '${ECLIPSE_BIN}'" > /dev/stderr + exit -1 +fi + +if [ $(whoami) == "root" ] ; then + echo "!!! You are running Eclipse as root. Be advised that this will modify the contents of" + echo "!!! /usr/lib/eclipse-3.2, and that such a modification may prevent you from safely" + echo "!!! upgrading to later 3.2 revisions." + echo + echo "!!! To ensure correct behavior on your next upgrade, do:" + echo "!!! 1) 'emerge unmerge \"=eclipse-sdk-3.2\"'" + echo "!!! 2) 'rm -rf /usr/lib/eclipse-3.2'" + echo "!!! 3) 'emerge eclipse-sdk'" +fi + +if [[ -d /usr/lib/gecko-sdk/lib/ ]] && [[ -f /usr/lib/gecko-sdk/lib/libgtkembedmoz.so ]] ; then + export MOZILLA_FIVE_HOME="/usr/lib/gecko-sdk/lib/" +fi + +exec ${ECLIPSE_BIN} "$@" |