diff options
author | Joshua Nichols <nichoj@gentoo.org> | 2006-04-19 04:39:41 +0000 |
---|---|---|
committer | Joshua Nichols <nichoj@gentoo.org> | 2006-04-19 04:39:41 +0000 |
commit | b6a025c1db93ce461b0e929bc649e8a1e64588d7 (patch) | |
tree | c16600f04a67300f801235493af3e16909de89a9 /dev-util/eclipse-sdk | |
parent | Version bump (diff) | |
download | gentoo-2-b6a025c1db93ce461b0e929bc649e8a1e64588d7.tar.gz gentoo-2-b6a025c1db93ce461b0e929bc649e8a1e64588d7.tar.bz2 gentoo-2-b6a025c1db93ce461b0e929bc649e8a1e64588d7.zip |
Loads of cleanup. Now compiles against gecko-sdk.
(Portage version: 2.1_pre7-r4)
Diffstat (limited to 'dev-util/eclipse-sdk')
-rw-r--r-- | dev-util/eclipse-sdk/ChangeLog | 9 | ||||
-rw-r--r-- | dev-util/eclipse-sdk/Manifest | 22 | ||||
-rw-r--r-- | dev-util/eclipse-sdk/eclipse-sdk-3.1.2-r1.ebuild | 363 | ||||
-rw-r--r-- | dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1.2-r1 | 3 |
4 files changed, 383 insertions, 14 deletions
diff --git a/dev-util/eclipse-sdk/ChangeLog b/dev-util/eclipse-sdk/ChangeLog index b4cf1085f5d8..1a7e167486ec 100644 --- a/dev-util/eclipse-sdk/ChangeLog +++ b/dev-util/eclipse-sdk/ChangeLog @@ -1,6 +1,13 @@ # 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.102 2006/04/17 14:52:11 centic Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/eclipse-sdk/ChangeLog,v 1.103 2006/04/19 04:39:41 nichoj Exp $ + +*eclipse-sdk-3.1.2-r1 (18 Apr 2006) + + 18 Apr 2006; Joshua Nichols <nichoj@gentoo.org> + +eclipse-sdk-3.1.2-r1.ebuild: + Loads of cleanup. Now compiles against gecko-sdk, instead of firefox or + mozilla. *eclipse-sdk-3.1.2 (17 Apr 2006) diff --git a/dev-util/eclipse-sdk/Manifest b/dev-util/eclipse-sdk/Manifest index 14cf3e5cd807..b5cdcfd33598 100644 --- a/dev-util/eclipse-sdk/Manifest +++ b/dev-util/eclipse-sdk/Manifest @@ -1,9 +1,6 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -MD5 32817af2f02c26f8cd3993fe26e62531 ChangeLog 20172 -RMD160 59a5adc6d550f86c6f6e9430acdc60d49dc0aab9 ChangeLog 20172 -SHA256 e53b5760bbb7c2837321b3534ad1c71129ceb8078e7a0e01b045b939816999dc ChangeLog 20172 +MD5 5d8c7d59fe5d0dc683ca167c69666df6 ChangeLog 20377 +RMD160 e8a59b8f8aed0e4b752b7059dd56674d441934be ChangeLog 20377 +SHA256 a2a3104a4f7a91ec79c854181e641760b4723edf2ac32537bbbaa1092bfdfdf6 ChangeLog 20377 MD5 784f7f8fdf82be12bba512c56169050e eclipse-sdk-2.1.3-r5.ebuild 9905 RMD160 c4c052548ad75e997b2ecb6246773e4cdea6c925 eclipse-sdk-2.1.3-r5.ebuild 9905 SHA256 6357db93f7dfb6937db14f5a0f13ace7af42bc9ff2570b74f6f1688993c8c7b1 eclipse-sdk-2.1.3-r5.ebuild 9905 @@ -22,6 +19,9 @@ SHA256 e6fb525198e777c7d87893dd04b225b9cd7a92b5afb51ef41e0a6eed8f801a19 eclipse- MD5 e56bed895cd713529b60cb5dc49e4b0a eclipse-sdk-3.1.1.ebuild 10393 RMD160 9b5c6e089102ee34a8fb05a4a8164213065a195e eclipse-sdk-3.1.1.ebuild 10393 SHA256 6432c3d38373ad2f472b7a002312a3c64dcb24ab5a4a16dc85cdb39efaa50058 eclipse-sdk-3.1.1.ebuild 10393 +MD5 156332e5d01aa5b4c08732b2bcf9f441 eclipse-sdk-3.1.2-r1.ebuild 10572 +RMD160 cac83a64675a7fe1807380379886d2725970cfb7 eclipse-sdk-3.1.2-r1.ebuild 10572 +SHA256 03839cfdc49f1d60a7eb68fd2b9903dac8e81b17d9b37d3c87544f163bc2d484 eclipse-sdk-3.1.2-r1.ebuild 10572 MD5 55d2870f781ab6eb8450d6ef2b4bebd9 eclipse-sdk-3.1.2.ebuild 10395 RMD160 c268daf205090c9fcc8147289b1ca37df430a68c eclipse-sdk-3.1.2.ebuild 10395 SHA256 1ce0bb9597635551f293d9175bdea4a26877cf2ddfeba730408ed52ffd50e860 eclipse-sdk-3.1.2.ebuild 10395 @@ -67,6 +67,9 @@ SHA256 8c5f1687cc5701180e20605b6672f79a2a1d3b9d6800a63f28b02b26e5e39346 files/di MD5 0dd05cebf3928888ff566c433da96335 files/digest-eclipse-sdk-3.1.2 310 RMD160 dea902b88d52673c42f034ab9451e145bc52b30c files/digest-eclipse-sdk-3.1.2 310 SHA256 01187ce1cad8c9037d48c130cd9d98167d7c934e075d42c7c55f3adae8105749 files/digest-eclipse-sdk-3.1.2 310 +MD5 0dd05cebf3928888ff566c433da96335 files/digest-eclipse-sdk-3.1.2-r1 310 +RMD160 dea902b88d52673c42f034ab9451e145bc52b30c files/digest-eclipse-sdk-3.1.2-r1 310 +SHA256 01187ce1cad8c9037d48c130cd9d98167d7c934e075d42c7c55f3adae8105749 files/digest-eclipse-sdk-3.1.2-r1 310 MD5 de999f62aa03505bfd16a01f7e1a28a3 files/eclipse-2 956 RMD160 0045f44e9e47f4e3b80535c3a25de590c7ab92e2 files/eclipse-2 956 SHA256 a842d3ee3f135d695e659811598340bc2b3b42222d44bf3d2155c9c59ac4e778 files/eclipse-2 956 @@ -94,10 +97,3 @@ SHA256 5165b07f736763eab05decb39397be0be8ae03b77f614ba3794eff71d411537b files/ec MD5 8de14dda7d318d8fb514fdbcecd4058b metadata.xml 782 RMD160 5b8dc4f4b6bdd457da62f967ec176bee2ae7e5e4 metadata.xml 782 SHA256 a1e6bbc5427799b8607d355e3e09ce7d4de98f2a365417ec158eb56f4f00746f metadata.xml 782 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.2.2 (GNU/Linux) - -iD8DBQFEQ6u47IRIh26aCTkRAmiUAJ4jXCz85iN47IIKBqxAEJpLw5zzBwCgk7UM -fdqwi/yzWuzKfzpW7EsWRbo= -=N8/n ------END PGP SIGNATURE----- diff --git a/dev-util/eclipse-sdk/eclipse-sdk-3.1.2-r1.ebuild b/dev-util/eclipse-sdk/eclipse-sdk-3.1.2-r1.ebuild new file mode 100644 index 000000000000..b394b1b6ad75 --- /dev/null +++ b/dev-util/eclipse-sdk/eclipse-sdk-3.1.2-r1.ebuild @@ -0,0 +1,363 @@ +# 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.1.2-r1.ebuild,v 1.1 2006/04/19 04:39:41 nichoj Exp $ + +inherit eutils java-utils flag-o-matic check-reqs + +MY_A="eclipse-sourceBuild-srcIncluded-${PV}.zip" +RELEASE_DATE="200601181600" +DESCRIPTION="Eclipse Tools Platform" +HOMEPAGE="http://www.eclipse.org/" +SRC_URI="http://download.eclipse.org/eclipse/downloads/drops/R-${PV}-${RELEASE_DATE}/${MY_A}" +IUSE="gecko-sdk gnome jikes source doc atk" +SLOT="3.1" +LICENSE="CPL-1.0" +KEYWORDS="~x86 ~ppc ~amd64" +S="${WORKDIR}" + +RDEPEND=">=virtual/jre-1.4.2 + >=x11-libs/gtk+-2.2.4 + gecko-sdk? ( net-libs/gecko-sdk ) + atk? ( >=dev-libs/atk-1.6 ) + gnome? ( =gnome-base/gnome-vfs-2* =gnome-base/libgnomeui-2* )" + +DEPEND="${RDEPEND} + >=virtual/jdk-1.4.2 + jikes? ( >=dev-java/jikes-1.21 ) + >=dev-java/ant-1.6.2 + >=dev-java/ant-core-1.6.2-r4 + >=sys-apps/findutils-4.1.7 + app-arch/unzip + app-arch/zip" + +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 +# -use make_desktop_entry from eutils instead of our own stuff + +pkg_setup() { + debug-print "Checking for sufficient physical RAM" + CHECKREQS_MEMORY="768" + check_reqs + + debug-print "Checking for bad CFLAGS" + check-cflags + + # Make sure our vm is sane + java-utils_setup-vm + java-utils_ensure-vm-version-ge 1 4 2 + + # All other gentoo archs match in eclipse build system except amd64 + if use amd64 ; then + eclipsearch=x86_64 + else + eclipsearch=${ARCH} + fi + + # All other gentoo archs match in sun jdk library patch except x86 + if use x86 ; then + jvmarch=i386 + else + jvmarch=${ARCH} + fi + + # eventually, we'll have a plugin directory that's user writable, as group + # 'eclipse' -nichoj + + # Add the eclipse group, for our plugin directories + #enewgroup eclipse +} + +src_unpack() { + unpack ${A} + + # TODO figure out what this does -nichoj + epatch ${FILESDIR}/06-path-fixups.patch + + einfo "Setting up virtual machine" + java-utils_setup-vm + + einfo "Cleaning out prebuilt code" + clean-prebuilt-code + + einfo "Patching makefiles" + fix_makefiles + fix_amd64_ibm_jvm +} + +src_compile() { + # karltk: this should be handled by the java-pkg eclass in setup-vm + addwrite "/proc/self/maps" + addwrite "/proc/cpuinfo" + addwrite "/dev/random" + + # Figure out VM, set up ant classpath and native library paths + setup-jvm-opts + + if use gecko-sdk ; then + einfo "Will compile embedded Mozilla support against net-libs/gecko-sdk" + setup-mozilla-opts + else + einfo "Not building embedded Mozilla support" + fi + + use jikes && bootstrap_ant_opts="-Dbuild.compiler=jikes" + + debug-print "Bootstrapping bootstrap ecj" + ant ${bootstrap_ant_opts} -q -f jdtcoresrc/compilejdtcorewithjavac.xml || die "Failed to bootstrap ecj" + + debug-print "Bootstrapping ecj" + ant -lib jdtcoresrc/ecj.jar -q -f jdtcoresrc/compilejdtcore.xml || die "Failed to bootstrap ecj" + + debug-print "Compiling Eclipse -- see ${S}/compilelog.txt for details" + ANT_OPTS="-Xmx1024M" \ + ant -lib jdtcoresrc/ecj.jar -q -f build.xml \ + -DinstallOs=linux \ + -DinstallWs=gtk \ + -DinstallArch=${eclipsearch} \ + -Dbootclasspath=${bootclasspath} \ + -Dlibsconfig=true \ + -DjavacTarget=1.4 \ + -DjavacSource=1.4 \ + -DjavacVerbose=false \ + -DjavacFailOnError=true \ + -DjavacDebugInfo=true \ + -DbuildId="Gentoo Linux ${PF}" \ + || die "Failed to compile Eclipse" + + cp launchertmp/eclipse eclipse-gtk || die "Cannot find eclipse binary" + + # TODO use make_desktop_entry from eutils during src_install instead -nichoj + create-desktop-entry +} + +src_install() { + dodir /usr/lib + + debug-print "Installing features and plugins" + + [ -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} + + debug-print "Installing eclipse-gtk binary" + doexe eclipse-gtk || die "Failed to install eclipse binary" + # need to rename inf file to eclipse-gtk.ini, see bug #128128 + + if use "!source" ; then + debug-print "Removing source code" + strip-src + fi + + if use "!doc" ; then + debug-print "Removing documentation" + strip-docs + fi + + # Install startup script + exeinto /usr/bin + doexe ${FILESDIR}/eclipse-${SLOT} + + install-desktop-entry + + doman ${FILESDIR}/eclipse.1 + + install-link-files + + # eventually, we'll have a user writable extension location -nichoj + # TODO make g+w + #dodir /var/lib/eclipse-${SLOT} + #touch ${D}/var/lib/eclipse-${SLOT}/.eclipseextension + #fowners root:eclipse /var/lib/eclipse-${SLOT} + +} + +# ----------------------------------------------------------------------------- +# Helper functions +# ----------------------------------------------------------------------------- + +fix_makefiles() { + # Comment out hard-coded JAVA_HOME + sed -i 's/^JAVA_HOME/#JAVA_HOME/' plugins/org.eclipse.core.resources.linux/src/Makefile || die "Failed to patch Makefile" + + # Select the set of native libraries to compile + local libs="make_swt make_awt make_atk" + + if use gnome ; then + einfo "Building GNOME VFS support" + libs="${libs} make_gnome" + fi + + if use gecko-sdk ; then + einfo "Building Mozilla embed support" + libs="${libs} make_mozilla" + fi + + if use atk ; then + einfo "Building ATK support" + libs="${libs} make_atk" + fi + + sed -i "s/^all:.*/all: ${libs}/" "plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak" || die "Failed to patch make_linux.mak" +} + +fix_amd64_ibm_jvm() { + # the ibm jdk ebuild should have fixed headers, but until then + # we just fix the compiling here (see bug #97421) + if use 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 +} + + +clean-prebuilt-code() { + find ${S} -type f \( -name '*.class' -o -name '*.so' -o -name '*.so.*' -o -name 'eclipse' \) | xargs rm -f +} + +check-cflags() { + local badflags="-fomit-frame-pointer -msse2" + local error=false + local flag + + for flag in ${badflags} ; do + if is-flag ${flag}; then + ewarn "Found offending option ${flag} in your CFLAGS" + error=true + fi + done + if [ ${error} == "true" ]; then + echo + ewarn "One or more potentially gruesome CFLAGS detected. When you run into trouble," + ewarn "please edit /etc/make.conf and remove all offending flags, then recompile" + ewarn "Eclipse and all its dependencies before submitting a bug report." + echo + ewarn "In particular, gtk+ is extremely sensitive to which which flags it was" + ewarn "compiled with." + echo + einfo "Tip: use equery depgraph \"=${PF}\" to list all dependencies." + echo + ebeep + fi +} + +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 JDK + 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 JDKs (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} +} + +setup-mozilla-opts() { + mozilla_dir="--mozdir-unset---" + + if [ -f ${ROOT}/usr/lib/gecko-sdk/lib/libgtkembedmoz.so ] ; then + mozilla_dir=/usr/lib/gecko-sdk + else + # TODO need to update this appropriately for gecko-sdk + eerror "You have enabled the embedded mozilla component, but no suitable" + eerror "provider was found. You need gecko-sdk compiled against" + eerror "gtk+ v2.0 or newer." + eerror "To merge it, execute 'USE=\"gtk2\" emerge mozilla' as root." + eerror "To disable embedded mozilla, remove \"mozilla\" from your USE flags." + die "Need Mozilla compiled with gtk+-2.x support" + fi + + export GECKO_SDK="${mozilla_dir}" + # TODO should this be using pkg-config? + export GECKO_INCLUDES="-include ${GECKO_SDK}/include/mozilla-config.h \ + -I${GECKO_SDK}/include/nspr \ + -I${GECKO_SDK}/include/nspr \ + -I${GECKO_SDK}/include/xpcom \ + -I${GECKO_SDK}/include/string \ + -I${GECKO_SDK}/include/embed_base \ + -I${JAVA_HOME}/include/linux" + export GECKO_LIBS="-L${GECKO_SDK}/lib -lgtkembedmoz" +} + +build-native() { + sh features/org.eclipse.platform.launchers/library/gtk/build.sh \ + -os linux -ws gtk \ + -arch ${eclipsearch} || die "Failed to build launcher" +} +create-desktop-entry() { + sed -e "s/@PV@/${PV}/" ${FILESDIR}/eclipse-${SLOT}.desktop \ + > eclipse-${SLOT}.desktop || die "Failed to create desktop entry" +} + +install-desktop-entry() { + dodir /usr/share/applications + insinto /usr/share/applications + doins eclipse-${SLOT}.desktop +} + +install_link_file() { + local path=${1} + local file=${2} + + echo "path=${path}" > "${D}/${ECLIPSE_LINKS_DIR}/${file}" +} + +install-link-files() { + einfo "Installing link files" + + dodir ${ECLIPSE_LINKS_DIR} + install_link_file /opt/eclipse-extensions-3 eclipse-binary-extensions-3.link + install_link_file /opt/eclipse-extensions-3.1 eclipse-binary-extensions-3.1.link + + install_link_file /usr/lib/eclipse-extensions-3 eclipse-extensions-3.link + install_link_file /usr/lib/eclipse-extensions-3.1 eclipse-extensions-3.1.link + +# install_link_file /var/lib/eclipse-3 eclipse-var-3.link +# install_link_file /var/lib/eclipse-3.1 eclipse-var-3.1.link +} + +strip-src() { + local bp=${D}/${ECLIPSE_DIR} + + rm -rf ${bp}/plugins/org.eclipse.pde.source_3* \ + ${bp}/plugins/org.eclipse.jdt.source_3* \ + ${bp}/plugins/org.eclipse.platform.source.linux.* \ + ${bp}/plugins/org.eclipse.platform.source_3* \ + ${bp}/features/org.eclipse.jdt.source_3* \ + ${bp}/features/org.eclipse.pde.source_3* \ + ${bp}/features/org.eclipse.platform.source_3* +} + +strip-docs() { + local bp=${D}/${ECLIPSE_DIR} + + rm -rf ${bp}/plugins/org.eclipse.platform.doc.* \ + ${bp}/plugins/org.eclipse.jdt.doc.* \ + ${bp}/plugins/org.eclipse.pde.doc.* +} diff --git a/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1.2-r1 b/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1.2-r1 new file mode 100644 index 000000000000..f22ddffd2fd5 --- /dev/null +++ b/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1.2-r1 @@ -0,0 +1,3 @@ +MD5 f2c8066151de14c5ccdf420266ce9f39 eclipse-sourceBuild-srcIncluded-3.1.2.zip 66630673 +RMD160 ffe59352fe02b4a47be3e9a6daad3a5501f196b0 eclipse-sourceBuild-srcIncluded-3.1.2.zip 66630673 +SHA256 31233332f205a197a42aafdc4f15a4f38eb5e4be19ac8a7192492ab8a21324a4 eclipse-sourceBuild-srcIncluded-3.1.2.zip 66630673 |