removing ant dependency
This commit is contained in:
parent
56f4d22f09
commit
37272bc2ac
@ -1,6 +1,8 @@
|
|||||||
MD5 a381d0a0951fe8ec2d4e0b94331a4933 eclipse-sdk-3.1.2.ebuild 10371
|
DIST eclipse-sourceBuild-srcIncluded-3.1.2.zip 66630673 RMD160 ffe59352fe02b4a47be3e9a6daad3a5501f196b0 SHA1 d399232b586e0c6b516f990296a202dcd814404d SHA256 31233332f205a197a42aafdc4f15a4f38eb5e4be19ac8a7192492ab8a21324a4 size 66630673
|
||||||
RMD160 76f4c392304365bfd2e138fbd3a7b0d300bd9efc eclipse-sdk-3.1.2.ebuild 10371
|
EBUILD eclipse-sdk-3.1.2-r2.ebuild 10567 RMD160 d89766a1f2f03453dffa1667a4a82b8d21d54914 SHA1 bf25beca2edc37e7453f3804d964fbd2339b1969 SHA256 8be7bb07a20a913bc97a83f744f88a6997f8324e9122a2a74f3646f4e886c843 size 10567
|
||||||
SHA256 ddb5302f60e4b659fe6061924e0e6ca08b00cd0a14b505e875cea7b01d56ca6e eclipse-sdk-3.1.2.ebuild 10371
|
MD5 7c9e2c1f24894188b85e0dd93229269b eclipse-sdk-3.1.2-r2.ebuild 10567
|
||||||
MD5 0dd05cebf3928888ff566c433da96335 files/digest-eclipse-sdk-3.1.2 310
|
RMD160 d89766a1f2f03453dffa1667a4a82b8d21d54914 eclipse-sdk-3.1.2-r2.ebuild 10567
|
||||||
RMD160 dea902b88d52673c42f034ab9451e145bc52b30c files/digest-eclipse-sdk-3.1.2 310
|
SHA256 8be7bb07a20a913bc97a83f744f88a6997f8324e9122a2a74f3646f4e886c843 eclipse-sdk-3.1.2-r2.ebuild 10567
|
||||||
SHA256 01187ce1cad8c9037d48c130cd9d98167d7c934e075d42c7c55f3adae8105749 files/digest-eclipse-sdk-3.1.2 310
|
MD5 0dd05cebf3928888ff566c433da96335 files/digest-eclipse-sdk-3.1.2-r2 310
|
||||||
|
RMD160 dea902b88d52673c42f034ab9451e145bc52b30c files/digest-eclipse-sdk-3.1.2-r2 310
|
||||||
|
SHA256 01187ce1cad8c9037d48c130cd9d98167d7c934e075d42c7c55f3adae8105749 files/digest-eclipse-sdk-3.1.2-r2 310
|
||||||
|
@ -1,23 +1,24 @@
|
|||||||
# Copyright 1999-2005 Gentoo Foundation
|
# Copyright 1999-2006 Gentoo Foundation
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
# $Header: /var/cvsroot/gentoo-x86/dev-util/eclipse-sdk/eclipse-sdk-3.1.1.ebuild,v 1.1 2005/11/09 19:00:28 axxo Exp $
|
# $Header: /var/cvsroot/gentoo-x86/dev-util/eclipse-sdk/eclipse-sdk-3.1.2-r2.ebuild,v 1.1 2006/04/20 13:49:19 nichoj Exp $
|
||||||
|
|
||||||
inherit eutils java-utils
|
inherit eutils java-utils flag-o-matic check-reqs
|
||||||
|
|
||||||
MY_A="eclipse-sourceBuild-srcIncluded-${PV}.zip"
|
MY_A="eclipse-sourceBuild-srcIncluded-${PV}.zip"
|
||||||
|
RELEASE_DATE="200601181600"
|
||||||
DESCRIPTION="Eclipse Tools Platform"
|
DESCRIPTION="Eclipse Tools Platform"
|
||||||
HOMEPAGE="http://www.eclipse.org/"
|
HOMEPAGE="http://www.eclipse.org/"
|
||||||
SRC_URI="http://download.eclipse.org/eclipse/downloads/drops/R-3.1.2-200601181600/${MY_A}"
|
SRC_URI="http://download.eclipse.org/eclipse/downloads/drops/R-${PV}-${RELEASE_DATE}/${MY_A}"
|
||||||
IUSE="gnome mozilla firefox jikes nosrc nodoc atk"
|
IUSE="nogecko-sdk gnome jikes nosrc nodoc atk"
|
||||||
SLOT="3.1"
|
SLOT="3.1"
|
||||||
LICENSE="CPL-1.0"
|
LICENSE="CPL-1.0"
|
||||||
KEYWORDS="~x86 ~ppc ~amd64"
|
KEYWORDS="~x86 ~ppc ~amd64"
|
||||||
|
S="${WORKDIR}"
|
||||||
|
|
||||||
RDEPEND=">=virtual/jre-1.4.2
|
RDEPEND=">=virtual/jre-1.4.2
|
||||||
>=x11-libs/gtk+-2.2.4
|
>=x11-libs/gtk+-2.2.4
|
||||||
mozilla? ( >=www-client/mozilla-1.7 )
|
!nogecko-sdk? ( net-libs/gecko-sdk )
|
||||||
atk? ( >=dev-libs/atk-1.6 )
|
atk? ( >=dev-libs/atk-1.6 )
|
||||||
firefox? ( >=www-client/mozilla-firefox-1.0.2 )
|
|
||||||
gnome? ( =gnome-base/gnome-vfs-2* =gnome-base/libgnomeui-2* )"
|
gnome? ( =gnome-base/gnome-vfs-2* =gnome-base/libgnomeui-2* )"
|
||||||
|
|
||||||
DEPEND="${RDEPEND}
|
DEPEND="${RDEPEND}
|
||||||
@ -28,44 +29,55 @@ DEPEND="${RDEPEND}
|
|||||||
app-arch/unzip
|
app-arch/unzip
|
||||||
app-arch/zip"
|
app-arch/zip"
|
||||||
|
|
||||||
|
ECLIPSE_DIR="/usr/lib/eclipse-${SLOT}"
|
||||||
|
ECLIPSE_LINKS_DIR="${ECLIPSE_DIR}/links"
|
||||||
|
|
||||||
# TODO:
|
# TODO:
|
||||||
# - use CFLAGS from make.conf when building native libraries
|
# - use CFLAGS from make.conf when building native libraries
|
||||||
# - must patch eclipse build files
|
# - must patch eclipse build files
|
||||||
# - also submit patch to bugs.eclipse
|
# - also submit patch to bugs.eclipse.org
|
||||||
# - intergration to eclipse plugin ebuilds most likely broken
|
|
||||||
# - ppc support not tested, but not explicitly broken either
|
# - ppc support not tested, but not explicitly broken either
|
||||||
|
# - make a extension location in /var/lib that's writable by 'eclipse' group
|
||||||
|
# - use make_desktop_entry from eutils instead of our own stuff
|
||||||
|
# -
|
||||||
|
|
||||||
pkg_setup() {
|
pkg_setup() {
|
||||||
|
debug-print "Checking for sufficient physical RAM"
|
||||||
|
CHECKREQS_MEMORY="768"
|
||||||
|
check_reqs
|
||||||
|
|
||||||
einfo "Checking for sufficient physical RAM"
|
debug-print "Checking for bad CFLAGS"
|
||||||
check-ram
|
|
||||||
check-cflags
|
check-cflags
|
||||||
|
|
||||||
|
# Make sure our vm is sane
|
||||||
java-utils_setup-vm
|
java-utils_setup-vm
|
||||||
|
|
||||||
java-utils_ensure-vm-version-ge 1 4 2
|
java-utils_ensure-vm-version-ge 1 4 2
|
||||||
|
|
||||||
# all other gentoo archs match in eclipse build system except amd64
|
# All other gentoo archs match in eclipse build system except amd64
|
||||||
if [ ${ARCH} == 'amd64' ] ; then
|
if use amd64 ; then
|
||||||
eclipsearch=x86_64
|
eclipsearch=x86_64
|
||||||
else
|
else
|
||||||
eclipsearch=${ARCH}
|
eclipsearch=${ARCH}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# all other gentoo archs match in sun jdk library patch except x86
|
# All other gentoo archs match in sun jdk library patch except x86
|
||||||
if [ ${ARCH} == 'x86' ] ; then
|
if use x86 ; then
|
||||||
jvmarch=i386
|
jvmarch=i386
|
||||||
else
|
else
|
||||||
jvmarch=${ARCH}
|
jvmarch=${ARCH}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# eventually, we'll have a plugin directory that's user writable, as group
|
||||||
|
# 'eclipse' -nichoj
|
||||||
|
|
||||||
|
# Add the eclipse group, for our plugin directories
|
||||||
|
#enewgroup eclipse
|
||||||
}
|
}
|
||||||
|
|
||||||
src_unpack() {
|
src_unpack() {
|
||||||
|
unpack ${A}
|
||||||
|
|
||||||
mkdir ${S}
|
# TODO figure out what this does -nichoj
|
||||||
cd ${S}
|
|
||||||
unpack ${MY_A} || die "Could not unpack ${MY_A}"
|
|
||||||
|
|
||||||
epatch ${FILESDIR}/06-path-fixups.patch
|
epatch ${FILESDIR}/06-path-fixups.patch
|
||||||
|
|
||||||
einfo "Setting up virtual machine"
|
einfo "Setting up virtual machine"
|
||||||
@ -75,14 +87,11 @@ src_unpack() {
|
|||||||
clean-prebuilt-code
|
clean-prebuilt-code
|
||||||
|
|
||||||
einfo "Patching makefiles"
|
einfo "Patching makefiles"
|
||||||
process-makefiles
|
fix_makefiles
|
||||||
|
fix_amd64_ibm_jvm
|
||||||
patch_amd64_ibm_jvm
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
src_compile() {
|
src_compile() {
|
||||||
|
|
||||||
# karltk: this should be handled by the java-pkg eclass in setup-vm
|
# karltk: this should be handled by the java-pkg eclass in setup-vm
|
||||||
addwrite "/proc/self/maps"
|
addwrite "/proc/self/maps"
|
||||||
addwrite "/proc/cpuinfo"
|
addwrite "/proc/cpuinfo"
|
||||||
@ -91,17 +100,22 @@ src_compile() {
|
|||||||
# Figure out VM, set up ant classpath and native library paths
|
# Figure out VM, set up ant classpath and native library paths
|
||||||
setup-jvm-opts
|
setup-jvm-opts
|
||||||
|
|
||||||
${use_gtk} && use mozilla && setup-mozilla-opts
|
if use !nogecko-sdk ; then
|
||||||
|
einfo "Will compile embedded Mozilla support against net-libs/gecko-sdk"
|
||||||
|
setup-mozilla-opts
|
||||||
|
else
|
||||||
|
einfo "Not building embedded Mozilla support"
|
||||||
|
fi
|
||||||
|
|
||||||
use jikes && bootstrap_ant_opts="-Dbuild.compiler=jikes"
|
use jikes && bootstrap_ant_opts="-Dbuild.compiler=jikes"
|
||||||
|
|
||||||
einfo "Bootstrapping bootstrap ecj"
|
debug-print "Bootstrapping bootstrap ecj"
|
||||||
ant ${bootstrap_ant_opts} -q -f jdtcoresrc/compilejdtcorewithjavac.xml || die "Failed to bootstrap ecj"
|
ant ${bootstrap_ant_opts} -q -f jdtcoresrc/compilejdtcorewithjavac.xml || die "Failed to bootstrap ecj"
|
||||||
|
|
||||||
einfo "Bootstrapping ecj"
|
debug-print "Bootstrapping ecj"
|
||||||
ant -lib jdtcoresrc/ecj.jar -q -f jdtcoresrc/compilejdtcore.xml || die "Failed to bootstrap ecj"
|
ant -lib jdtcoresrc/ecj.jar -q -f jdtcoresrc/compilejdtcore.xml || die "Failed to bootstrap ecj"
|
||||||
|
|
||||||
einfo "Compiling Eclipse -- see ${S}/compilelog.txt for details"
|
debug-print "Compiling Eclipse -- see ${S}/compilelog.txt for details"
|
||||||
ANT_OPTS="-Xmx1024M" \
|
ANT_OPTS="-Xmx1024M" \
|
||||||
ant -lib jdtcoresrc/ecj.jar -q -f build.xml \
|
ant -lib jdtcoresrc/ecj.jar -q -f build.xml \
|
||||||
-DinstallOs=linux \
|
-DinstallOs=linux \
|
||||||
@ -119,39 +133,34 @@ src_compile() {
|
|||||||
|
|
||||||
cp launchertmp/eclipse eclipse-gtk || die "Cannot find eclipse binary"
|
cp launchertmp/eclipse eclipse-gtk || die "Cannot find eclipse binary"
|
||||||
|
|
||||||
einfo "Creating .desktop entry"
|
# TODO use make_desktop_entry from eutils during src_install instead -nichoj
|
||||||
create-desktop-entry
|
create-desktop-entry
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
|
|
||||||
eclipse_dir="/usr/lib/eclipse-${SLOT}"
|
|
||||||
|
|
||||||
dodir /usr/lib
|
dodir /usr/lib
|
||||||
|
|
||||||
einfo "Installing features and plugins"
|
debug-print "Installing features and plugins"
|
||||||
|
|
||||||
[ -f result/linux-gtk-${eclipsearch}-sdk.tar.gz ] || die "tar.gz bundle was not built properly!"
|
[ -f result/linux-gtk-${eclipsearch}-sdk.tar.gz ] || die "tar.gz bundle was not built properly!"
|
||||||
tar zxf result/linux-gtk-${eclipsearch}-sdk.tar.gz -C ${D}/usr/lib || die "Failed to extract the built package"
|
tar zxf result/linux-gtk-${eclipsearch}-sdk.tar.gz -C ${D}/usr/lib || die "Failed to extract the built package"
|
||||||
|
|
||||||
|
|
||||||
mv ${D}/usr/lib/eclipse ${D}/${eclipse_dir}
|
mv ${D}/usr/lib/eclipse ${D}/${ECLIPSE_DIR}
|
||||||
|
insinto ${ECLIPSE_DIR}
|
||||||
|
exeinto ${ECLIPSE_DIR}
|
||||||
|
|
||||||
insinto ${eclipse_dir}
|
debug-print "Installing eclipse-gtk binary"
|
||||||
|
|
||||||
# Install launchers and native code
|
|
||||||
exeinto ${eclipse_dir}
|
|
||||||
|
|
||||||
einfo "Installing eclipse-gtk binary"
|
|
||||||
doexe eclipse-gtk || die "Failed to install eclipse binary"
|
doexe eclipse-gtk || die "Failed to install eclipse binary"
|
||||||
|
# need to rename inf file to eclipse-gtk.ini, see bug #128128
|
||||||
|
|
||||||
if use nosrc; then
|
if use nosrc; then
|
||||||
einfo "Stripping away source code"
|
debug-print "Removing source code"
|
||||||
strip-src
|
strip-src
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if use nodoc ; then
|
if use nodoc ; then
|
||||||
einfo "Stripping away documentation"
|
debug-print "Removing documentation"
|
||||||
strip-docs
|
strip-docs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -164,50 +173,20 @@ src_install() {
|
|||||||
doman ${FILESDIR}/eclipse.1
|
doman ${FILESDIR}/eclipse.1
|
||||||
|
|
||||||
install-link-files
|
install-link-files
|
||||||
|
|
||||||
|
# eventually, we'll have a user writable extension location -nichoj
|
||||||
|
# TODO make g+w
|
||||||
|
#dodir /var/lib/eclipse-${SLOT}
|
||||||
|
#touch ${D}/var/lib/eclipse-${SLOT}/.eclipseextension
|
||||||
|
#fowners root:eclipse /var/lib/eclipse-${SLOT}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Helper functions
|
# Helper functions
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
function setup-mozilla-opts()
|
fix_makefiles() {
|
||||||
{
|
|
||||||
mozilla_dir="--mozdir-unset---"
|
|
||||||
|
|
||||||
if [ -f ${ROOT}/usr/lib/MozillaFirefox/libgtkembedmoz.so ] ; then
|
|
||||||
einfo "Compiling against www-client/mozilla-firefox"
|
|
||||||
mozilla_dir=/usr/lib/MozillaFirefox
|
|
||||||
elif [ -f ${ROOT}/usr/lib/mozilla/libgtkembedmoz.so ] ; then
|
|
||||||
einfo "Compiling against www-client/mozilla"
|
|
||||||
mozilla_dir=/usr/lib/mozilla
|
|
||||||
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
|
|
||||||
|
|
||||||
export GECKO_SDK="${mozilla_dir}"
|
|
||||||
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"
|
|
||||||
}
|
|
||||||
|
|
||||||
function build-native() {
|
|
||||||
sh features/org.eclipse.platform.launchers/library/gtk/build.sh \
|
|
||||||
-os linux -ws gtk \
|
|
||||||
-arch ${eclipsearch} || die "Failed to build launcher"
|
|
||||||
}
|
|
||||||
|
|
||||||
function process-makefiles() {
|
|
||||||
|
|
||||||
# Comment out hard-coded JAVA_HOME
|
# Comment out hard-coded JAVA_HOME
|
||||||
sed -i 's/^JAVA_HOME/#JAVA_HOME/' plugins/org.eclipse.core.resources.linux/src/Makefile || die "Failed to patch Makefile"
|
sed -i 's/^JAVA_HOME/#JAVA_HOME/' plugins/org.eclipse.core.resources.linux/src/Makefile || die "Failed to patch Makefile"
|
||||||
|
|
||||||
@ -219,7 +198,7 @@ function process-makefiles() {
|
|||||||
libs="${libs} make_gnome"
|
libs="${libs} make_gnome"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if use mozilla ; then
|
if use !nogecko-sdk ; then
|
||||||
einfo "Building Mozilla embed support"
|
einfo "Building Mozilla embed support"
|
||||||
libs="${libs} make_mozilla"
|
libs="${libs} make_mozilla"
|
||||||
fi
|
fi
|
||||||
@ -232,59 +211,10 @@ function process-makefiles() {
|
|||||||
sed -i "s/^all:.*/all: ${libs}/" "plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak" || die "Failed to patch make_linux.mak"
|
sed -i "s/^all:.*/all: ${libs}/" "plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak" || die "Failed to patch make_linux.mak"
|
||||||
}
|
}
|
||||||
|
|
||||||
function create-desktop-entry() {
|
fix_amd64_ibm_jvm() {
|
||||||
|
|
||||||
cat ${FILESDIR}/eclipse-${SLOT}.desktop | \
|
|
||||||
sed -e "s/@PV@/${PV}/" \
|
|
||||||
> eclipse-${SLOT}.desktop || die "Failed to create desktop entry"
|
|
||||||
}
|
|
||||||
|
|
||||||
function install-desktop-entry() {
|
|
||||||
|
|
||||||
dodir /usr/share/applications
|
|
||||||
insinto /usr/share/applications
|
|
||||||
doins eclipse-${SLOT}.desktop
|
|
||||||
}
|
|
||||||
|
|
||||||
function clean-prebuilt-code() {
|
|
||||||
|
|
||||||
find ${S} -type f \( -name '*.class' -o -name '*.so' -o -name '*.so.*' -o -name 'eclipse' \) | xargs rm -f
|
|
||||||
}
|
|
||||||
|
|
||||||
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. If the build"
|
|
||||||
ewarn "stops with an error about invalid memory, increase your swap."
|
|
||||||
echo
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
function install-link-files() {
|
|
||||||
|
|
||||||
einfo "Installing link files"
|
|
||||||
|
|
||||||
dodir /usr/lib/eclipse-${SLOT}/links
|
|
||||||
|
|
||||||
echo "path=/opt/eclipse-extensions-3" > ${D}/${eclipse_dir}/links/eclipse-binary-extensions-3.link
|
|
||||||
echo "path=/opt/eclipse-extensions-3.1" > ${D}/${eclipse_dir}/links/eclipse-binary-extensions-3.1.link
|
|
||||||
|
|
||||||
echo "path=/usr/lib/eclipse-extensions-3" > ${D}/${eclipse_dir}/links/eclipse-extensions-3.link
|
|
||||||
echo "path=/usr/lib/eclipse-extensions-3.1" > ${D}/${eclipse_dir}/links/eclipse-extensions-3.1.link
|
|
||||||
}
|
|
||||||
|
|
||||||
function patch_amd64_ibm_jvm() {
|
|
||||||
# the ibm jdk ebuild should have fixed headers, but until then
|
# the ibm jdk ebuild should have fixed headers, but until then
|
||||||
# we just fix the compiling here (see bug #97421)
|
# we just fix the compiling here (see bug #97421)
|
||||||
if [ ${ARCH} == 'amd64' ]; then
|
if use amd64 ; then
|
||||||
if [ ! -z "`java-config --java-version | grep IBM`" ] ; then
|
if [ ! -z "`java-config --java-version | grep IBM`" ] ; then
|
||||||
einfo "Fixing IBM jdk header problem"
|
einfo "Fixing IBM jdk header problem"
|
||||||
find plugins -name "make_linux.mak" -print0 | xargs -0 sed -i -e 's/^CFLAGS =/CFLAGS = -D_JNI_IMPORT_OR_EXPORT_= /'
|
find plugins -name "make_linux.mak" -print0 | xargs -0 sed -i -e 's/^CFLAGS =/CFLAGS = -D_JNI_IMPORT_OR_EXPORT_= /'
|
||||||
@ -292,63 +222,19 @@ function patch_amd64_ibm_jvm() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup-jvm-opts() {
|
|
||||||
|
|
||||||
# Figure out correct boot classpath
|
clean-prebuilt-code() {
|
||||||
# karltk: this should be handled by the java-pkg eclass in setup-vm
|
find ${S} -type f \( -name '*.class' -o -name '*.so' -o -name '*.so.*' -o -name 'eclipse' \) | xargs rm -f
|
||||||
if [ ! -z "`java-config --java-version | grep IBM`" ] ; then
|
|
||||||
# IBM JRE
|
|
||||||
local bp="$(java-config --jdk-home)/jre/lib"
|
|
||||||
bootclasspath="${bp}/core.jar:${bp}/xml.jar:${bp}/graphics.jar:${bp}/security.jar:${bp}/server.jar"
|
|
||||||
JAVA_LIB_DIR="$(java-config --jdk-home)/jre/bin"
|
|
||||||
else
|
|
||||||
# Sun derived JREs (Blackdown, Sun)
|
|
||||||
local bp="$(java-config --jdk-home)/jre/lib"
|
|
||||||
bootclasspath="${bp}/rt.jar:${bp}/jsse.jar"
|
|
||||||
JAVA_LIB_DIR="$(java-config --jdk-home)/jre/lib/${jvmarch}"
|
|
||||||
fi
|
|
||||||
einfo "Using bootclasspath ${bootclasspath}"
|
|
||||||
einfo "Using JVM library path ${JAVA_LIB_DIR}"
|
|
||||||
|
|
||||||
if [ ! -f ${JAVA_LIB_DIR}/libawt.so ] ; then
|
|
||||||
die "Could not find libawt.so native library"
|
|
||||||
fi
|
|
||||||
|
|
||||||
export AWT_LIB_PATH=${JAVA_LIB_DIR}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function strip-src() {
|
check-cflags() {
|
||||||
|
|
||||||
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 check-cflags() {
|
|
||||||
|
|
||||||
einfo "Checking for bad CFLAGS"
|
|
||||||
|
|
||||||
local badflags="-fomit-frame-pointer -msse2"
|
local badflags="-fomit-frame-pointer -msse2"
|
||||||
local error=false
|
local error=false
|
||||||
|
local flag
|
||||||
|
|
||||||
for x in ${badflags} ; do
|
for flag in ${badflags} ; do
|
||||||
if [ ! -z "$(echo ${CFLAGS} | grep -- $x)" ] ; then
|
if is-flag ${flag}; then
|
||||||
ewarn "Found offending option $x in your CFLAGS"
|
ewarn "Found offending option ${flag} in your CFLAGS"
|
||||||
error=true
|
error=true
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -367,3 +253,111 @@ function check-cflags() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setup-jvm-opts() {
|
||||||
|
# Figure out correct boot classpath
|
||||||
|
# karltk: this should be handled by the java-pkg eclass in setup-vm
|
||||||
|
if [ ! -z "`java-config --java-version | grep IBM`" ] ; then
|
||||||
|
# IBM JDK
|
||||||
|
local bp="$(java-config --jdk-home)/jre/lib"
|
||||||
|
bootclasspath="${bp}/core.jar:${bp}/xml.jar:${bp}/graphics.jar:${bp}/security.jar:${bp}/server.jar"
|
||||||
|
JAVA_LIB_DIR="$(java-config --jdk-home)/jre/bin"
|
||||||
|
else
|
||||||
|
# Sun derived JDKs (Blackdown, Sun)
|
||||||
|
local bp="$(java-config --jdk-home)/jre/lib"
|
||||||
|
bootclasspath="${bp}/rt.jar:${bp}/jsse.jar"
|
||||||
|
JAVA_LIB_DIR="$(java-config --jdk-home)/jre/lib/${jvmarch}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
einfo "Using bootclasspath ${bootclasspath}"
|
||||||
|
einfo "Using JVM library path ${JAVA_LIB_DIR}"
|
||||||
|
|
||||||
|
if [ ! -f ${JAVA_LIB_DIR}/libawt.so ] ; then
|
||||||
|
die "Could not find libawt.so native library"
|
||||||
|
fi
|
||||||
|
|
||||||
|
export AWT_LIB_PATH=${JAVA_LIB_DIR}
|
||||||
|
}
|
||||||
|
|
||||||
|
setup-mozilla-opts() {
|
||||||
|
mozilla_dir="--mozdir-unset---"
|
||||||
|
|
||||||
|
if [ -f ${ROOT}/usr/lib/gecko-sdk/lib/libgtkembedmoz.so ] ; then
|
||||||
|
mozilla_dir=/usr/lib/gecko-sdk
|
||||||
|
else
|
||||||
|
# TODO need to update this appropriately for gecko-sdk
|
||||||
|
eerror "You have enabled the embedded mozilla component, but no suitable"
|
||||||
|
eerror "provider was found. You need gecko-sdk compiled against"
|
||||||
|
eerror "gtk+ v2.0 or newer."
|
||||||
|
eerror "To merge it, execute 'USE=\"gtk2\" emerge mozilla' as root."
|
||||||
|
eerror "To disable embedded mozilla, remove \"mozilla\" from your USE flags."
|
||||||
|
die "Need Mozilla compiled with gtk+-2.x support"
|
||||||
|
fi
|
||||||
|
|
||||||
|
export GECKO_SDK="${mozilla_dir}"
|
||||||
|
# TODO should this be using pkg-config?
|
||||||
|
export GECKO_INCLUDES="-include ${GECKO_SDK}/include/mozilla-config.h \
|
||||||
|
-I${GECKO_SDK}/include/nspr \
|
||||||
|
-I${GECKO_SDK}/include/nspr \
|
||||||
|
-I${GECKO_SDK}/include/xpcom \
|
||||||
|
-I${GECKO_SDK}/include/string \
|
||||||
|
-I${GECKO_SDK}/include/embed_base \
|
||||||
|
-I${JAVA_HOME}/include/linux"
|
||||||
|
export GECKO_LIBS="-L${GECKO_SDK}/lib -lgtkembedmoz"
|
||||||
|
}
|
||||||
|
|
||||||
|
build-native() {
|
||||||
|
sh features/org.eclipse.platform.launchers/library/gtk/build.sh \
|
||||||
|
-os linux -ws gtk \
|
||||||
|
-arch ${eclipsearch} || die "Failed to build launcher"
|
||||||
|
}
|
||||||
|
create-desktop-entry() {
|
||||||
|
sed -e "s/@PV@/${PV}/" ${FILESDIR}/eclipse-${SLOT}.desktop \
|
||||||
|
> eclipse-${SLOT}.desktop || die "Failed to create desktop entry"
|
||||||
|
}
|
||||||
|
|
||||||
|
install-desktop-entry() {
|
||||||
|
dodir /usr/share/applications
|
||||||
|
insinto /usr/share/applications
|
||||||
|
doins eclipse-${SLOT}.desktop
|
||||||
|
}
|
||||||
|
|
||||||
|
install_link_file() {
|
||||||
|
local path=${1}
|
||||||
|
local file=${2}
|
||||||
|
|
||||||
|
echo "path=${path}" > "${D}/${ECLIPSE_LINKS_DIR}/${file}"
|
||||||
|
}
|
||||||
|
|
||||||
|
install-link-files() {
|
||||||
|
einfo "Installing link files"
|
||||||
|
|
||||||
|
dodir ${ECLIPSE_LINKS_DIR}
|
||||||
|
install_link_file /opt/eclipse-extensions-3 eclipse-binary-extensions-3.link
|
||||||
|
install_link_file /opt/eclipse-extensions-3.1 eclipse-binary-extensions-3.1.link
|
||||||
|
|
||||||
|
install_link_file /usr/lib/eclipse-extensions-3 eclipse-extensions-3.link
|
||||||
|
install_link_file /usr/lib/eclipse-extensions-3.1 eclipse-extensions-3.1.link
|
||||||
|
|
||||||
|
# install_link_file /var/lib/eclipse-3 eclipse-var-3.link
|
||||||
|
# install_link_file /var/lib/eclipse-3.1 eclipse-var-3.1.link
|
||||||
|
}
|
||||||
|
|
||||||
|
strip-src() {
|
||||||
|
local bp=${D}/${ECLIPSE_DIR}
|
||||||
|
|
||||||
|
rm -rf ${bp}/plugins/org.eclipse.pde.source_3* \
|
||||||
|
${bp}/plugins/org.eclipse.jdt.source_3* \
|
||||||
|
${bp}/plugins/org.eclipse.platform.source.linux.* \
|
||||||
|
${bp}/plugins/org.eclipse.platform.source_3* \
|
||||||
|
${bp}/features/org.eclipse.jdt.source_3* \
|
||||||
|
${bp}/features/org.eclipse.pde.source_3* \
|
||||||
|
${bp}/features/org.eclipse.platform.source_3*
|
||||||
|
}
|
||||||
|
|
||||||
|
strip-docs() {
|
||||||
|
local bp=${D}/${ECLIPSE_DIR}
|
||||||
|
|
||||||
|
rm -rf ${bp}/plugins/org.eclipse.platform.doc.* \
|
||||||
|
${bp}/plugins/org.eclipse.jdt.doc.* \
|
||||||
|
${bp}/plugins/org.eclipse.pde.doc.*
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user