mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-java/freemarker: Drop old
Bug: https://bugs.gentoo.org/466558 Signed-off-by: Pacho Ramos <pacho@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11
This commit is contained in:
@@ -1,2 +1 @@
|
||||
DIST freemarker-2.3.13.tar.gz 2136791 BLAKE2B 6947d99fdca76ad9d38d57f5b982ba63b2b831c026dd5e65af5ea7c9aa816d01d0b477cc46cb6be6a8204953d73464dfc639d134191a72afc43cd4c7e936eaff SHA512 9216bc97e74779617ec91916842185472c3cfd4c5625168ddd2f4404237767df44c62d8308af8bed0ab10d72c8835c97daab7fbc1efa80c3e01c861dd334ec3b
|
||||
DIST freemarker-2.3.25.tar.gz 1873971 BLAKE2B 52c64938c67ac0303b07f4aa74c3fc7ccc0be68bd37a7c6c663ac0849acc9f2236d1028abb377efa6fdb518840b1961e71c1a02a37388864f9be14b3b443f28a SHA512 32a41a73a2f71a4e0ae8829da2c09e07204aa2b4a6899e2c7a3db0bde5d3e129ec7b44b7299a20165d7eb88f4f7d1bd9f0b7a1fd116dc11493134bec2306d1ac
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
--- src/freemarker/ext/jython/JythonModelCache.java.orig 2015-07-05 08:47:07.035000000 +0000
|
||||
+++ src/freemarker/ext/jython/JythonModelCache.java 2015-07-05 08:49:31.157000000 +0000
|
||||
@@ -10,7 +10,7 @@
|
||||
import org.python.core.PyDictionary;
|
||||
import org.python.core.PyFloat;
|
||||
import org.python.core.PyInteger;
|
||||
-import org.python.core.PyJavaInstance;
|
||||
+import org.python.core.PyJavaType;
|
||||
import org.python.core.PyLong;
|
||||
import org.python.core.PyNone;
|
||||
import org.python.core.PyObject;
|
||||
@@ -37,8 +37,8 @@
|
||||
protected TemplateModel create(Object obj) {
|
||||
boolean asHash = false;
|
||||
boolean asSequence = false;
|
||||
- if(obj instanceof PyJavaInstance) {
|
||||
- Object jobj = ((PyJavaInstance)obj).__tojava__(java.lang.Object.class);
|
||||
+ if(obj instanceof PyJavaType) {
|
||||
+ Object jobj = PyJavaType.wrapJavaObject(obj).__tojava__(Object.class);
|
||||
// FreeMarker-aware, Jython-wrapped Java objects are left intact
|
||||
if(jobj instanceof TemplateModel) {
|
||||
return (TemplateModel)jobj;
|
||||
@@ -1,126 +0,0 @@
|
||||
diff -Nru freemarker-2.3.13.vanilla/build.xml freemarker-2.3.13/build.xml
|
||||
--- freemarker-2.3.13.vanilla/build.xml 2008-06-21 00:46:08.000000000 +0200
|
||||
+++ freemarker-2.3.13/build.xml 2008-06-21 00:46:48.000000000 +0200
|
||||
@@ -69,21 +69,28 @@
|
||||
<pathelement path="${lib.log4j}"/>
|
||||
<pathelement path="${lib.rhino}"/>
|
||||
<pathelement path="${java.class.path}"/>
|
||||
+ <fileset dir="lib" includes="*.jar"/>
|
||||
</path>
|
||||
|
||||
<path id="compile.classpath">
|
||||
<path refid="compile.nojsp.classpath"/>
|
||||
<pathelement path="${lib.jsp21}"/>
|
||||
+ <fileset dir="lib" includes="*.jar"/>
|
||||
+ <fileset dir="lib/jsp-2.1" includes="*.jar"/>
|
||||
</path>
|
||||
|
||||
<path id="compile.jsp1.classpath">
|
||||
<path refid="compile.nojsp.classpath"/>
|
||||
<pathelement path="${lib.jsp12}"/>
|
||||
+ <fileset dir="lib" includes="*.jar"/>
|
||||
+ <fileset dir="lib/jsp-1.2" includes="*.jar"/>
|
||||
</path>
|
||||
|
||||
<path id="compile.jsp2.classpath">
|
||||
<path refid="compile.nojsp.classpath"/>
|
||||
<pathelement path="${lib.jsp20}"/>
|
||||
+ <fileset dir="lib" includes="*.jar"/>
|
||||
+ <fileset dir="lib/jsp-2.0" includes="*.jar"/>
|
||||
</path>
|
||||
|
||||
<path id="compile.classpath.testcases">
|
||||
@@ -92,6 +99,7 @@
|
||||
<pathelement path="${lib.jdom}"/>
|
||||
<pathelement path="${lib.servlet}"/>
|
||||
<pathelement path="${lib.jsp20}"/>
|
||||
+ <fileset dir="lib" includes="*.jar"/>
|
||||
</path>
|
||||
|
||||
<path id="compile.classpath.javadoc">
|
||||
@@ -110,12 +118,14 @@
|
||||
<pathelement path="${src.dir}"/>
|
||||
<pathelement path="${build.javacc.dir}"/>
|
||||
<pathelement path="${java.class.path}"/>
|
||||
+ <fileset dir="lib" includes="*.jar"/>
|
||||
</path>
|
||||
|
||||
<path id="compile.classpath.examples">
|
||||
<pathelement path="${lib.servlet}"/>
|
||||
<pathelement path="${lib.dir}/freemarker.jar"/>
|
||||
<pathelement path="${lib.struts}"/>
|
||||
+ <fileset dir="lib" includes="*.jar"/>
|
||||
</path>
|
||||
|
||||
<path id="full.classpath">
|
||||
@@ -131,6 +141,7 @@
|
||||
<pathelement path="${lib.logkit}"/>
|
||||
<pathelement path="${lib.log4j}"/>
|
||||
<pathelement path="${java.class.path}"/>
|
||||
+ <fileset dir="lib" includes="*.jar"/>
|
||||
</path>
|
||||
|
||||
|
||||
@@ -180,7 +191,6 @@
|
||||
|
||||
<patternset id="freemarker.compile.jdk15">
|
||||
<include name="freemarker/ext/beans/EnumModels.java"/>
|
||||
- <include name="freemarker/ext/dom/SunInternalXalanXPathSupport.java"/>
|
||||
</patternset>
|
||||
|
||||
<patternset id="freemarker.compile.xalan">
|
||||
@@ -311,7 +321,6 @@
|
||||
<available file="lib/xalan.jar"/>
|
||||
</and>
|
||||
</condition>
|
||||
- <antcall target="fetchlibs"/>
|
||||
<available
|
||||
property="log4j.available"
|
||||
classname="org.apache.log4j.Logger"
|
||||
diff -Nru freemarker-2.3.13.vanilla/src/freemarker/ext/jsp/FreeMarkerPageContext21.java freemarker-2.3.13/src/freemarker/ext/jsp/FreeMarkerPageContext21.java
|
||||
--- freemarker-2.3.13.vanilla/src/freemarker/ext/jsp/FreeMarkerPageContext21.java 2008-06-21 00:46:08.000000000 +0200
|
||||
+++ freemarker-2.3.13/src/freemarker/ext/jsp/FreeMarkerPageContext21.java 2008-06-21 00:46:12.000000000 +0200
|
||||
@@ -2,11 +2,13 @@
|
||||
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
+import java.util.Enumeration;
|
||||
|
||||
import javax.el.ELContext;
|
||||
import javax.servlet.jsp.JspApplicationContext;
|
||||
import javax.servlet.jsp.JspContext;
|
||||
import javax.servlet.jsp.JspFactory;
|
||||
+import javax.servlet.jsp.ErrorData;
|
||||
import javax.servlet.jsp.PageContext;
|
||||
import javax.servlet.jsp.el.ELException;
|
||||
import javax.servlet.jsp.el.ExpressionEvaluator;
|
||||
@@ -24,6 +26,9 @@
|
||||
class FreeMarkerPageContext21 extends FreeMarkerPageContext {
|
||||
private static final Logger logger = Logger.getLogger("freemarker.jsp");
|
||||
|
||||
+ public ErrorData getErrorData() { return null; }
|
||||
+ public Enumeration getAttributeNames() { return getServletContext().getAttributeNames(); }
|
||||
+
|
||||
static {
|
||||
if(JspFactory.getDefaultFactory() == null) {
|
||||
JspFactory.setDefaultFactory(new FreeMarkerJspFactory21());
|
||||
diff -Nru freemarker-2.3.13.vanilla/src/freemarker/ext/jython/JythonHashModel.java freemarker-2.3.13/src/freemarker/ext/jython/JythonHashModel.java
|
||||
--- freemarker-2.3.13.vanilla/src/freemarker/ext/jython/JythonHashModel.java 2008-06-21 00:46:08.000000000 +0200
|
||||
+++ freemarker-2.3.13/src/freemarker/ext/jython/JythonHashModel.java 2008-06-21 00:46:12.000000000 +0200
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="5"
|
||||
|
||||
JAVA_PKG_IUSE="doc source"
|
||||
WANT_ANT_TASKS="ant-nodeps"
|
||||
|
||||
inherit java-pkg-2 java-ant-2 eutils
|
||||
|
||||
DESCRIPTION="FreeMarker is a 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 x86"
|
||||
IUSE=""
|
||||
|
||||
CDEPEND="dev-java/jython:2.7
|
||||
java-virtuals/servlet-api:2.3
|
||||
java-virtuals/servlet-api:2.4
|
||||
java-virtuals/servlet-api:2.5
|
||||
dev-java/jaxen:1.1
|
||||
dev-java/juel:0"
|
||||
|
||||
RDEPEND="
|
||||
${CDEPEND}
|
||||
>=virtual/jre-1.6"
|
||||
|
||||
DEPEND="
|
||||
${CDEPEND}
|
||||
>=virtual/jdk-1.6
|
||||
dev-java/javacc:0"
|
||||
|
||||
# [0]: Patch so that we can compile the package
|
||||
# against Jython-2.7.
|
||||
# [1]: Gentoo specific stuff.
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-PyJavaInstance.patch
|
||||
"${FILESDIR}"/${P}-gentoo.patch
|
||||
)
|
||||
|
||||
java_prepare() {
|
||||
# Do away with bundled jar files.
|
||||
java-pkg_clean
|
||||
|
||||
# Apply patches.
|
||||
epatch "${PATCHES[@]}"
|
||||
|
||||
# Weed out comments (some contain UTF-8 chars javac cannnot deal with).
|
||||
sed -i -e '/*/d;' \
|
||||
src/freemarker/template/LocalizedString.java
|
||||
|
||||
# For ecj-3.5.
|
||||
java-ant_rewrite-bootclasspath auto
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# BIG FAT WARNING:
|
||||
# clean target removes lib/ directory!!
|
||||
eant clean
|
||||
|
||||
mkdir -p lib/jsp-{1.2,2.0,2.1} || die
|
||||
pushd lib >/dev/null || die
|
||||
java-pkg_jar-from --virtual --into jsp-1.2 servlet-api-2.3
|
||||
java-pkg_jar-from --virtual --into jsp-2.0 servlet-api-2.4
|
||||
java-pkg_jar-from --virtual --into jsp-2.1 servlet-api-2.5
|
||||
java-pkg_jar-from jaxen-1.1
|
||||
java-pkg_jar-from jython-2.7
|
||||
java-pkg_jar-from --build-only javacc
|
||||
java-pkg_jar-from juel
|
||||
popd >/dev/null
|
||||
|
||||
eant jar $(use_doc) -Djavacc.home=/usr/share/javacc/lib
|
||||
}
|
||||
|
||||
src_install() {
|
||||
java-pkg_dojar "lib/${PN}.jar"
|
||||
dodoc README.txt
|
||||
|
||||
use doc && java-pkg_dojavadoc build/api
|
||||
use source && java-pkg_dosrc src/*
|
||||
}
|
||||
Reference in New Issue
Block a user