summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Sennhauser <sera@gentoo.org>2011-12-18 08:44:56 +0000
committerRalph Sennhauser <sera@gentoo.org>2011-12-18 08:44:56 +0000
commit21199e14c8e446f8b89a7a57ef37e0bc0ef80111 (patch)
treec29e1c19557f1271a8012e74966f60168ebcc80d /app-admin
parentFix dependency on ecj, eselect-ecj's PDEPEND doesn't guarantee it's availabil... (diff)
downloadhistorical-21199e14c8e446f8b89a7a57ef37e0bc0ef80111.tar.gz
historical-21199e14c8e446f8b89a7a57ef37e0bc0ef80111.tar.bz2
historical-21199e14c8e446f8b89a7a57ef37e0bc0ef80111.zip
Version and EAPI bump.
Drop PDEPEND as it doesn't guarantee packages DEPENDing on eselect-ecj the availability of a usable ecj. Packages must DEPEND on ecj for themself. Make update action always barf on invalid input. Make update action check for ecj.jar link as well. Make set action always link valid targets. #354097 Package-Manager: portage-2.1.10.41/cvs/Linux x86_64
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/eselect-ecj/ChangeLog13
-rw-r--r--app-admin/eselect-ecj/Manifest4
-rw-r--r--app-admin/eselect-ecj/eselect-ecj-0.7.ebuild23
-rw-r--r--app-admin/eselect-ecj/files/ecj-0.7.eselect151
4 files changed, 189 insertions, 2 deletions
diff --git a/app-admin/eselect-ecj/ChangeLog b/app-admin/eselect-ecj/ChangeLog
index 78cdc49f6671..b828a96c279c 100644
--- a/app-admin/eselect-ecj/ChangeLog
+++ b/app-admin/eselect-ecj/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for app-admin/eselect-ecj
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-ecj/ChangeLog,v 1.13 2011/10/19 22:01:32 fordfrog Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-ecj/ChangeLog,v 1.14 2011/12/18 08:44:55 sera Exp $
+
+*eselect-ecj-0.7 (18 Dec 2011)
+
+ 18 Dec 2011; Ralph Sennhauser <sera@gentoo.org> +eselect-ecj-0.7.ebuild,
+ +files/ecj-0.7.eselect:
+ Version and EAPI bump.
+ Drop PDEPEND as it doesn't guarantee packages DEPENDing on eselect-ecj the
+ availability of a usable ecj. Packages must DEPEND on ecj for themself.
+ Make update action always barf on invalid input.
+ Make update action check for ecj.jar link as well.
+ Make set action always link valid targets. #354097
*eselect-ecj-0.6-r1 (19 Oct 2011)
diff --git a/app-admin/eselect-ecj/Manifest b/app-admin/eselect-ecj/Manifest
index 311b95480adc..7ba7bcff3c43 100644
--- a/app-admin/eselect-ecj/Manifest
+++ b/app-admin/eselect-ecj/Manifest
@@ -1,5 +1,7 @@
AUX ecj-0.6.eselect 4287 RMD160 c5536f5b6c7944332de89d3f8fa75773077f424c SHA1 79665e5bf6acc85e80cae01dd1e6556db2db10cc SHA256 2a48ab5b2a26f00cc22cbea282c1edc875f7022595d265fb69a206cb5500c6c7
+AUX ecj-0.7.eselect 3354 RMD160 689f37b33762aaa7e56d4b8b401b4f13f81f538b SHA1 c523c43ecd6ede154cdbd60f7e5eb605ad3f67db SHA256 d4fb20a735c58afe89c1b18fe94a81f5cf2e4b00c2fe7ac0d881f4c0c75afff9
EBUILD eselect-ecj-0.6-r1.ebuild 818 RMD160 a2b6b7bcd618e3b3dca881029c40049491300e88 SHA1 6f6b704579638f20ceedf8c827ca1d4d6cf85658 SHA256 5b3f511caf364ccf41f9c15eb3e73a509cab746ed83e3ee5bd09011015ed30f2
EBUILD eselect-ecj-0.6.ebuild 761 RMD160 ee2cc8965b931b8774bdaef1b55c52bb26da7759 SHA1 f197acdf93c9efe2cafd6c59a5156a5fc83c5863 SHA256 cd4cb78e9e9e6ce060c393144ce15e34abed5ca58d386987ac3e56c24685cef8
-MISC ChangeLog 2353 RMD160 bea8a064a9a2764c1ec870f1757a1d02e9640b1e SHA1 1ee5e06816db8b245bf78e2ab3e4abf5f0c6f5ce SHA256 50294a8fee1507fefe92ebc10f1bac7a26a8613e544a8205658f9fb6e20123bb
+EBUILD eselect-ecj-0.7.ebuild 640 RMD160 2ba33b8c08e10e107578eb3962669eaaf782842b SHA1 871d9549b0f41f1117c78c9fa53482551e516130 SHA256 47e9e22c31d0d3baa4cadf6b664e6cacb0e9674a61af26b87cd3296fb8d77390
+MISC ChangeLog 2816 RMD160 078552f25bfa00ecf544fa752355eb9aaf5fbdf7 SHA1 d71660e299baaecace11fdb1089836a2469c49d2 SHA256 9fca1c45e615d869150ee49527f53964da7cee7ad8a9ba07c2d049b509d78665
MISC metadata.xml 158 RMD160 493079b5fb71d66863beea1b023901c90ba81be5 SHA1 77cd509a8b3c377b9a24480b48a5d5481b7874f1 SHA256 ea882ceccfd160b16cf7e79de423bdcc12b3fa000f124491a6df36f5783894fb
diff --git a/app-admin/eselect-ecj/eselect-ecj-0.7.ebuild b/app-admin/eselect-ecj/eselect-ecj-0.7.ebuild
new file mode 100644
index 000000000000..90081b566f36
--- /dev/null
+++ b/app-admin/eselect-ecj/eselect-ecj-0.7.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-ecj/eselect-ecj-0.7.ebuild,v 1.1 2011/12/18 08:44:56 sera Exp $
+
+EAPI=4
+
+DESCRIPTION="Manages ECJ symlinks"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~sparc-solaris ~x86-solaris"
+IUSE=""
+
+RDEPEND=">=app-admin/eselect-1.2.3"
+
+S="${WORKDIR}"
+
+src_install() {
+ insinto /usr/share/eselect/modules
+ newins "${FILESDIR}/ecj-${PV}.eselect" ecj.eselect || die "newins failed"
+}
diff --git a/app-admin/eselect-ecj/files/ecj-0.7.eselect b/app-admin/eselect-ecj/files/ecj-0.7.eselect
new file mode 100644
index 000000000000..3250b9721e90
--- /dev/null
+++ b/app-admin/eselect-ecj/files/ecj-0.7.eselect
@@ -0,0 +1,151 @@
+# -*-eselect-*- vim: ft=eselect
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id: ecj-0.7.eselect,v 1.1 2011/12/18 08:44:56 sera Exp $
+
+DESCRIPTION="Manage ECJ targets"
+MAINTAINER="java@gentoo.org"
+VERSION="0.7"
+
+ECJ="${EROOT}/usr/bin/ecj"
+ECJ_JAR="${EROOT}/usr/share/eclipse-ecj/ecj.jar"
+
+# find a list of ecj symlink targets, best first.
+find_targets() {
+ for f in $(ls -r "${ECJ}"-[0-9]* "${ECJ}"-gcj-[0-9]* 2> /dev/null) ; do
+ if [[ -f "${f}" ]] ; then
+ echo $(basename "${f}")
+ fi
+ done
+}
+
+# get a named or numbered target.
+find_target() {
+ local target=${1}
+
+ if is_number "${target}" && [[ ${target} -ge 1 ]] ; then
+ targets=( $(find_targets ) )
+ [[ -z "${targets}" ]] && die -q "No targets found!"
+ target=${targets[target-1]}
+ fi
+
+ if [[ "${target}" = ecj-[0-9]* || "${target}" = ecj-gcj-[0-9]* ]] \
+ && [[ -f "${EROOT}/usr/bin/${target}" ]] ; then
+ echo ${target}
+ else
+ die -q "Target \"${1}\" doesn't appear to be valid!"
+ fi
+}
+
+# determine the current target.
+get_target() {
+ local canonicalised=$(canonicalise "${ECJ}")
+ echo $(basename "${canonicalised}")
+}
+
+### show action ###
+
+describe_show() {
+ echo "Show current ECJ target"
+}
+
+do_show() {
+ if [[ ${#} -gt 0 ]]; then
+ die -q "No parameters allowed."
+ fi
+
+ if [[ -L "${ECJ}" ]] ; then
+ get_target
+ return 0
+ elif [[ -e "${ECJ}" ]] ; then
+ echo "(not a symlink)" >&2
+ return 1
+ else
+ echo "(unset)" >&2
+ return 1
+ fi
+}
+
+### list action ###
+
+describe_list() {
+ echo "List available ECJ targets"
+}
+
+do_list() {
+ if [[ ${#} -gt 0 ]]; then
+ die -q "Usage error: no parameters allowed."
+ fi
+
+ local i targets
+ targets=( $(find_targets) )
+
+ for (( i = 0; i < ${#targets[@]}; i++ )); do
+ [[ ${targets[i]} = $(basename "$(canonicalise "${ECJ}")") ]] \
+ && targets[i]=$(highlight_marker "${targets[i]}")
+ done
+
+ write_list_start "Available ECJ targets:"
+ write_numbered_list -m "(none found)" "${targets[@]}"
+}
+
+### set action ###
+
+describe_set() {
+ echo "Set a new ECJ target"
+}
+
+describe_set_options() {
+ echo "target : Target name or number (from 'list' action)"
+}
+
+describe_set_parameters() {
+ echo "<target>"
+}
+
+do_set() {
+ [[ ${1} ]] || die -q "You didn't give me a target name or number."
+ [[ ${2} ]] && die -q "Too many parameters. Expected only one."
+
+ local target=$(find_target "${1}")
+
+ rm -f "${ECJ}" "${ECJ_JAR}"
+
+ ln -sf "${target}" "${ECJ}" || die "Couldn't set ${target} symlink."
+ mkdir -p $(dirname ${ECJ_JAR})
+ [[ "${target}" != ecj-gcj* ]] && target="eclipse-${target}"
+ ln -sf "${EROOT}"/usr/share/${target}/lib/ecj.jar ${ECJ_JAR} \
+ || die -q "Wasn't able to set a new provider."
+}
+
+### update action ###
+
+describe_update() {
+ echo "Set the ECJ target to the latest if the current target is invalid or if the given target is the latest"
+}
+
+describe_update_options() {
+ echo "target (optional) : Target name (from 'list' action)"
+}
+
+describe_update_parameters() {
+ echo "<target>"
+}
+
+do_update() {
+ [[ ${1} ]] && find_target "${1}" >/dev/null
+ [[ ${2} ]] && die -q "Too many parameters. Expected only one."
+
+ if [[ ! -f "${ECJ}" ]] || [[ ! -f "${ECJ_JAR}" ]]; then
+ local target="${1}"
+ if [[ -z "${target}" ]]; then
+ local all_targets=( $(find_targets) )
+ target=${all_targets}
+ fi
+ if [[ ${target} ]]; then
+ do_set ${target}
+ else
+ rm -f "${ECJ}" "${ECJ_JAR}"
+ fi
+ fi
+}