Added ebuilds for eclipse-sdk 3.5 from gentoo-bugs
This commit is contained in:
12
dev-util/eclipse-sdk/Manifest
Normal file
12
dev-util/eclipse-sdk/Manifest
Normal file
@@ -0,0 +1,12 @@
|
||||
AUX 3.4/eclipse-3.4 1378 RMD160 8e99b71258a5c047e3094b2ec941924871b9b147 SHA1 99cf45921276ed70f1123cc2c0655ec37944a0d4 SHA256 ba99d0d956d53d5f8f801c7f8aa9a805bb32c0a4e64262eac39bfc176c46ebbe
|
||||
AUX 3.4/eclipserc-3.4 858 RMD160 f911438aa661be9ca8fc352dd372c9485d163ddb SHA1 abb1c369326be455d16bc42cf0a1b035aa145dc0 SHA256 0aea733c968ca064ad5ca95d5895778ecf7387826198b512e98d0cbb7dd353f1
|
||||
AUX 3.5/eclipse-3.5 1378 RMD160 f8b0e69ac5ecd988c53ed94a806a155fa99d5621 SHA1 d49e67f7dcc53895330fbf6f9df6ecf0b33be304 SHA256 a5faecfb0aabea10539a09340aade4454d4a69d28bf43cae3c5c93f02331fd0d
|
||||
AUX 3.5/eclipserc-3.5 858 RMD160 f911438aa661be9ca8fc352dd372c9485d163ddb SHA1 abb1c369326be455d16bc42cf0a1b035aa145dc0 SHA256 0aea733c968ca064ad5ca95d5895778ecf7387826198b512e98d0cbb7dd353f1
|
||||
DIST eclipse-I20090611-1540-fetched-src.tar.bz2 86737752 RMD160 67c562675a85e7a83bcf798ca599a384b4517523 SHA1 bd3d784aa05b53fe9aa385b635b564dfba8dc011 SHA256 8b9151a617cc51388cbf74daf167eb6e1125461a5ee502238aa0af891674d1bf
|
||||
DIST eclipse-R3_5_1-fetched-src.tar.bz2 86976475 RMD160 2903769589f5d5b4c4deb68f27cc140c5cdc7a84 SHA1 920e2d826167d9026b0d3f0855d2e9cf34be546d SHA256 b9afadefe09906cfa3a49c32363cebf12bfc75244367e91ee8b4f36a1a089386
|
||||
DIST eclipse-build-R0_3_0.tar.gz 40437 RMD160 d1382f3ede39e0e700f7dcd00158e6622bce196c SHA1 535f54620f1647ec404c35bc92fafbd1966e4eb2 SHA256 f6895b8dc6cca93589de78de2f4d43afa3a351b1bc0ad4a4073015532eb71346
|
||||
DIST eclipse-sourceBuild-srcIncluded-3.4.2.zip 105843305 RMD160 d4bb5e15b484ac955ba342336de70b3d0c14ac6d SHA1 2a093a119def58b4df43e672c4d75c2f62fb0b16 SHA256 0c0df3b317a0c5745dfb7d5714ea3754b1f2d23f08c1f59713c812dd0bfa79d7
|
||||
EBUILD eclipse-sdk-3.4.2.ebuild 13579 RMD160 11e41a08244339cfb6cc7da4df32df2fa5f094c5 SHA1 b3376b377b5a20d8ebe548aae1aafdf8d40360f7 SHA256 c5b6a0293a7ff5512344ca3fcef2b17dada978f0eb9580c3d77580038fff8b74
|
||||
EBUILD eclipse-sdk-3.5.1.ebuild 10063 RMD160 ed57fa1fb6fa5d584e796b356d8647aa9f84fb57 SHA1 65ff80ad5bf71dc4f6df5c6f482aa4f14de9a09d SHA256 7310c4c514a077cfcee466e0033bc1a5c2ab9428bdc46abe38bf4c41fe64cef4
|
||||
EBUILD eclipse-sdk-3.5.ebuild 9509 RMD160 acb568e8f9e4ad6f36fa14208fc055076f89f7c4 SHA1 8a84516267ce7beec319903dbc68a3c8db7d904a SHA256 5f03330e9a3c2346332ec1b8208ae720a10a438fe5828cf455567c096fa5fcb8
|
||||
MISC metadata.xml 800 RMD160 f97cc4ac78898369a7706331bb14bc838519cf21 SHA1 21cd52a15acb6510aa3b955f78fb28a73cf58234 SHA256 76e243573c28c3d705f54745cfbcedd85dae3233b6ed00e2f81a61ac9caeeeaa
|
||||
359
dev-util/eclipse-sdk/eclipse-sdk-3.4.2.ebuild
Normal file
359
dev-util/eclipse-sdk/eclipse-sdk-3.4.2.ebuild
Normal file
@@ -0,0 +1,359 @@
|
||||
# Copyright 1999-2009 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="2"
|
||||
|
||||
inherit java-pkg-2 check-reqs
|
||||
|
||||
MY_PV=${PV/_pre/M}
|
||||
DMF="R-${MY_PV}-200902111700"
|
||||
MY_A="eclipse-sourceBuild-srcIncluded-${MY_PV}.zip"
|
||||
S=${WORKDIR}
|
||||
|
||||
DESCRIPTION="Eclipse SDK"
|
||||
HOMEPAGE="http://www.eclipse.org/eclipse/"
|
||||
SRC_URI="http://download.eclipse.org/eclipse/downloads/drops/${DMF}/${MY_A}"
|
||||
|
||||
LICENSE="EPL-1.0"
|
||||
SLOT="3.4"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="doc source"
|
||||
|
||||
CDEPEND=">=dev-java/swt-${PV}:${SLOT}
|
||||
>=dev-java/ant-1.7.0
|
||||
>=dev-java/ant-core-1.7.0
|
||||
>=dev-java/ant-eclipse-ecj-${PV}:${SLOT}
|
||||
>=dev-java/asm-3.1:3
|
||||
>=dev-java/commons-el-1.0
|
||||
>=dev-java/commons-logging-1.0.4
|
||||
>=dev-java/icu4j-3.8.1:0
|
||||
>=dev-java/jsch-0.1.37
|
||||
>=dev-java/junit-3.8.2:0
|
||||
dev-java/junit:4
|
||||
>=dev-java/lucene-1.9.1:1.9
|
||||
>=dev-java/lucene-analyzers-1.9.1:1.9
|
||||
>=dev-java/sat4j-core-2.0.3:2
|
||||
>=dev-java/sat4j-pseudo-2.0.3:2
|
||||
dev-java/tomcat-servlet-api:2.4"
|
||||
RDEPEND="${CDEPEND}
|
||||
>=virtual/jre-1.5"
|
||||
DEPEND="${CDEPEND}
|
||||
app-arch/unzip
|
||||
app-arch/zip
|
||||
>=virtual/jdk-1.6"
|
||||
|
||||
ALL_WS='carbon gtk motif photon wpf'
|
||||
ALL_OS='aix hpux linux macosx qnx solaris win32'
|
||||
ALL_ARCH='ia64 PA_RISC ppc s390 s390x sparc x86 x86_64'
|
||||
|
||||
pkg_setup() {
|
||||
ws='gtk'
|
||||
if use x86 ; then os='linux' ; arch='x86'
|
||||
elif use amd64 ; then os='linux' ; arch='x86_64'
|
||||
fi
|
||||
|
||||
java-pkg-2_pkg_setup
|
||||
|
||||
CHECKREQS_MEMORY="512"
|
||||
check_reqs
|
||||
|
||||
if use doc ; then
|
||||
ewarn "Having the 'doc' USE flag enabled greatly increases the build time."
|
||||
ewarn "You might want to disable it for ${PN} if you don't need it."
|
||||
fi
|
||||
|
||||
CLASSPATH=$(java-pkg_getjars --with-dependencies "ant-eclipse-ecj:${SLOT}")
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
java-pkg_jar-from "eclipse-ecj:${SLOT}"
|
||||
|
||||
ebegin 'Removing plugins of irrelevant platforms'
|
||||
local remove=" ${ALL_WS[@]} ${ALL_OS[@]} ${ALL_ARCH[@]} "
|
||||
remove=${remove/ ${ws} / } ; remove=${remove/ ${os} / } ; remove=${remove/ ${arch} / }
|
||||
remove=${remove# } ; remove=${remove% } ; remove=${remove// /'\|'}
|
||||
find \( -type d -o -name '*.xml' \) \
|
||||
! -regex '.*[./]\(net\|update\.core\.'"${os}"'\)\([./].*\|\)' \
|
||||
-regex '.*[./]\('"${remove}"'\)\([./].*\|\)' -prune -exec rm -rf {} +
|
||||
eclipse_delete-plugins '.*[./]\('"${remove}"'\)\([./].*\|\)'
|
||||
eend
|
||||
|
||||
ebegin 'Removing bundled binaries'
|
||||
find -type f \( -name '*.so' -o -name 'eclipse' \) -delete
|
||||
eend
|
||||
|
||||
ebegin 'Unbundling dependencies'
|
||||
eclipse_unbundle-dir plugins/org.apache.ant_* ant-core,ant-nodeps lib
|
||||
eclipse_unbundle-dir plugins/org.eclipse.swt."${ws}.${os}.${arch}"_*.jar swt:${SLOT}
|
||||
eclipse_unbundle-dir plugins/org.junit_* junit
|
||||
eclipse_unbundle-dir plugins/org.junit4 junit:4
|
||||
eclipse_unbundle-jar plugins/com.ibm.icu_*.jar icu4j
|
||||
eclipse_unbundle-jar plugins/com.jcraft.jsch_*.jar jsch
|
||||
eclipse_unbundle-jar plugins/javax.servlet_*.jar tomcat-servlet-api:2.4 servlet-api
|
||||
eclipse_unbundle-jar plugins/javax.servlet.jsp_*.jar tomcat-servlet-api:2.4 jsp-api
|
||||
eclipse_unbundle-jar plugins/org.apache.commons.el_*.jar commons-el
|
||||
eclipse_unbundle-jar plugins/org.apache.commons.logging_*.jar commons-logging
|
||||
#eclipse_unbundle-jar plugins/org.apache.jasper_*.jar tomcat-jasper
|
||||
eclipse_unbundle-jar plugins/org.apache.lucene_*.jar lucene:1.9
|
||||
eclipse_unbundle-jar plugins/org.apache.lucene.analysis_*.jar lucene-analyzers:1.9
|
||||
#eclipse_unbundle-jar plugins/org.mortbay.jetty_*.jar jetty
|
||||
eclipse_unbundle-jar plugins/org.objectweb.asm_*.jar asm:3
|
||||
eclipse_unbundle-jar plugins/org.sat4j.core_*.jar sat4j-core:2
|
||||
eclipse_unbundle-jar plugins/org.sat4j.pb_*.jar sat4j-pseudo:2
|
||||
eend
|
||||
|
||||
if use doc ; then
|
||||
# No need to keep unpacking and repacking stuff
|
||||
sed -e '/<antcall target="install\.eclipse/d' \
|
||||
-e '/<move .*-old"/,/<delete .*-old/d' \
|
||||
-e 's/\(java\b.*\bjar="\).*\(\${launcher}\)/\1${plugin.destination}\/\2/' \
|
||||
-i build.xml || die
|
||||
sed_xml_element 'pathconvert\|delete\|copy' \
|
||||
-e '/property="launcher"/s/\(<fileset dir=\)"[^"]*"/\1"${plugin.destination}"/' \
|
||||
-e '/\${buildDirectory}\/eclipse/d' \
|
||||
-i build.xml || die
|
||||
else
|
||||
ebegin 'Removing documentation plugins'
|
||||
rm -rf plugins/*.doc{,.*}
|
||||
eclipse_delete-plugins '.*\.doc\([./].*\|\)'
|
||||
sed_xml_element 'antcall' -e '/target="build\.doc\.plugins"/d' -i build.xml || die
|
||||
eend
|
||||
fi
|
||||
|
||||
if ! use source ; then
|
||||
ebegin 'Removing source features and plugins'
|
||||
rm -rf {features,plugins}/*.source{,_*}
|
||||
eclipse_delete-plugins '.*\.source\(_[0-9].*\|\/\|\)'
|
||||
eend
|
||||
fi
|
||||
|
||||
ebegin 'Preparing build system'
|
||||
# Disable compiler warnings
|
||||
find -name 'build.xml' -exec sed -e 's/<javac\b/<javac nowarn="true"/' -i {} +
|
||||
# Fix OSGi plugin classpath
|
||||
sed -e '/<path id="@dot\.classpath">/a<pathelement path="'"$(java-config --runtime)"'"/>' \
|
||||
-i plugins/org.eclipse.osgi/build.xml || die
|
||||
# Skip final archiving phase
|
||||
sed -e '/<exec executable="tar" dir="${assemblyTempDir}">/,/<delete dir="${assemblyTempDir}"\/>/d' \
|
||||
-i {assemble,package}.*.xml || die
|
||||
eend
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local java_home=$(java-config --jdk-home)
|
||||
|
||||
# Compile Eclipse SDK
|
||||
CLASSPATH=${CLASSPATH} ant insertBuildId compile || die 'ant compile failed'
|
||||
|
||||
# Compile Equinox native launcher
|
||||
chmod +x "features/org.eclipse.equinox.executable/library/${ws}/build.sh"
|
||||
"features/org.eclipse.equinox.executable/library/${ws}/build.sh" -java "${java_home}" \
|
||||
|| die 'equinox native launcher build failed'
|
||||
ln "features/org.eclipse.equinox.executable/library/${ws}/eclipse" \
|
||||
"features/org.eclipse.equinox.executable/bin/${ws}/${os}/${arch}/" \
|
||||
|| die 'ln equinox native launcher failed'
|
||||
ln "features/org.eclipse.equinox.executable/library/${ws}"/eclipse*.so \
|
||||
"plugins/org.eclipse.equinox.launcher.${ws}.${os}.${arch}/" &&
|
||||
ln "features/org.eclipse.equinox.executable/library/${ws}"/eclipse*.so \
|
||||
"plugins/org.eclipse.equinox.launcher/fragments/org.eclipse.equinox.launcher.${ws}.${os}.${arch}/" \
|
||||
|| die 'ln equinox native library failed'
|
||||
|
||||
# Compile liblocalfile
|
||||
emake -C "plugins/org.eclipse.core.filesystem/natives/unix/${os}" \
|
||||
JAVA_HOME="${java_home}" || die 'emake liblocalfile failed'
|
||||
ln "plugins/org.eclipse.core.filesystem/natives/unix/${os}/liblocalfile_1_0_0.so" \
|
||||
"plugins/org.eclipse.core.filesystem.${os}.${arch}/os/${os}/${arch}/" \
|
||||
|| die 'ln liblocalfile failed'
|
||||
|
||||
# Compile libupdate
|
||||
ant -buildfile "plugins/org.eclipse.update.core.${os}/src/build.xml" \
|
||||
|| die 'ant build libupdate failed'
|
||||
|
||||
# Package everything up
|
||||
ant -DinstallWs="${ws}" -DinstallOs="${os}" -DinstallArch="${arch}" install \
|
||||
|| die 'ant install failed'
|
||||
|
||||
# Generate P2 repository
|
||||
$(java-config --java) \
|
||||
-jar tmp/eclipse/plugins/org.eclipse.equinox.launcher_*.jar \
|
||||
-data workspace \
|
||||
-application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator \
|
||||
-source "${S}/tmp/eclipse" \
|
||||
-metadataRepository "file:${S}/tmp/eclipse/repo" \
|
||||
-metadataRepositoryName 'Gentoo Portage' \
|
||||
-artifactRepository "file:${S}/tmp/eclipse/repo" \
|
||||
-artifactRepositoryName 'Gentoo Portage' \
|
||||
-publishArtifacts \
|
||||
-root 'Gentoo Eclipse SDK' -rootVersion "${PV%_*}" \
|
||||
-flavor tooling \
|
||||
|| die 'P2 repository generation failed'
|
||||
|
||||
# Disable Internet update sites
|
||||
sed -e '/^repositories\/http:/ s/\(enabled=\)true/\1false/' \
|
||||
-i tmp/eclipse/configuration/.settings/org.eclipse.equinox.p2.*.prefs || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local destdir="/usr/$(get_libdir)/eclipse-${SLOT}"
|
||||
|
||||
# Copy root files
|
||||
insinto "${destdir}"
|
||||
doins -r features/org.eclipse.platform/rootfiles/{.eclipseproduct,*}
|
||||
|
||||
# Install Eclipse SDK with P2
|
||||
$(java-config --java) \
|
||||
-Declipse.p2.data.area="file:${D}${destdir}/p2" \
|
||||
-jar tmp/eclipse/plugins/org.eclipse.equinox.launcher_*.jar \
|
||||
-data workspace \
|
||||
-application org.eclipse.equinox.p2.director.app.application \
|
||||
-metadataRepository "file:${S}/tmp/eclipse/repo" \
|
||||
-artifactRepository "file:${S}/tmp/eclipse/repo" \
|
||||
-installIU 'Gentoo Eclipse SDK' -version "${PV%_*}" \
|
||||
-destination "${D}${destdir}" \
|
||||
-profile SDKProfile \
|
||||
-profileProperties 'org.eclipse.update.install.features=true' \
|
||||
-bundlepool "${D}${destdir}" \
|
||||
-p2.ws "${ws}" -p2.os "${os}" -p2.arch "${arch}" \
|
||||
-roaming \
|
||||
|| die 'P2 installation failed'
|
||||
|
||||
# Java doesn't know about symlinks
|
||||
find plugins -type l -name '*.jar' |
|
||||
while read -r link ; do
|
||||
ref=$(readlink "${link}") ; link=${link#plugins/}
|
||||
ln -sf "${ref}" "$(echo "${D}${destdir}/plugins/${link%%/*}"*)/${link#*/}" || die
|
||||
done
|
||||
|
||||
# Install Gentoo wrapper and config
|
||||
dobin "${FILESDIR}/${SLOT}/eclipse-${SLOT}"
|
||||
insinto /etc/
|
||||
doins "${FILESDIR}/${SLOT}/eclipserc-${SLOT}"
|
||||
|
||||
# Create desktop entry
|
||||
newicon "features/org.eclipse.equinox.executable/bin/${ws}/${os}/${arch}/icon.xpm" \
|
||||
"eclipse-${SLOT}.xpm" || die
|
||||
make_desktop_entry "eclipse-${SLOT}" "Eclipse ${MY_PV}" "eclipse-${SLOT}.xpm" || die
|
||||
}
|
||||
|
||||
# Replaces the bundled jars in plugin dir ${1} with links to the jars from
|
||||
# java-config package ${2}. If ${3} is given, the jars are linked in ${1}/${3}.
|
||||
eclipse_unbundle-dir() {
|
||||
local bundle=${S}/${1} package=${2} into=${3}
|
||||
local basename=$(basename "${bundle}")
|
||||
local barename=${basename%_*}
|
||||
|
||||
if [[ -d "${bundle}" ]] ; then
|
||||
pushd "${bundle}" > /dev/null || die
|
||||
einfo " ${barename} => ${package}"
|
||||
|
||||
rm -rf "../${barename}.source${basename#${barename}}"*
|
||||
eclipse_delete-plugins ".*${barename//./\.}\.source.*"
|
||||
|
||||
local classpath=$(manifest_get META-INF/MANIFEST.MF 'Bundle-ClassPath')
|
||||
manifest_delete META-INF/MANIFEST.MF 'Name\|SHA1-Digest'
|
||||
rm -f ${classpath//,/ } META-INF/ECLIPSEF.{RSA,SF}
|
||||
java-pkg_jar-from ${into:+--into "${into}"} "${package}"
|
||||
popd > /dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
# Extracts plugin jar ${1} and updates its manifest to reference the jars of
|
||||
# java-config package ${2}.
|
||||
eclipse_unbundle-jar() {
|
||||
local bundle=${S}/${1} package=${2}
|
||||
local basename=$(basename "${bundle}" .jar)
|
||||
local barename=${basename%_*}
|
||||
|
||||
pushd "$(dirname "${bundle}")" > /dev/null || die
|
||||
if [[ -f "${basename}.jar" ]] ; then
|
||||
einfo " ${barename} => ${package}"
|
||||
|
||||
rm -rf "${barename}.source${basename#${barename}}"*
|
||||
eclipse_delete-plugins ".*${barename//./\.}\.source.*"
|
||||
|
||||
mkdir "${basename}" && cd "${basename}" || die
|
||||
$(java-config --jar) -xf "../${basename}.jar" \
|
||||
META-INF/MANIFEST.MF {feature,fragment,plugin}.{properties,xml} || die
|
||||
|
||||
local classpath=$(java-pkg_getjars "${package}")
|
||||
[[ ${classpath} ]] || die "java-pkg_getjars ${package} failed"
|
||||
CLASSPATH="${CLASSPATH}:${classpath}"
|
||||
manifest_replace META-INF/MANIFEST.MF 'Bundle-ClassPath' \
|
||||
"external:${classpath//:/,external:}"
|
||||
manifest_delete META-INF/MANIFEST.MF 'Name\|SHA1-Digest'
|
||||
sed_xml_element 'plugin' -e '/id="'"${barename//./\.}"'"/s/unpack="false"//' \
|
||||
-i "${S}"/features/*/feature.xml || die
|
||||
eclipse_replace-pathelement "${basename//./\.}" "${classpath////\/}"
|
||||
|
||||
rm "../${basename}.jar" || die
|
||||
sed_xml_element 'copy' \
|
||||
-e '/\bfile=".*'"${basename//./\.}"'/{
|
||||
s/<copy/<copydir/;s/\.jar//g;s/\bfile=/src=/;s/\btofile=/dest=/}' \
|
||||
-i "${S}"/package.*.xml || die
|
||||
fi
|
||||
popd > /dev/null
|
||||
}
|
||||
|
||||
# Replaces Ant path elements that match ${1} with ${2}.
|
||||
eclipse_replace-pathelement() {
|
||||
local from=${1} to=${2}
|
||||
sed -e '/<pathelement path="/s/\([":;]\)[^":;]*\('"${from}"'\)[^":;]*\([":;]\)/\1'"${to}"'\3/' \
|
||||
-i "${S}"/{,features/*/,plugins/*/}build.xml \
|
||||
|| die 'eclipse_replace-pathelement failed'
|
||||
}
|
||||
|
||||
# Removes Ant commands that reference plugins matching ${1}.
|
||||
eclipse_delete-plugins() {
|
||||
sed_xml_element 'ant' -e '/dir="'"${1}"'"/d' -i "${S}"/features/*/build.xml &&
|
||||
sed_xml_element 'includes\|plugin' -e '/id="'"${1}"'"/d' -i "${S}"/features/*/feature.xml &&
|
||||
sed_xml_element 'customGather\|antcall' -e '/="'"${1}"'"/d' -i "${S}"/assemble.*.xml &&
|
||||
sed_xml_element 'copy\|antcall' -e '/="'"${1}"'"/d' -i "${S}"/package.*.xml \
|
||||
|| die 'eclipse_delete-plugins failed'
|
||||
}
|
||||
|
||||
# Prints the first value from manifest file ${1} whose key matches regex ${2},
|
||||
# unfolding as necessary.
|
||||
manifest_get() {
|
||||
sed -n -e '/^\('"${2}"'\): /{h;:A;$bB;n;/^ /!bB;H;bA};d;:B;g;s/^[^:]*: //;s/\n //g;p;q' "${1}" \
|
||||
|| die 'manifest_get failed'
|
||||
}
|
||||
|
||||
# Deletes values from manifest file ${1} whose keys match regex ${2}, taking
|
||||
# into account folding.
|
||||
manifest_delete() {
|
||||
sed -n -e ':A;/^\('"${2}"'\): /{:B;n;/^ /!{bA};bB};p' -i "${1}" \
|
||||
|| die 'manifest_delete failed'
|
||||
}
|
||||
|
||||
# Replaces the value for key ${2} in the first section of manifest file ${1}
|
||||
# with ${3}, or adds the key-value pair to that section if the key was absent.
|
||||
manifest_replace() {
|
||||
LC_ALL='C' awk -v key="${2}" -v val="${3}" '
|
||||
function fold(s, o, l, r) {
|
||||
o = 2 ; l = length(s) - 1 ; r = substr(s, 1, 1)
|
||||
while (l > 69) { r = r substr(s, o, 69) "\n " ; o += 69 ; l -= 69 }
|
||||
return r substr(s, o)
|
||||
}
|
||||
BEGIN { FS = ": " }
|
||||
f { print ; next }
|
||||
i { if ($0 !~ "^ ") { f = 1 ; print } ; next }
|
||||
$1 == key { print fold(key FS val) ; i = 1 ; next }
|
||||
/^\r?$/ { print fold(key FS val) ; print ; f = 1 ; next }
|
||||
{ print }
|
||||
END { if (!f) { print fold(key FS val) } }
|
||||
' "${1}" > "${1}-" && mv "${1}"{-,} || die 'manifest_replace failed'
|
||||
}
|
||||
|
||||
# Executes sed over each XML element with a name matching ${1}, rather than
|
||||
# over each line. The entire element (and its children) may be removed with the
|
||||
# 'd' command, or they may be edited using all the usual sed foo. Basically,
|
||||
# the script argument will be executed only for elements matching ${1}, and the
|
||||
# sed pattern space will consist of the entire element, including any nested
|
||||
# elements. Note that this is not perfect and requires no more than one XML
|
||||
# element per line to be reliable.
|
||||
sed_xml_element() {
|
||||
local elem="${1}" ; shift
|
||||
sed -e '/<\('"${elem}"'\)\([> \t]\|$\)/{:_1;/>/!{N;b_1};/\/>/b_3' \
|
||||
-e ':_2;/<\/\('"${elem}"'\)>/!{N;b_2};b_3};b;:_3' "${@}"
|
||||
}
|
||||
278
dev-util/eclipse-sdk/eclipse-sdk-3.5.1.ebuild
Normal file
278
dev-util/eclipse-sdk/eclipse-sdk-3.5.1.ebuild
Normal file
@@ -0,0 +1,278 @@
|
||||
# Copyright 1999-2009 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="2"
|
||||
|
||||
inherit java-pkg-2 check-reqs
|
||||
|
||||
BUILD_ID="R3_5_1"
|
||||
S="${WORKDIR}/eclipse-build-R0_3_0"
|
||||
|
||||
DESCRIPTION="Eclipse SDK"
|
||||
HOMEPAGE="http://www.eclipse.org/eclipse/"
|
||||
SRC_URI="http://download.eclipse.org/technology/linuxtools/eclipse-build/eclipse-${BUILD_ID}-fetched-src.tar.bz2
|
||||
http://download.eclipse.org/technology/linuxtools/eclipse-build/eclipse-build-R0_3_0.tar.gz"
|
||||
|
||||
LICENSE="EPL-1.0"
|
||||
SLOT="3.5"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="doc source"
|
||||
|
||||
CDEPEND=">=dev-java/swt-${PV}:${SLOT}
|
||||
>=dev-java/ant-1.7.1
|
||||
>=dev-java/ant-core-1.7.1
|
||||
>=dev-java/asm-3.1:3
|
||||
>=dev-java/commons-codec-1.3
|
||||
>=dev-java/commons-el-1.0
|
||||
>=dev-java/commons-httpclient-3.1:3
|
||||
>=dev-java/commons-logging-1.0.4
|
||||
>=dev-java/hamcrest-core-1.1
|
||||
>=dev-java/icu4j-4.0.1:4
|
||||
>=dev-java/jsch-0.1.41
|
||||
>=dev-java/junit-3.8.2:0
|
||||
>=dev-java/junit-4.5:4
|
||||
>=dev-java/lucene-1.9.1:1.9
|
||||
>=dev-java/lucene-analyzers-1.9.1:1.9
|
||||
>=dev-java/sat4j-core-2.1:2
|
||||
>=dev-java/sat4j-pseudo-2.1:2
|
||||
dev-java/tomcat-servlet-api:2.5"
|
||||
RDEPEND="${CDEPEND}
|
||||
>=virtual/jre-1.5"
|
||||
DEPEND="${CDEPEND}
|
||||
app-arch/unzip
|
||||
app-arch/zip
|
||||
>=virtual/jdk-1.6"
|
||||
|
||||
ALL_WS='carbon cocoa gtk motif photon wpf'
|
||||
ALL_OS='aix hpux linux macosx qnx solaris win32'
|
||||
ALL_ARCH='ia64 PA_RISC ppc s390 s390x sparc x86 x86_64'
|
||||
|
||||
buildDir="${S}/build/eclipse-${BUILD_ID}-fetched-src"
|
||||
|
||||
pkg_setup() {
|
||||
ws='gtk'
|
||||
if use x86 ; then os='linux' ; arch='x86'
|
||||
elif use amd64 ; then os='linux' ; arch='x86_64'
|
||||
fi
|
||||
|
||||
java-pkg-2_pkg_setup
|
||||
|
||||
if use doc ; then
|
||||
ewarn "Having the 'doc' USE flag enabled greatly increases the build time."
|
||||
ewarn "You might want to disable it for ${PN} if you don't need it."
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
CHECKREQS_MEMORY="1536"
|
||||
CHECKREQS_DISK_BUILD="3072"
|
||||
check_reqs
|
||||
|
||||
unpack eclipse-build-R0_3_0.tar.gz
|
||||
ln -s "${DISTDIR}/eclipse-${BUILD_ID}-fetched-src.tar.bz2" "${S}"/ || die
|
||||
|
||||
# fix up hardcoded buildId
|
||||
sed -e 's/^\(buildId=\).*$/\1'"${BUILD_ID}"'/' -i "${S}"/{,pde}build.properties || die
|
||||
sed -e 's/I20090611-1540/'"${BUILD_ID}"'/g' -i "${S}"/pdebuild.xml || die
|
||||
|
||||
( cd "${S}" && ant init ) || die
|
||||
# remove init target since we've already run it
|
||||
sed -e 's/depends="init"//' -i "${S}"/build.xml || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if use amd64 ; then
|
||||
sed -e 's/^buildArch=x86$/\0_64/' -i {,pde}build.properties || die
|
||||
fi
|
||||
|
||||
# fix up hardcoded paths
|
||||
local JAVA_HOME=$(java-config --jdk-home)
|
||||
sed -e 's|/usr/lib/jvm/java/jre/lib/rt\.jar:.*$|'"$(java-config --runtime)"'|' \
|
||||
-i {,pde}build.properties || die
|
||||
sed -e 's|javaHome="[^"]*"|javaHome="'"${JAVA_HOME}"'"|' \
|
||||
-i "${buildDir}"/features/org.eclipse.equinox.executable/library/gtk/build.sh || die
|
||||
sed -e 's|~/vm/sun142|'"${JAVA_HOME}"'|' \
|
||||
-i "${buildDir}"/plugins/org.eclipse.core.filesystem/natives/unix/linux/Makefile || die
|
||||
|
||||
# fix up hardcoded versions and add new ECF plugin to build paths
|
||||
sed -e 's/20090604-1131/20090831-1906/' -e 's/20090415/20090822/' \
|
||||
-e '/org\.eclipse\.ecf\.filetransfer/{p;s/\(filetransfer_3\.0\.\)0/provider.\11/}' \
|
||||
-i "${buildDir}"/plugins/*/build.xml || die
|
||||
|
||||
# skip compilation of SWT native libraries (we use the system-installed copies)
|
||||
sed_xml_element 'ant\|patch' -e '/swt/d' -i build.xml || die
|
||||
|
||||
ebegin 'Removing plugins of irrelevant platforms'
|
||||
local remove=" ${ALL_WS[@]} ${ALL_OS[@]} ${ALL_ARCH[@]} "
|
||||
remove=${remove/ ${ws} / } ; remove=${remove/ ${os} / } ; remove=${remove/ ${arch} / }
|
||||
remove=${remove# } ; remove=${remove% } ; remove=${remove// /'\|'}
|
||||
find \( -type d -o -name '*.xml' \) \
|
||||
! -regex '.*[./]\(net\|update\.core\.'"${os}"'\)\([./].*\|\)' \
|
||||
-regex '.*[./]\('"${remove}"'\)\([./].*\|\)' -prune -exec rm -rf {} +
|
||||
eclipse_delete-plugins '.*\.\('"${remove}"'\)\(\..*\|\)'
|
||||
eend
|
||||
|
||||
if ! use doc ; then
|
||||
ebegin 'Removing documentation plugins'
|
||||
rm -rf "${buildDir}"/plugins/*.doc{,.*}
|
||||
eclipse_delete-plugins '.*\.doc\(\..*\|\)'
|
||||
eend
|
||||
fi
|
||||
|
||||
if ! use source ; then
|
||||
ebegin 'Removing source plugins'
|
||||
rm -rf "${buildDir}"/plugins/*.source{,_*}
|
||||
eclipse_delete-plugins '.*\.source'
|
||||
eend
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
ANT_OPTS='-Xmx512M' ./build.sh || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local destDir="/usr/$(get_libdir)/eclipse-${SLOT}"
|
||||
|
||||
insinto "${destDir}"
|
||||
shopt -s dotglob
|
||||
doins -r "${buildDir}"/installation/*
|
||||
shopt -u dotglob
|
||||
chmod +x "${D}${destDir}"/eclipse
|
||||
rm "${D}${destDir}"/libcairo-swt.so # use the system-installed SWT libraries
|
||||
|
||||
ebegin 'Unbundling dependencies'
|
||||
pushd "${D}${destDir}" > /dev/null || die
|
||||
eclipse_unbundle-dir plugins/org.apache.ant_* ant-core,ant-nodeps lib
|
||||
eclipse_unbundle-dir plugins/org.junit_* junit
|
||||
eclipse_unbundle-dir plugins/org.junit4_* junit:4
|
||||
eclipse_unbundle-jar plugins/com.ibm.icu_*.jar icu4j:4
|
||||
eclipse_unbundle-jar plugins/com.jcraft.jsch_*.jar jsch
|
||||
eclipse_unbundle-jar plugins/javax.servlet_*.jar tomcat-servlet-api:2.5 servlet-api
|
||||
eclipse_unbundle-jar plugins/javax.servlet.jsp_*.jar tomcat-servlet-api:2.5 jsp-api
|
||||
eclipse_unbundle-jar plugins/org.apache.commons.codec_*.jar commons-codec
|
||||
eclipse_unbundle-jar plugins/org.apache.commons.el_*.jar commons-el
|
||||
eclipse_unbundle-jar plugins/org.apache.commons.httpclient_*.jar commons-httpclient:3
|
||||
eclipse_unbundle-jar plugins/org.apache.commons.logging_*.jar commons-logging
|
||||
#eclipse_unbundle-jar plugins/org.apache.jasper_*.jar tomcat-jasper
|
||||
eclipse_unbundle-jar plugins/org.apache.lucene_*.jar lucene:1.9
|
||||
eclipse_unbundle-jar plugins/org.apache.lucene.analysis_*.jar lucene-analyzers:1.9
|
||||
eclipse_unbundle-jar plugins/org.eclipse.swt."${ws}.${os}.${arch}"_*.jar swt:${SLOT}
|
||||
eclipse_unbundle-jar plugins/org.hamcrest.core_*.jar hamcrest-core
|
||||
#eclipse_unbundle-jar plugins/org.mortbay.jetty_*.jar jetty
|
||||
eclipse_unbundle-jar plugins/org.objectweb.asm_*.jar asm:3
|
||||
eclipse_unbundle-jar plugins/org.sat4j.core_*.jar sat4j-core:2
|
||||
eclipse_unbundle-jar plugins/org.sat4j.pb_*.jar sat4j-pseudo:2
|
||||
popd > /dev/null
|
||||
eend
|
||||
|
||||
# Install Gentoo wrapper and config
|
||||
dobin "${FILESDIR}/${SLOT}/eclipse-${SLOT}"
|
||||
insinto /etc
|
||||
doins "${FILESDIR}/${SLOT}/eclipserc-${SLOT}"
|
||||
|
||||
# Create desktop entry
|
||||
make_desktop_entry "eclipse-${SLOT}" "Eclipse ${PV}" "${destDir}/icon.xpm" || die
|
||||
}
|
||||
|
||||
# Replaces the bundled jars in plugin dir ${1} with links to the jars from
|
||||
# java-config package ${2}. If ${3} is given, the jars are linked in ${1}/${3}.
|
||||
eclipse_unbundle-dir() {
|
||||
local bundle=${1} package=${2} into=${3}
|
||||
local basename=$(basename "${bundle}")
|
||||
local barename=${basename%_*}
|
||||
|
||||
if [[ -d "${bundle}" ]] ; then
|
||||
einfo " ${barename} => ${package}"
|
||||
|
||||
pushd "${bundle}" > /dev/null || die
|
||||
local classpath=$(manifest_get META-INF/MANIFEST.MF 'Bundle-ClassPath')
|
||||
manifest_delete META-INF/MANIFEST.MF 'Name\|SHA1-Digest'
|
||||
rm -f ${classpath//,/ } META-INF/ECLIPSEF.{RSA,SF}
|
||||
java-pkg_jar-from ${into:+--into "${into}"} "${package}"
|
||||
popd > /dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
# Extracts plugin jar ${1}, updates its manifest to reference the jars of
|
||||
# java-config package ${2}, and repacks it.
|
||||
eclipse_unbundle-jar() {
|
||||
local bundle=${1} package=${2} jar=${3}
|
||||
local basename=$(basename "${bundle}" .jar)
|
||||
local barename=${basename%_*}
|
||||
|
||||
if [[ -f "${bundle}" ]] ; then
|
||||
einfo " ${barename} => ${package}"
|
||||
|
||||
bundle=$(readlink -f "${bundle}")
|
||||
mkdir "${T}/${basename}" && pushd "${T}/${basename}" > /dev/null || die
|
||||
$(java-config --jar) -xf "${bundle}" \
|
||||
META-INF/MANIFEST.MF {feature,fragment,plugin}.{properties,xml} || die
|
||||
rm "${bundle}" || die
|
||||
|
||||
local classpath=$(java-pkg_getjars "${package}")
|
||||
[[ ${classpath} ]] || die "java-pkg_getjars ${package} failed"
|
||||
[[ ${jar} ]] && classpath=$(echo "${classpath}" | grep -o '[^:]*/'"${jar}"'\.jar')
|
||||
manifest_replace META-INF/MANIFEST.MF 'Bundle-ClassPath' \
|
||||
"external:${classpath//:/,external:}"
|
||||
manifest_delete META-INF/MANIFEST.MF 'Name\|SHA1-Digest'
|
||||
|
||||
$(java-config --jar) -cfm "${bundle}" META-INF/MANIFEST.MF . || die
|
||||
popd > /dev/null
|
||||
rm -r "${T}/${basename}" || die
|
||||
fi
|
||||
}
|
||||
|
||||
# Removes feature.xml references to plugins matching ${1}.
|
||||
eclipse_delete-plugins() {
|
||||
sed_xml_element 'includes\|plugin' -e '/id="'"${1}"'"/d' \
|
||||
-i "${buildDir}"/features/*/feature.xml "${S}"/eclipse-build-feature/feature.xml \
|
||||
|| die 'eclipse_delete-plugins failed'
|
||||
}
|
||||
|
||||
# Prints the first value from manifest file ${1} whose key matches regex ${2},
|
||||
# unfolding as necessary.
|
||||
manifest_get() {
|
||||
sed -n -e '/^\('"${2}"'\): /{h;:A;$bB;n;/^ /!bB;H;bA};d;:B;g;s/^[^:]*: //;s/\n //g;p;q' "${1}" \
|
||||
|| die 'manifest_get failed'
|
||||
}
|
||||
|
||||
# Deletes values from manifest file ${1} whose keys match regex ${2}, taking
|
||||
# into account folding.
|
||||
manifest_delete() {
|
||||
sed -n -e ':A;/^\('"${2}"'\): /{:B;n;/^ /!{bA};bB};p' -i "${1}" \
|
||||
|| die 'manifest_delete failed'
|
||||
}
|
||||
|
||||
# Replaces the value for key ${2} in the first section of manifest file ${1}
|
||||
# with ${3}, or adds the key-value pair to that section if the key was absent.
|
||||
manifest_replace() {
|
||||
LC_ALL='C' awk -v key="${2}" -v val="${3}" '
|
||||
function fold(s, o, l, r) {
|
||||
o = 2 ; l = length(s) - 1 ; r = substr(s, 1, 1)
|
||||
while (l > 69) { r = r substr(s, o, 69) "\n " ; o += 69 ; l -= 69 }
|
||||
return r substr(s, o)
|
||||
}
|
||||
BEGIN { FS = ": " }
|
||||
f { print ; next }
|
||||
i { if ($0 !~ "^ ") { f = 1 ; print } ; next }
|
||||
$1 == key { print fold(key FS val) ; i = 1 ; next }
|
||||
/^\r?$/ { print fold(key FS val) ; print ; f = 1 ; next }
|
||||
{ print }
|
||||
END { if (!f) { print fold(key FS val) } }
|
||||
' "${1}" > "${1}-" && mv "${1}"{-,} || die 'manifest_replace failed'
|
||||
}
|
||||
|
||||
# Executes sed over each XML element with a name matching ${1}, rather than
|
||||
# over each line. The entire element (and its children) may be removed with the
|
||||
# 'd' command, or they may be edited using all the usual sed foo. Basically,
|
||||
# the script argument will be executed only for elements matching ${1}, and the
|
||||
# sed pattern space will consist of the entire element, including any nested
|
||||
# elements. Note that this is not perfect and requires no more than one XML
|
||||
# element per line to be reliable.
|
||||
sed_xml_element() {
|
||||
local elem="${1}" ; shift
|
||||
sed -e '/<\('"${elem}"'\)\([> \t]\|$\)/{:_1;/>/!{N;b_1};/\/>/b_3' \
|
||||
-e ':_2;/<\/\('"${elem}"'\)>/!{N;b_2};b_3};b;:_3' "${@}"
|
||||
}
|
||||
267
dev-util/eclipse-sdk/eclipse-sdk-3.5.ebuild
Normal file
267
dev-util/eclipse-sdk/eclipse-sdk-3.5.ebuild
Normal file
@@ -0,0 +1,267 @@
|
||||
# Copyright 1999-2009 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="2"
|
||||
|
||||
inherit java-pkg-2 check-reqs
|
||||
|
||||
BUILD_ID="I20090611-1540"
|
||||
S="${WORKDIR}/eclipse-build-R0_3_0"
|
||||
|
||||
DESCRIPTION="Eclipse SDK"
|
||||
HOMEPAGE="http://www.eclipse.org/eclipse/"
|
||||
SRC_URI="http://download.eclipse.org/technology/linuxtools/eclipse-build/eclipse-${BUILD_ID}-fetched-src.tar.bz2
|
||||
http://download.eclipse.org/technology/linuxtools/eclipse-build/eclipse-build-R0_3_0.tar.gz"
|
||||
|
||||
LICENSE="EPL-1.0"
|
||||
SLOT="3.5"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="doc source"
|
||||
|
||||
CDEPEND=">=dev-java/swt-${PV}:${SLOT}
|
||||
>=dev-java/ant-1.7.1
|
||||
>=dev-java/ant-core-1.7.1
|
||||
>=dev-java/asm-3.1:3
|
||||
>=dev-java/commons-codec-1.3
|
||||
>=dev-java/commons-el-1.0
|
||||
>=dev-java/commons-httpclient-3.1:3
|
||||
>=dev-java/commons-logging-1.0.4
|
||||
>=dev-java/icu4j-4.0.1:4
|
||||
>=dev-java/jsch-0.1.41
|
||||
>=dev-java/junit-3.8.2:0
|
||||
>=dev-java/junit-4.5:4
|
||||
>=dev-java/lucene-1.9.1:1.9
|
||||
>=dev-java/lucene-analyzers-1.9.1:1.9
|
||||
>=dev-java/sat4j-core-2.1:2
|
||||
>=dev-java/sat4j-pseudo-2.1:2
|
||||
dev-java/tomcat-servlet-api:2.5"
|
||||
RDEPEND="${CDEPEND}
|
||||
>=virtual/jre-1.5"
|
||||
DEPEND="${CDEPEND}
|
||||
app-arch/unzip
|
||||
app-arch/zip
|
||||
>=virtual/jdk-1.6"
|
||||
|
||||
ALL_WS='carbon cocoa gtk motif photon wpf'
|
||||
ALL_OS='aix hpux linux macosx qnx solaris win32'
|
||||
ALL_ARCH='ia64 PA_RISC ppc s390 s390x sparc x86 x86_64'
|
||||
|
||||
buildDir="${S}/build/eclipse-${BUILD_ID}-fetched-src"
|
||||
|
||||
pkg_setup() {
|
||||
ws='gtk'
|
||||
if use x86 ; then os='linux' ; arch='x86'
|
||||
elif use amd64 ; then os='linux' ; arch='x86_64'
|
||||
fi
|
||||
|
||||
java-pkg-2_pkg_setup
|
||||
|
||||
if use doc ; then
|
||||
ewarn "Having the 'doc' USE flag enabled greatly increases the build time."
|
||||
ewarn "You might want to disable it for ${PN} if you don't need it."
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
CHECKREQS_MEMORY="1536"
|
||||
CHECKREQS_DISK_BUILD="3072"
|
||||
check_reqs
|
||||
|
||||
unpack eclipse-build-R0_3_0.tar.gz
|
||||
ln -s "${DISTDIR}/eclipse-${BUILD_ID}-fetched-src.tar.bz2" "${S}"/ || die
|
||||
|
||||
( cd "${S}" && ant init ) || die
|
||||
# remove init target since we've already run it
|
||||
sed -e 's/depends="init"//' -i "${S}"/build.xml || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if use amd64 ; then
|
||||
sed -e 's/^buildArch=x86$/\0_64/' -i {,pde}build.properties || die
|
||||
fi
|
||||
|
||||
# fix up hardcoded paths
|
||||
local JAVA_HOME=$(java-config --jdk-home)
|
||||
sed -e 's|/usr/lib/jvm/java/jre/lib/rt\.jar:.*$|'"$(java-config --runtime)"'|' \
|
||||
-i {,pde}build.properties || die
|
||||
sed -e 's|javaHome="[^"]*"|javaHome="'"${JAVA_HOME}"'"|' \
|
||||
-i "${buildDir}"/features/org.eclipse.equinox.executable/library/gtk/build.sh || die
|
||||
sed -e 's|~/vm/sun142|'"${JAVA_HOME}"'|' \
|
||||
-i "${buildDir}"/plugins/org.eclipse.core.filesystem/natives/unix/linux/Makefile || die
|
||||
|
||||
# skip compilation of SWT native libraries (we use the system-installed copies)
|
||||
sed_xml_element 'ant\|patch' -e '/swt/d' -i build.xml || die
|
||||
|
||||
ebegin 'Removing plugins of irrelevant platforms'
|
||||
local remove=" ${ALL_WS[@]} ${ALL_OS[@]} ${ALL_ARCH[@]} "
|
||||
remove=${remove/ ${ws} / } ; remove=${remove/ ${os} / } ; remove=${remove/ ${arch} / }
|
||||
remove=${remove# } ; remove=${remove% } ; remove=${remove// /'\|'}
|
||||
find \( -type d -o -name '*.xml' \) \
|
||||
! -regex '.*[./]\(net\|update\.core\.'"${os}"'\)\([./].*\|\)' \
|
||||
-regex '.*[./]\('"${remove}"'\)\([./].*\|\)' -prune -exec rm -rf {} +
|
||||
eclipse_delete-plugins '.*\.\('"${remove}"'\)\(\..*\|\)'
|
||||
eend
|
||||
|
||||
if ! use doc ; then
|
||||
ebegin 'Removing documentation plugins'
|
||||
rm -rf "${buildDir}"/plugins/*.doc{,.*}
|
||||
eclipse_delete-plugins '.*\.doc\(\..*\|\)'
|
||||
eend
|
||||
fi
|
||||
|
||||
if ! use source ; then
|
||||
ebegin 'Removing source plugins'
|
||||
rm -rf "${buildDir}"/plugins/*.source{,_*}
|
||||
eclipse_delete-plugins '.*\.source'
|
||||
eend
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
ANT_OPTS='-Xmx512M' ./build.sh || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local destDir="/usr/$(get_libdir)/eclipse-${SLOT}"
|
||||
|
||||
insinto "${destDir}"
|
||||
shopt -s dotglob
|
||||
doins -r "${buildDir}"/installation/*
|
||||
shopt -u dotglob
|
||||
chmod +x "${D}${destDir}"/eclipse
|
||||
rm "${D}${destDir}"/libcairo-swt.so # use the system-installed SWT libraries
|
||||
|
||||
ebegin 'Unbundling dependencies'
|
||||
pushd "${D}${destDir}" > /dev/null || die
|
||||
eclipse_unbundle-dir plugins/org.apache.ant_* ant-core,ant-nodeps lib
|
||||
eclipse_unbundle-dir plugins/org.junit_* junit
|
||||
eclipse_unbundle-dir plugins/org.junit4_* junit:4
|
||||
eclipse_unbundle-jar plugins/com.ibm.icu_*.jar icu4j:4
|
||||
eclipse_unbundle-jar plugins/com.jcraft.jsch_*.jar jsch
|
||||
eclipse_unbundle-jar plugins/javax.servlet_*.jar tomcat-servlet-api:2.5 servlet-api
|
||||
eclipse_unbundle-jar plugins/javax.servlet.jsp_*.jar tomcat-servlet-api:2.5 jsp-api
|
||||
eclipse_unbundle-jar plugins/org.apache.commons.codec_*.jar commons-codec
|
||||
eclipse_unbundle-jar plugins/org.apache.commons.el_*.jar commons-el
|
||||
eclipse_unbundle-jar plugins/org.apache.commons.httpclient_*.jar commons-httpclient:3
|
||||
eclipse_unbundle-jar plugins/org.apache.commons.logging_*.jar commons-logging
|
||||
#eclipse_unbundle-jar plugins/org.apache.jasper_*.jar tomcat-jasper
|
||||
eclipse_unbundle-jar plugins/org.apache.lucene_*.jar lucene:1.9
|
||||
eclipse_unbundle-jar plugins/org.apache.lucene.analysis_*.jar lucene-analyzers:1.9
|
||||
eclipse_unbundle-jar plugins/org.eclipse.swt."${ws}.${os}.${arch}"_*.jar swt:${SLOT}
|
||||
#eclipse_unbundle-jar plugins/org.mortbay.jetty_*.jar jetty
|
||||
eclipse_unbundle-jar plugins/org.objectweb.asm_*.jar asm:3
|
||||
eclipse_unbundle-jar plugins/org.sat4j.core_*.jar sat4j-core:2
|
||||
eclipse_unbundle-jar plugins/org.sat4j.pb_*.jar sat4j-pseudo:2
|
||||
popd > /dev/null
|
||||
eend
|
||||
|
||||
# Install Gentoo wrapper and config
|
||||
dobin "${FILESDIR}/${SLOT}/eclipse-${SLOT}"
|
||||
insinto /etc
|
||||
doins "${FILESDIR}/${SLOT}/eclipserc-${SLOT}"
|
||||
|
||||
# Create desktop entry
|
||||
make_desktop_entry "eclipse-${SLOT}" "Eclipse ${PV}" "${destDir}/icon.xpm" || die
|
||||
}
|
||||
|
||||
# Replaces the bundled jars in plugin dir ${1} with links to the jars from
|
||||
# java-config package ${2}. If ${3} is given, the jars are linked in ${1}/${3}.
|
||||
eclipse_unbundle-dir() {
|
||||
local bundle=${1} package=${2} into=${3}
|
||||
local basename=$(basename "${bundle}")
|
||||
local barename=${basename%_*}
|
||||
|
||||
if [[ -d "${bundle}" ]] ; then
|
||||
einfo " ${barename} => ${package}"
|
||||
|
||||
pushd "${bundle}" > /dev/null || die
|
||||
local classpath=$(manifest_get META-INF/MANIFEST.MF 'Bundle-ClassPath')
|
||||
manifest_delete META-INF/MANIFEST.MF 'Name\|SHA1-Digest'
|
||||
rm -f ${classpath//,/ } META-INF/ECLIPSEF.{RSA,SF}
|
||||
java-pkg_jar-from ${into:+--into "${into}"} "${package}"
|
||||
popd > /dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
# Extracts plugin jar ${1}, updates its manifest to reference the jars of
|
||||
# java-config package ${2}, and repacks it.
|
||||
eclipse_unbundle-jar() {
|
||||
local bundle=${1} package=${2} jar=${3}
|
||||
local basename=$(basename "${bundle}" .jar)
|
||||
local barename=${basename%_*}
|
||||
|
||||
if [[ -f "${bundle}" ]] ; then
|
||||
einfo " ${barename} => ${package}"
|
||||
|
||||
bundle=$(readlink -f "${bundle}")
|
||||
mkdir "${T}/${basename}" && pushd "${T}/${basename}" > /dev/null || die
|
||||
$(java-config --jar) -xf "${bundle}" \
|
||||
META-INF/MANIFEST.MF {feature,fragment,plugin}.{properties,xml} || die
|
||||
rm "${bundle}" || die
|
||||
|
||||
local classpath=$(java-pkg_getjars "${package}")
|
||||
[[ ${classpath} ]] || die "java-pkg_getjars ${package} failed"
|
||||
[[ ${jar} ]] && classpath=$(echo "${classpath}" | grep -o '[^:]*/'"${jar}"'\.jar')
|
||||
manifest_replace META-INF/MANIFEST.MF 'Bundle-ClassPath' \
|
||||
"external:${classpath//:/,external:}"
|
||||
manifest_delete META-INF/MANIFEST.MF 'Name\|SHA1-Digest'
|
||||
|
||||
$(java-config --jar) -cfm "${bundle}" META-INF/MANIFEST.MF . || die
|
||||
popd > /dev/null
|
||||
rm -r "${T}/${basename}" || die
|
||||
fi
|
||||
}
|
||||
|
||||
# Removes feature.xml references to plugins matching ${1}.
|
||||
eclipse_delete-plugins() {
|
||||
sed_xml_element 'includes\|plugin' -e '/id="'"${1}"'"/d' \
|
||||
-i "${buildDir}"/features/*/feature.xml "${S}"/eclipse-build-feature/feature.xml \
|
||||
|| die 'eclipse_delete-plugins failed'
|
||||
}
|
||||
|
||||
# Prints the first value from manifest file ${1} whose key matches regex ${2},
|
||||
# unfolding as necessary.
|
||||
manifest_get() {
|
||||
sed -n -e '/^\('"${2}"'\): /{h;:A;$bB;n;/^ /!bB;H;bA};d;:B;g;s/^[^:]*: //;s/\n //g;p;q' "${1}" \
|
||||
|| die 'manifest_get failed'
|
||||
}
|
||||
|
||||
# Deletes values from manifest file ${1} whose keys match regex ${2}, taking
|
||||
# into account folding.
|
||||
manifest_delete() {
|
||||
sed -n -e ':A;/^\('"${2}"'\): /{:B;n;/^ /!{bA};bB};p' -i "${1}" \
|
||||
|| die 'manifest_delete failed'
|
||||
}
|
||||
|
||||
# Replaces the value for key ${2} in the first section of manifest file ${1}
|
||||
# with ${3}, or adds the key-value pair to that section if the key was absent.
|
||||
manifest_replace() {
|
||||
LC_ALL='C' awk -v key="${2}" -v val="${3}" '
|
||||
function fold(s, o, l, r) {
|
||||
o = 2 ; l = length(s) - 1 ; r = substr(s, 1, 1)
|
||||
while (l > 69) { r = r substr(s, o, 69) "\n " ; o += 69 ; l -= 69 }
|
||||
return r substr(s, o)
|
||||
}
|
||||
BEGIN { FS = ": " }
|
||||
f { print ; next }
|
||||
i { if ($0 !~ "^ ") { f = 1 ; print } ; next }
|
||||
$1 == key { print fold(key FS val) ; i = 1 ; next }
|
||||
/^\r?$/ { print fold(key FS val) ; print ; f = 1 ; next }
|
||||
{ print }
|
||||
END { if (!f) { print fold(key FS val) } }
|
||||
' "${1}" > "${1}-" && mv "${1}"{-,} || die 'manifest_replace failed'
|
||||
}
|
||||
|
||||
# Executes sed over each XML element with a name matching ${1}, rather than
|
||||
# over each line. The entire element (and its children) may be removed with the
|
||||
# 'd' command, or they may be edited using all the usual sed foo. Basically,
|
||||
# the script argument will be executed only for elements matching ${1}, and the
|
||||
# sed pattern space will consist of the entire element, including any nested
|
||||
# elements. Note that this is not perfect and requires no more than one XML
|
||||
# element per line to be reliable.
|
||||
sed_xml_element() {
|
||||
local elem="${1}" ; shift
|
||||
sed -e '/<\('"${elem}"'\)\([> \t]\|$\)/{:_1;/>/!{N;b_1};/\/>/b_3' \
|
||||
-e ':_2;/<\/\('"${elem}"'\)>/!{N;b_2};b_3};b;:_3' "${@}"
|
||||
}
|
||||
43
dev-util/eclipse-sdk/files/3.4/eclipse-3.4
Normal file
43
dev-util/eclipse-sdk/files/3.4/eclipse-3.4
Normal file
@@ -0,0 +1,43 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Tiny startup wrapper for Eclipse
|
||||
#
|
||||
# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org>
|
||||
# Copyright (c) 2007-2008, Jean-Noël Rivasseau <elvanor@gentoo.org>
|
||||
# Copyright (c) 2004-2008, Gentoo Foundation
|
||||
#
|
||||
# Licensed under the GNU General Public License, version 2
|
||||
#
|
||||
|
||||
SLOT="3.4"
|
||||
|
||||
[ -f "/etc/eclipserc-${SLOT}" ] && source "/etc/eclipserc-${SLOT}"
|
||||
[ -f "$HOME/gentoo/.eclipserc" ] && source "$HOME/gentoo/.eclipserc"
|
||||
|
||||
ECLIPSE_HOME=${ECLIPSE_HOME:="/usr/lib/eclipse-${SLOT}"}
|
||||
ECLIPSE_BIN="${ECLIPSE_HOME}/eclipse"
|
||||
|
||||
if [ ! -x "${ECLIPSE_BIN}" ] ; then
|
||||
echo "Failed to find executable '${ECLIPSE_BIN}'" > /dev/stderr
|
||||
exit -1
|
||||
fi
|
||||
|
||||
if [ $(id -u) -eq 0 ] ; then
|
||||
echo "Do not run eclipse as root user! Exiting ..."
|
||||
exit -1
|
||||
fi
|
||||
|
||||
[[ "$(java-config -f)" =~ "gcj" ]] \
|
||||
&& export JAVA_PKG_CLASSMAP="${ECLIPSE_HOME}/eclipse.gcjdb"
|
||||
|
||||
eval $(gjl --package "swt-${SLOT}" --get-args)
|
||||
|
||||
[ -n "${ECLIPSE_XMS}" ] && VM_ARGS="${VM_ARGS} -Xms${ECLIPSE_XMS}"
|
||||
[ -n "${ECLIPSE_XMX}" ] && VM_ARGS="${VM_ARGS} -Xmx${ECLIPSE_XMX}"
|
||||
[ -n "${ECLIPSE_PERMSIZE}" ] && VM_ARGS="${VM_ARGS} -XX:PermSize=${ECLIPSE_PERMSIZE}"
|
||||
[ -n "${ECLIPSE_MAX_PERMSIZE}" ] && VM_ARGS="${VM_ARGS} -XX:MaxPermSize=${ECLIPSE_MAX_PERMSIZE}"
|
||||
|
||||
# Fix for JRE 1.5.
|
||||
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib
|
||||
|
||||
exec "${ECLIPSE_BIN}" -vm $(java-config --java) "$@" "${ECLIPSE_USER_ARGS}" -vmargs ${VM_ARGS}
|
||||
20
dev-util/eclipse-sdk/files/3.4/eclipserc-3.4
Normal file
20
dev-util/eclipse-sdk/files/3.4/eclipserc-3.4
Normal file
@@ -0,0 +1,20 @@
|
||||
# This file specifies some initial Eclipse settings, like memory allowed
|
||||
# These settings only affect Eclipse startup and overall configuration
|
||||
# Main Eclipse configuration should be done within Eclipse (with the GUI)
|
||||
|
||||
# Following variables controls the minimal and maximum amounts of memory
|
||||
# allocated to Eclipse (respectively).
|
||||
# Increase those numbers if you get OutOfMemory errors.
|
||||
|
||||
ECLIPSE_XMS=128m
|
||||
ECLIPSE_XMX=256m
|
||||
|
||||
# Following variables controls the minimal and maximum amounts of memory
|
||||
# allocated to the permanent generation space.
|
||||
# This space contains data related to all classes.
|
||||
# Thus, if you use a lot of Eclipse plugins, it is recommended to uncomment
|
||||
# these variables and even increase it, if you have enough RAM.
|
||||
# Else you will get crashes related to OutOfMemory in PermGen exceptions.
|
||||
|
||||
#ECLIPSE_PERMSIZE=64m
|
||||
#ECLIPSE_MAX_PERMSIZE=128m
|
||||
43
dev-util/eclipse-sdk/files/3.5/eclipse-3.5
Normal file
43
dev-util/eclipse-sdk/files/3.5/eclipse-3.5
Normal file
@@ -0,0 +1,43 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Tiny startup wrapper for Eclipse
|
||||
#
|
||||
# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org>
|
||||
# Copyright (c) 2007-2008, Jean-Noël Rivasseau <elvanor@gentoo.org>
|
||||
# Copyright (c) 2004-2008, Gentoo Foundation
|
||||
#
|
||||
# Licensed under the GNU General Public License, version 2
|
||||
#
|
||||
|
||||
SLOT="3.5"
|
||||
|
||||
[ -f "/etc/eclipserc-${SLOT}" ] && source "/etc/eclipserc-${SLOT}"
|
||||
[ -f "$HOME/gentoo/.eclipserc" ] && source "$HOME/gentoo/.eclipserc"
|
||||
|
||||
ECLIPSE_HOME=${ECLIPSE_HOME:="/usr/lib/eclipse-${SLOT}"}
|
||||
ECLIPSE_BIN="${ECLIPSE_HOME}/eclipse"
|
||||
|
||||
if [ ! -x "${ECLIPSE_BIN}" ] ; then
|
||||
echo "Failed to find executable '${ECLIPSE_BIN}'" > /dev/stderr
|
||||
exit -1
|
||||
fi
|
||||
|
||||
if [ $(id -u) -eq 0 ] ; then
|
||||
echo "Do not run eclipse as root user! Exiting ..."
|
||||
exit -1
|
||||
fi
|
||||
|
||||
[[ "$(java-config -f)" =~ "gcj" ]] \
|
||||
&& export JAVA_PKG_CLASSMAP="${ECLIPSE_HOME}/eclipse.gcjdb"
|
||||
|
||||
eval $(gjl --package "swt-${SLOT}" --get-args)
|
||||
|
||||
[ -n "${ECLIPSE_XMS}" ] && VM_ARGS="${VM_ARGS} -Xms${ECLIPSE_XMS}"
|
||||
[ -n "${ECLIPSE_XMX}" ] && VM_ARGS="${VM_ARGS} -Xmx${ECLIPSE_XMX}"
|
||||
[ -n "${ECLIPSE_PERMSIZE}" ] && VM_ARGS="${VM_ARGS} -XX:PermSize=${ECLIPSE_PERMSIZE}"
|
||||
[ -n "${ECLIPSE_MAX_PERMSIZE}" ] && VM_ARGS="${VM_ARGS} -XX:MaxPermSize=${ECLIPSE_MAX_PERMSIZE}"
|
||||
|
||||
# Fix for JRE 1.5.
|
||||
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib
|
||||
|
||||
exec "${ECLIPSE_BIN}" -vm $(java-config --java) "$@" "${ECLIPSE_USER_ARGS}" -vmargs ${VM_ARGS}
|
||||
20
dev-util/eclipse-sdk/files/3.5/eclipserc-3.5
Normal file
20
dev-util/eclipse-sdk/files/3.5/eclipserc-3.5
Normal file
@@ -0,0 +1,20 @@
|
||||
# This file specifies some initial Eclipse settings, like memory allowed
|
||||
# These settings only affect Eclipse startup and overall configuration
|
||||
# Main Eclipse configuration should be done within Eclipse (with the GUI)
|
||||
|
||||
# Following variables controls the minimal and maximum amounts of memory
|
||||
# allocated to Eclipse (respectively).
|
||||
# Increase those numbers if you get OutOfMemory errors.
|
||||
|
||||
ECLIPSE_XMS=128m
|
||||
ECLIPSE_XMX=256m
|
||||
|
||||
# Following variables controls the minimal and maximum amounts of memory
|
||||
# allocated to the permanent generation space.
|
||||
# This space contains data related to all classes.
|
||||
# Thus, if you use a lot of Eclipse plugins, it is recommended to uncomment
|
||||
# these variables and even increase it, if you have enough RAM.
|
||||
# Else you will get crashes related to OutOfMemory in PermGen exceptions.
|
||||
|
||||
#ECLIPSE_PERMSIZE=64m
|
||||
#ECLIPSE_MAX_PERMSIZE=128m
|
||||
17
dev-util/eclipse-sdk/metadata.xml
Normal file
17
dev-util/eclipse-sdk/metadata.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<herd>dev-tools</herd>
|
||||
<herd>java</herd>
|
||||
<longdescription>
|
||||
The Eclipse Project is an open source project of eclipse.org, overseen by
|
||||
a Project Management Committee (PMC) and project leaders. The work is done
|
||||
in subprojects working against a CVS repository. The Eclipse Project
|
||||
Charter describes the organization of the project, roles and
|
||||
responsibilities of the participants, and top level development process
|
||||
for the project. The JDT and PDE are plug-in tools for the Eclipse
|
||||
Platform. Together, these three pieces form the Eclipse SDK download, a
|
||||
complete development environment for Eclipse-based tools, and for
|
||||
developing Eclipse itself.
|
||||
</longdescription>
|
||||
</pkgmetadata>
|
||||
Reference in New Issue
Block a user