diff options
author | 2005-07-03 17:52:49 +0000 | |
---|---|---|
committer | 2005-07-03 17:52:49 +0000 | |
commit | 72ff2be37750a8159c859a63fdee10f77a3196c1 (patch) | |
tree | 98e039dc1652f670663d0cf458741cbdf258c04b | |
parent | New upstream release. Tentatively fixes #97347. (diff) | |
download | historical-72ff2be37750a8159c859a63fdee10f77a3196c1.tar.gz historical-72ff2be37750a8159c859a63fdee10f77a3196c1.tar.bz2 historical-72ff2be37750a8159c859a63fdee10f77a3196c1.zip |
Removed outdated ebuilds.
Package-Manager: portage-2.0.51.19
22 files changed, 10 insertions, 4740 deletions
diff --git a/dev-util/eclipse-sdk/ChangeLog b/dev-util/eclipse-sdk/ChangeLog index 471770aab151..9921aa12ed26 100644 --- a/dev-util/eclipse-sdk/ChangeLog +++ b/dev-util/eclipse-sdk/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for dev-util/eclipse-sdk # Copyright 2003-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/eclipse-sdk/ChangeLog,v 1.94 2005/07/03 17:48:17 karltk Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/eclipse-sdk/ChangeLog,v 1.95 2005/07/03 17:52:49 karltk Exp $ + + 03 Jul 2005; Karl Trygve Kalleberg <karltk@gentoo.org> + -eclipse-sdk-3.0.1.ebuild, -eclipse-sdk-3.0.1-r1.ebuild, + -eclipse-sdk-3.1_pre1.ebuild, -eclipse-sdk-3.1_pre2.ebuild, + -eclipse-sdk-3.1_pre3.ebuild, -eclipse-sdk-3.1_pre4.ebuild, + -eclipse-sdk-3.1_pre5.ebuild, -eclipse-sdk-3.1_pre6.ebuild, + -eclipse-sdk-3.1_pre6-r1.ebuild, -eclipse-sdk-3.1_pre7.ebuild: + Removed old versions. *eclipse-sdk-3.1 (03 Jul 2005) diff --git a/dev-util/eclipse-sdk/Manifest b/dev-util/eclipse-sdk/Manifest index e60632faa38d..acb154f1dbdb 100644 --- a/dev-util/eclipse-sdk/Manifest +++ b/dev-util/eclipse-sdk/Manifest @@ -1,41 +1,21 @@ -MD5 b46f3362dcf17eebc979bc87c2581b49 eclipse-sdk-3.1_pre3.ebuild 16524 -MD5 5f47b5e1d82a19fafb466d830a509d01 eclipse-sdk-3.0.1.ebuild 11886 MD5 a2d7d204d16c0363da6429bad390431a eclipse-sdk-3.0.0-r3.ebuild 12081 -MD5 d85a11c5e39f6591da5bcdc731b02761 eclipse-sdk-3.1_pre5.ebuild 17446 MD5 70cb5d4da1ab9b430a1779c899c66b01 eclipse-sdk-3.1.ebuild 10112 MD5 819818fb9914fe0dccf2af4c89d94452 eclipse-sdk-3.0.1-r2.ebuild 14287 -MD5 a54adcd5de4bafa3a201ba0df24337f8 eclipse-sdk-3.1_pre7.ebuild 13621 -MD5 233b7bd25c8c68c658a37232777f4f61 eclipse-sdk-3.1_pre2.ebuild 16365 -MD5 9657b31eca5ce4ee031ad5874e3d34c9 eclipse-sdk-3.1_pre6-r1.ebuild 13593 -MD5 cc4746d44b4bb74e9db76f257f98b8f3 eclipse-sdk-3.1_pre4.ebuild 17450 MD5 784f7f8fdf82be12bba512c56169050e eclipse-sdk-2.1.3-r5.ebuild 9905 MD5 b7835429b6a12c387636babaedc3aaa9 eclipse-sdk-3.0.2.ebuild 13831 -MD5 030ee53185dd243ff9adbc829417bd5d eclipse-sdk-3.0.1-r1.ebuild 13995 -MD5 c66d55982a2caf62d0619cae87866542 eclipse-sdk-3.1_pre6.ebuild 13572 -MD5 0b6f44460f5c2164e469e4444060b23f eclipse-sdk-3.1_pre1.ebuild 12137 -MD5 b807621bfc51dba54f74761932a469e3 ChangeLog 18615 +MD5 02970a3c38546b558db3b4bc0c076e4f ChangeLog 19007 MD5 a68179074a5e152f35d52d03847abcd4 eclipse-sdk-3.1_rc1.ebuild 13818 MD5 8de14dda7d318d8fb514fdbcecd4058b metadata.xml 782 MD5 ab0f6620b4767e065bd533b06245b0fc files/01-distribute_ant_target-2.1.patch 1103 MD5 69ee2069b0260e40c6fa93315ff759cc files/eclipse-3.1.desktop 226 MD5 a9f983102fa1b491ad4c4f154123d509 files/06-path-fixups.patch 4707 MD5 6ac05b530442f845b10b830e624ffe04 files/eclipse-2.desktop 222 -MD5 c2e939c5ac99b36a6fd439fe179139cb files/digest-eclipse-sdk-3.1_pre6-r1 88 MD5 a8bdecb6304c91da92a3b153e154f544 files/02-konqueror_help_browser-3.0.patch 1560 MD5 3110e7ec528bc98ef251172c2d7e2956 files/05-mozilla-xpcom.patch 862 MD5 0805c4d31f80b5ebb2f52456273d0d44 files/digest-eclipse-sdk-3.1 86 MD5 0e815a2260dbd0153de35c6de26fbd05 files/digest-eclipse-sdk-3.0.0-r3 86 -MD5 486d232cbe9d4b75d915bb6bf8b5f0d2 files/digest-eclipse-sdk-3.0.1-r1 88 MD5 486d232cbe9d4b75d915bb6bf8b5f0d2 files/digest-eclipse-sdk-3.0.1-r2 88 -MD5 486d232cbe9d4b75d915bb6bf8b5f0d2 files/digest-eclipse-sdk-3.0.1 88 MD5 35725caa2b42f4ca3ee05c49b03d47ea files/digest-eclipse-sdk-3.0.2 88 -MD5 eb74cc6c76bd05234e01af4fe0097b0c files/digest-eclipse-sdk-3.1_pre1 88 -MD5 5ad8ad3c4903f22b93bda11fc259940b files/digest-eclipse-sdk-3.1_pre2 88 -MD5 faec09f4506f1a9a12ceb725a09709f6 files/digest-eclipse-sdk-3.1_pre3 88 -MD5 18dfd928ae2d0f9bc5058eb604adc895 files/digest-eclipse-sdk-3.1_pre4 88 -MD5 997fca22d81ad543ce32c6e98c86cab6 files/digest-eclipse-sdk-3.1_pre5 89 -MD5 c2e939c5ac99b36a6fd439fe179139cb files/digest-eclipse-sdk-3.1_pre6 88 -MD5 6b2b3baec54d1b720c83cf573a50d5f8 files/digest-eclipse-sdk-3.1_pre7 88 MD5 ed33fd609db26b85ef9b0c2a82a06b22 files/01-distribute_ant_target-3.0.patch 726 MD5 a6dce51922f203f777e70544299a09fb files/digest-eclipse-sdk-3.1_rc1 89 MD5 21bde556ac55c5e22578cf4998135913 files/digest-eclipse-sdk-2.1.3-r5 176 diff --git a/dev-util/eclipse-sdk/eclipse-sdk-3.0.1-r1.ebuild b/dev-util/eclipse-sdk/eclipse-sdk-3.0.1-r1.ebuild deleted file mode 100644 index 82f5c4ebc48d..000000000000 --- a/dev-util/eclipse-sdk/eclipse-sdk-3.0.1-r1.ebuild +++ /dev/null @@ -1,454 +0,0 @@ -# Copyright 1999-2005 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.0.1-r1.ebuild,v 1.6 2005/03/23 16:16:48 seemant Exp $ - -inherit eutils java-utils - -# karltk: Portage 2.0.51_pre13 needs this -MY_A="eclipse-sourceBuild-srcIncluded-3.0.1.zip" -DESCRIPTION="Eclipse Tools Platform" -HOMEPAGE="http://www.eclipse.org/" -SRC_URI="http://download2.eclipse.org/downloads/drops/R-3.0.1-200409161125/${MY_A}" -IUSE="gtk motif gnome kde mozilla" -SLOT="3" -LICENSE="CPL-1.0" -KEYWORDS="~x86 ~ppc ~amd64" - -RDEPEND="|| ( >=virtual/jdk-1.4.2 =dev-java/blackdown-jdk-1.4.2* ) - gtk? ( >=x11-libs/gtk+-2.2.4 ) - !gtk? ( kde? ( kde-base/kdelibs x11-libs/openmotif ) - !kde? ( motif? ( x11-libs/openmotif ) - !motif? ( >=x11-libs/gtk+-2.2.4 ) - ) - ) - mozilla? ( >=www-client/mozilla-1.5 ) - gnome? ( =gnome-base/gnome-vfs-2* =gnome-base/libgnomeui-2* ) - !media-fonts/unifont" - -DEPEND="${RDEPEND} - >=dev-java/ant-1.5.3 - >=sys-apps/findutils-4.1.7 - >=app-shells/tcsh-6.11 - app-arch/unzip - app-arch/zip" - -pkg_setup() { - - check-ram - - java-utils_setup-vm - - java-utils_ensure-vm-version-ge 1 4 2 - - ${use_gtk} && use mozilla && detect-mozilla - - setup-dir-vars - - use gtk && use_gtk='true' || use_gtk='false' - use motif && use_motif='true' || use_motif='false' - - # If gtk+ enabled, disable motif - ${use_gtk} && use_motif='false' - - # If neither enabled, default to gtk+ - ${use_gtk} || ${use_motif} || use_gtk='true' - - # If both enabled, use gtk+ only - ${use_gtk} && ${use_motif} && use_motif='false' - - einfo "Compiling gtk+ frontend : ${use_gtk}" - einfo "Compiling Motif frontend : ${use_motif}" - -} - -src_unpack() { - mkdir ${S} - cd ${S} - unpack ${MY_A} || die "Could not unpack ${MY_A}" - - epatch ${FILESDIR}/03-motif-java1.5-build.patch - - einfo "Setting up virtual machine" - java-utils_setup-vm - - einfo "Patching build.xmls" - process-build-xmls - - einfo "Cleaning out prebuilt code" - clean-prebuilt-code - - einfo "Patching gtk+ frontend" - patch-gtk-frontend - - einfo "Patching Motif frontend" - patch-motif-frontend - - einfo "Set build version in Help->About" - find -type f -name about.mappings -exec sed -e "s/@build@/Gentoo Linux ${PF}/" -i \{\} \; -} - -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 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 - ant_extra_opts="-Dbootclasspath=$(java-config --jdk-home)/jre/lib/core.jar:$(java-config --jdk-home)/jre/lib/xml.jar:$(java-config --jdk-home)/jre/lib/graphics.jar" - else - # Sun derived JREs (Blackdown, Sun) - ant_extra_opts="-Dbootclasspath=$(java-config --jdk-home)/jre/lib/rt.jar" - fi - - export ANT_OPTS=-Xmx768m - - einfo "Building resources.core plugin" - cd ${S}/${core_src_dir} - make JDK_INCLUDE="`java-config -O`/include -I`java-config -O`/include/linux" || die "Failed to build resource.core plugin" - mkdir -p ${S}/"${core_dest_dir}" - mv *.so ${S}/"${core_dest_dir}" - cd ${S} - - # Compile all Java code - ${use_gtk} && build-gtk-java compile - ${use_motif} && build-motif-java compile - - # Build selected native frontend code - ${use_gtk} && build-gtk-native - ${use_motif} && build-motif-native - - # Install all Java code - ${use_gtk} && build-gtk-java install - ${use_motif} && build-motif-java install - - create-desktop-entry -} - -src_install() { - eclipse_dir="/usr/lib/eclipse-${SLOT}" - - dodir /usr/lib - - einfo "Installing features and plugins" - if ${use_gtk} ; then - [ -f result/linux-gtk-${ARCH}-sdk.zip ] || die "gtk zip bundle was not build properly!" - unzip -o -q result/linux-gtk-${ARCH}-sdk.zip -d ${D}/usr/lib - fi - if ${use_motif} ; then - [ -f result/linux-motif-${ARCH}-sdk.zip ] || die "motif zip bundle was not build properly!" - unzip -o -q result/linux-motif-${ARCH}-sdk.zip -d ${D}/usr/lib - fi - - mv ${D}/usr/lib/eclipse ${D}/${eclipse_dir} - - insinto ${eclipse_dir} - - # Install launchers and native code - exeinto ${eclipse_dir} - if ${use_gtk} ; then - einfo "Installing eclipse-gtk binary" - doexe plugins/platform-launcher/library/gtk/eclipse-gtk \ - || die "Failed to install eclipse-gtk" - fi - if ${use_motif} ; then - einfo "Installing eclipse-motif binary" - doexe plugins/platform-launcher/library/motif/eclipse-motif \ - || die "Failed to install eclipse-motif" - fi - - doins plugins/org.eclipse.platform/{startup.jar,splash.bmp} - - # Install startup script - exeinto /usr/bin - doexe ${FILESDIR}/eclipse-${SLOT} - - install-desktop-entry - - doman ${FILESDIR}/eclipse.1 -} - -# ----------------------------------------------------------------------------- -# Helper functions -# ----------------------------------------------------------------------------- - -function detect-mozilla() -{ - if [ -f ${ROOT}/usr/lib/mozilla/libgtkembedmoz.so ] ; then - einfo "Compiling against www-client/mozilla" - mozilla_dir=/usr/lib/mozilla - elif [ -f ${ROOT}/usr/lib/MozillaFirefox/libgtkembedmoz.so ] ; then - einfo "Compiling against www-client/mozilla-firefox" - mozilla_dir=/usr/lib/MozillaFirefox - else - eerror "You need either Mozilla, compiled against gtk+ v2.0 or newer" - eerror "To merge it, do USE=\"gtk2\" emerge mozilla." - eerror "Otherwise, remove \"mozilla\" from use flags" - die "Need Mozilla compiled with gtk+-2.x support" - fi -} - -function setup-dir-vars() { - gtk_launcher_src_dir="plugins/platform-launcher/library/gtk" - motif_launch_src_dir="plugins/platform-launcher/library/motif" - gtk_swt_src_dir="plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library" - motif_swt_src_dir="plugins/org.eclipse.swt/Eclipse SWT PI/motif/library" - - core_src_dir="plugins/org.eclipse.core.resources.linux/src" - - case ${ARCH} in - sparc) - gtk_swt_dest_dir="plugins/org.eclipse.swt.gtk/os/solaris/sparc" - motif_swt_dest_dir="plugins/org.eclipse.swt.motif/os/solaris/sparc" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/solaris/sparc" - ;; - x86) - gtk_swt_dest_dir="plugins/org.eclipse.swt.gtk/os/linux/x86" - motif_swt_dest_dir="plugins/org.eclipse.swt.motif/os/linux/x86" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/linux/x86" - ;; - ppc) - gtk_swt_dest_dir="plugins/org.eclipse.swt.gtk/os/linux/ppc" - motif_swt_dest_dir="plugins/org.eclipse.swt.motif/os/linux/ppc" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/linux/ppc/" - ;; - amd64) - gtk_swt_dest_dir="plugins/org.eclipse.swt.gtk64/os/linux/amd64" - motif_swt_dest_dir="plugins/org.eclipse.swt.motif/os/linux/amd64" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/linux/amd64" - ;; - esac -} - -function process-build-xmls() { - - # Turn off verbose mode and on errors in all build.xml files - for x in $(find . -type f -name "build.xml") ; do - sed -i -r \ - -e 's/failonerror="[^"]+"/failonerror="true"/' \ - -e 's/verbose="[^"]+"/verbose="false"/' $x - done -} - -function patch-gtk-frontend() { - - # Move around some source code that should have been handled by the build system - local m="Failed to move native files for SWT gtk+" - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT/common/library/* ${S}/"${gtk_swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Mozilla/common/library/* ${S}/"${gtk_swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Program/gnome/library/* ${S}/"${gtk_swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ AWT/gtk/library/* ${S}/"${gtk_swt_src_dir}" || die ${m} - - if use gnome ; then - gnome_lib=`pkg-config --libs gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0 | sed -e "s:-pthread:-lpthread:" -e "s:-Wl,--export:--export:"` - fi - - if ${use_gtk} ; then - gtk_lib=`pkg-config --libs gtk+-2.0 gthread-2.0 | sed -e "s:-pthread:-lpthread:" -e "s:-Wl,--export:--export:"` - atk_lib=`pkg-config --libs atk gtk+-2.0 | sed -e "s:-Wl,--export:--export:"` - fi - - sed -e "s:/bluebird/teamswt/swt-builddir/IBMJava2-141:$JAVA_HOME:" \ - -e "s:/bluebird/teamswt/swt-builddir/jdk1.5.0:$JAVA_HOME:" \ - -e "s:/mozilla/mozilla/1.6/linux_gtk2/mozilla/dist:$MOZILLA_FIVE_HOME:" \ - -e "s:/usr/lib/mozilla-1.6:$MOZILLA_FIVE_HOME:" \ - -e "s:\`pkg-config --libs gtk+-2.0 gthread-2.0\`:${gtk_lib}:" \ - -e "s:\`pkg-config --libs atk gtk+-2.0\`:${atk_lib}:" \ - -e "s:\`pkg-config --libs gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0\`:${gnome_lib}:" \ - -e "s:-I\$(JAVA_HOME)/include:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-I\$(JAVA_HOME)\t:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-L\$(MOZILLA_HOME)/lib -lembed_base_s:-L${mozilla_dir} -lgtkembedmoz:" \ - -e "s:MOZILLACFLAGS = -O:MOZILLACFLAGS = -O -fPIC:" \ - -e "s:\$(JAVA_HOME)/jre/bin:\$(JAVA_HOME)/jre/lib/i386:" \ - -i ${S}/"${gtk_swt_src_dir}"/make_gtk.mak || die "Failed to modify make_gtk.mak" - -} - -function patch-motif-frontend() -{ - cp plugins/org.eclipse.swt/Eclipse\ SWT/common/library/* "${motif_swt_src_dir}" - sed -e "s:/bluebird/teamswt/swt-builddir/IBMJava2-141:$JAVA_HOME:" \ - -e "s:/bluebird/teamswt/swt-builddir/motif21:/usr/X11R6:" \ - -e "s:/usr/lib/qt-3.1:/usr/qt/3:" \ - -e "s:-lkdecore:-L\`kde-config --prefix\`/lib -lkdecore:" \ - -e "s:-I/usr/include/kde:-I\`kde-config --prefix\`/include:" \ - -e "s:-I\$(JAVA_HOME)/include:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-I\$(JAVA_HOME)\t:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-L\$(MOZILLA_HOME)/lib -lembed_base_s:-L\$(MOZILLA_HOME):" \ - -e "s:-L\$(JAVA_HOME)/jre/bin:-L\$(JAVA_HOME)/jre/lib/i386:" \ - -i "${motif_swt_src_dir}"/make_linux.mak || die "Failed to modify Motfit make_linux.mak" -} - - -function create-desktop-entry() { - - cat ${FILESDIR}/eclipse-${SLOT}.desktop | \ - sed -e "s/@PV@/${PV}/" \ - > eclipse-${SLOT}.desktop || die "Failed to create desktop entry" -} - -function build-gtk-java() { - local target=${1} - - einfo "Building GTK+ frontend (${target}) -- see compilelog.txt for details" - ant -q -q \ - -buildfile build.xml \ - -DinstallOs=linux \ - -DinstallWs=gtk \ - -DinstallArch=$ARCH \ - ${ant_extra_opts} ${target} \ - || die "Failed to ${target} Java code (gtk+)" -} - -function build-motif-java() { - local target=${1} - - einfo "Building Motif frontend (${target}) -- see compilelog.txt for details" - ant -q -q \ - -buildfile build.xml \ - -DcollPlace="eclipse-${SLOT}" \ - -DinstallOs=linux \ - -DinstallWs=motif \ - -DinstallArch=$ARCH \ - ${ant_extra_opts} ${target} \ - || die "Failed to ${target} java code (Motif)" -} - -function install-desktop-entry() { - - # Install GNOME .desktop file - if use gnome ; then - insinto /usr/share/gnome/apps/Development - doins eclipse-${SLOT}.desktop - fi - - # Install KDE .desktop file - if use kde ; then - for x in /usr/kde/* ; do - insinto ${x}/share/applnk/Applications/ - doins eclipse-${SLOT}.desktop - done - fi -} - -function build-gtk-native() { - - einfo "Building gtk+ SWT" - - # kludge to allow patches to applied at unpack, but correct compilation - if [ ${ARCH} == "amd64" ] ; then - gtk_swt_src_dir="plugins/org.eclipse.swt.gtk64/src/Eclipse SWT PI/gtk/library" - fi - - # Perpare destination directory - mkdir -p ${S}/"${gtk_swt_dest_dir}" - - # Build the eclipse gtk binary - cd ${S}/plugins/platform-launcher/library/gtk - case ${ARCH} in - sparc|x86|ppc) - tcsh -f build.csh -output eclipse-gtk -arch $ARCH || die "Failed to build eclipse-gtk" - ;; - amd64) - tcsh -f build64.csh -output eclipse-gtk -arch $ARCH || die "Failed to build eclipse-gtk" - ;; - esac - - - cd ${S}/"${gtk_swt_src_dir}" - case ${ARCH} in - sparc|x86|ppc) - bash ./build.sh make_swt || die "Failed to build platform-independent SWT support" - bash ./build.sh make_atk || die "Failed to build atk support" - ;; - amd64) - bash ./build64.sh make_swt || die "Failed to build platform-independent SWT support" - bash ./build64.sh make_atk || die "Failed to build atk support" - ;; - esac - - if use gnome ; then - einfo "Building GNOME VFS support" - case ${ARCH} in - sparc|x86|ppc) - bash ./build.sh make_gnome || die "Failed to build GNOME VFS support" - ;; - amd64) - bash ./build64.sh make_gnome || die "Failed to build GNOME VFS support" - ;; - esac - fi - - if use mozilla ; then - einfo "Building Mozilla component" - case $ARCH in - sparc|x86|ppc) - bash ./build.sh make_mozilla || die "Failed to build Mozilla support" - ;; - amd64) - bash ./build64.sh make_mozilla || die "Failed to build Mozilla support" - ;; - esac - fi - - # move the *.so files to the right path so eclipse can find them - # karltk: do this incrementally at each step above, with || die - mv *.so ${S}/"${gtk_swt_dest_dir}" - cd ${S} -} - -function build-motif-native() { - - # Prepare destination directory - mkdir -p ${S}/"${motif_swt_dest_dir}" - - # Build eclipse motif binary - cd ${S}/plugins/platform-launcher/library/motif - tcsh -f build.csh -output eclipse-motif -arch $ARCH || die "Failed to build eclipse-motif" - - cd ${S}/"${motif_swt_src_dir}" - - make -f make_linux.mak make_swt || die "Failed to build Motif support" - if use kde ; then - make -f make_linux.mak make_kde || die "Failed to build KDE support" - fi - - # move the *.so files to the right path so eclipse can find them - # karltk: do this incrementally at each step above, with || die - mv *.so ${S}/"${motif_swt_dest_dir}" - cd ${S} -} - - - -function clean-prebuilt-code() { - - # Clean up all pre-built code - ant -q -DinstallWs=gtk -DinstallOs=linux clean - ant -q -DinstallWs=motif -DinstallOs=linux clean - find ${S} -name '*.so' -exec rm -f {} \; - find ${S} -name '*.so.*' -exec rm -f {} \; - find ${S} -type f -name 'eclipse' -exec rm {} \; - rm -f eclipse - -} - -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 775669 ] && - ( - echo - ewarn "To build Eclipse, at least 768MB of RAM is recommended." - ewarn "Your machine has less RAM. Continuing anyway." - echo - ) -} - diff --git a/dev-util/eclipse-sdk/eclipse-sdk-3.0.1.ebuild b/dev-util/eclipse-sdk/eclipse-sdk-3.0.1.ebuild deleted file mode 100644 index 6d9713e1b8be..000000000000 --- a/dev-util/eclipse-sdk/eclipse-sdk-3.0.1.ebuild +++ /dev/null @@ -1,340 +0,0 @@ -# Copyright 1999-2005 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.0.1.ebuild,v 1.4 2005/03/23 16:16:48 seemant Exp $ - -inherit eutils java-utils - -# karltk: Portage 2.0.51_pre13 needs this -MY_A="eclipse-sourceBuild-srcIncluded-3.0.1.zip" -DESCRIPTION="Eclipse Tools Platform" -HOMEPAGE="http://www.eclipse.org/" -SRC_URI="http://download2.eclipse.org/downloads/drops/R-3.0.1-200409161125/${MY_A}" -IUSE="gtk motif gnome kde mozilla" -SLOT="3" -LICENSE="CPL-1.0" -KEYWORDS="~x86 ~ppc" - -RDEPEND="|| ( >=virtual/jdk-1.4.2 =dev-java/blackdown-jdk-1.4.2* ) - gtk? ( >=x11-libs/gtk+-2.2.4 ) - !gtk? ( kde? ( kde-base/kdelibs x11-libs/openmotif ) - !kde? ( motif? ( x11-libs/openmotif ) - !motif? ( >=x11-libs/gtk+-2.2.4 ) - ) - ) - mozilla? ( >=www-client/mozilla-1.5 ) - gnome? ( =gnome-base/gnome-vfs-2* =gnome-base/libgnomeui-2* ) - !media-fonts/unifont" - -DEPEND="${RDEPEND} - >=dev-java/ant-1.5.3 - >=sys-apps/findutils-4.1.7 - >=app-shells/tcsh-6.11 - app-arch/unzip - app-arch/zip" - -pkg_setup() { - ewarn "This package is _highly_ experimental." - ewarn "If you are using Eclipse 2.1.x for any serious work, stop now." - ewarn "You cannot expect to be productive with this packaging of 3.0!" - if use ppc; then - ewarn "This package needs 1 gig Ram on PPC !" - fi - - java-utils_setup-vm - - # karltk: refactor, put in java-pkg.eclass? - local version="$(java-config --java-version | grep 'java version' | sed -r 's/java version \"(.*)\"/\1/')" - local ver_rx="([0-9]+)\.([0-9]+)\.([0-9]+)(.*)" - local major=$(echo ${version} | sed -r "s/${ver_rx}/\1/") - local minor=$(echo ${version} | sed -r "s/${ver_rx}/\2/") - local patch=$(echo ${version} | sed -r "s/${ver_rx}/\3/") - local extra=$(echo ${version} | sed -r "s/${ver_rx}/\4/") - - if [ ${major} -ge 1 ] && [ ${minor} -gt 4 ] ; then - einfo "Detected JDK is sufficient to compile Eclipse (${version} >= 1.4.2)" - elif [ ${major} -ge 1 ] && [ ${minor} -ge 4 ] && [ ${patch} -ge 2 ] ; then - einfo "Detected JDK is sufficient to compile Eclipse (${version} >= 1.4.2)" - else - die "Detected JDK (${version}) is too old to compile Eclipse, need at least 1.4.2!" - fi - - if ${use_gtk} && use mozilla ; then - if [ -f ${ROOT}/usr/lib/mozilla/libgtkembedmoz.so ] ; then - einfo "Compiling against www-client/mozilla" - mozilla_dir=/usr/lib/mozilla - elif [ -f ${ROOT}/usr/lib/MozillaFirefox/libgtkembedmoz.so ] ; then - einfo "Compiling against www-client/mozilla-firefox" - mozilla_dir=/usr/lib/MozillaFirefox - else - eerror "You need either Mozilla, compiled against gtk+ v2.0 or newer" - eerror "To merge it, do USE=\"gtk2\" emerge mozilla." - eerror "Otherwise, remove \"mozilla\" from use flags" - die "Need Mozilla compiled with gtk+-2.0 support" - fi - fi - - set_dirs - use gtk && use_gtk='true' || use_gtk='false' - use motif && use_motif='true' || use_motif='false' - - # If gtk+ enabled, disable motif - ${use_gtk} && use_motif='false' - - # If neither enabled, default to gtk+ - ${use_gtk} || ${use_motif} || use_gtk='true' -} - -set_dirs() { - gtk_launcher_src_dir="plugins/platform-launcher/library/gtk" - motif_launch_src_dir="plugins/platform-launcher/library/motif" - gtk_swt_src_dir="plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library" - motif_swt_src_dir="plugins/org.eclipse.swt/Eclipse SWT PI/motif/library" - - core_src_dir="plugins/org.eclipse.core.resources.linux/src" - - case $ARCH in - sparc) - gtk_swt_dest_dir="plugins/org.eclipse.swt.gtk/os/solaris/sparc" - motif_swt_dest_dir="plugins/org.eclipse.swt.motif/os/solaris/sparc" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/solaris/sparc" - ;; - x86) - gtk_swt_dest_dir="plugins/org.eclipse.swt.gtk/os/linux/x86" - motif_swt_dest_dir="plugins/org.eclipse.swt.motif/os/linux/x86" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/linux/x86" - ;; - ppc) - gtk_swt_dest_dir="plugins/org.eclipse.swt.gtk/os/linux/ppc" - motif_swt_dest_dir="plugins/org.eclipse.swt.motif/os/linux/ppc" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/linux/ppc/" - ;; - esac -} - -src_unpack() { - mkdir ${S} - cd ${S} - unpack ${MY_A} || die "Could not unpack ${MY_A}" - - epatch ${FILESDIR}/03-motif-java1.5-build.patch - - java-utils_setup-vm - - # Turn off verbose mode and on errors in all build.xml files - for x in $(find . -type f -name "build.xml") ; do - sed -i -r \ - -e 's/failonerror="[^"]+"/failonerror="true"/' \ - -e 's/verbose="[^"]+"/verbose="false"/' $x - done - - # Clean up all pre-built code - ant -q -DinstallWs=gtk -DinstallOs=linux clean - ant -q -DinstallWs=motif -DinstallOs=linux clean - find ${S} -name '*.so' -exec rm -f {} \; - find ${S} -name '*.so.*' -exec rm -f {} \; - find ${S} -type f -name 'eclipse' -exec rm {} \; - rm -f eclipse - - # Move around some source code that should have been handled by the build system - cd ${S}/"${gtk_swt_src_dir}" || die "Directory ${gtk_swt_src_dir} not found" - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT/common/library/* . - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Mozilla/common/library/* . - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Program/gnome/library/* . - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ AWT/gtk/library/* . - - if use gnome ; then - gnome_lib=`pkg-config --libs gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0 | sed -e "s:-pthread:-lpthread:" -e "s:-Wl,--export:--export:"` - fi - - if ${use_gtk} ; then - gtk_lib=`pkg-config --libs gtk+-2.0 gthread-2.0 | sed -e "s:-pthread:-lpthread:" -e "s:-Wl,--export:--export:"` - atk_lib=`pkg-config --libs atk gtk+-2.0 | sed -e "s:-Wl,--export:--export:"` - fi - - sed -e "s:/bluebird/teamswt/swt-builddir/IBMJava2-141:$JAVA_HOME:" \ - -e "s:/bluebird/teamswt/swt-builddir/jdk1.5.0:$JAVA_HOME:" \ - -e "s:/mozilla/mozilla/1.6/linux_gtk2/mozilla/dist:$MOZILLA_FIVE_HOME:" \ - -e "s:/usr/lib/mozilla-1.6:$MOZILLA_FIVE_HOME:" \ - -e "s:\`pkg-config --libs gtk+-2.0 gthread-2.0\`:${gtk_lib}:" \ - -e "s:\`pkg-config --libs atk gtk+-2.0\`:${atk_lib}:" \ - -e "s:\`pkg-config --libs gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0\`:${gnome_lib}:" \ - -e "s:-I\$(JAVA_HOME)/include:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-I\$(JAVA_HOME)\t:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-L\$(MOZILLA_HOME)/lib -lembed_base_s:-L${mozilla_dir} -lgtkembedmoz:" \ - -e "s:MOZILLACFLAGS = -O:MOZILLACFLAGS = -O -fPIC:" \ - -e "s:\$(JAVA_HOME)/jre/bin:\$(JAVA_HOME)/jre/lib/i386:" \ - -i make_gtk.mak - - cd ${S}/"${motif_swt_src_dir}" - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT/common/library/* . - sed -e "s:/bluebird/teamswt/swt-builddir/IBMJava2-141:$JAVA_HOME:" \ - -e "s:/bluebird/teamswt/swt-builddir/motif21:/usr/X11R6:" \ - -e "s:/usr/lib/qt-3.1:/usr/qt/3:" \ - -e "s:-lkdecore:-L\`kde-config --prefix\`/lib -lkdecore:" \ - -e "s:-I/usr/include/kde:-I\`kde-config --prefix\`/include:" \ - -e "s:-I\$(JAVA_HOME)/include:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-I\$(JAVA_HOME)\t:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-L\$(MOZILLA_HOME)/lib -lembed_base_s:-L\$(MOZILLA_HOME):" \ - -e "s:-L\$(JAVA_HOME)/jre/bin:-L\$(JAVA_HOME)/jre/lib/i386:" \ - -i make_linux.mak - - cd ${S} - find -type f -name about.mappings -exec sed -e "s/@build@/Gentoo Linux ${PF}/" -i \{\} \; -} - -build_gtk_frontend() { - - einfo "Building gtk+ SWT" - - # Build the eclipse gtk binary - cd ${S}/plugins/platform-launcher/library/gtk - tcsh -f build.csh -output eclipse-gtk -arch $ARCH || die "Failed to build eclipse-gtk" - - cd ${S}/"${gtk_swt_src_dir}" - make -f make_gtk.mak make_swt || die "Failed to build platform-independent SWT support" - make -f make_gtk.mak make_atk || die "Failed to build atk support" - - if use gnome ; then - einfo "Building GNOME VFS support" - make -f make_gtk.mak make_gnome || die "Failed to build GNOME VFS support" - fi - - if use mozilla ; then - einfo "Building Mozilla component" - make -f make_gtk.mak make_mozilla || die "Failed to build Mozilla support" - fi - - # move the *.so files to the right path so eclipse can find them - mkdir -p ${S}/"${gtk_swt_dest_dir}" - mv *.so ${S}/"${gtk_swt_dest_dir}" -} - -build_motif_frontend() { - - # Build eclipse motif binary - cd ${S}/plugins/platform-launcher/library/motif - tcsh -f build.csh -output eclipse-motif -arch $ARCH || die "Failed to build eclipse-motif" - - cd ${S}/"${motif_swt_src_dir}" - - make -f make_linux.mak make_swt || die "Failed to build Motif support" - if use kde ; then - make -f make_linux.mak make_kde || die "Failed to build KDE support" - fi - - # move the *.so files to the right path so eclipse can find them - mkdir -p ${S}/"${motif_swt_dest_dir}" - mv *.so ${S}/"${motif_swt_dest_dir}" -} - -src_compile() { - - addwrite "/proc/self/maps" - addwrite "/proc/cpuinfo" - addwrite "/dev/random" - - # Figure out correct boot classpath - if [ ! -z "`java-config --java-version | grep IBM`" ] ; then - # IBM JRE - ant_extra_opts="-Dbootclasspath=$(java-config --jdk-home)/jre/lib/core.jar:$(java-config --jdk-home)/jre/lib/xml.jar:$(java-config --jdk-home)/jre/lib/graphics.jar" - else - # Sun derived JREs (Blackdown, Sun) - ant_extra_opts="-Dbootclasspath=$(java-config --jdk-home)/jre/lib/rt.jar" - fi - - export ANT_OPTS=-Xmx768m - - # Build selected frontends - ${use_gtk} && build_gtk_frontend - ${use_motif} && build_motif_frontend - - einfo "Building resources.core plugin" - cd ${S}/${core_src_dir} - make JDK_INCLUDE="`java-config -O`/include -I`java-config -O`/include/linux" || die "Failed to build resource.core plugin" - mkdir -p ${S}/"${core_dest_dir}" - mv *.so ${S}/"${core_dest_dir}" - - cd ${S} - - # Build all java code -- default to gtk if neither of gtk, motif, - # kde are set - if ( ${use_gtk} || ! ( ${use_gtk} || ${use_motif} || use kde ) ); then - einfo "Building GTK+ frontend -- see compilelog.txt for details" - ant -q -q \ - -buildfile build.xml \ - -DinstallOs=linux \ - -DinstallWs=gtk \ - -DinstallArch=$ARCH \ - ${ant_extra_opts} compile install \ - || die "Failed to compile java code (gtk+)" - fi - if ${use_motif} ; then - einfo "Building Motif frontend -- see compilelog.txt for details" - ant -q -q \ - -buildfile build.xml \ - -DcollPlace="eclipse-${SLOT}" \ - -DinstallOs=linux \ - -DinstallWs=motif \ - -DinstallArch=$ARCH \ - ${ant_extra_opts} compile install \ - || die "Failed to compile java code (Motif)" - fi - - cat ${FILESDIR}/eclipse-${SLOT}.desktop | \ - sed -e "s/@PV@/${PV}/" \ - > eclipse-${SLOT}.desktop -} - -src_install() { - eclipse_dir="/usr/lib/eclipse-${SLOT}" - - dodir /usr/lib - - einfo "Installing features and plugins" - if ${use_gtk} ; then - [ -f result/linux-gtk-${ARCH}-sdk.zip ] || die "gtk zip bundle was not build properly!" - unzip -o -q result/linux-gtk-${ARCH}-sdk.zip -d ${D}/usr/lib - fi - if ${use_motif} ; then - [ -f result/linux-motif-${ARCH}-sdk.zip ] || die "motif zip bundle was not build properly!" - unzip -o -q result/linux-motif-${ARCH}-sdk.zip -d ${D}/usr/lib - fi - - mv ${D}/usr/lib/eclipse ${D}/${eclipse_dir} - - insinto ${eclipse_dir} - - # Install launchers and native code - exeinto ${eclipse_dir} - if ${use_gtk} ; then - einfo "Installing eclipse-gtk binary" - doexe plugins/platform-launcher/library/gtk/eclipse-gtk \ - || die "Failed to install eclipse-gtk" - fi - if ${use_motif} ; then - einfo "Installing eclipse-motif binary" - doexe plugins/platform-launcher/library/motif/eclipse-motif \ - || die "Failed to install eclipse-motif" - fi - - doins plugins/org.eclipse.platform/{startup.jar,splash.bmp} - - # Install startup script - exeinto /usr/bin - doexe ${FILESDIR}/eclipse-${SLOT} - - # Install GNOME .desktop file - if use gnome ; then - insinto /usr/share/gnome/apps/Development - doins eclipse-${SLOT}.desktop - fi - - # Install KDE .desktop file - if use kde ; then - # karltk: should check for available kde version(s) - insinto /usr/kde/3.2/share/applnk/Applications/ - doins eclipse-${SLOT}.desktop - fi - - doman ${FILESDIR}/eclipse.1 -} diff --git a/dev-util/eclipse-sdk/eclipse-sdk-3.1_pre1.ebuild b/dev-util/eclipse-sdk/eclipse-sdk-3.1_pre1.ebuild deleted file mode 100644 index 9a62b5f3e434..000000000000 --- a/dev-util/eclipse-sdk/eclipse-sdk-3.1_pre1.ebuild +++ /dev/null @@ -1,346 +0,0 @@ -# Copyright 1999-2005 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_pre1.ebuild,v 1.5 2005/03/23 16:16:48 seemant Exp $ - -inherit eutils java-utils - -# karltk: Portage 2.0.51_pre13 needs this -MY_A="eclipse-sourceBuild-srcIncluded-3.1M1.zip" -DESCRIPTION="Eclipse Tools Platform" -HOMEPAGE="http://www.eclipse.org/" -SRC_URI="http://download.eclipse.org/downloads/drops/S-3.1M1-200408122000/${MY_A}" -IUSE="gtk motif gnome kde mozilla jikes" -SLOT="3.1" -LICENSE="CPL-1.0" -KEYWORDS="~x86" - -RDEPEND="|| ( >=virtual/jdk-1.4.2 =dev-java/blackdown-jdk-1.4.2* ) - gtk? ( >=x11-libs/gtk+-2.2.4 ) - !gtk? ( kde? ( kde-base/kdelibs x11-libs/openmotif ) - !kde? ( motif? ( x11-libs/openmotif ) - !motif? ( >=x11-libs/gtk+-2.2.4 ) - ) - ) - mozilla? ( >=www-client/mozilla-1.5 ) - gnome? ( =gnome-base/gnome-vfs-2* =gnome-base/libgnomeui-2* ) - jikes? ( >=dev-java/jikes-1.19 ) - !media-fonts/unifont" - -DEPEND="${RDEPEND} - >=dev-java/ant-1.5.3 - >=sys-apps/findutils-4.1.7 - >=app-shells/tcsh-6.11 - app-arch/unzip - app-arch/zip" - -pkg_setup() { - java-utils_setup-vm - - # karltk: refactor, put in java-pkg.eclass? - local version="$(java-config --java-version | grep 'java version' | sed -r 's/java version \"(.*)\"/\1/')" - local ver_rx="([0-9]+)\.([0-9]+)\.([0-9]+)(.*)" - local major=$(echo ${version} | sed -r "s/${ver_rx}/\1/") - local minor=$(echo ${version} | sed -r "s/${ver_rx}/\2/") - local patch=$(echo ${version} | sed -r "s/${ver_rx}/\3/") - local extra=$(echo ${version} | sed -r "s/${ver_rx}/\4/") - - if [ ${major} -ge 1 ] && [ ${minor} -gt 4 ] ; then - einfo "Detected JDK is sufficient to compile Eclipse (${version} >= 1.4.2)" - elif [ ${major} -ge 1 ] && [ ${minor} -ge 4 ] && [ ${patch} -ge 2 ] ; then - einfo "Detected JDK is sufficient to compile Eclipse (${version} >= 1.4.2)" - else - die "Detected JDK (${version}) is too old to compile Eclipse, need at least 1.4.2!" - fi - - if ${use_gtk} && use mozilla ; then - if [ -f ${ROOT}/usr/lib/mozilla/libgtkembedmoz.so ] ; then - einfo "Compiling against www-client/mozilla" - mozilla_dir=/usr/lib/mozilla - elif [ -f ${ROOT}/usr/lib/MozillaFirefox/libgtkembedmoz.so ] ; then - einfo "Compiling against www-client/mozilla-firefox" - mozilla_dir=/usr/lib/MozillaFirefox - else - eerror "You need either Mozilla, compiled against gtk+ v2.0 or newer" - eerror "To merge it, do USE=\"gtk2\" emerge mozilla." - eerror "Otherwise, remove \"mozilla\" from use flags" - die "Need Mozilla compiled with gtk+-2.0 support" - fi - fi - - set_dirs - use gtk && use_gtk='true' || use_gtk='false' - use motif && use_motif='true' || use_motif='false' - - # If gtk+ enabled, disable motif - ${use_gtk} && use_motif='false' - - # If neither enabled, default to gtk+ - ${use_gtk} || ${use_motif} || use_gtk='true' -} - -set_dirs() { - gtk_launcher_src_dir="plugins/platform-launcher/library/gtk" - motif_launch_src_dir="plugins/platform-launcher/library/motif" - gtk_swt_src_dir="plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library" - motif_swt_src_dir="plugins/org.eclipse.swt/Eclipse SWT PI/motif/library" - - core_src_dir="plugins/org.eclipse.core.resources.linux/src" - - case $ARCH in - sparc) - gtk_swt_dest_dir="plugins/org.eclipse.swt.gtk/os/solaris/sparc" - motif_swt_dest_dir="plugins/org.eclipse.swt.motif/os/solaris/sparc" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/solaris/sparc" - ;; - x86) - gtk_swt_dest_dir="plugins/org.eclipse.swt.gtk/os/linux/x86" - motif_swt_dest_dir="plugins/org.eclipse.swt.motif/os/linux/x86" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/linux/x86" - ;; - ppc) - gtk_swt_dest_dir="plugins/org.eclipse.swt.gtk/os/linux/ppc" - motif_swt_dest_dir="plugins/org.eclipse.swt.motif/os/linux/ppc" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/linux/ppc/" - ;; - esac -} - -src_unpack() { - mkdir ${S} - cd ${S} - unpack ${MY_A} || die "Could not unpack ${MY_A}" - - epatch ${FILESDIR}/03-motif-java1.5-build.patch - - java-utils_setup-vm - - # Turn off verbose mode and on errors in all build.xml files - for x in $(find . -type f -name "build.xml") ; do - sed -i -r \ - -e 's/failonerror="[^"]+"/failonerror="true"/' \ - -e 's/verbose="[^"]+"/verbose="false"/' $x - done - - # Clean up all pre-built code - ant -q -DinstallWs=gtk -DinstallOs=linux clean - ant -q -DinstallWs=motif -DinstallOs=linux clean - find ${S} -name '*.so' -exec rm -f {} \; - find ${S} -name '*.so.*' -exec rm -f {} \; - find ${S} -type f -name 'eclipse' -exec rm {} \; - rm -f eclipse - - # Move around some source code that should have been handled by the build system - cd ${S}/"${gtk_swt_src_dir}" || die "Directory ${gtk_swt_src_dir} not found" - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT/common/library/* . - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Mozilla/common/library/* . - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Program/gnome/library/* . - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ AWT/gtk/library/* . - - if use gnome ; then - gnome_lib=`pkg-config --libs gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0 | sed -e "s:-pthread:-lpthread:" -e "s:-Wl,--export:--export:"` - fi - - if ${use_gtk} ; then - gtk_lib=`pkg-config --libs gtk+-2.0 gthread-2.0 | sed -e "s:-pthread:-lpthread:" -e "s:-Wl,--export:--export:"` - atk_lib=`pkg-config --libs atk gtk+-2.0 | sed -e "s:-Wl,--export:--export:"` - fi - - sed -e "s:/bluebird/teamswt/swt-builddir/IBMJava2-141:$JAVA_HOME:" \ - -e "s:/bluebird/teamswt/swt-builddir/jdk1.5.0:$JAVA_HOME:" \ - -e "s:/mozilla/mozilla/1.6/linux_gtk2/mozilla/dist:$MOZILLA_FIVE_HOME:" \ - -e "s:/usr/lib/mozilla-1.6:$MOZILLA_FIVE_HOME:" \ - -e "s:\`pkg-config --libs gtk+-2.0 gthread-2.0\`:${gtk_lib}:" \ - -e "s:\`pkg-config --libs atk gtk+-2.0\`:${atk_lib}:" \ - -e "s:\`pkg-config --libs gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0\`:${gnome_lib}:" \ - -e "s:-I\$(JAVA_HOME)/include:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-I\$(JAVA_HOME)\t:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-L\$(MOZILLA_HOME)/lib -lembed_base_s:-L${mozilla_dir} -lgtkembedmoz:" \ - -e "s:MOZILLACFLAGS = -O:MOZILLACFLAGS = -O -fPIC:" \ - -e "s:\$(JAVA_HOME)/jre/bin:\$(JAVA_HOME)/jre/lib/i386:" \ - -i make_gtk.mak || die "Failed to patch ${gtk_swt_src_dir}/make_gtk.mak" - - cd ${S}/"${motif_swt_src_dir}" - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT/common/library/* . - sed -e "s:/bluebird/teamswt/swt-builddir/IBMJava2-141:$JAVA_HOME:" \ - -e "s:/bluebird/teamswt/swt-builddir/motif21:/usr/X11R6:" \ - -e "s:/usr/lib/qt-3.1:/usr/qt/3:" \ - -e "s:-lkdecore:-L\`kde-config --prefix\`/lib -lkdecore:" \ - -e "s:-I/usr/include/kde:-I\`kde-config --prefix\`/include:" \ - -e "s:-I\$(JAVA_HOME)/include:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-I\$(JAVA_HOME)\t:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-L\$(MOZILLA_HOME)/lib -lembed_base_s:-L\$(MOZILLA_HOME):" \ - -e "s:-L\$(JAVA_HOME)/jre/bin:-L\$(JAVA_HOME)/jre/lib/i386:" \ - -i make_linux.mak || die "Failed to patch ${motif_swt_src_dir}/make_linux.mak" - - cd ${S} - find -type f -name about.mappings -exec sed -e "s/@build@/Gentoo Linux ${PF}/" -i \{\} \; -} - -build_gtk_frontend() { - - einfo "Building gtk+ SWT" - - # Build the eclipse gtk binary - cd ${S}/plugins/platform-launcher/library/gtk - tcsh -f build.csh -output eclipse-gtk -arch $ARCH || die "Failed to build eclipse-gtk" - - cd ${S}/"${gtk_swt_src_dir}" - make -f make_gtk.mak make_swt || die "Failed to build platform-independent SWT support" - make -f make_gtk.mak make_atk || die "Failed to build atk support" - - if use gnome ; then - einfo "Building GNOME VFS support" - make -f make_gtk.mak make_gnome || die "Failed to build GNOME VFS support" - fi - - if use mozilla ; then - einfo "Building Mozilla component" - make -f make_gtk.mak make_mozilla || die "Failed to build Mozilla support" - fi - - # move the *.so files to the right path so eclipse can find them - mkdir -p ${S}/"${gtk_swt_dest_dir}" - mv *.so ${S}/"${gtk_swt_dest_dir}" -} - -build_motif_frontend() { - - # Build eclipse motif binary - cd ${S}/plugins/platform-launcher/library/motif - tcsh -f build.csh -output eclipse-motif -arch $ARCH || die "Failed to build eclipse-motif" - - cd ${S}/"${motif_swt_src_dir}" - - make -f make_linux.mak make_swt || die "Failed to build Motif support" - if use kde ; then - make -f make_linux.mak make_kde || die "Failed to build KDE support" - fi - - # move the *.so files to the right path so eclipse can find them - mkdir -p ${S}/"${motif_swt_dest_dir}" - mv *.so ${S}/"${motif_swt_dest_dir}" -} - -src_compile() { - - addwrite "/proc/self/maps" - addwrite "/proc/cpuinfo" - addwrite "/dev/random" - - # Figure out correct boot classpath - if [ ! -z "`java-config --java-version | grep IBM`" ] ; then - # IBM JRE - ant_extra_opts="-Dbootclasspath=$(java-config --jdk-home)/jre/lib/core.jar:$(java-config --jdk-home)/jre/lib/xml.jar:$(java-config --jdk-home)/jre/lib/graphics.jar" - else - # Sun derived JREs (Blackdown, Sun) - ant_extra_opts="-Dbootclasspath=$(java-config --jdk-home)/jre/lib/rt.jar" - fi - - # karltk: jikes doesn't work as a compiler for Eclipse currently. -# if use jikes ; then -# ant_extra_opts="${ant_extra_opts} -Dbuild.compiler=jikes" -# fi - - export ANT_OPTS=-Xmx768m - - # Build selected frontends - ${use_gtk} && build_gtk_frontend - ${use_motif} && build_motif_frontend - - einfo "Building resources.core plugin" - cd ${S}/${core_src_dir} - make JDK_INCLUDE="`java-config -O`/include -I`java-config -O`/include/linux" || die "Failed to build resource.core plugin" - mkdir -p ${S}/"${core_dest_dir}" - mv *.so ${S}/"${core_dest_dir}" - - cd ${S} - - # Build all java code -- default to gtk if neither of gtk, motif, - # kde are set - if ( ${use_gtk} || ! ( ${use_gtk} || ${use_motif} || use kde ) ); then - einfo "Building GTK+ frontend -- see compilelog.txt for details" - ant -q -q \ - -buildfile build.xml \ - -DinstallOs=linux \ - -DinstallWs=gtk \ - -DinstallArch=$ARCH \ - ${ant_extra_opts} compile install \ - || die "Failed to compile java code (gtk+)" - fi - if ${use_motif} ; then - einfo "Building Motif frontend -- see compilelog.txt for details" - ant -q -q \ - -buildfile build.xml \ - -DcollPlace="eclipse-${SLOT}" \ - -DinstallOs=linux \ - -DinstallWs=motif \ - -DinstallArch=$ARCH \ - ${ant_extra_opts} compile install \ - || die "Failed to compile java code (Motif)" - fi - - cat ${FILESDIR}/eclipse-${SLOT}.desktop | \ - sed -e "s/@PV@/${PV}/" \ - > eclipse-${SLOT}.desktop -} - -src_install() { - eclipse_dir="/usr/lib/eclipse-${SLOT}" - - dodir /usr/lib - - einfo "Installing features and plugins" - if ${use_gtk} ; then - [ -f result/linux-gtk-${ARCH}-sdk.zip ] || die "gtk zip bundle was not build properly!" - unzip -o -q result/linux-gtk-${ARCH}-sdk.zip -d ${D}/usr/lib - fi - if ${use_motif} ; then - [ -f result/linux-motif-${ARCH}-sdk.zip ] || die "motif zip bundle was not build properly!" - unzip -o -q result/linux-motif-${ARCH}-sdk.zip -d ${D}/usr/lib - fi - - mv ${D}/usr/lib/eclipse ${D}/${eclipse_dir} - - insinto ${eclipse_dir} - - # Install launchers and native code - exeinto ${eclipse_dir} - if ${use_gtk} ; then - einfo "Installing eclipse-gtk binary" - doexe plugins/platform-launcher/library/gtk/eclipse-gtk \ - || die "Failed to install eclipse-gtk" - fi - if ${use_motif} ; then - einfo "Installing eclipse-motif binary" - doexe plugins/platform-launcher/library/motif/eclipse-motif \ - || die "Failed to install eclipse-motif" - fi - - doins plugins/org.eclipse.platform/{startup.jar,splash.bmp} - - # Install startup script - exeinto /usr/bin - doexe ${FILESDIR}/eclipse-${SLOT} - - # Install GNOME .desktop file - if use gnome ; then - insinto /usr/share/gnome/apps/Development - doins eclipse-${SLOT}.desktop - fi - - # Install KDE .desktop file - if use kde ; then - # karltk: should check for available kde version(s) - insinto /usr/kde/3.2/share/applnk/Applications/ - doins eclipse-${SLOT}.desktop - fi - - doman ${FILESDIR}/eclipse.1 -} - -pkg_postinst() { - ewarn "This is a development version of Eclipse. Be sensible when reporting" - ewarn "bugs upstream, and verify that the problem exists in the official" - ewarn "binary drop, too." - -} diff --git a/dev-util/eclipse-sdk/eclipse-sdk-3.1_pre2.ebuild b/dev-util/eclipse-sdk/eclipse-sdk-3.1_pre2.ebuild deleted file mode 100644 index 58405c94e8ad..000000000000 --- a/dev-util/eclipse-sdk/eclipse-sdk-3.1_pre2.ebuild +++ /dev/null @@ -1,522 +0,0 @@ -# Copyright 1999-2005 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_pre2.ebuild,v 1.4 2005/03/23 16:16:48 seemant Exp $ - -inherit eutils java-utils - -# karltk: Portage 2.0.51_pre13 needs this -MY_A="eclipse-sourceBuild-srcIncluded-3.1M2.zip" -DESCRIPTION="Eclipse Tools Platform" -HOMEPAGE="http://www.eclipse.org/" -SRC_URI="http://download2.eclipse.org/downloads/drops/S-3.1M2-200409240800/${MY_A}" -IUSE="gtk motif gnome kde mozilla" -SLOT="3.1" -LICENSE="CPL-1.0" -KEYWORDS="~x86 ~ppc ~amd64" - -RDEPEND="|| ( >=virtual/jdk-1.4.2 =dev-java/blackdown-jdk-1.4.2* ) - gtk? ( >=x11-libs/gtk+-2.2.4 ) - !gtk? ( kde? ( kde-base/kdelibs x11-libs/openmotif ) - !kde? ( motif? ( x11-libs/openmotif ) - !motif? ( >=x11-libs/gtk+-2.2.4 ) - ) - ) - mozilla? ( >=www-client/mozilla-1.5 ) - gnome? ( =gnome-base/gnome-vfs-2* =gnome-base/libgnomeui-2* ) - !media-fonts/unifont" - -DEPEND="${RDEPEND} - >=dev-java/ant-1.5.3 - >=sys-apps/findutils-4.1.7 - >=app-shells/tcsh-6.11 - app-arch/unzip - app-arch/zip" - -pkg_setup() { - - check-ram - check-cflags - - java-utils_setup-vm - - java-utils_ensure-vm-version-ge 1 4 2 - - ${use_gtk} && use mozilla && detect-mozilla - - setup-dir-vars - - use gtk && use_gtk='true' || use_gtk='false' - use motif && use_motif='true' || use_motif='false' - - # If gtk+ enabled, disable motif - ${use_gtk} && use_motif='false' - - # If neither enabled, default to gtk+ - ${use_gtk} || ${use_motif} || use_gtk='true' - - # If both enabled, use gtk+ only - ${use_gtk} && ${use_motif} && use_motif='false' - - einfo "Compiling gtk+ frontend : ${use_gtk}" - einfo "Compiling Motif frontend : ${use_motif}" - -} - -src_unpack() { - mkdir ${S} - cd ${S} - unpack ${MY_A} || die "Could not unpack ${MY_A}" - - einfo "Setting up virtual machine" - java-utils_setup-vm - - einfo "Patching build.xmls" - process-build-xmls - - einfo "Cleaning out prebuilt code" - clean-prebuilt-code - - einfo "Patching gtk+ frontend" - patch-gtk-frontend - - einfo "Patching Motif frontend" - patch-motif-frontend - - einfo "Set build version in Help->About" - find -type f -name about.mappings -exec sed -e "s/@build@/Gentoo Linux ${PF}/" -i \{\} \; \ - || die "Failed to patch about.mappings" -} - -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 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 - ant_extra_opts="-Dbootclasspath=$(java-config --jdk-home)/jre/lib/core.jar:$(java-config --jdk-home)/jre/lib/xml.jar:$(java-config --jdk-home)/jre/lib/graphics.jar" - else - # Sun derived JREs (Blackdown, Sun) - ant_extra_opts="-Dbootclasspath=$(java-config --jdk-home)/jre/lib/rt.jar" - fi - - export ANT_OPTS=-Xmx768m - - einfo "Building resources.core plugin" - cd ${S}/${core_src_dir} - make JDK_INCLUDE="`java-config -O`/include -I`java-config -O`/include/linux" || die "Failed to build resource.core plugin" - mkdir -p ${S}/"${core_dest_dir}" - mv *.so ${S}/"${core_dest_dir}" - cd ${S} - - # Build selected native frontend code - ${use_gtk} && build-gtk-native - ${use_motif} && build-motif-native - - # Compile all Java code - ${use_gtk} && build-gtk-java compile - ${use_motif} && build-motif-java compile - - # Install all Java code - ${use_gtk} && build-gtk-java install - ${use_motif} && build-motif-java install - - - create-desktop-entry -} - -src_install() { - eclipse_dir="/usr/lib/eclipse-${SLOT}" - - dodir /usr/lib - - einfo "Installing features and plugins" - if ${use_gtk} ; then - [ -f result/linux-gtk-${ARCH}-sdk.zip ] || die "gtk zip bundle was not build properly!" - unzip -o -q result/linux-gtk-${ARCH}-sdk.zip -d ${D}/usr/lib - fi - if ${use_motif} ; then - [ -f result/linux-motif-${ARCH}-sdk.zip ] || die "motif zip bundle was not build properly!" - unzip -o -q result/linux-motif-${ARCH}-sdk.zip -d ${D}/usr/lib - fi - - mv ${D}/usr/lib/eclipse ${D}/${eclipse_dir} - - insinto ${eclipse_dir} - - # Install launchers and native code - exeinto ${eclipse_dir} - if ${use_gtk} ; then - einfo "Installing eclipse-gtk binary" - doexe plugins/platform-launcher/library/gtk/eclipse-gtk \ - || die "Failed to install eclipse-gtk" - fi - if ${use_motif} ; then - einfo "Installing eclipse-motif binary" - doexe plugins/platform-launcher/library/motif/eclipse-motif \ - || die "Failed to install eclipse-motif" - fi - - doins plugins/org.eclipse.platform/{startup.jar,splash.bmp} - - # Install startup script - exeinto /usr/bin - doexe ${FILESDIR}/eclipse-${SLOT} - - install-desktop-entry - - doman ${FILESDIR}/eclipse.1 - - install-link-files -} - -pkg_postinst() -{ - check-cflags -} - -# ----------------------------------------------------------------------------- -# Helper functions -# ----------------------------------------------------------------------------- - -function detect-mozilla() -{ - mozilla_dir="--mozdir-unset---" - - if [ -f ${ROOT}/usr/lib/mozilla/libgtkembedmoz.so ] ; then - einfo "Compiling against www-client/mozilla" - mozilla_dir=/usr/lib/mozilla - elif [ -f ${ROOT}/usr/lib/MozillaFirefox/libgtkembedmoz.so ] ; then - einfo "Compiling against www-client/mozilla-firefox" - mozilla_dir=/usr/lib/MozillaFirefox - else - eerror "You need either Mozilla, compiled against gtk+ v2.0 or newer" - eerror "To merge it, do USE=\"gtk2\" emerge mozilla." - eerror "Otherwise, remove \"mozilla\" from use flags" - die "Need Mozilla compiled with gtk+-2.x support" - fi -} - -function setup-dir-vars() { - gtk_launcher_src_dir="plugins/platform-launcher/library/gtk" - motif_launch_src_dir="plugins/platform-launcher/library/motif" - gtk_swt_src_dir="plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library" - motif_swt_src_dir="plugins/org.eclipse.swt/Eclipse SWT PI/motif/library" - - core_src_dir="plugins/org.eclipse.core.resources.linux/src" - - case ${ARCH} in - sparc) - gtk_swt_dest_dir="plugins/org.eclipse.swt.gtk/os/solaris/sparc" - motif_swt_dest_dir="plugins/org.eclipse.swt.motif/os/solaris/sparc" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/solaris/sparc" - ;; - x86) - gtk_swt_dest_dir="plugins/org.eclipse.swt.gtk/os/linux/x86" - motif_swt_dest_dir="plugins/org.eclipse.swt.motif/os/linux/x86" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/linux/x86" - ;; - ppc) - gtk_swt_dest_dir="plugins/org.eclipse.swt.gtk/os/linux/ppc" - motif_swt_dest_dir="plugins/org.eclipse.swt.motif/os/linux/ppc" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/linux/ppc/" - ;; - amd64) - gtk_swt_dest_dir="plugins/org.eclipse.swt.gtk64/os/linux/amd64" - motif_swt_dest_dir="plugins/org.eclipse.swt.motif/os/linux/amd64" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/linux/amd64" - ;; - esac -} - -function process-build-xmls() { - - # Turn off verbose mode and on errors in all build.xml files - find . -type f -name "build.xml" | while read x ; do - sed -i -r \ - -e 's/failonerror="[^"]+"/failonerror="true"/' \ - -e 's/verbose="[^"]+"/verbose="false"/' "$x" - done -} - -function patch-gtk-frontend() { - - # Move around some source code that should have been handled by the build system - local m="Failed to move native files for SWT gtk+" - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT/common/library/* ${S}/"${gtk_swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Mozilla/common/library/* ${S}/"${gtk_swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Program/gnome/library/* ${S}/"${gtk_swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ AWT/gtk/library/* ${S}/"${gtk_swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Program/kde/library/* ${S}/"${gtk_swt_src_dir}" || die ${m} - - if use gnome ; then - gnome_lib=`pkg-config --libs gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0 | sed -e "s:-pthread:-lpthread:" -e "s:-Wl,--export:--export:"` - fi - - if ${use_gtk} ; then - gtk_lib="`pkg-config --libs gtk+-2.0 | sed -e 's:-pthread:-lpthread:' -e 's:-Wl,::'` -L/usr/X11R6/lib -lXtst" - atk_lib=`pkg-config --libs atk gtk+-2.0 | sed -e "s:-Wl,--export:--export:"` - fi - - sed -e "s:\`pkg-config --libs gtk+-2.0\`:${gtk_lib}:" \ - -e "s:\`pkg-config --libs atk gtk+-2.0\`:${atk_lib}:" \ - -e "s:\`pkg-config --libs gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0\`:${gnome_lib}:" \ - -e "s:-I\$(JAVA_HOME)/include:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-I\$(JAVA_HOME)\t:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-L\$(GECKO_SDK)/embed_base/bin -lembed_base_s:-L${mozilla_dir} -lgtkembedmoz:" \ - -e "s:\(^.*\)\(-L.*-lembedstring.*\)\(\\\\$\):\1\3:" \ - -e "s:\(^.*\)\(-L.*/xpcom/bin.*\)\(\\\\$\):\1\3:" \ - -e "s:\(^.*-L.*-lnspr4.*$\)::" \ - -e "s:MOZILLACFLAGS = -O:MOZILLACFLAGS = -O -DNO_nsEmbedString_1Equals -I${mozilla_dir}/include/java:" \ - -e "s:\(-include \)\(\$(GECKO_SDK)\)\(/mozilla-config.h\):\1${mozilla_dir}/include\3:" \ - -e "s:\(-I\$(GECKO_SDK)\)\(/.*\)\(/include\):-I${mozilla_dir}/include\2:g" \ - -e "s:\$(XTEST_LIB_PATH):/usr/X11R6/lib:" \ - -e "s:\$(GECKO_SDK):${mozilla_dir}:" \ - -e "s:/usr/include/kde:\`kde-config --prefix\`/include:" \ - -e "s:\(KDE_LIBS.*\)\(-L/usr/lib\):\1-L\`kde-config --prefix\`/lib:" \ - -i "${S}/${gtk_swt_src_dir}/make_linux.mak" || die "Failed to patch ${gtk_swt_src_dir}/make_linux.mak" - - - sed -e "s:\(JAVA_HOME *=\)\(.*$\):\1${JAVA_HOME}:" \ - -e "s:\(GECKO_SDK *=\)\(.*$\):\1${mozilla_dir:-/usr/lib/mozilla}:" \ - -e "s:\(AWT_LIB_PATH *=\)\(.*$\):\1\$JAVA_HOME/jre/lib/${ARCH}:" \ - -i "${S}/${gtk_swt_src_dir}/build.sh" || die "Failed to patch ${gtk_swt_src_dir}/build.sh" - -} - -function patch-motif-frontend() -{ - local m="Failed to move native files for SWT Motif" - - cp plugins/org.eclipse.swt/Eclipse\ SWT/common/library/* ${S}/"${motif_swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Program/kde/library/* ${S}/"${motif_swt_src_dir}" || die ${m} - - sed -e "s:/bluebird/teamswt/swt-builddir/IBMJava2-141:$JAVA_HOME:" \ - -e "s:/bluebird/teamswt/swt-builddir/motif21:/usr/X11R6:" \ - -e "s:/usr/lib/qt-3.1:/usr/qt/3:" \ - -e "s:-lkdecore:-L\`kde-config --prefix\`/lib -lkdecore:" \ - -e "s:-I/usr/include/kde:-I\`kde-config --prefix\`/include:" \ - -e "s:-I\$(JAVA_HOME)/include:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-I\$(JAVA_HOME)\t:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-L\$(MOZILLA_HOME)/lib -lembed_base_s:-L\$(MOZILLA_HOME):" \ - -e "s:-L\$(JAVA_HOME)/jre/bin:-L\$(JAVA_HOME)/jre/lib/i386:" \ - -i "${motif_swt_src_dir}"/make_linux.mak || die "Failed to modify ${motif_swt_src_dir}/make_linux.mak" -} - - -function create-desktop-entry() { - - cat ${FILESDIR}/eclipse-${SLOT}.desktop | \ - sed -e "s/@PV@/${PV}/" \ - > eclipse-${SLOT}.desktop || die "Failed to create desktop entry" -} - -function build-gtk-java() { - local target=${1} - - einfo "Building GTK+ frontend (${target}) -- see compilelog.txt for details" - ant -q -q \ - -buildfile build.xml \ - -DcollPlace="eclipse-${SLOT}" \ - -DinstallOs=linux \ - -DinstallWs=gtk \ - -DinstallArch=$ARCH \ - ${ant_extra_opts} ${target} \ - || die "Failed to ${target} Java code (gtk+)" -} - -function build-motif-java() { - local target=${1} - - einfo "Building Motif frontend (${target}) -- see compilelog.txt for details" - ant -q -q \ - -buildfile build.xml \ - -DcollPlace="eclipse-${SLOT}" \ - -DinstallOs=linux \ - -DinstallWs=motif \ - -DinstallArch=$ARCH \ - ${ant_extra_opts} ${target} \ - || die "Failed to ${target} java code (Motif)" -} - -function install-desktop-entry() { - - # Install GNOME .desktop file - if use gnome ; then - insinto /usr/share/gnome/apps/Development - doins eclipse-${SLOT}.desktop - fi - - # Install KDE .desktop file - if use kde ; then - for x in /usr/kde/* ; do - insinto ${x}/share/applnk/Applications/ - doins eclipse-${SLOT}.desktop - done - fi -} - -function build-gtk-native() { - - einfo "Building gtk+ SWT" - - # kludge to allow patches to applied at unpack, but correct compilation - if [ ${ARCH} == "amd64" ] ; then - gtk_swt_src_dir="plugins/org.eclipse.swt.gtk64/src/Eclipse SWT PI/gtk/library" - fi - - # Perpare destination directory - mkdir -p ${S}/"${gtk_swt_dest_dir}" - - # Build the eclipse gtk binary - cd ${S}/plugins/platform-launcher/library/gtk - case ${ARCH} in - sparc|x86|ppc) - bash ./build.sh -output eclipse-gtk -arch $ARCH || die "Failed to build eclipse-gtk" - ;; - amd64) - bash ./build.sh -output eclipse-gtk -arch $ARCH || die "Failed to build eclipse-gtk" - ;; - esac - - - cd ${S}/"${gtk_swt_src_dir}" - case ${ARCH} in - sparc|x86|ppc) - bash ./build.sh make_swt || die "Failed to build platform-independent SWT support" - bash ./build.sh make_atk || die "Failed to build atk support" - ;; - amd64) - bash ./build64.sh make_swt || die "Failed to build platform-independent SWT support" - bash ./build64.sh make_atk || die "Failed to build atk support" - ;; - esac - - if use gnome ; then - einfo "Building GNOME VFS support" - case ${ARCH} in - sparc|x86|ppc) - bash ./build.sh make_gnome || die "Failed to build GNOME VFS support" - ;; - amd64) - bash ./build64.sh make_gnome || die "Failed to build GNOME VFS support" - ;; - esac - fi - - if use kde ; then - einfo "Building KDE support" - bash ./build.sh make_kde || die "Failed to build KDE support" - fi - - if use mozilla ; then - einfo "Building Mozilla component" - case $ARCH in - sparc|x86|ppc) - bash ./build.sh make_mozilla || die "Failed to build Mozilla support" - ;; - amd64) - bash ./build64.sh make_mozilla || die "Failed to build Mozilla support" - ;; - esac - fi - - # move the *.so files to the right path so eclipse can find them - # karltk: do this incrementally at each step above, with || die - mv *.so ${S}/"${gtk_swt_dest_dir}" - cd ${S} - - einfo "Native gtk+ bindings built" -} - -function build-motif-native() { - - einfo "Building Motif SWT" - - # Prepare destination directory - mkdir -p ${S}/"${motif_swt_dest_dir}" - - # Build eclipse motif binary - cd ${S}/plugins/platform-launcher/library/motif - bash build.sh -output eclipse-motif -arch $ARCH || die "Failed to build eclipse-motif" - - cd ${S}/"${motif_swt_src_dir}" - - make -f make_linux.mak make_swt QT_HOME="${QTDIR}" || die "Failed to build Motif support" - if use kde ; then - make -f make_linux.mak make_kde QT_HOME="${QTDIR}" || die "Failed to build KDE support" - fi - - # move the *.so files to the right path so eclipse can find them - # karltk: do this incrementally at each step above, with || die - mv *.so ${S}/"${motif_swt_dest_dir}" - cd ${S} - - einfo "Native Motif bindings built" -} - - - -function clean-prebuilt-code() { - - # Clean up all pre-built code - ant -q -DinstallWs=gtk -DinstallOs=linux clean - ant -q -DinstallWs=motif -DinstallOs=linux clean - find ${S} -name '*.so' -exec rm -f {} \; - find ${S} -name '*.so.*' -exec rm -f {} \; - find ${S} -type f -name 'eclipse' -exec rm {} \; - rm -f eclipse - -} - -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() { - 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 check-cflags() { - local badflags="-fomit-frame-pointer -msse2" - local error=false - - for x in ${badflags} ; do - if [ ! -z "$(echo ${CFLAGS} | grep -- $x)" ] ; then - ewarn "Found offending option $x in your CFLAGS" - error=true - fi - done - if [ ${error} == "true" ]; then - echo - ewarn "One or more potentially CFLAGS detected. When you run into trouble, please" - ewarn "edit /etc/make.conf and remove all offending flags, then recompile" - ewarn "Eclipse and all its dependencies before submitting a bug report." - echo - einfo "Tip: use equery depgraph \"=${PF}\" to list all dependencies" - echo - ebeep - fi -} diff --git a/dev-util/eclipse-sdk/eclipse-sdk-3.1_pre3.ebuild b/dev-util/eclipse-sdk/eclipse-sdk-3.1_pre3.ebuild deleted file mode 100644 index c9f8a708b257..000000000000 --- a/dev-util/eclipse-sdk/eclipse-sdk-3.1_pre3.ebuild +++ /dev/null @@ -1,522 +0,0 @@ -# Copyright 1999-2005 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_pre3.ebuild,v 1.4 2005/03/23 16:16:48 seemant Exp $ - -inherit eutils java-utils - -# karltk: Portage 2.0.51_pre13 needs this -MY_A="eclipse-sourceBuild-srcIncluded-3.1M3.zip" -DESCRIPTION="Eclipse Tools Platform" -HOMEPAGE="http://www.eclipse.org/" -SRC_URI="http://download.eclipse.org/downloads/drops/S-3.1M3-200411050810/${MY_A}" -IUSE="gtk motif gnome kde mozilla" -SLOT="3.1" -LICENSE="CPL-1.0" -KEYWORDS="~x86 ~ppc ~amd64" - -RDEPEND="|| ( >=virtual/jdk-1.4.2 =dev-java/blackdown-jdk-1.4.2* ) - gtk? ( >=x11-libs/gtk+-2.2.4 ) - !gtk? ( kde? ( kde-base/kdelibs x11-libs/openmotif ) - !kde? ( motif? ( x11-libs/openmotif ) - !motif? ( >=x11-libs/gtk+-2.2.4 ) - ) - ) - mozilla? ( >=www-client/mozilla-1.5 ) - gnome? ( =gnome-base/gnome-vfs-2* =gnome-base/libgnomeui-2* ) - !media-fonts/unifont" - -DEPEND="${RDEPEND} - >=dev-java/ant-1.5.3 - >=sys-apps/findutils-4.1.7 - >=app-shells/tcsh-6.11 - app-arch/unzip - app-arch/zip" - -pkg_setup() { - - check-ram - check-cflags - - java-utils_setup-vm - - java-utils_ensure-vm-version-ge 1 4 2 - - ${use_gtk} && use mozilla && detect-mozilla - - setup-dir-vars - - use gtk && use_gtk='true' || use_gtk='false' - use motif && use_motif='true' || use_motif='false' - - # If gtk+ enabled, disable motif - ${use_gtk} && use_motif='false' - - # If neither enabled, default to gtk+ - ${use_gtk} || ${use_motif} || use_gtk='true' - - # If both enabled, use gtk+ only - ${use_gtk} && ${use_motif} && use_motif='false' - - einfo "Compiling gtk+ frontend : ${use_gtk}" - einfo "Compiling Motif frontend : ${use_motif}" - -} - -src_unpack() { - mkdir ${S} - cd ${S} - unpack ${MY_A} || die "Could not unpack ${MY_A}" - - einfo "Setting up virtual machine" - java-utils_setup-vm - - einfo "Patching build.xmls" - process-build-xmls - - einfo "Cleaning out prebuilt code" - clean-prebuilt-code - - einfo "Patching gtk+ frontend" - patch-gtk-frontend - - einfo "Patching Motif frontend" - patch-motif-frontend - - einfo "Set build version in Help->About" - find -type f -name about.mappings -exec sed -e "s/@build@/Gentoo Linux ${PF}/" -i \{\} \; \ - || die "Failed to patch about.mappings" -} - -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 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 - ant_extra_opts="-Dbootclasspath=$(java-config --jdk-home)/jre/lib/core.jar:$(java-config --jdk-home)/jre/lib/xml.jar:$(java-config --jdk-home)/jre/lib/graphics.jar" - else - # Sun derived JREs (Blackdown, Sun) - ant_extra_opts="-Dbootclasspath=$(java-config --jdk-home)/jre/lib/rt.jar" - fi - - export ANT_OPTS=-Xmx768m - - einfo "Building resources.core plugin" - cd ${S}/${core_src_dir} - make JDK_INCLUDE="`java-config -O`/include -I`java-config -O`/include/linux" || die "Failed to build resource.core plugin" - mkdir -p ${S}/"${core_dest_dir}" - mv *.so ${S}/"${core_dest_dir}" - cd ${S} - - # Build selected native frontend code - ${use_gtk} && build-gtk-native - ${use_motif} && build-motif-native - - # Compile all Java code - ${use_gtk} && build-gtk-java compile - ${use_motif} && build-motif-java compile - - # Install all Java code - ${use_gtk} && build-gtk-java install - ${use_motif} && build-motif-java install - - - create-desktop-entry -} - -src_install() { - eclipse_dir="/usr/lib/eclipse-${SLOT}" - - dodir /usr/lib - - einfo "Installing features and plugins" - if ${use_gtk} ; then - [ -f result/org.eclipse.sdk-I*-linux.gtk.${ARCH}.zip ] || die "gtk zip bundle was not build properly!" - unzip -o -q result/org.eclipse.sdk-I*-linux.gtk.${ARCH}.zip -d ${D}/usr/lib - fi - if ${use_motif} ; then - [ -f result/org.eclipse.sdk-I*-linux.motif.${ARCH}.zip ] || die "motif zip bundle was not build properly!" - unzip -o -q result/org.eclipse.sdk-I*-linux.motif.${ARCH}.zip -d ${D}/usr/lib - fi - - mv ${D}/usr/lib/eclipse ${D}/${eclipse_dir} - - insinto ${eclipse_dir} - - # Install launchers and native code - exeinto ${eclipse_dir} - if ${use_gtk} ; then - einfo "Installing eclipse-gtk binary" - doexe plugins/platform-launcher/library/gtk/eclipse-gtk \ - || die "Failed to install eclipse-gtk" - fi - if ${use_motif} ; then - einfo "Installing eclipse-motif binary" - doexe plugins/platform-launcher/library/motif/eclipse-motif \ - || die "Failed to install eclipse-motif" - fi - - doins plugins/org.eclipse.platform/{startup.jar,splash.bmp} - - # Install startup script - exeinto /usr/bin - doexe ${FILESDIR}/eclipse-${SLOT} - - install-desktop-entry - - doman ${FILESDIR}/eclipse.1 - - install-link-files -} - -pkg_postinst() -{ - check-cflags -} - -# ----------------------------------------------------------------------------- -# Helper functions -# ----------------------------------------------------------------------------- - -function detect-mozilla() -{ - mozilla_dir="--mozdir-unset---" - - if [ -f ${ROOT}/usr/lib/mozilla/libgtkembedmoz.so ] ; then - einfo "Compiling against www-client/mozilla" - mozilla_dir=/usr/lib/mozilla - elif [ -f ${ROOT}/usr/lib/MozillaFirefox/libgtkembedmoz.so ] ; then - einfo "Compiling against www-client/mozilla-firefox" - mozilla_dir=/usr/lib/MozillaFirefox - else - eerror "You need either Mozilla, compiled against gtk+ v2.0 or newer" - eerror "To merge it, do USE=\"gtk2\" emerge mozilla." - eerror "Otherwise, remove \"mozilla\" from use flags" - die "Need Mozilla compiled with gtk+-2.x support" - fi -} - -function setup-dir-vars() { - gtk_launcher_src_dir="plugins/platform-launcher/library/gtk" - motif_launch_src_dir="plugins/platform-launcher/library/motif" - gtk_swt_src_dir="plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library" - motif_swt_src_dir="plugins/org.eclipse.swt/Eclipse SWT PI/motif/library" - - core_src_dir="plugins/org.eclipse.core.resources.linux/src" - - case ${ARCH} in - sparc) - gtk_swt_dest_dir="plugins/org.eclipse.swt.gtk/os/solaris/sparc" - motif_swt_dest_dir="plugins/org.eclipse.swt.motif/os/solaris/sparc" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/solaris/sparc" - ;; - x86) - gtk_swt_dest_dir="plugins/org.eclipse.swt.gtk/os/linux/x86" - motif_swt_dest_dir="plugins/org.eclipse.swt.motif/os/linux/x86" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/linux/x86" - ;; - ppc) - gtk_swt_dest_dir="plugins/org.eclipse.swt.gtk/os/linux/ppc" - motif_swt_dest_dir="plugins/org.eclipse.swt.motif/os/linux/ppc" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/linux/ppc/" - ;; - amd64) - gtk_swt_dest_dir="plugins/org.eclipse.swt.gtk64/os/linux/amd64" - motif_swt_dest_dir="plugins/org.eclipse.swt.motif/os/linux/amd64" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/linux/amd64" - ;; - esac -} - -function process-build-xmls() { - - # Turn off verbose mode and on errors in all build.xml files - find . -type f -name "build.xml" | while read x ; do - sed -i -r \ - -e 's/failonerror="[^"]+"/failonerror="true"/' \ - -e 's/verbose="[^"]+"/verbose="false"/' "$x" - done -} - -function patch-gtk-frontend() { - - # Move around some source code that should have been handled by the build system - local m="Failed to move native files for SWT gtk+" - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT/common/library/* ${S}/"${gtk_swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Mozilla/common/library/* ${S}/"${gtk_swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Program/gnome/library/* ${S}/"${gtk_swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ AWT/gtk/library/* ${S}/"${gtk_swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Program/kde/library/* ${S}/"${gtk_swt_src_dir}" || die ${m} - - if use gnome ; then - gnome_lib=`pkg-config --libs gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0 | sed -e "s:-pthread:-lpthread:" -e "s:-Wl,--export:--export:"` - fi - - if ${use_gtk} ; then - gtk_lib="`pkg-config --libs gtk+-2.0 | sed -e 's:-pthread:-lpthread:' -e 's:-Wl,::'` -L/usr/X11R6/lib -lXtst" - atk_lib=`pkg-config --libs atk gtk+-2.0 | sed -e "s:-Wl,--export:--export:"` - fi - - sed -e "s:\`pkg-config --libs gtk+-2.0\`:${gtk_lib}:" \ - -e "s:\`pkg-config --libs atk gtk+-2.0\`:${atk_lib}:" \ - -e "s:\`pkg-config --libs gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0\`:${gnome_lib}:" \ - -e "s:-I\$(JAVA_HOME)/include:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-I\$(JAVA_HOME)\t:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-L\$(GECKO_SDK)/embed_base/bin -lembed_base_s:-L${mozilla_dir} -lgtkembedmoz:" \ - -e "s:\(^.*\)\(-L.*-lembedstring.*\)\(\\\\$\):\1\3:" \ - -e "s:\(^.*\)\(-L.*/xpcom/bin.*\)\(\\\\$\):\1\3:" \ - -e "s:\(^.*-L.*-lnspr4.*$\)::" \ - -e "s:MOZILLACFLAGS = -O:MOZILLACFLAGS = -O -DNO_nsEmbedString_1Equals -I${mozilla_dir}/include/java:" \ - -e "s:\(-include \)\(\$(GECKO_SDK)\)\(/mozilla-config.h\):\1${mozilla_dir}/include\3:" \ - -e "s:\(-I\$(GECKO_SDK)\)\(/.*\)\(/include\):-I${mozilla_dir}/include\2:g" \ - -e "s:\$(XTEST_LIB_PATH):/usr/X11R6/lib:" \ - -e "s:\$(GECKO_SDK):${mozilla_dir}:" \ - -e "s:/usr/include/kde:\`kde-config --prefix\`/include:" \ - -e "s:\(KDE_LIBS.*\)\(-L/usr/lib\):\1-L\`kde-config --prefix\`/lib:" \ - -i "${S}/${gtk_swt_src_dir}/make_linux.mak" || die "Failed to patch ${gtk_swt_src_dir}/make_linux.mak" - - - sed -e "s:\(JAVA_HOME *=\)\(.*$\):\1${JAVA_HOME}:" \ - -e "s:\(GECKO_SDK *=\)\(.*$\):\1${mozilla_dir:-/usr/lib/mozilla}:" \ - -e "s:\(AWT_LIB_PATH *=\)\(.*$\):\1\$JAVA_HOME/jre/lib/${ARCH}:" \ - -i "${S}/${gtk_swt_src_dir}/build.sh" || die "Failed to patch ${gtk_swt_src_dir}/build.sh" - -} - -function patch-motif-frontend() -{ - local m="Failed to move native files for SWT Motif" - - cp plugins/org.eclipse.swt/Eclipse\ SWT/common/library/* ${S}/"${motif_swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Program/kde/library/* ${S}/"${motif_swt_src_dir}" || die ${m} - - sed -e "s:/bluebird/teamswt/swt-builddir/IBMJava2-141:$JAVA_HOME:" \ - -e "s:/bluebird/teamswt/swt-builddir/motif21:/usr/X11R6:" \ - -e "s:/usr/lib/qt-3.1:/usr/qt/3:" \ - -e "s:-lkdecore:-L\`kde-config --prefix\`/lib -lkdecore:" \ - -e "s:-I/usr/include/kde:-I\`kde-config --prefix\`/include:" \ - -e "s:-I\$(JAVA_HOME)/include:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-I\$(JAVA_HOME)\t:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-L\$(MOZILLA_HOME)/lib -lembed_base_s:-L\$(MOZILLA_HOME):" \ - -e "s:-L\$(JAVA_HOME)/jre/bin:-L\$(JAVA_HOME)/jre/lib/i386:" \ - -i "${motif_swt_src_dir}"/make_linux.mak || die "Failed to modify ${motif_swt_src_dir}/make_linux.mak" -} - - -function create-desktop-entry() { - - cat ${FILESDIR}/eclipse-${SLOT}.desktop | \ - sed -e "s/@PV@/${PV}/" \ - > eclipse-${SLOT}.desktop || die "Failed to create desktop entry" -} - -function build-gtk-java() { - local target=${1} - - einfo "Building GTK+ frontend (${target}) -- see compilelog.txt for details" - LOCALCLASSPATH=jdtcore.jar:jdtCompilerAdapter.jar ant -q -q \ - -buildfile build.xml \ - -DcollPlace="eclipse-${SLOT}" \ - -DinstallOs=linux \ - -DinstallWs=gtk \ - -DinstallArch=$ARCH \ - ${ant_extra_opts} ${target} \ - || die "Failed to ${target} Java code (gtk+)" -} - -function build-motif-java() { - local target=${1} - - einfo "Building Motif frontend (${target}) -- see compilelog.txt for details" - LOCALCLASSPATH=jdtcore.jar:jdtCompilerAdapter.jar ant -q -q \ - -buildfile build.xml \ - -DcollPlace="eclipse-${SLOT}" \ - -DinstallOs=linux \ - -DinstallWs=motif \ - -DinstallArch=$ARCH \ - ${ant_extra_opts} ${target} \ - || die "Failed to ${target} java code (Motif)" -} - -function install-desktop-entry() { - - # Install GNOME .desktop file - if use gnome ; then - insinto /usr/share/gnome/apps/Development - doins eclipse-${SLOT}.desktop - fi - - # Install KDE .desktop file - if use kde ; then - for x in /usr/kde/* ; do - insinto ${x}/share/applnk/Applications/ - doins eclipse-${SLOT}.desktop - done - fi -} - -function build-gtk-native() { - - einfo "Building gtk+ SWT" - - # kludge to allow patches to applied at unpack, but correct compilation - if [ ${ARCH} == "amd64" ] ; then - gtk_swt_src_dir="plugins/org.eclipse.swt.gtk64/src/Eclipse SWT PI/gtk/library" - fi - - # Perpare destination directory - mkdir -p ${S}/"${gtk_swt_dest_dir}" - - # Build the eclipse gtk binary - cd ${S}/plugins/platform-launcher/library/gtk - case ${ARCH} in - sparc|x86|ppc) - bash ./build.sh -output eclipse-gtk -arch $ARCH || die "Failed to build eclipse-gtk" - ;; - amd64) - bash ./build.sh -output eclipse-gtk -arch $ARCH || die "Failed to build eclipse-gtk" - ;; - esac - - - cd ${S}/"${gtk_swt_src_dir}" - case ${ARCH} in - sparc|x86|ppc) - bash ./build.sh make_swt || die "Failed to build platform-independent SWT support" - bash ./build.sh make_atk || die "Failed to build atk support" - ;; - amd64) - bash ./build64.sh make_swt || die "Failed to build platform-independent SWT support" - bash ./build64.sh make_atk || die "Failed to build atk support" - ;; - esac - - if use gnome ; then - einfo "Building GNOME VFS support" - case ${ARCH} in - sparc|x86|ppc) - bash ./build.sh make_gnome || die "Failed to build GNOME VFS support" - ;; - amd64) - bash ./build64.sh make_gnome || die "Failed to build GNOME VFS support" - ;; - esac - fi - - if use kde ; then - einfo "Building KDE support" - bash ./build.sh make_kde || die "Failed to build KDE support" - fi - - if use mozilla ; then - einfo "Building Mozilla component" - case $ARCH in - sparc|x86|ppc) - bash ./build.sh make_mozilla || die "Failed to build Mozilla support" - ;; - amd64) - bash ./build64.sh make_mozilla || die "Failed to build Mozilla support" - ;; - esac - fi - - # move the *.so files to the right path so eclipse can find them - # karltk: do this incrementally at each step above, with || die - mv *.so ${S}/"${gtk_swt_dest_dir}" - cd ${S} - - einfo "Native gtk+ bindings built" -} - -function build-motif-native() { - - einfo "Building Motif SWT" - - # Prepare destination directory - mkdir -p ${S}/"${motif_swt_dest_dir}" - - # Build eclipse motif binary - cd ${S}/plugins/platform-launcher/library/motif - bash build.sh -output eclipse-motif -arch $ARCH || die "Failed to build eclipse-motif" - - cd ${S}/"${motif_swt_src_dir}" - - make -f make_linux.mak make_swt QT_HOME="${QTDIR}" || die "Failed to build Motif support" - if use kde ; then - make -f make_linux.mak make_kde QT_HOME="${QTDIR}" || die "Failed to build KDE support" - fi - - # move the *.so files to the right path so eclipse can find them - # karltk: do this incrementally at each step above, with || die - mv *.so ${S}/"${motif_swt_dest_dir}" - cd ${S} - - einfo "Native Motif bindings built" -} - - - -function clean-prebuilt-code() { - - # Clean up all pre-built code - ant -q -DinstallWs=gtk -DinstallOs=linux clean - ant -q -DinstallWs=motif -DinstallOs=linux clean - find ${S} -name '*.so' -exec rm -f {} \; - find ${S} -name '*.so.*' -exec rm -f {} \; - find ${S} -type f -name 'eclipse' -exec rm {} \; - rm -f eclipse - -} - -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() { - 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 check-cflags() { - local badflags="-fomit-frame-pointer -msse2" - local error=false - - for x in ${badflags} ; do - if [ ! -z "$(echo ${CFLAGS} | grep -- $x)" ] ; then - ewarn "Found offending option $x in your CFLAGS" - error=true - fi - done - if [ ${error} == "true" ]; then - echo - ewarn "One or more potentially CFLAGS detected. When you run into trouble, please" - ewarn "edit /etc/make.conf and remove all offending flags, then recompile" - ewarn "Eclipse and all its dependencies before submitting a bug report." - echo - einfo "Tip: use equery depgraph \"=${PF}\" to list all dependencies" - echo - ebeep - fi -} diff --git a/dev-util/eclipse-sdk/eclipse-sdk-3.1_pre4.ebuild b/dev-util/eclipse-sdk/eclipse-sdk-3.1_pre4.ebuild deleted file mode 100644 index 0d6f22950415..000000000000 --- a/dev-util/eclipse-sdk/eclipse-sdk-3.1_pre4.ebuild +++ /dev/null @@ -1,540 +0,0 @@ -# Copyright 1999-2005 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_pre4.ebuild,v 1.8 2005/05/05 23:12:40 swegener Exp $ - -inherit eutils java-utils - -# karltk: Portage 2.0.51_pre13 needs this -MY_A="eclipse-sourceBuild-srcIncluded-3.1M4.zip" -DESCRIPTION="Eclipse Tools Platform" -HOMEPAGE="http://www.eclipse.org/" -SRC_URI="http://download.eclipse.org/downloads/drops/S-3.1M4-200412162000/${MY_A}" -IUSE="gtk motif gnome kde mozilla" -SLOT="3.1" -LICENSE="CPL-1.0" -KEYWORDS="~x86 ~ppc ~amd64" - -RDEPEND="|| ( >=virtual/jdk-1.4.2 =dev-java/blackdown-jdk-1.4.2* ) - gtk? ( >=x11-libs/gtk+-2.2.4 ) - !gtk? ( kde? ( kde-base/kdelibs x11-libs/openmotif ) - !kde? ( motif? ( x11-libs/openmotif ) - !motif? ( >=x11-libs/gtk+-2.2.4 ) - ) - ) - mozilla? ( >=www-client/mozilla-1.7 ) - gnome? ( =gnome-base/gnome-vfs-2* =gnome-base/libgnomeui-2* ) - !media-fonts/unifont" - -DEPEND="${RDEPEND} - >=dev-java/ant-1.5.3 - >=sys-apps/findutils-4.1.7 - >=app-shells/tcsh-6.11 - app-arch/unzip - app-arch/zip" - -pkg_setup() { - - check-ram - check-cflags - - java-utils_setup-vm - - java-utils_ensure-vm-version-ge 1 4 2 - - if (java-utils_is-vm-version-ge 1 5 0) ; then - die "${P} cannot be compiled with a 1.5.x VM, set your system VM to a 1.4.x VM." - fi - - ${use_gtk} && use mozilla && detect-mozilla - - setup-dir-vars - - use gtk && use_gtk='true' || use_gtk='false' - use motif && use_motif='true' || use_motif='false' - - # If gtk+ enabled, disable motif - ${use_gtk} && use_motif='false' - - # If neither enabled, default to gtk+ - ${use_gtk} || ${use_motif} || use_gtk='true' - - # If both enabled, use gtk+ only - ${use_gtk} && ${use_motif} && use_motif='false' - - einfo "Compiling gtk+ frontend : ${use_gtk}" - einfo "Compiling Motif frontend : ${use_motif}" - -} - -src_unpack() { - mkdir ${S} - cd ${S} - unpack ${MY_A} || die "Could not unpack ${MY_A}" - - einfo "Setting up virtual machine" - java-utils_setup-vm - - einfo "Patching build.xmls" - process-build-xmls - - einfo "Cleaning out prebuilt code" - clean-prebuilt-code - - einfo "Patching gtk+ frontend" - patch-gtk-frontend - - einfo "Patching Motif frontend" - patch-motif-frontend - - einfo "Set build version in Help->About" - patch-about -} - -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 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 - ant_extra_opts="-Dbootclasspath=$(java-config --jdk-home)/jre/lib/core.jar:$(java-config --jdk-home)/jre/lib/xml.jar:$(java-config --jdk-home)/jre/lib/graphics.jar" - else - # Sun derived JREs (Blackdown, Sun) - ant_extra_opts="-Dbootclasspath=$(java-config --jdk-home)/jre/lib/rt.jar" - fi - - export ANT_OPTS=-Xmx768m - - einfo "Building resources.core plugin" - cd ${S}/${core_src_dir} - make JDK_INCLUDE="-I`java-config -O`/include -I`java-config -O`/include/linux" || die "Failed to build resource.core plugin" - mkdir -p ${S}/"${core_dest_dir}" - mv *.so ${S}/"${core_dest_dir}" - cd ${S} - - # Build selected native frontend code - ${use_gtk} && build-gtk-native - ${use_motif} && build-motif-native - - # Compile all Java code - ${use_gtk} && build-gtk-java compile - ${use_motif} && build-motif-java compile - - # Install all Java code - ${use_gtk} && build-gtk-java install - ${use_motif} && build-motif-java install - - - create-desktop-entry -} - -src_install() { - eclipse_dir="/usr/lib/eclipse-${SLOT}" - - dodir /usr/lib - - einfo "Installing features and plugins" - if ${use_gtk} ; then - [ -f result/org.eclipse.sdk-I*-linux.gtk.${ARCH}.zip ] || die "gtk zip bundle was not build properly!" - unzip -o -q result/org.eclipse.sdk-I*-linux.gtk.${ARCH}.zip -d ${D}/usr/lib - fi - if ${use_motif} ; then - [ -f result/org.eclipse.sdk-I*-linux.motif.${ARCH}.zip ] || die "motif zip bundle was not build properly!" - unzip -o -q result/org.eclipse.sdk-I*-linux.motif.${ARCH}.zip -d ${D}/usr/lib - fi - - mv ${D}/usr/lib/eclipse ${D}/${eclipse_dir} - - insinto ${eclipse_dir} - - # Install launchers and native code - exeinto ${eclipse_dir} - if ${use_gtk} ; then - einfo "Installing eclipse-gtk binary" - doexe plugins/platform-launcher/library/gtk/eclipse-gtk \ - || die "Failed to install eclipse-gtk" - fi - if ${use_motif} ; then - einfo "Installing eclipse-motif binary" - doexe plugins/platform-launcher/library/motif/eclipse-motif \ - || die "Failed to install eclipse-motif" - fi - - doins plugins/org.eclipse.platform/{startup.jar,splash.bmp} - - # Install startup script - exeinto /usr/bin - doexe ${FILESDIR}/eclipse-${SLOT} - - install-desktop-entry - - doman ${FILESDIR}/eclipse.1 - - install-link-files -} - -pkg_postinst() -{ - check-cflags -} - -# ----------------------------------------------------------------------------- -# Helper functions -# ----------------------------------------------------------------------------- - -function detect-mozilla() -{ - mozilla_dir="--mozdir-unset---" - - if [ -f ${ROOT}/usr/lib/mozilla/libgtkembedmoz.so ] ; then - einfo "Compiling against www-client/mozilla" - mozilla_dir=/usr/lib/mozilla -# elif [ -f ${ROOT}/usr/lib/MozillaFirefox/libgtkembedmoz.so ] ; then -# einfo "Compiling against www-client/mozilla-firefox" -# mozilla_dir=/usr/lib/MozillaFirefox - else - eerror "You need either Mozilla, compiled against gtk+ v2.0 or newer" - eerror "To merge it, do USE=\"gtk2\" emerge mozilla." - eerror "Otherwise, remove \"mozilla\" from use flags" - die "Need Mozilla compiled with gtk+-2.x support" - fi -} - -function setup-dir-vars() { - gtk_launcher_src_dir="plugins/platform-launcher/library/gtk" - motif_launch_src_dir="plugins/platform-launcher/library/motif" - gtk_swt_src_dir="plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library" - motif_swt_src_dir="plugins/org.eclipse.swt/Eclipse SWT PI/motif/library" - - core_src_dir="plugins/org.eclipse.core.resources.linux/src" - - case ${ARCH} in - sparc) - gtk_swt_dest_dir="plugins/org.eclipse.swt.gtk/os/solaris/sparc" - motif_swt_dest_dir="plugins/org.eclipse.swt.motif/os/solaris/sparc" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/solaris/sparc" - ;; - x86) - gtk_swt_dest_dir="plugins/org.eclipse.swt.gtk/os/linux/x86" - motif_swt_dest_dir="plugins/org.eclipse.swt.motif/os/linux/x86" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/linux/x86" - ;; - ppc) - gtk_swt_dest_dir="plugins/org.eclipse.swt.gtk/os/linux/ppc" - motif_swt_dest_dir="plugins/org.eclipse.swt.motif/os/linux/ppc" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/linux/ppc/" - ;; - amd64) - gtk_swt_dest_dir="plugins/org.eclipse.swt.gtk64/os/linux/amd64" - motif_swt_dest_dir="plugins/org.eclipse.swt.motif/os/linux/amd64" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/linux/amd64" - ;; - esac -} - -function process-build-xmls() { - - # Turn off verbose mode and on errors in all build.xml files - find . -type f -name "build.xml" | while read x ; do - sed -i -r \ - -e 's/failonerror="[^"]+"/failonerror="true"/' \ - -e 's/verbose="[^"]+"/verbose="false"/' "$x" - done -} - -function patch-gtk-frontend() { - - # Move around some source code that should have been handled by the build system - local m="Failed to move native files for SWT gtk+" - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT/common/library/* ${S}/"${gtk_swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Mozilla/common/library/* ${S}/"${gtk_swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Program/gnome/library/* ${S}/"${gtk_swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ AWT/gtk/library/* ${S}/"${gtk_swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Program/kde/library/* ${S}/"${gtk_swt_src_dir}" || die ${m} - - if use gnome ; then - gnome_lib=`pkg-config --libs gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0 | sed -e "s:-pthread:-lpthread:" -e "s:-Wl,--export:--export:"` - fi - - if ${use_gtk} ; then - gtk_lib="`pkg-config --libs gtk+-2.0 | sed -e 's:-pthread:-lpthread:' -e 's:-Wl,::'` -L/usr/X11R6/lib -lXtst" - atk_lib=`pkg-config --libs atk gtk+-2.0 | sed -e "s:-Wl,--export:--export:"` - fi - - sed -e "s:\`pkg-config --libs gtk+-2.0\`:${gtk_lib}:" \ - -e "s:\`pkg-config --libs atk gtk+-2.0\`:${atk_lib}:" \ - -e "s:\`pkg-config --libs gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0\`:${gnome_lib}:" \ - -e "s:-I\$(JAVA_HOME)/include:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-I\$(JAVA_HOME)\t:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-L\$(GECKO_SDK)/embed_base/bin -lembed_base_s:-L${mozilla_dir} -lgtkembedmoz:" \ - -e "s:\(^.*\)\(-L.*-lembedstring.*\)\(\\\\$\):\1\3:" \ - -e "s:\(^.*\)\(-L.*/xpcom/bin.*\)\(\\\\$\):\1\3:" \ - -e "s:\(^.*-L.*-lnspr4.*$\)::" \ - -e "s:MOZILLACFLAGS = -O:MOZILLACFLAGS = -O -DNO_nsEmbedString_1Equals -I${mozilla_dir}/include/java:" \ - -e "s:\(-include \)\(\$(GECKO_SDK)\)\(/mozilla-config.h\):\1${mozilla_dir}/include\3:" \ - -e "s:\(-I\$(GECKO_SDK)\)\(/.*\)\(/include\):-I${mozilla_dir}/include\2:g" \ - -e "s:\$(XTEST_LIB_PATH):/usr/X11R6/lib:" \ - -e "s:\$(GECKO_SDK):${mozilla_dir}:" \ - -i "${S}/${gtk_swt_src_dir}/make_linux.mak" || die "Failed to patch ${gtk_swt_src_dir}/make_linux.mak" - - sed \ - -e "s:GECKO_INCLUDES *=.*: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\":" \ - -e "s:GECKO_LIBS *=.*:GECKO_LIBS=\"-L\$\{GECKO_SDK\} -lgtkembedmoz\":" \ - -e "s:\(JAVA_HOME *=\)\(.*$\):\1${JAVA_HOME}:" \ - -e "s:\(GECKO_SDK *=\)\(.*$\):\1${mozilla_dir:-/usr/lib/mozilla}:" \ - -e "s:\(AWT_LIB_PATH *=\)\(.*$\):\1\$JAVA_HOME/jre/lib/${ARCH}:" \ - -e "s:KDE_LIB_PATH=.*:KDE_LIB_PATH=`kde-config --prefix`/lib:" \ - -e "s:KDE_INCLUDE_PATH=.*:KDE_INCLUDE_PATH=`kde-config --prefix`/include:" \ - -i "${S}/${gtk_swt_src_dir}/build.sh" || die "Failed to patch ${gtk_swt_src_dir}/build.sh" - -} - -function patch-motif-frontend() -{ - local m="Failed to move native files for SWT Motif" - - cp plugins/org.eclipse.swt/Eclipse\ SWT/common/library/* ${S}/"${motif_swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Program/kde/library/* ${S}/"${motif_swt_src_dir}" || die ${m} - - sed -e "s:/bluebird/teamswt/swt-builddir/IBMJava2-141:$JAVA_HOME:" \ - -e "s:/bluebird/teamswt/swt-builddir/motif21:/usr/X11R6:" \ - -e "s:/usr/lib/qt-3.1:/usr/qt/3:" \ - -e "s:-lkdecore:-L\`kde-config --prefix\`/lib -lkdecore:" \ - -e "s:-I/usr/include/kde:-I\`kde-config --prefix\`/include:" \ - -e "s:-I\$(JAVA_HOME)/include:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-I\$(JAVA_HOME)\t:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-L\$(MOZILLA_HOME)/lib -lembed_base_s:-L\$(MOZILLA_HOME):" \ - -e "s:-L\$(JAVA_HOME)/jre/bin:-L\$(JAVA_HOME)/jre/lib/i386:" \ - -i "${motif_swt_src_dir}"/make_linux.mak || die "Failed to modify ${motif_swt_src_dir}/make_linux.mak" - - sed \ - -e "s:KDE_LIB_PATH=.*:KDE_LIB_PATH=`kde-config --prefix`/lib:" \ - -e "s:KDE_INCLUDE_PATH=.*:KDE_INCLUDE_PATH=`kde-config --prefix`/include:" \ - -i "${S}/${motif_swt_src_dir}/build.sh" || die "Failed to patch ${motif_swt_src_dir}/build.sh" -} - - -function create-desktop-entry() { - - cat ${FILESDIR}/eclipse-${SLOT}.desktop | \ - sed -e "s/@PV@/${PV}/" \ - > eclipse-${SLOT}.desktop || die "Failed to create desktop entry" -} - -function build-gtk-java() { - local target=${1} - - einfo "Building GTK+ frontend (${target}) -- see compilelog.txt for details" - LOCALCLASSPATH=jdtcore.jar:jdtCompilerAdapter.jar ant -q -q \ - -buildfile build.xml \ - -DcollPlace="eclipse-${SLOT}" \ - -DinstallOs=linux \ - -DinstallWs=gtk \ - -DinstallArch=$ARCH \ - ${ant_extra_opts} ${target} \ - || die "Failed to ${target} Java code (gtk+)" -} - -function build-motif-java() { - local target=${1} - - einfo "Building Motif frontend (${target}) -- see compilelog.txt for details" - LOCALCLASSPATH=jdtcore.jar:jdtCompilerAdapter.jar ant -q -q \ - -buildfile build.xml \ - -DcollPlace="eclipse-${SLOT}" \ - -DinstallOs=linux \ - -DinstallWs=motif \ - -DinstallArch=$ARCH \ - ${ant_extra_opts} ${target} \ - || die "Failed to ${target} java code (Motif)" -} - -function install-desktop-entry() { - - # Install GNOME .desktop file - if use gnome ; then - insinto /usr/share/gnome/apps/Development - doins eclipse-${SLOT}.desktop - fi - - # Install KDE .desktop file - if use kde ; then - insinto /usr/share/applnk/Development - doins eclipse-${SLOT}.desktop - fi -} - -function build-gtk-native() { - - einfo "Building gtk+ SWT" - - # kludge to allow patches to applied at unpack, but correct compilation - if [ ${ARCH} == "amd64" ] ; then - gtk_swt_src_dir="plugins/org.eclipse.swt.gtk64/src/Eclipse SWT PI/gtk/library" - fi - - # Perpare destination directory - mkdir -p ${S}/"${gtk_swt_dest_dir}" - - # Build the eclipse gtk binary - cd ${S}/plugins/platform-launcher/library/gtk - case ${ARCH} in - sparc|x86|ppc) - bash ./build.sh -output eclipse-gtk -arch $ARCH || die "Failed to build eclipse-gtk" - ;; - amd64) - bash ./build.sh -output eclipse-gtk -arch $ARCH || die "Failed to build eclipse-gtk" - ;; - esac - - - cd ${S}/"${gtk_swt_src_dir}" - case ${ARCH} in - sparc|x86|ppc) - bash ./build.sh make_swt || die "Failed to build platform-independent SWT support" - bash ./build.sh make_atk || die "Failed to build atk support" - ;; - amd64) - bash ./build64.sh make_swt || die "Failed to build platform-independent SWT support" - bash ./build64.sh make_atk || die "Failed to build atk support" - ;; - esac - - if use gnome ; then - einfo "Building GNOME VFS support" - case ${ARCH} in - sparc|x86|ppc) - bash ./build.sh make_gnome || die "Failed to build GNOME VFS support" - ;; - amd64) - bash ./build64.sh make_gnome || die "Failed to build GNOME VFS support" - ;; - esac - fi - - if use kde ; then - einfo "Building KDE support" - bash ./build.sh make_kde || die "Failed to build KDE support" - fi - - if use mozilla ; then - einfo "Building Mozilla component" - case $ARCH in - sparc|x86|ppc) - bash ./build.sh make_mozilla || die "Failed to build Mozilla support" - ;; - amd64) - bash ./build64.sh make_mozilla || die "Failed to build Mozilla support" - ;; - esac - fi - - # move the *.so files to the right path so eclipse can find them - # karltk: do this incrementally at each step above, with || die - mv *.so ${S}/"${gtk_swt_dest_dir}" - cd ${S} - - einfo "Native gtk+ bindings built" -} - -function build-motif-native() { - - einfo "Building Motif SWT" - - # Prepare destination directory - mkdir -p ${S}/"${motif_swt_dest_dir}" - - # Build eclipse motif binary - cd ${S}/plugins/platform-launcher/library/motif - bash build.sh -output eclipse-motif -arch $ARCH || die "Failed to build eclipse-motif" - - cd ${S}/"${motif_swt_src_dir}" - - make -f make_linux.mak make_swt QT_HOME="${QTDIR}" || die "Failed to build Motif support" - if use kde ; then - make -f make_linux.mak make_kde QT_HOME="${QTDIR}" || die "Failed to build KDE support" - fi - - # move the *.so files to the right path so eclipse can find them - # karltk: do this incrementally at each step above, with || die - mv *.so ${S}/"${motif_swt_dest_dir}" - cd ${S} - - einfo "Native Motif bindings built" -} - - - -function clean-prebuilt-code() { - - # Clean up all pre-built code - ant -q -DinstallWs=gtk -DinstallOs=linux clean - ant -q -DinstallWs=motif -DinstallOs=linux clean - find ${S} -name '*.so' -exec rm -f {} \; - find ${S} -name '*.so.*' -exec rm -f {} \; - find ${S} -type f -name 'eclipse' -exec rm {} \; - rm -f eclipse - -} - -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() { - 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 check-cflags() { - local badflags="-fomit-frame-pointer -msse2" - local error=false - - for x in ${badflags} ; do - if [ ! -z "$(echo ${CFLAGS} | grep -- $x)" ] ; then - ewarn "Found offending option $x in your CFLAGS" - error=true - fi - done - if [ ${error} == "true" ]; then - echo - ewarn "One or more potentially CFLAGS detected. When you run into trouble, please" - ewarn "edit /etc/make.conf and remove all offending flags, then recompile" - ewarn "Eclipse and all its dependencies before submitting a bug report." - echo - einfo "Tip: use equery depgraph \"=${PF}\" to list all dependencies" - echo - ebeep - fi -} - -function patch-about { - - find -type f -name about.mappings -exec sed -e "s/@build@/Gentoo Linux ${PF}/" -i \{\} \; \ - || die "Failed to patch about.mappings" - - sed -e "s/@build@/Gentoo Linux ${PF}/" \ - -i features/org.eclipse.platform/configuration.files/configuration/config.ini \ - -i build.xml || die "Failed to set build version" -} diff --git a/dev-util/eclipse-sdk/eclipse-sdk-3.1_pre5.ebuild b/dev-util/eclipse-sdk/eclipse-sdk-3.1_pre5.ebuild deleted file mode 100644 index ceee1747ecf8..000000000000 --- a/dev-util/eclipse-sdk/eclipse-sdk-3.1_pre5.ebuild +++ /dev/null @@ -1,541 +0,0 @@ -# Copyright 1999-2005 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_pre5.ebuild,v 1.5 2005/05/05 23:12:40 swegener Exp $ - -inherit eutils java-utils - -# karltk: Portage 2.0.51_pre13 needs this -MY_A="eclipse-sourceBuild-srcIncluded-3.1M5a.zip" -DESCRIPTION="Eclipse Tools Platform" -HOMEPAGE="http://www.eclipse.org/" -SRC_URI="http://download.eclipse.org/downloads/drops/S-3.1M5a-200502191500/${MY_A}" -IUSE="gtk motif gnome kde mozilla" -SLOT="3.1" -LICENSE="CPL-1.0" -KEYWORDS="~x86 ~ppc" - -RDEPEND="|| ( >=virtual/jdk-1.4.2 =dev-java/blackdown-jdk-1.4.2* ) - gtk? ( >=x11-libs/gtk+-2.2.4 ) - !gtk? ( kde? ( kde-base/kdelibs x11-libs/openmotif ) - !kde? ( motif? ( x11-libs/openmotif ) - !motif? ( >=x11-libs/gtk+-2.2.4 ) - ) - ) - mozilla? ( >=www-client/mozilla-1.7 ) - gnome? ( =gnome-base/gnome-vfs-2* =gnome-base/libgnomeui-2* ) - !media-fonts/unifont" - -DEPEND="${RDEPEND} - >=dev-java/ant-1.5.3 - >=sys-apps/findutils-4.1.7 - >=app-shells/tcsh-6.11 - app-arch/unzip - app-arch/zip" - -pkg_setup() { - - check-ram - check-cflags - - java-utils_setup-vm - - java-utils_ensure-vm-version-ge 1 4 2 - - if (java-utils_is-vm-version-ge 1 5 0) ; then - die "${P} cannot be compiled with a 1.5.x VM, set your system VM to a 1.4.x VM." - fi - - ${use_gtk} && use mozilla && detect-mozilla - - setup-dir-vars - - use gtk && use_gtk='true' || use_gtk='false' - use motif && use_motif='true' || use_motif='false' - - # If gtk+ enabled, disable motif - ${use_gtk} && use_motif='false' - - # If neither enabled, default to gtk+ - ${use_gtk} || ${use_motif} || use_gtk='true' - - # If both enabled, use gtk+ only - ${use_gtk} && ${use_motif} && use_motif='false' - - einfo "Compiling gtk+ frontend : ${use_gtk}" - einfo "Compiling Motif frontend : ${use_motif}" - -} - -src_unpack() { - mkdir ${S} - cd ${S} - unpack ${MY_A} || die "Could not unpack ${MY_A}" - - einfo "Setting up virtual machine" - java-utils_setup-vm - - einfo "Patching build.xmls" - process-build-xmls - - einfo "Cleaning out prebuilt code" - clean-prebuilt-code - - einfo "Patching gtk+ frontend" - patch-gtk-frontend - - einfo "Patching Motif frontend" - patch-motif-frontend - - einfo "Set build version in Help->About" - patch-about -} - -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 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 - ant_extra_opts="-Dbootclasspath=$(java-config --jdk-home)/jre/lib/core.jar:$(java-config --jdk-home)/jre/lib/xml.jar:$(java-config --jdk-home)/jre/lib/graphics.jar" - else - # Sun derived JREs (Blackdown, Sun) - ant_extra_opts="-Dbootclasspath=$(java-config --jdk-home)/jre/lib/rt.jar" - fi - - export ANT_OPTS=-Xmx768m - - einfo "Building resources.core plugin" - cd ${S}/${core_src_dir} - make JDK_INCLUDE="-I`java-config -O`/include -I`java-config -O`/include/linux" || die "Failed to build resource.core plugin" - mkdir -p ${S}/"${core_dest_dir}" - mv *.so ${S}/"${core_dest_dir}" - cd ${S} - - # Build selected native frontend code - ${use_gtk} && build-gtk-native - ${use_motif} && build-motif-native - - # Compile all Java code - ${use_gtk} && build-gtk-java compile - ${use_motif} && build-motif-java compile - - # Install all Java code - ${use_gtk} && build-gtk-java install - ${use_motif} && build-motif-java install - - - create-desktop-entry -} - -src_install() { - eclipse_dir="/usr/lib/eclipse-${SLOT}" - - dodir /usr/lib - - einfo "Installing features and plugins" - if ${use_gtk} ; then - [ -f result/org.eclipse.sdk-I*-linux.gtk.${ARCH}.zip ] || die "gtk zip bundle was not build properly!" - tar zxf result/org.eclipse.sdk-I*-linux.gtk.${ARCH}.zip -C ${D}/usr/lib - fi - if ${use_motif} ; then - [ -f result/org.eclipse.sdk-I*-linux.motif.${ARCH}.zip ] || die "motif zip bundle was not build properly!" - tar zxf result/org.eclipse.sdk-I*-linux.motif.${ARCH}.zip -C ${D}/usr/lib - fi - - mv ${D}/usr/lib/eclipse ${D}/${eclipse_dir} - - insinto ${eclipse_dir} - - # Install launchers and native code - exeinto ${eclipse_dir} - if ${use_gtk} ; then - einfo "Installing eclipse-gtk binary" - doexe ${gtk_launcher_src_dir}/eclipse-gtk \ - || die "Failed to install eclipse-gtk" - fi - if ${use_motif} ; then - einfo "Installing eclipse-motif binary" - doexe ${motif_launcher_src_dir}/eclipse-motif \ - || die "Failed to install eclipse-motif" - fi - - doins plugins/org.eclipse.platform/{startup.jar,splash.bmp} - - # Install startup script - exeinto /usr/bin - doexe ${FILESDIR}/eclipse-${SLOT} - - install-desktop-entry - - doman ${FILESDIR}/eclipse.1 - - install-link-files -} - -pkg_postinst() -{ - check-cflags -} - -# ----------------------------------------------------------------------------- -# Helper functions -# ----------------------------------------------------------------------------- - -function detect-mozilla() -{ - mozilla_dir="--mozdir-unset---" - - if [ -f ${ROOT}/usr/lib/mozilla/libgtkembedmoz.so ] ; then - einfo "Compiling against www-client/mozilla" - mozilla_dir=/usr/lib/mozilla -# elif [ -f ${ROOT}/usr/lib/MozillaFirefox/libgtkembedmoz.so ] ; then -# einfo "Compiling against www-client/mozilla-firefox" -# mozilla_dir=/usr/lib/MozillaFirefox - else - eerror "You need either Mozilla, compiled against gtk+ v2.0 or newer" - eerror "To merge it, do USE=\"gtk2\" emerge mozilla." - eerror "Otherwise, remove \"mozilla\" from use flags" - die "Need Mozilla compiled with gtk+-2.x support" - fi -} - -function setup-dir-vars() { - gtk_launcher_src_dir="features/org.eclipse.launchers/library/gtk" - motif_launcher_src_dir="features/org.eclipse.launchers/library/motif" - gtk_swt_src_dir="plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library" - motif_swt_src_dir="plugins/org.eclipse.swt/Eclipse SWT PI/motif/library" - - core_src_dir="plugins/org.eclipse.core.resources.linux/src" - - case ${ARCH} in - sparc) - gtk_swt_dest_dir="plugins/org.eclipse.swt.gtk/os/solaris/sparc" - motif_swt_dest_dir="plugins/org.eclipse.swt.motif/os/solaris/sparc" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/solaris/sparc" - ;; - x86) - gtk_swt_dest_dir="plugins/org.eclipse.swt.gtk/os/linux/x86" - motif_swt_dest_dir="plugins/org.eclipse.swt.motif/os/linux/x86" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/linux/x86" - ;; - ppc) - gtk_swt_dest_dir="plugins/org.eclipse.swt.gtk/os/linux/ppc" - motif_swt_dest_dir="plugins/org.eclipse.swt.motif/os/linux/ppc" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/linux/ppc/" - ;; - amd64) - gtk_swt_dest_dir="plugins/org.eclipse.swt.gtk64/os/linux/amd64" - motif_swt_dest_dir="plugins/org.eclipse.swt.motif/os/linux/amd64" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/linux/amd64" - ;; - esac -} - -function process-build-xmls() { - - # Turn off verbose mode and on errors in all build.xml files - find . -type f -name "build.xml" | while read x ; do - sed -i -r \ - -e 's/failonerror="[^"]+"/failonerror="true"/' \ - -e 's/verbose="[^"]+"/verbose="false"/' "$x" - done -} - -function patch-gtk-frontend() { - - # Move around some source code that should have been handled by the build system - local m="Failed to move native files for SWT gtk+" - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT/common/library/* ${S}/"${gtk_swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Mozilla/common/library/* ${S}/"${gtk_swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Program/gnome/library/* ${S}/"${gtk_swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ AWT/gtk/library/* ${S}/"${gtk_swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Program/kde/library/* ${S}/"${gtk_swt_src_dir}" || die ${m} - - if use gnome ; then - gnome_lib=`pkg-config --libs gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0 | sed -e "s:-pthread:-lpthread:" -e "s:-Wl,--export:--export:"` - fi - - if ${use_gtk} ; then - gtk_lib="`pkg-config --libs gtk+-2.0 | sed -e 's:-pthread:-lpthread:' -e 's:-Wl,::'` -L/usr/X11R6/lib -lXtst" - atk_lib=`pkg-config --libs atk gtk+-2.0 | sed -e "s:-Wl,--export:--export:"` - fi - - sed -e "s:\`pkg-config --libs gtk+-2.0\`:${gtk_lib}:" \ - -e "s:\`pkg-config --libs atk gtk+-2.0\`:${atk_lib}:" \ - -e "s:\`pkg-config --libs gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0\`:${gnome_lib}:" \ - -e "s:-I\$(JAVA_HOME)/include:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-I\$(JAVA_HOME)\t:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-L\$(GECKO_SDK)/embed_base/bin -lembed_base_s:-L${mozilla_dir} -lgtkembedmoz:" \ - -e "s:\(^.*\)\(-L.*-lembedstring.*\)\(\\\\$\):\1\3:" \ - -e "s:\(^.*\)\(-L.*/xpcom/bin.*\)\(\\\\$\):\1\3:" \ - -e "s:\(^.*-L.*-lnspr4.*$\)::" \ - -e "s:MOZILLACFLAGS = -O:MOZILLACFLAGS = -O -DNO_nsEmbedString_1Equals -I${mozilla_dir}/include/java:" \ - -e "s:\(-include \)\(\$(GECKO_SDK)\)\(/mozilla-config.h\):\1${mozilla_dir}/include\3:" \ - -e "s:\(-I\$(GECKO_SDK)\)\(/.*\)\(/include\):-I${mozilla_dir}/include\2:g" \ - -e "s:\$(XTEST_LIB_PATH):/usr/X11R6/lib:" \ - -e "s:\$(GECKO_SDK):${mozilla_dir}:" \ - -i "${S}/${gtk_swt_src_dir}/make_linux.mak" || die "Failed to patch ${gtk_swt_src_dir}/make_linux.mak" - - sed \ - -e "s:GECKO_INCLUDES *=.*: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\":" \ - -e "s:GECKO_LIBS *=.*:GECKO_LIBS=\"-L\$\{GECKO_SDK\} -lgtkembedmoz\":" \ - -e "s:\(JAVA_HOME *=\)\(.*$\):\1${JAVA_HOME}:" \ - -e "s:\(GECKO_SDK *=\)\(.*$\):\1${mozilla_dir:-/usr/lib/mozilla}:" \ - -e "s:\(AWT_LIB_PATH *=\)\(.*$\):\1\$JAVA_HOME/jre/lib/${ARCH}:" \ - -e "s:KDE_LIB_PATH=.*:KDE_LIB_PATH=`kde-config --prefix`/lib:" \ - -e "s:KDE_INCLUDE_PATH=.*:KDE_INCLUDE_PATH=`kde-config --prefix`/include:" \ - -i "${S}/${gtk_swt_src_dir}/build.sh" || die "Failed to patch ${gtk_swt_src_dir}/build.sh" - -} - -function patch-motif-frontend() -{ - local m="Failed to move native files for SWT Motif" - - cp plugins/org.eclipse.swt/Eclipse\ SWT/common/library/* ${S}/"${motif_swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Program/kde/library/* ${S}/"${motif_swt_src_dir}" || die ${m} - - sed -e "s:/bluebird/teamswt/swt-builddir/IBMJava2-141:$JAVA_HOME:" \ - -e "s:/bluebird/teamswt/swt-builddir/motif21:/usr/X11R6:" \ - -e "s:/usr/lib/qt-3.1:/usr/qt/3:" \ - -e "s:-lkdecore:-L\`kde-config --prefix\`/lib -lkdecore:" \ - -e "s:-I/usr/include/kde:-I\`kde-config --prefix\`/include:" \ - -e "s:-I\$(JAVA_HOME)/include:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-I\$(JAVA_HOME)\t:-I\$(JAVA_HOME)/include -I\$(JAVA_HOME)/include/linux:" \ - -e "s:-L\$(MOZILLA_HOME)/lib -lembed_base_s:-L\$(MOZILLA_HOME):" \ - -e "s:-L\$(JAVA_HOME)/jre/bin:-L\$(JAVA_HOME)/jre/lib/i386:" \ - -i "${motif_swt_src_dir}"/make_linux.mak || die "Failed to modify ${motif_swt_src_dir}/make_linux.mak" - - sed \ - -e "s:KDE_LIB_PATH=.*:KDE_LIB_PATH=`kde-config --prefix`/lib:" \ - -e "s:KDE_INCLUDE_PATH=.*:KDE_INCLUDE_PATH=`kde-config --prefix`/include:" \ - -i "${S}/${motif_swt_src_dir}/build.sh" || die "Failed to patch ${motif_swt_src_dir}/build.sh" -} - - -function create-desktop-entry() { - - cat ${FILESDIR}/eclipse-${SLOT}.desktop | \ - sed -e "s/@PV@/${PV}/" \ - > eclipse-${SLOT}.desktop || die "Failed to create desktop entry" -} - -function build-gtk-java() { - local target=${1} - - einfo "Building GTK+ frontend (${target}) -- see compilelog.txt for details" - LOCALCLASSPATH=jdtcore.jar:jdtCompilerAdapter.jar ant -q -q \ - -buildfile build.xml \ - -DcollPlace="eclipse-${SLOT}" \ - -DinstallOs=linux \ - -DinstallWs=gtk \ - -DinstallArch=$ARCH \ - ${ant_extra_opts} ${target} \ - || die "Failed to ${target} Java code (gtk+)" -} - -function build-motif-java() { - local target=${1} - - einfo "Building Motif frontend (${target}) -- see compilelog.txt for details" - LOCALCLASSPATH=jdtcore.jar:jdtCompilerAdapter.jar ant -q -q \ - -buildfile build.xml \ - -DcollPlace="eclipse-${SLOT}" \ - -DinstallOs=linux \ - -DinstallWs=motif \ - -DinstallArch=$ARCH \ - ${ant_extra_opts} ${target} \ - || die "Failed to ${target} java code (Motif)" -} - -function install-desktop-entry() { - - # Install GNOME .desktop file - if use gnome ; then - insinto /usr/share/gnome/apps/Development - doins eclipse-${SLOT}.desktop - fi - - # Install KDE .desktop file - if use kde ; then - insinto /usr/share/applnk/Development - doins eclipse-${SLOT}.desktop - fi -} - -function build-gtk-native() { - - einfo "Building gtk+ SWT" - - # kludge to allow patches to applied at unpack, but correct compilation - if [ ${ARCH} == "amd64" ] ; then - gtk_swt_src_dir="plugins/org.eclipse.swt.gtk64/src/Eclipse SWT PI/gtk/library" - fi - - # Perpare destination directory - mkdir -p ${S}/"${gtk_swt_dest_dir}" - - # Build the eclipse gtk binary - cd ${S}/${gtk_launcher_src_dir} - case ${ARCH} in - sparc|x86|ppc) - bash ./build.sh -output eclipse-gtk -arch $ARCH || die "Failed to build eclipse-gtk" - ;; - amd64) - bash ./build.sh -output eclipse-gtk -arch $ARCH || die "Failed to build eclipse-gtk" - ;; - esac - - - cd ${S}/"${gtk_swt_src_dir}" - case ${ARCH} in - sparc|x86|ppc) - bash ./build.sh make_swt || die "Failed to build platform-independent SWT support" - bash ./build.sh make_atk || die "Failed to build atk support" - ;; - amd64) - bash ./build64.sh make_swt || die "Failed to build platform-independent SWT support" - bash ./build64.sh make_atk || die "Failed to build atk support" - ;; - esac - - if use gnome ; then - einfo "Building GNOME VFS support" - case ${ARCH} in - sparc|x86|ppc) - bash ./build.sh make_gnome || die "Failed to build GNOME VFS support" - ;; - amd64) - bash ./build64.sh make_gnome || die "Failed to build GNOME VFS support" - ;; - esac - fi - - if use kde ; then - einfo "Building KDE support" - bash ./build.sh make_kde || die "Failed to build KDE support" - fi - - if use mozilla ; then - einfo "Building Mozilla component" - case $ARCH in - sparc|x86|ppc) - bash ./build.sh make_mozilla || die "Failed to build Mozilla support" - ;; - amd64) - bash ./build64.sh make_mozilla || die "Failed to build Mozilla support" - ;; - esac - fi - - # move the *.so files to the right path so eclipse can find them - # karltk: do this incrementally at each step above, with || die - mv *.so ${S}/"${gtk_swt_dest_dir}" - cd ${S} - - einfo "Native gtk+ bindings built" -} - -function build-motif-native() { - - einfo "Building Motif SWT" - - # Prepare destination directory - mkdir -p ${S}/"${motif_swt_dest_dir}" - - # Build eclipse motif binary - cd ${S}/${motify_launcher_src_dir} - bash build.sh -output eclipse-motif -arch $ARCH || die "Failed to build eclipse-motif" - - cd ${S}/"${motif_swt_src_dir}" - - make -f make_linux.mak make_swt QT_HOME="${QTDIR}" || die "Failed to build Motif support" - if use kde ; then - make -f make_linux.mak make_kde QT_HOME="${QTDIR}" || die "Failed to build KDE support" - fi - - # move the *.so files to the right path so eclipse can find them - # karltk: do this incrementally at each step above, with || die - mv *.so ${S}/"${motif_swt_dest_dir}" - cd ${S} - - einfo "Native Motif bindings built" -} - - - -function clean-prebuilt-code() { - - # Clean up all pre-built code - ant -q -DinstallWs=gtk -DinstallOs=linux clean - ant -q -DinstallWs=motif -DinstallOs=linux clean - find ${S} -name '*.so' -exec rm -f {} \; - find ${S} -name '*.so.*' -exec rm -f {} \; - find ${S} -type f -name 'eclipse' -exec rm {} \; - rm -f eclipse - -} - -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() { - 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 check-cflags() { - local badflags="-fomit-frame-pointer -msse2" - local error=false - - for x in ${badflags} ; do - if [ ! -z "$(echo ${CFLAGS} | grep -- $x)" ] ; then - ewarn "Found offending option $x in your CFLAGS" - error=true - fi - done - if [ ${error} == "true" ]; then - echo - ewarn "One or more potentially CFLAGS detected. When you run into trouble, please" - ewarn "edit /etc/make.conf and remove all offending flags, then recompile" - ewarn "Eclipse and all its dependencies before submitting a bug report." - echo - einfo "Tip: use equery depgraph \"=${PF}\" to list all dependencies" - echo - ebeep - fi -} - -function patch-about { - - find -type f -name about.mappings -exec sed -e "s/@build@/Gentoo Linux ${PF}/" -i \{\} \; \ - || die "Failed to patch about.mappings" - - sed -e "s/@build@/Gentoo Linux ${PF}/" \ - -i features/org.eclipse.platform/gtk/configuration/config.ini \ - -i features/org.eclipse.platform/motif/configuration/config.ini \ - -i build.xml || die "Failed to set build version" -} diff --git a/dev-util/eclipse-sdk/eclipse-sdk-3.1_pre6-r1.ebuild b/dev-util/eclipse-sdk/eclipse-sdk-3.1_pre6-r1.ebuild deleted file mode 100644 index 77ea93394820..000000000000 --- a/dev-util/eclipse-sdk/eclipse-sdk-3.1_pre6-r1.ebuild +++ /dev/null @@ -1,480 +0,0 @@ -# Copyright 1999-2005 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_pre6-r1.ebuild,v 1.2 2005/05/19 15:58:26 swegener Exp $ - -inherit eutils java-utils - -# karltk: Portage 2.0.51_pre13 needs this -MY_A="eclipse-sourceBuild-srcIncluded-3.1M6.zip" -DESCRIPTION="Eclipse Tools Platform" -HOMEPAGE="http://www.eclipse.org/" -SRC_URI="http://download.eclipse.org/downloads/drops/S-3.1M6-200504011645/${MY_A}" -IUSE="gnome mozilla jikes gcj nosrc nodoc" -SLOT="3.1" -LICENSE="CPL-1.0" -KEYWORDS="~x86 ~ppc" - -RDEPEND=" - || ( >=virtual/jre-1.4.2 =dev-java/blackdown-jdk-1.4.2* ) - >=x11-libs/gtk+-2.2.4 - mozilla? ( >=www-client/mozilla-1.4 ) - jikes? ( >=dev-java/jikes-1.21 ) - gcj? ( >=sys-devel/gcc-4.0.0_beta20050305 ) - gnome? ( =gnome-base/gnome-vfs-2* =gnome-base/libgnomeui-2* )" - -DEPEND="${RDEPEND} - >=dev-java/ant-1.5.3 - >=sys-apps/findutils-4.1.7 - app-arch/unzip - app-arch/zip" - -pkg_setup() { - - check-ram - check-cflags - - java-utils_setup-vm - - java-utils_ensure-vm-version-ge 1 4 2 - - if (java-utils_is-vm-version-ge 1 5 0) ; then - die "${P} cannot be compiled with a 1.5.x VM, set your system VM to a 1.4.x VM." - fi - -} - -src_unpack() { - - setup-dir-vars - - mkdir ${S} - cd ${S} - unpack ${MY_A} || die "Could not unpack ${MY_A}" - - einfo "Setting up virtual machine" - java-utils_setup-vm - - einfo "Patching build.xmls" - process-build-xmls - - einfo "Cleaning out prebuilt code" - clean-prebuilt-code - - einfo "Patching frontend" - patch-frontend - - einfo "Set build version in Help->About" - patch-about -} - -src_compile() { - - ${use_gtk} && use mozilla && detect-mozilla - setup-dir-vars - - # 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 classpath and other Ant options - setup-ant-opts - - einfo "Building native front end code" - build-native - - einfo "Building core resources" - build-core-resources - - einfo "Bootstrapping ecj compiler" - build-compiler - - einfo "Compiling all Java code" - build-java compile - - einfo "Installing all code" - build-java install - - einfo "Creating .desktop entry" - create-desktop-entry -} - -src_install() { - - setup-dir-vars - - eclipse_dir="/usr/lib/eclipse-${SLOT}" - - dodir /usr/lib - - einfo "Installing features and plugins" - - [ -f result/org.eclipse.sdk-I*-linux.gtk.${ARCH}.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 - - mv ${D}/usr/lib/eclipse ${D}/${eclipse_dir} - - insinto ${eclipse_dir} - - # Install launchers and native code - exeinto ${eclipse_dir} - - einfo "Installing eclipse-gtk binary" - doexe ${launcher_src_dir}/eclipse-gtk || die "Failed to install eclipse-gtk" - - doins plugins/org.eclipse.platform/{startup.jar,splash.bmp} - - if use nosrc ; then - einfo "Stripping away source code" - strip-src - fi - - if use nodoc ; then - einfo "Stripping away documentation" - strip-docs - fi - - dodir /var/lib/eclipse - echo "osgi.configuration=/var/lib/eclipse" >> ${D}/${eclipse_dir}/eclipse.ini - - # Install startup script - exeinto /usr/bin - doexe ${FILESDIR}/eclipse-${SLOT} - - install-desktop-entry - - doman ${FILESDIR}/eclipse.1 - - install-link-files -} - -pkg_postinst() -{ - check-cflags -} - -# ----------------------------------------------------------------------------- -# Helper functions -# ----------------------------------------------------------------------------- - -function detect-mozilla() -{ - mozilla_dir="--mozdir-unset---" - - if [ -f ${ROOT}/usr/lib/mozilla/libgtkembedmoz.so ] ; then - einfo "Compiling against www-client/mozilla" - mozilla_dir=/usr/lib/mozilla - elif [ -f ${ROOT}/usr/lib/MozillaFirefox/libgtkembedmoz.so ] ; then - einfo "Compiling against www-client/mozilla-firefox" - mozilla_dir=/usr/lib/MozillaFirefox - else - eerror "You have enabled the embedded mozilla component, but no suitable" - eerror "provider was found. You need Mozilla or Firefox 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 -} - -function setup-dir-vars() { - launcher_src_dir="features/org.eclipse.launchers/library/gtk" - swt_src_dir="plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library" - - core_src_dir="plugins/org.eclipse.core.resources.linux/src" - - case ${ARCH} in - x86) - 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() { - - # Turn off verbose mode and on errors in all build.xml files - find . -type f -name "build.xml" | while read x ; do - sed -i -r \ - -e 's/failonerror="[^"]+"/failonerror="true"/' \ - -e 's/verbose="[^"]+"/verbose="false"/' "$x" - done -} - -function patch-frontend() { - - # Move around some source code that should have been handled by the build system - # Some files are arbitrarily duplicated (make_common.mak), but others are not. - # I'm feeling inclined to start using the term "eclipse logic" to refer to build - # system strangeness, because this build system has heaploads and heaploads of - # weird idiosyncracies, and they keep changing between minor versions. Hurrah. -- karltk - - local m="Failed to move native files for SWT gtk+" - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT/common/library/* ${S}/"${swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Mozilla/common/library/* ${S}/"${swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Program/gnome/library/* ${S}/"${swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ AWT/gtk/library/* ${S}/"${swt_src_dir}" || die ${m} -} - -function create-desktop-entry() { - - cat ${FILESDIR}/eclipse-${SLOT}.desktop | \ - sed -e "s/@PV@/${PV}/" \ - > eclipse-${SLOT}.desktop || die "Failed to create desktop entry" -} - -function build-java() { - local target=${1} - - einfo "Building GTK+ frontend (${target}) -- see compilelog.txt for details" - LOCALCLASSPATH=jdtcore.jar ant -q -q \ - -buildfile build.xml \ - -DcollPlace="eclipse-${SLOT}" \ - -DinstallOs=linux \ - -DinstallWs=gtk \ - -DinstallArch=$ARCH \ - ${ant_extra_opts} ${target} \ - || die "Failed to ${target} Java code (gtk+)" -} - -function install-desktop-entry() { - - dodir /usr/share/applnk/Development - insinto /usr/share/applnk/Development - doins eclipse-${SLOT}.desktop -} - -function build-native() { - - einfo "Building SWT" - - # Perpare destination directory - mkdir -p ${S}/"${swt_dest_dir}" - - - einfo "Building the eclipse-gtk binary" - - cd ${S}/${launcher_src_dir} - PROGRAM_OUTPUT=eclipse-gtk \ - DEFAULT_OS=linux \ - DEFAULT_OS_ARCH=${ARCH} \ - DEFAULT_WS=gtk \ - make -f make_linux.mak || die "Failed to build eclipse-gtk" - - cd ${S}/"${swt_src_dir}" - - einfo "Building the SWT bindings" - - # Disabled for 3.1 series - # KDE_LIB_PATH=$(kde-config --prefix)/lib - # KDE_INCLUDE_PATH=$(kde-config --prefix)/include - - local awt_lib_path - - [ ${ARCH} == 'x86' ] && awt_lib_path="${JAVA_HOME}/jre/lib/i386 -L${JAVA_HOME}/jre/bin" - [ ${ARCH} == 'amd64' ] && awt_lib_path=${JAVA_HOME}/jre/lib/amd64 - - [ ${ARCH} == 'amd64' ] && swt_ptr_cflags=-DSWT_PTR_SIZE_64 - - [ ${ARCH} == 'x86' ] && output_dir="../../../org.eclipse.swt.gtk/os/linux/x86" - [ ${ARCH} == 'ppc' ] && output_dir="../../../org.eclipse.swt.gtk64/os/linux/ppc" - [ ${ARCH} == 'amd64' ] && output_dir="../../../org.eclipse.swt.gtk64/os/linux/x86_64" - - export AWT_LIB_PATH=${awt_lib_path} - export XTEST_LIB_PATH=/usr/X11R6/lib - export GECKO_SDK=/usr/lib/mozilla - 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} -lgtkembedmoz" - export SWT_PTR_CFLAGS="${swt_ptr_cflags} -I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux" - export OUTPUT_DIR=${output_dir} - - - einfo "Building SWT support" - make -f make_linux.mak make_swt || "Failed to build SWT support" - cp libswt-gtk-*.so libswt-pi-gtk-*.so ${S}/"${swt_dest_dir}" || die "Failed to copy SWT .so files" - - einfo "Building AWT support" - make -f make_linux.mak make_awt || "Failed to build AWT support" - cp libswt-awt-gtk-*.so ${S}/"${swt_dest_dir}" || die "Failed to copy AWT .so" - - if use gnome ; then - einfo "Building GNOME VFS support" - make -f make_linux.mak make_gnome || die "Failed to build GNOME VFS support" - cp libswt-gnome-gtk-*.so ${S}/"${swt_dest_dir}" || die "Failed to copy GNOME VFS .so files" - fi - - if use mozilla ; then - einfo "Building Mozilla component" - make -f make_linux.mak make_mozilla || die "Failed to build Mozilla support" - cp libswt-mozilla-gtk-*.so ${S}/"${swt_dest_dir}" || die "Failed to copy GNOME VFS .so files" - fi - - cd ${S} - - einfo "Native gtk+ bindings built" -} - -function clean-prebuilt-code() { - - einfo "Cleaning all pre-built code" - - ant -q -DinstallWs=gtk -DinstallOs=linux clean - ant -q -DinstallWs=motif -DinstallOs=linux clean - find ${S} -name '*.so' -exec rm -f {} \; - find ${S} -name '*.so.*' -exec rm -f {} \; - find ${S} -type f -name 'eclipse' -exec rm {} \; - rm -f eclipse - -} - -function get-memory-total() { - cat /proc/meminfo | grep MemTotal | sed -r "s/[^0-9]*([0-9]+).*/\1/" -} - -function check-ram() { - - einfo "Checking for sufficient physical 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 check-cflags() { - - einfo "Checking for bad CFLAGS" - - local badflags="-fomit-frame-pointer -msse2" - local error=false - - for x in ${badflags} ; do - if [ ! -z "$(echo ${CFLAGS} | grep -- $x)" ] ; then - ewarn "Found offending option $x 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 - einfo "Tip: use equery depgraph \"=${PF}\" to list all dependencies" - echo - ebeep - fi -} - -function patch-about() { - - find -type f -name about.mappings -exec sed -e "s/@build@/Gentoo Linux ${PF}/" -i \{\} \; \ - || die "Failed to patch about.mappings" - - sed -e "s/@build@/Gentoo Linux ${PF}/" \ - -i features/org.eclipse.platform/gtk/configuration/config.ini \ - -i features/org.eclipse.platform/motif/configuration/config.ini \ - -i build.xml || die "Failed to set build version" -} - -function build-compiler() { - - pushd . - cd jdtcoresrc - - # WTF? Why does compilejdtcorewithjavac.xml delete its own source code? - # See their #90319. - [ -f src/jdtcore.zip ] && cp src/jdtcore.zip jdtcore.zip-backup - [ -f jdtcore.zip-backup ] && cp jdtcore.zip-backup src/jdtcore.zip - - use jikes && antopts="-Dbuild.compiler=jikes" - - ant ${antopts} -q -f compilejdtcorewithjavac.xml || die "Failed to bootstrap jdtcore compiler" - LOCALCLASSPATH=jdtcore.jar ant -q -f compilejdtcore.xml || die "Failed to compile jdtcore" - - # WTF? Just to make things interesting, compilejdtcore.xml suddenly moves jdtcore.jar to ../ - - popd -} - -function setup-ant-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" - ant_extra_opts="-Dbootclasspath=${bp}/core.jar:${bp}/xml.jar:${bp}/graphics.jar:${bp}/security.jar:${bp}/server.jar" - else - # Sun derived JREs (Blackdown, Sun) - local bp="$(java-config --jdk-home)/jre/lib" - ant_extra_opts="-Dbootclasspath=${bp}/rt.jar:${bp}/jsse.jar" - fi - - einfo "Using ant_extra_opts=${ant_extra_opts}" - export ANT_OPTS=-Xmx768m -} - -function build-core-resources() { - - cd ${S}/${core_src_dir} - make \ - JDK_INCLUDE="-I`java-config -O`/include -I`java-config -O`/include/linux" || die "Failed to build core resources" - - mkdir -p ${S}/"${core_dest_dir}" - mv libcore*.so ${S}/"${core_dest_dir}" - cd ${S} -} - -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() { - :; -} diff --git a/dev-util/eclipse-sdk/eclipse-sdk-3.1_pre6.ebuild b/dev-util/eclipse-sdk/eclipse-sdk-3.1_pre6.ebuild deleted file mode 100644 index aa320d95c5bb..000000000000 --- a/dev-util/eclipse-sdk/eclipse-sdk-3.1_pre6.ebuild +++ /dev/null @@ -1,481 +0,0 @@ -# Copyright 1999-2005 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_pre6.ebuild,v 1.4 2005/05/05 23:12:40 swegener Exp $ - -inherit eutils java-utils - -# karltk: Portage 2.0.51_pre13 needs this -MY_A="eclipse-sourceBuild-srcIncluded-3.1M6.zip" -DESCRIPTION="Eclipse Tools Platform" -HOMEPAGE="http://www.eclipse.org/" -SRC_URI="http://download.eclipse.org/downloads/drops/S-3.1M6-200504011645/${MY_A}" -IUSE="gnome mozilla jikes gcj nosrc nodoc" -SLOT="3.1" -LICENSE="CPL-1.0" -KEYWORDS="~x86 ~ppc" - -RDEPEND=" - || ( >=virtual/jre-1.4.2 =dev-java/blackdown-jdk-1.4.2* ) - >=x11-libs/gtk+-2.2.4 - mozilla? ( >=www-client/mozilla-1.4 ) - jikes? ( >=dev-java/jikes-1.21 ) - gcj? ( >=sys-devel/gcc-4.0.0_beta20050305 ) - gnome? ( =gnome-base/gnome-vfs-2* =gnome-base/libgnomeui-2* )" - -DEPEND="${RDEPEND} - >=dev-java/ant-1.5.3 - >=sys-apps/findutils-4.1.7 - >=app-shells/tcsh-6.11 - app-arch/unzip - app-arch/zip" - -pkg_setup() { - - check-ram - check-cflags - - java-utils_setup-vm - - java-utils_ensure-vm-version-ge 1 4 2 - - if (java-utils_is-vm-version-ge 1 5 0) ; then - die "${P} cannot be compiled with a 1.5.x VM, set your system VM to a 1.4.x VM." - fi - -} - -src_unpack() { - - setup-dir-vars - - mkdir ${S} - cd ${S} - unpack ${MY_A} || die "Could not unpack ${MY_A}" - - einfo "Setting up virtual machine" - java-utils_setup-vm - - einfo "Patching build.xmls" - process-build-xmls - - einfo "Cleaning out prebuilt code" - clean-prebuilt-code - - einfo "Patching frontend" - patch-frontend - - einfo "Set build version in Help->About" - patch-about -} - -src_compile() { - - ${use_gtk} && use mozilla && detect-mozilla - setup-dir-vars - - # 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 classpath and other Ant options - setup-ant-opts - - einfo "Building native front end code" - build-native - - einfo "Building core resources" - build-core-resources - - einfo "Bootstrapping ecj compiler" - build-compiler - - einfo "Compiling all Java code" - build-java compile - - einfo "Installing all code" - build-java install - - einfo "Creating .desktop entry" - create-desktop-entry -} - -src_install() { - - setup-dir-vars - - eclipse_dir="/usr/lib/eclipse-${SLOT}" - - dodir /usr/lib - - einfo "Installing features and plugins" - - [ -f result/org.eclipse.sdk-I*-linux.gtk.${ARCH}.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 - - mv ${D}/usr/lib/eclipse ${D}/${eclipse_dir} - - insinto ${eclipse_dir} - - # Install launchers and native code - exeinto ${eclipse_dir} - - einfo "Installing eclipse-gtk binary" - doexe ${launcher_src_dir}/eclipse-gtk || die "Failed to install eclipse-gtk" - - doins plugins/org.eclipse.platform/{startup.jar,splash.bmp} - - if use nosrc ; then - einfo "Stripping away source code" - strip-src - fi - - if use nodoc ; then - einfo "Stripping away documentation" - strip-docs - fi - - dodir /var/lib/eclipse - echo "osgi.configuration=/var/lib/eclipse" >> ${D}/${eclipse_dir}/eclipse.ini - - # Install startup script - exeinto /usr/bin - doexe ${FILESDIR}/eclipse-${SLOT} - - install-desktop-entry - - doman ${FILESDIR}/eclipse.1 - - install-link-files -} - -pkg_postinst() -{ - check-cflags -} - -# ----------------------------------------------------------------------------- -# Helper functions -# ----------------------------------------------------------------------------- - -function detect-mozilla() -{ - mozilla_dir="--mozdir-unset---" - - if [ -f ${ROOT}/usr/lib/mozilla/libgtkembedmoz.so ] ; then - einfo "Compiling against www-client/mozilla" - mozilla_dir=/usr/lib/mozilla - elif [ -f ${ROOT}/usr/lib/MozillaFirefox/libgtkembedmoz.so ] ; then - einfo "Compiling against www-client/mozilla-firefox" - mozilla_dir=/usr/lib/MozillaFirefox - else - eerror "You have enabled the embedded mozilla component, but no suitable" - eerror "provider was found. You need Mozilla or Firefox 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 -} - -function setup-dir-vars() { - launcher_src_dir="features/org.eclipse.launchers/library/gtk" - swt_src_dir="plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library" - - core_src_dir="plugins/org.eclipse.core.resources.linux/src" - - case ${ARCH} in - x86) - 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() { - - # Turn off verbose mode and on errors in all build.xml files - find . -type f -name "build.xml" | while read x ; do - sed -i -r \ - -e 's/failonerror="[^"]+"/failonerror="true"/' \ - -e 's/verbose="[^"]+"/verbose="false"/' "$x" - done -} - -function patch-frontend() { - - # Move around some source code that should have been handled by the build system - # Some files are arbitrarily duplicated (make_common.mak), but others are not. - # I'm feeling inclined to start using the term "eclipse logic" to refer to build - # system strangeness, because this build system has heaploads and heaploads of - # weird idiosyncracies, and they keep changing between minor versions. Hurrah. -- karltk - - local m="Failed to move native files for SWT gtk+" - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT/common/library/* ${S}/"${swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Mozilla/common/library/* ${S}/"${swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Program/gnome/library/* ${S}/"${swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ AWT/gtk/library/* ${S}/"${swt_src_dir}" || die ${m} -} - -function create-desktop-entry() { - - cat ${FILESDIR}/eclipse-${SLOT}.desktop | \ - sed -e "s/@PV@/${PV}/" \ - > eclipse-${SLOT}.desktop || die "Failed to create desktop entry" -} - -function build-java() { - local target=${1} - - einfo "Building GTK+ frontend (${target}) -- see compilelog.txt for details" - LOCALCLASSPATH=jdtcore.jar ant -q -q \ - -buildfile build.xml \ - -DcollPlace="eclipse-${SLOT}" \ - -DinstallOs=linux \ - -DinstallWs=gtk \ - -DinstallArch=$ARCH \ - ${ant_extra_opts} ${target} \ - || die "Failed to ${target} Java code (gtk+)" -} - -function install-desktop-entry() { - - dodir /usr/share/applnk/Development - insinto /usr/share/applnk/Development - doins eclipse-${SLOT}.desktop -} - -function build-native() { - - einfo "Building SWT" - - # Perpare destination directory - mkdir -p ${S}/"${swt_dest_dir}" - - - einfo "Building the eclipse-gtk binary" - - cd ${S}/${launcher_src_dir} - PROGRAM_OUTPUT=eclipse-gtk \ - DEFAULT_OS=linux \ - DEFAULT_OS_ARCH=${ARCH} \ - DEFAULT_WS=gtk \ - make -f make_linux.mak || die "Failed to build eclipse-gtk" - - cd ${S}/"${swt_src_dir}" - - einfo "Building the SWT bindings" - - # Disabled for 3.1 series - # KDE_LIB_PATH=$(kde-config --prefix)/lib - # KDE_INCLUDE_PATH=$(kde-config --prefix)/include - - local awt_lib_path - - [ ${ARCH} == 'x86' ] && awt_lib_path=${JAVA_HOME}/jre/lib/i386 - [ ${ARCH} == 'amd64' ] && awt_lib_path=${JAVA_HOME}/jre/lib/amd64 - - [ ${ARCH} == 'amd64' ] && swt_ptr_cflags=-DSWT_PTR_SIZE_64 - - [ ${ARCH} == 'x86' ] && output_dir="../../../org.eclipse.swt.gtk/os/linux/x86" - [ ${ARCH} == 'ppc' ] && output_dir="../../../org.eclipse.swt.gtk64/os/linux/ppc" - [ ${ARCH} == 'amd64' ] && output_dir="../../../org.eclipse.swt.gtk64/os/linux/x86_64" - - export AWT_LIB_PATH=${awt_lib_path} - export XTEST_LIB_PATH=/usr/X11R6/lib - export GECKO_SDK=/usr/lib/mozilla - 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} -lgtkembedmoz" - export SWT_PTR_CFLAGS="${swt_ptr_cflags} -I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux" - export OUTPUT_DIR=${output_dir} - - - einfo "Building SWT support" - make -f make_linux.mak make_swt || "Failed to build SWT support" - cp libswt-gtk-*.so libswt-pi-gtk-*.so ${S}/"${swt_dest_dir}" || die "Failed to copy SWT .so files" - - einfo "Building AWT support" - make -f make_linux.mak make_awt || "Failed to build AWT support" - cp libswt-awt-gtk-*.so ${S}/"${swt_dest_dir}" || die "Failed to copy AWT .so" - - if use gnome ; then - einfo "Building GNOME VFS support" - make -f make_linux.mak make_gnome || die "Failed to build GNOME VFS support" - cp libswt-gnome-gtk-*.so ${S}/"${swt_dest_dir}" || die "Failed to copy GNOME VFS .so files" - fi - - if use mozilla ; then - einfo "Building Mozilla component" - make -f make_linux.mak make_mozilla || die "Failed to build Mozilla support" - cp libswt-mozilla-gtk-*.so ${S}/"${swt_dest_dir}" || die "Failed to copy GNOME VFS .so files" - fi - - cd ${S} - - einfo "Native gtk+ bindings built" -} - -function clean-prebuilt-code() { - - einfo "Cleaning all pre-built code" - - ant -q -DinstallWs=gtk -DinstallOs=linux clean - ant -q -DinstallWs=motif -DinstallOs=linux clean - find ${S} -name '*.so' -exec rm -f {} \; - find ${S} -name '*.so.*' -exec rm -f {} \; - find ${S} -type f -name 'eclipse' -exec rm {} \; - rm -f eclipse - -} - -function get-memory-total() { - cat /proc/meminfo | grep MemTotal | sed -r "s/[^0-9]*([0-9]+).*/\1/" -} - -function check-ram() { - - einfo "Checking for sufficient physical 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 check-cflags() { - - einfo "Checking for bad CFLAGS" - - local badflags="-fomit-frame-pointer -msse2" - local error=false - - for x in ${badflags} ; do - if [ ! -z "$(echo ${CFLAGS} | grep -- $x)" ] ; then - ewarn "Found offending option $x 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 - einfo "Tip: use equery depgraph \"=${PF}\" to list all dependencies" - echo - ebeep - fi -} - -function patch-about() { - - find -type f -name about.mappings -exec sed -e "s/@build@/Gentoo Linux ${PF}/" -i \{\} \; \ - || die "Failed to patch about.mappings" - - sed -e "s/@build@/Gentoo Linux ${PF}/" \ - -i features/org.eclipse.platform/gtk/configuration/config.ini \ - -i features/org.eclipse.platform/motif/configuration/config.ini \ - -i build.xml || die "Failed to set build version" -} - -function build-compiler() { - - pushd . - cd jdtcoresrc - - # WTF? Why does compilejdtcorewithjavac.xml delete its own source code? - # See their #90319. - [ -f src/jdtcore.zip ] && cp src/jdtcore.zip jdtcore.zip-backup - [ -f jdtcore.zip-backup ] && cp jdtcore.zip-backup src/jdtcore.zip - - use jikes && antopts="-Dbuild.compiler=jikes" - - ant ${antopts} -q -f compilejdtcorewithjavac.xml || die "Failed to bootstrap jdtcore compiler" - LOCALCLASSPATH=jdtcore.jar ant -q -f compilejdtcore.xml || die "Failed to compile jdtcore" - - # WTF? Just to make things interesting, compilejdtcore.xml suddenly moves jdtcore.jar to ../ - - popd -} - -function setup-ant-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" - ant_extra_opts="-Dbootclasspath=${bp}/core.jar:${bp}/xml.jar:${bp}/graphics.jar:${bp}/security.jar" - else - # Sun derived JREs (Blackdown, Sun) - local bp="$(java-config --jdk-home)/jre/lib" - ant_extra_opts="-Dbootclasspath=${bp}/rt.jar:${bp}/jsse.jar" - fi - - einfo "Using ant_extra_opts=${ant_extra_opts}" - export ANT_OPTS=-Xmx768m -} - -function build-core-resources() { - - cd ${S}/${core_src_dir} - make \ - JDK_INCLUDE="-I`java-config -O`/include -I`java-config -O`/include/linux" || die "Failed to build core resources" - - mkdir -p ${S}/"${core_dest_dir}" - mv libcore*.so ${S}/"${core_dest_dir}" - cd ${S} -} - -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() { - :; -} diff --git a/dev-util/eclipse-sdk/eclipse-sdk-3.1_pre7.ebuild b/dev-util/eclipse-sdk/eclipse-sdk-3.1_pre7.ebuild deleted file mode 100644 index 1e0401ad4a2e..000000000000 --- a/dev-util/eclipse-sdk/eclipse-sdk-3.1_pre7.ebuild +++ /dev/null @@ -1,482 +0,0 @@ -# Copyright 1999-2005 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_pre7.ebuild,v 1.1 2005/05/18 21:28:47 karltk Exp $ - -inherit eutils java-utils - -# karltk: Portage 2.0.51_pre13 needs this -MY_A="eclipse-sourceBuild-srcIncluded-3.1M7.zip" -DESCRIPTION="Eclipse Tools Platform" -HOMEPAGE="http://www.eclipse.org/" -SRC_URI="ftp://download.eclipse.org/S-3.1M7-200505131415/${MY_A}" -IUSE="gnome mozilla jikes gcj nosrc nodoc" -SLOT="3.1" -LICENSE="CPL-1.0" -KEYWORDS="~x86 ~ppc" - -RDEPEND=" - || ( >=virtual/jre-1.4.2 =dev-java/blackdown-jdk-1.4.2* ) - >=x11-libs/gtk+-2.2.4 - mozilla? ( >=www-client/mozilla-1.4 ) - jikes? ( >=dev-java/jikes-1.21 ) - gcj? ( >=sys-devel/gcc-4.0.0_beta20050305 ) - gnome? ( =gnome-base/gnome-vfs-2* =gnome-base/libgnomeui-2* )" - -DEPEND="${RDEPEND} - >=dev-java/ant-1.5.3 - >=sys-apps/findutils-4.1.7 - app-arch/unzip - app-arch/zip" - -pkg_setup() { - - use gnome && echo "Building GNOME stuff" - - check-ram - check-cflags - - java-utils_setup-vm - - java-utils_ensure-vm-version-ge 1 4 2 - - if (java-utils_is-vm-version-ge 1 5 0) ; then - die "${P} cannot be compiled with a 1.5.x VM, set your system VM to a 1.4.x VM." - fi - -} - -src_unpack() { - - setup-dir-vars - - mkdir ${S} - cd ${S} - unpack ${MY_A} || die "Could not unpack ${MY_A}" - - einfo "Setting up virtual machine" - java-utils_setup-vm - - einfo "Patching build.xmls" - process-build-xmls - - einfo "Cleaning out prebuilt code" - clean-prebuilt-code - - einfo "Patching frontend" - patch-frontend - - einfo "Set build version in Help->About" - patch-about -} - -src_compile() { - - ${use_gtk} && use mozilla && detect-mozilla - setup-dir-vars - - # 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 classpath and other Ant options - setup-ant-opts - - einfo "Building native front end code" - build-native - - einfo "Building core resources" - build-core-resources - - einfo "Bootstrapping ecj compiler" - build-compiler - - einfo "Compiling all Java code" - build-java compile - - einfo "Installing all code" - build-java install - - einfo "Creating .desktop entry" - create-desktop-entry -} - -src_install() { - - setup-dir-vars - - eclipse_dir="/usr/lib/eclipse-${SLOT}" - - dodir /usr/lib - - einfo "Installing features and plugins" - - [ -f result/org.eclipse.sdk-I*-linux.gtk.${ARCH}.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 - - mv ${D}/usr/lib/eclipse ${D}/${eclipse_dir} - - insinto ${eclipse_dir} - - # Install launchers and native code - exeinto ${eclipse_dir} - - einfo "Installing eclipse-gtk binary" - doexe ${launcher_src_dir}/eclipse-gtk || die "Failed to install eclipse-gtk" - - doins plugins/org.eclipse.platform/{startup.jar,splash.bmp} - - if use nosrc ; then - einfo "Stripping away source code" - strip-src - fi - - if use nodoc ; then - einfo "Stripping away documentation" - strip-docs - fi - - dodir /var/lib/eclipse - echo "osgi.configuration=/var/lib/eclipse" >> ${D}/${eclipse_dir}/eclipse.ini - - # Install startup script - exeinto /usr/bin - doexe ${FILESDIR}/eclipse-${SLOT} - - install-desktop-entry - - doman ${FILESDIR}/eclipse.1 - - install-link-files -} - -pkg_postinst() -{ - check-cflags -} - -# ----------------------------------------------------------------------------- -# Helper functions -# ----------------------------------------------------------------------------- - -function detect-mozilla() -{ - mozilla_dir="--mozdir-unset---" - - if [ -f ${ROOT}/usr/lib/mozilla/libgtkembedmoz.so ] ; then - einfo "Compiling against www-client/mozilla" - mozilla_dir=/usr/lib/mozilla - elif [ -f ${ROOT}/usr/lib/MozillaFirefox/libgtkembedmoz.so ] ; then - einfo "Compiling against www-client/mozilla-firefox" - mozilla_dir=/usr/lib/MozillaFirefox - else - eerror "You have enabled the embedded mozilla component, but no suitable" - eerror "provider was found. You need Mozilla or Firefox 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 -} - -function setup-dir-vars() { - launcher_src_dir="features/org.eclipse.platform.launchers/library/gtk" - swt_src_dir="plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library" - - core_src_dir="plugins/org.eclipse.core.resources.linux/src" - - case ${ARCH} in - x86) - swt_dest_dir="plugins/org.eclipse.swt.gtk.linux.x86" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/linux/x86" - ;; - ppc) - swt_dest_dir="plugins/org.eclipse.swt.gtk.linux.ppc" - core_dest_dir="plugins/org.eclipse.core.resources.linux/os/linux/ppc/" - ;; - esac -} - -function process-build-xmls() { - - # Turn off verbose mode and on errors in all build.xml files - find . -type f -name "build.xml" | while read x ; do - sed -i -r \ - -e 's/failonerror="[^"]+"/failonerror="true"/' \ - -e 's/verbose="[^"]+"/verbose="false"/' "$x" - done -} - -function patch-frontend() { - - # Move around some source code that should have been handled by the build system - # Some files are arbitrarily duplicated (make_common.mak), but others are not. - # I'm feeling inclined to start using the term "eclipse logic" to refer to build - # system strangeness, because this build system has heaploads and heaploads of - # weird idiosyncracies, and they keep changing between minor versions. Hurrah. -- karltk - - local m="Failed to move native files for SWT gtk+" - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT/common/library/* ${S}/"${swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Mozilla/common/library/* ${S}/"${swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ Program/gnome/library/* ${S}/"${swt_src_dir}" || die ${m} - cp ${S}/plugins/org.eclipse.swt/Eclipse\ SWT\ AWT/gtk/library/* ${S}/"${swt_src_dir}" || die ${m} -} - -function create-desktop-entry() { - - cat ${FILESDIR}/eclipse-${SLOT}.desktop | \ - sed -e "s/@PV@/${PV}/" \ - > eclipse-${SLOT}.desktop || die "Failed to create desktop entry" -} - -function build-java() { - local target=${1} - - einfo "Building GTK+ frontend (${target}) -- see compilelog.txt for details" - LOCALCLASSPATH=jdtcore.jar:ecj.jar ant -q -q \ - -buildfile build.xml \ - -DcollPlace="eclipse-${SLOT}" \ - -DinstallOs=linux \ - -DinstallWs=gtk \ - -DinstallArch=$ARCH \ - ${ant_extra_opts} ${target} \ - || die "Failed to ${target} Java code (gtk+)" -} - -function install-desktop-entry() { - - dodir /usr/share/applnk/Development - insinto /usr/share/applnk/Development - doins eclipse-${SLOT}.desktop -} - -function build-native() { - - einfo "Building SWT" - - # Perpare destination directory - mkdir -p ${S}/"${swt_dest_dir}" - - - einfo "Building the eclipse-gtk binary" - - cd ${S}/${launcher_src_dir} - PROGRAM_OUTPUT=eclipse-gtk \ - DEFAULT_OS=linux \ - DEFAULT_OS_ARCH=${ARCH} \ - DEFAULT_WS=gtk \ - make -f make_linux.mak || die "Failed to build eclipse-gtk" - - cd ${S}/"${swt_src_dir}" - - einfo "Building the SWT bindings" - - # Disabled for 3.1 series - # KDE_LIB_PATH=$(kde-config --prefix)/lib - # KDE_INCLUDE_PATH=$(kde-config --prefix)/include - - local awt_lib_path - - [ ${ARCH} == 'x86' ] && awt_lib_path="${JAVA_HOME}/jre/lib/i386 -L${JAVA_HOME}/jre/bin" - [ ${ARCH} == 'amd64' ] && awt_lib_path=${JAVA_HOME}/jre/lib/amd64 - - [ ${ARCH} == 'amd64' ] && swt_ptr_cflags=-DSWT_PTR_SIZE_64 - - [ ${ARCH} == 'x86' ] && output_dir="../../../org.eclipse.swt.gtk.linux.x86" - [ ${ARCH} == 'ppc' ] && output_dir="../../../org.eclipse.swt.gtk.linux.ppc" - [ ${ARCH} == 'amd64' ] && output_dir="../../../org.eclipse.swt.gtk.linux.x86_64" - - export AWT_LIB_PATH=${awt_lib_path} - export XTEST_LIB_PATH=/usr/X11R6/lib - export GECKO_SDK=/usr/lib/mozilla - 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} -lgtkembedmoz" - export SWT_PTR_CFLAGS="${swt_ptr_cflags} -I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux" - export OUTPUT_DIR=${output_dir} - - - einfo "Building SWT support" - make -f make_linux.mak make_swt || "Failed to build SWT support" - cp libswt-gtk-*.so libswt-pi-gtk-*.so ${S}/"${swt_dest_dir}" || die "Failed to copy SWT .so files" - - einfo "Building AWT support" - make -f make_linux.mak make_awt || "Failed to build AWT support" - cp libswt-awt-gtk-*.so ${S}/"${swt_dest_dir}" || die "Failed to copy AWT .so" - - if use gnome ; then - einfo "Building GNOME VFS support" - make -f make_linux.mak make_gnome || die "Failed to build GNOME VFS support" - cp libswt-gnome-gtk-*.so ${S}/"${swt_dest_dir}" || die "Failed to copy GNOME VFS .so files" - fi - - if use mozilla ; then - einfo "Building Mozilla component" - make -f make_linux.mak make_mozilla || die "Failed to build Mozilla support" - cp libswt-mozilla-gtk-*.so ${S}/"${swt_dest_dir}" || die "Failed to copy GNOME VFS .so files" - fi - - cd ${S} - - einfo "Native gtk+ bindings built" -} - -function clean-prebuilt-code() { - - einfo "Cleaning all pre-built code" - - ant -q -DinstallWs=gtk -DinstallOs=linux clean - ant -q -DinstallWs=motif -DinstallOs=linux clean - find ${S} -name '*.so' -exec rm -f {} \; - find ${S} -name '*.so.*' -exec rm -f {} \; - find ${S} -type f -name 'eclipse' -exec rm {} \; - rm -f eclipse - -} - -function get-memory-total() { - cat /proc/meminfo | grep MemTotal | sed -r "s/[^0-9]*([0-9]+).*/\1/" -} - -function check-ram() { - - einfo "Checking for sufficient physical 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 check-cflags() { - - einfo "Checking for bad CFLAGS" - - local badflags="-fomit-frame-pointer -msse2" - local error=false - - for x in ${badflags} ; do - if [ ! -z "$(echo ${CFLAGS} | grep -- $x)" ] ; then - ewarn "Found offending option $x 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 - einfo "Tip: use equery depgraph \"=${PF}\" to list all dependencies" - echo - ebeep - fi -} - -function patch-about() { - - find -type f -name about.mappings -exec sed -e "s/@build@/Gentoo Linux ${PF}/" -i \{\} \; \ - || die "Failed to patch about.mappings" - - sed -e "s/@build@/Gentoo Linux ${PF}/" \ - -i features/org.eclipse.platform/gtk/configuration/config.ini \ - -i features/org.eclipse.platform/motif/configuration/config.ini \ - -i build.xml || die "Failed to set build version" -} - -function build-compiler() { - - pushd . - cd jdtcoresrc - - # WTF? Why does compilejdtcorewithjavac.xml delete its own source code? - # See their #90319. - [ -f src/jdtcore.zip ] && cp src/jdtcore.zip jdtcore.zip-backup - [ -f jdtcore.zip-backup ] && cp jdtcore.zip-backup src/jdtcore.zip - - use jikes && antopts="-Dbuild.compiler=jikes" - - ant ${antopts} -q -f compilejdtcorewithjavac.xml || die "Failed to bootstrap jdtcore compiler" - LOCALCLASSPATH=jdtcore.jar:ecj.jar ant -q -f compilejdtcore.xml || die "Failed to compile jdtcore" - - # WTF? Just to make things interesting, compilejdtcore.xml suddenly moves jdtcore.jar to ../ - - popd -} - -function setup-ant-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" - ant_extra_opts="-Dbootclasspath=${bp}/core.jar:${bp}/xml.jar:${bp}/graphics.jar:${bp}/security.jar:${bp}/server.jar" - else - # Sun derived JREs (Blackdown, Sun) - local bp="$(java-config --jdk-home)/jre/lib" - ant_extra_opts="-Dbootclasspath=${bp}/rt.jar:${bp}/jsse.jar" - fi - - einfo "Using ant_extra_opts=${ant_extra_opts}" - export ANT_OPTS=-Xmx1024m -} - -function build-core-resources() { - - cd ${S}/${core_src_dir} - make \ - JDK_INCLUDE="-I`java-config -O`/include -I`java-config -O`/include/linux" || die "Failed to build core resources" - - mkdir -p ${S}/"${core_dest_dir}" - mv libcore*.so ${S}/"${core_dest_dir}" - cd ${S} -} - -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() { - :; -} diff --git a/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.0.1 b/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.0.1 deleted file mode 100644 index df2af49b408d..000000000000 --- a/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.0.1 +++ /dev/null @@ -1 +0,0 @@ -MD5 c95561df899a47fc05261531ed0b9221 eclipse-sourceBuild-srcIncluded-3.0.1.zip 55618511 diff --git a/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.0.1-r1 b/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.0.1-r1 deleted file mode 100644 index df2af49b408d..000000000000 --- a/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.0.1-r1 +++ /dev/null @@ -1 +0,0 @@ -MD5 c95561df899a47fc05261531ed0b9221 eclipse-sourceBuild-srcIncluded-3.0.1.zip 55618511 diff --git a/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1_pre1 b/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1_pre1 deleted file mode 100644 index 61108b3d07de..000000000000 --- a/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1_pre1 +++ /dev/null @@ -1 +0,0 @@ -MD5 e2ed08cb88adc0262086a77c96ffa2b2 eclipse-sourceBuild-srcIncluded-3.1M1.zip 55540907 diff --git a/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1_pre2 b/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1_pre2 deleted file mode 100644 index d78ae31be016..000000000000 --- a/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1_pre2 +++ /dev/null @@ -1 +0,0 @@ -MD5 a10fc8b23fd7c6783d55d795168879f0 eclipse-sourceBuild-srcIncluded-3.1M2.zip 56139196 diff --git a/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1_pre3 b/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1_pre3 deleted file mode 100644 index bd168ececd67..000000000000 --- a/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1_pre3 +++ /dev/null @@ -1 +0,0 @@ -MD5 96b675b597f7dab86ee07e980cc1f09e eclipse-sourceBuild-srcIncluded-3.1M3.zip 60402374 diff --git a/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1_pre4 b/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1_pre4 deleted file mode 100644 index 674238a6a6e9..000000000000 --- a/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1_pre4 +++ /dev/null @@ -1 +0,0 @@ -MD5 9d529492c9cac1add34e96192504ac22 eclipse-sourceBuild-srcIncluded-3.1M4.zip 61568782 diff --git a/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1_pre5 b/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1_pre5 deleted file mode 100644 index 1bc83bac373a..000000000000 --- a/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1_pre5 +++ /dev/null @@ -1 +0,0 @@ -MD5 6e54a6530cd2ca23f643c79fdc847d05 eclipse-sourceBuild-srcIncluded-3.1M5a.zip 59481828 diff --git a/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1_pre6 b/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1_pre6 deleted file mode 100644 index a889cdf33a5b..000000000000 --- a/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1_pre6 +++ /dev/null @@ -1 +0,0 @@ -MD5 51d81345d2fa0e8aa0b455f6cf4c447f eclipse-sourceBuild-srcIncluded-3.1M6.zip 59038692 diff --git a/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1_pre6-r1 b/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1_pre6-r1 deleted file mode 100644 index a889cdf33a5b..000000000000 --- a/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1_pre6-r1 +++ /dev/null @@ -1 +0,0 @@ -MD5 51d81345d2fa0e8aa0b455f6cf4c447f eclipse-sourceBuild-srcIncluded-3.1M6.zip 59038692 diff --git a/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1_pre7 b/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1_pre7 deleted file mode 100644 index 7d8710355c8b..000000000000 --- a/dev-util/eclipse-sdk/files/digest-eclipse-sdk-3.1_pre7 +++ /dev/null @@ -1 +0,0 @@ -MD5 30279e8c74de2db219418f645291be39 eclipse-sourceBuild-srcIncluded-3.1M7.zip 59421339 |