diff options
author | Alistair Bush <ali_bush@gentoo.org> | 2008-03-01 02:36:41 +0000 |
---|---|---|
committer | Alistair Bush <ali_bush@gentoo.org> | 2008-03-01 02:36:41 +0000 |
commit | 75ba820737e4a22ff51a1bf5f95e3c73d224c8f1 (patch) | |
tree | ffe08b85ec074c5daa8c6a0a89a6852b837712b6 /dev-java/freemarker | |
parent | Remove old versions (diff) | |
download | gentoo-2-75ba820737e4a22ff51a1bf5f95e3c73d224c8f1.tar.gz gentoo-2-75ba820737e4a22ff51a1bf5f95e3c73d224c8f1.tar.bz2 gentoo-2-75ba820737e4a22ff51a1bf5f95e3c73d224c8f1.zip |
Bump freemarker with patch to support latest jython version. see #211503 and #106239
(Portage version: 2.1.4.4)
Diffstat (limited to 'dev-java/freemarker')
-rw-r--r-- | dev-java/freemarker/ChangeLog | 9 | ||||
-rw-r--r-- | dev-java/freemarker/files/freemarker-jython-2.2.patch | 20 | ||||
-rw-r--r-- | dev-java/freemarker/freemarker-2.3.10-r1.ebuild | 76 |
3 files changed, 104 insertions, 1 deletions
diff --git a/dev-java/freemarker/ChangeLog b/dev-java/freemarker/ChangeLog index bf2c1164d8f9..9647c480ee31 100644 --- a/dev-java/freemarker/ChangeLog +++ b/dev-java/freemarker/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-java/freemarker # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/freemarker/ChangeLog,v 1.17 2008/01/21 11:06:50 nelchael Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-java/freemarker/ChangeLog,v 1.18 2008/03/01 02:36:39 ali_bush Exp $ + +*freemarker-2.3.10-r1 (01 Mar 2008) + + 01 Mar 2008; Alistair Bush <ali_bush@gentoo.org> + +files/freemarker-jython-2.2.patch, +freemarker-2.3.10-r1.ebuild: + Bump freemarker with patch to support latest jython version. see #211503 and + #106239 21 Jan 2008; Krzysiek Pawlik <nelchael@gentoo.org> +files/freemarker-2.3.10-gentoo.patch, +freemarker-2.3.10.ebuild: diff --git a/dev-java/freemarker/files/freemarker-jython-2.2.patch b/dev-java/freemarker/files/freemarker-jython-2.2.patch new file mode 100644 index 000000000000..0d0d387ee1b4 --- /dev/null +++ b/dev-java/freemarker/files/freemarker-jython-2.2.patch @@ -0,0 +1,20 @@ +diff -Naur src.orig/freemarker/ext/jython/JythonHashModel.java src/freemarker/ext/jython/JythonHashModel.java +--- src.orig/freemarker/ext/jython/JythonHashModel.java 2007-04-21 01:06:15.000000000 +1200 ++++ src/freemarker/ext/jython/JythonHashModel.java 2008-02-29 18:56:57.000000000 +1300 +@@ -137,7 +137,7 @@ + {
+ throw new TemplateModelException(e);
+ }
+- throw new TemplateModelException("'?keys' is not supported as there is no 'keys' nor 'keySet' attribute on an instance of " + object.__class__.__name__);
++ throw new TemplateModelException("'?keys' is not supported as there is no 'keys' nor 'keySet' attribute on an instance of " + object.getType());
+ }
+
+ /**
+@@ -157,6 +157,6 @@ + {
+ throw new TemplateModelException(e);
+ }
+- throw new TemplateModelException("'?values' is not supported as there is no 'values' attribute on an instance of " + object.__class__.__name__);
++ throw new TemplateModelException("'?values' is not supported as there is no 'values' attribute on an instance of " + object.getType());
+ }
+ }
diff --git a/dev-java/freemarker/freemarker-2.3.10-r1.ebuild b/dev-java/freemarker/freemarker-2.3.10-r1.ebuild new file mode 100644 index 000000000000..8e730047e3c8 --- /dev/null +++ b/dev-java/freemarker/freemarker-2.3.10-r1.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/freemarker/freemarker-2.3.10-r1.ebuild,v 1.1 2008/03/01 02:36:39 ali_bush Exp $ + +JAVA_PKG_IUSE="doc source" +WANT_ANT_TASKS="ant-nodeps" + +inherit java-pkg-2 java-ant-2 eutils + +DESCRIPTION=" FreeMarker is a template engine; a generic tool to generate text output based on templates." +HOMEPAGE="http://freemarker.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="freemarker" +SLOT="2.3" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="" + +COMMON_DEP="dev-java/javacc + >=dev-java/jython-2.2.1 + =dev-java/servletapi-2.3* + =dev-java/jaxen-1.1*" + +DEPEND=">=virtual/jdk-1.4 + ${COMMON_DEP}" +RDEPEND=">=virtual/jre-1.4 + ${COMMON_DEP}" + +src_unpack() { + + unpack ${A} + + cd "${S}" + epatch "${FILESDIR}/${P}-gentoo.patch" + #If you remove this patch, remove the postinst function. + epatch "${FILESDIR}/${PN}-jython-2.2.patch" + + cd "${S}/lib/" + rm -f *.jar + + rm -f "${S}/src/freemarker/testcase/servlets/WEB-INF/taglib2.jar" + rm -f "${S}/src/freemarker/testcase/servlets/WEB-INF/lib/taglib-foo.jar" + +} + +src_compile() { + + # BIG FAT WARNING: + # clean target removes lib/ directory!! + eant clean + + mkdir lib/ + cd lib/ + java-pkg_jar-from servletapi-2.3 + java-pkg_jar-from jaxen-1.1 + java-pkg_jar-from jython + + cd "${S}" + eant jar $(use_doc) -Djavacc.home=/usr/share/javacc/lib +} + +src_install() { + + java-pkg_dojar lib/${PN}.jar + dodoc README.txt || die + + use doc && java-pkg_dojavadoc build/api + use source && java-pkg_dosrc src/* +} + +pkg_postinst() { + elog "This version of freemarker has been patched to allow use with" + elog ">=dev-java/jython-2.2.1. This patch breaks compatibility with" + elog "the upstream supported jython-2.1. Please be aware of this before" + elog "using and file bugs at https://bugs.gentoo.org, not upstream." +} |