summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2014-03-31 16:48:09 +0000
committerMichał Górny <mgorny@gentoo.org>2014-03-31 16:48:09 +0000
commitdf2f2e25859b7599f155418cf4c18c932357c204 (patch)
tree6cd2ff12c0f3cdcbbed315ad6b2ce59cce847f4f /app-misc/freemind
parentFix version scheme, some other minor fixes. (diff)
downloadgentoo-2-df2f2e25859b7599f155418cf4c18c932357c204.tar.gz
gentoo-2-df2f2e25859b7599f155418cf4c18c932357c204.tar.bz2
gentoo-2-df2f2e25859b7599f155418cf4c18c932357c204.zip
Move the java-ant_remove-taskdefs function from the ebuild since this ebuild is the last consumer of it. This is least-change way of fixing the eclass.
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)
Diffstat (limited to 'app-misc/freemind')
-rw-r--r--app-misc/freemind/ChangeLog6
-rw-r--r--app-misc/freemind/freemind-0.9.0-r1.ebuild34
2 files changed, 36 insertions, 4 deletions
diff --git a/app-misc/freemind/ChangeLog b/app-misc/freemind/ChangeLog
index bb04832b279e..597b249d55f1 100644
--- a/app-misc/freemind/ChangeLog
+++ b/app-misc/freemind/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-misc/freemind
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/freemind/ChangeLog,v 1.64 2014/03/22 16:42:04 tomwij Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-misc/freemind/ChangeLog,v 1.65 2014/03/31 16:48:09 mgorny Exp $
+
+ 31 Mar 2014; Michał Górny <mgorny@gentoo.org> freemind-0.9.0-r1.ebuild:
+ Move the java-ant_remove-taskdefs function from the ebuild since this ebuild
+ is the last consumer of it. This is least-change way of fixing the eclass.
22 Mar 2014; Tom Wijsman <TomWij@gentoo.org> freemind-1.0.0-r1.ebuild:
Add missing die; for bug #501728, discovered by Chema Alonso (nimiux).
diff --git a/app-misc/freemind/freemind-0.9.0-r1.ebuild b/app-misc/freemind/freemind-0.9.0-r1.ebuild
index 7c091192961e..73531c47f47d 100644
--- a/app-misc/freemind/freemind-0.9.0-r1.ebuild
+++ b/app-misc/freemind/freemind-0.9.0-r1.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/freemind/freemind-0.9.0-r1.ebuild,v 1.5 2013/09/05 19:22:45 ago Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-misc/freemind/freemind-0.9.0-r1.ebuild,v 1.6 2014/03/31 16:48:09 mgorny Exp $
EAPI="4"
@@ -26,7 +26,8 @@ COMMON_DEP="
latex? ( dev-java/hoteqn:0 )
pdf? ( dev-java/batik:1.7 >=dev-java/fop-0.95:0 )
svg? ( dev-java/batik:1.7 >=dev-java/fop-0.95:0 )"
-DEPEND=">=virtual/jdk-1.4
+DEPEND="dev-lang/python
+ >=virtual/jdk-1.4
pdf? ( dev-java/avalon-framework:4.2 )
svg? ( dev-java/avalon-framework:4.2 )
${COMMON_DEP}"
@@ -35,6 +36,33 @@ RDEPEND=">=virtual/jre-1.4
S="${WORKDIR}/${PN}"
+# Moved from the eclass to clean it up from python and this ebuild is
+# the last consumer. Additionally, the newer version no longer requires
+# it so it will die along with this one.
+java-ant_remove-taskdefs() {
+ debug-print-function ${FUNCNAME} $*
+ local task_name
+ if [[ "${1}" == --name ]]; then
+ task_name="${2}"
+ shift 2
+ fi
+ local file="${1:-build.xml}"
+ echo "Removing taskdefs from ${file}"
+ python <<EOF
+import sys
+from xml.dom.minidom import parse
+dom = parse("${file}")
+for elem in dom.getElementsByTagName('taskdef'):
+ if (len("${task_name}") == 0 or elem.getAttribute("name") == "${task_name}"):
+ elem.parentNode.removeChild(elem)
+ elem.unlink()
+f = open("${file}", "w")
+dom.writexml(f)
+f.close()
+EOF
+ [[ $? != 0 ]] && die "Removing taskdefs failed"
+}
+
java_prepare() {
# someone got it all wrong (set/unset vs. bool)
sed -i -e 's|<property name="include_latex" value="false"/>||' plugins/build.xml || die