Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

FL-627 Fork dev-java/freemarker, clean out dev-java/jython

  • Loading branch information...
commit 943744ca7c03cec538102ce69fc1bc62d6556bd0 1 parent 27e6f45
Ryan Harris authored
View
1  dev-java/freemarker/Manifest
@@ -0,0 +1 @@
+DIST freemarker-2.3.13.tar.gz 2136791 SHA256 00b43c28bc5b141e53ad9e56c472f40774b5638f96fc29f3d7cfa97048830eb5 SHA512 9216bc97e74779617ec91916842185472c3cfd4c5625168ddd2f4404237767df44c62d8308af8bed0ab10d72c8835c97daab7fbc1efa80c3e01c861dd334ec3b WHIRLPOOL f46ae311feb122e7ce52d2f4b518216c72135e5e6491d02cbef177fd76b798e7b7fa883a22067225e5a4de2163066696fb34f21708a5d821daf0d82c1460d9cc
View
54 dev-java/freemarker/files/freemarker-2.3.10-gentoo.patch
@@ -0,0 +1,54 @@
+diff -Nru freemarker-2.3.10.vanilla/build.xml freemarker-2.3.10/build.xml
+--- freemarker-2.3.10.vanilla/build.xml 2007-05-06 11:46:06.000000000 +0200
++++ freemarker-2.3.10/build.xml 2007-05-06 11:48:55.000000000 +0200
+@@ -55,16 +55,19 @@
+ <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.servlet23}"/>
++ <fileset dir="lib" includes="*.jar"/>
+ </path>
+
+ <path id="compile.jsp2.classpath">
+ <path refid="compile.nojsp.classpath"/>
+ <pathelement path="${lib.servlet24}"/>
++ <fileset dir="lib" includes="*.jar"/>
+ </path>
+
+ <path id="compile.classpath.testcases">
+@@ -72,6 +75,7 @@
+ <pathelement path="${lib.jython}"/>
+ <pathelement path="${lib.jdom}"/>
+ <pathelement path="${lib.servlet23}"/>
++ <fileset dir="lib" includes="*.jar"/>
+ </path>
+
+ <path id="compile.classpath.javadoc">
+@@ -89,12 +93,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.servlet23}"/>
+ <pathelement path="${lib.dir}/freemarker.jar"/>
+ <pathelement path="${lib.struts}"/>
++ <fileset dir="lib" includes="*.jar"/>
+ </path>
+
+ <path id="full.classpath">
+@@ -110,6 +116,7 @@
+ <pathelement path="${lib.logkit}"/>
+ <pathelement path="${lib.log4j}"/>
+ <pathelement path="${java.class.path}"/>
++ <fileset dir="lib" includes="*.jar"/>
+ </path>
+
+
View
126 dev-java/freemarker/files/freemarker-2.3.13-gentoo.patch
@@ -0,0 +1,126 @@
+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());
+ }
+ }
View
20 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());
+ }
+ }
View
68 dev-java/freemarker/freemarker-2.3.13-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/freemarker/freemarker-2.3.13-r1.ebuild,v 1.1 2012/09/27 13:38:27 sera Exp $
+
+EAPI="4"
+
+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="*"
+IUSE=""
+
+COMMON_DEP="
+ >=dev-java/jython-2.2
+ 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="${COMMON_DEP}
+ >=virtual/jre-1.5"
+DEPEND="${COMMON_DEP}
+ >=virtual/jdk-1.5
+ dev-java/javacc:0"
+
+java_prepare() {
+ find -name '*.jar' -exec rm -v {} + || die
+
+ epatch "${FILESDIR}/${P}-gentoo.patch"
+
+ # 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
+ 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/*
+}
View
73 dev-java/freemarker/freemarker-2.3.13.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/freemarker/freemarker-2.3.13.ebuild,v 1.6 2009/12/29 07:43:23 josejx Exp $
+
+EAPI="2"
+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:0
+ 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"
+
+DEPEND=">=virtual/jdk-1.4
+ ${COMMON_DEP}"
+RDEPEND=">=virtual/jre-1.4
+ ${COMMON_DEP}"
+
+java_prepare() {
+ epatch "${FILESDIR}/${P}-gentoo.patch"
+
+ # for ecj-3.5
+ java-ant_rewrite-bootclasspath auto
+
+ 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 -p lib/jsp-1.2
+ mkdir -p lib/jsp-2.0
+ mkdir -p lib/jsp-2.1
+ cd lib/
+ 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
+ java-pkg_jar-from javacc
+ java-pkg_jar-from juel
+
+ 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/*
+}
View
5 dev-java/freemarker/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>java</herd>
+</pkgmetadata>
View
3  dev-java/jython/Manifest
@@ -1,8 +1,5 @@
DIST Python-2.2.3.tgz 6709556 SHA256 a8f92e6b89d47359fff0d1fbfe47f104afc77fd1cd5143e7332758b7bc100188 SHA512 2e2c881f8819ed3d91b3e98e7087b23ced9715c80eb9e5fe4144cca5b82220e035d0f50ac4a098b3bbdca3c588f70b8021f68a5d52f653c013470579342943e4 WHIRLPOOL dbef6f9f0545f4f4ddf6e4535b67bb936a2ef596f17a1ff6acca89755729420588d845bc291eed0d19b433b3eff017166c7d68a1a352a5612b00da2f8f0c20d7
-DIST Python-2.5.5.tgz 11606370 SHA256 03be1019c4fe93daeb53ba9e4294bf22a8ed4cb854cbd57e24e16f6bf63e2392 SHA512 787b3e99386e3b52bca63c3191ccb90418e8c5eb5eef3f4c4d8bda76cc5dd558aa28d8146a610ee66e58c1e3967516d073986b073df326685170143f191c152c WHIRLPOOL ac504a4afe70b706b5f3bf19314d97f1ecdb49067feb0137455dfc02c010cb99a145fd4afeef230bb9e2991309499b68e81a91b4e6da588af3fe40bfdb29a60c
DIST jython-2.1.tar.bz2 1301528 SHA256 faa57a55d137268e80221cd628b234ca67de13504b813be1c0499c9f4d5872b2 SHA512 397ad2819eb5bb39e1b0c0673922af7fbb75f680d707a7c344d21f680901a6fd96eddbbed8b464fb91cccd6f38a9f9b1a8f8327a530ac870002b72c38bf75ad3 WHIRLPOOL 00a1e7376b1883fc835dc801d718041a623ab0406393135d452df613fbbb9a87ab6bf4429b07260e93530f04031e531d4e041bacf22491d7ec0db76a41d77061
-DIST jython-2.5.1.tar.bz2 14470421 SHA256 23bc356ac6e1037cc305dc9791a247f4cfffe7b9e3ceb5b2a97449529cf4aa1d SHA512 c56aecf57ff8fc0872c2b10216f19f9f9456cf05e8b09486e5826007f92d99b95c74416f3272556aca3dcc964f411b116f5011122a5be7cd815f54b447f53f1d WHIRLPOOL e2910a0b97b0bc2080a9a7d32c83f22630f11d51b1a8dc9d495a51a2972fc2f5066860e9eb0ae0be89a99b8327ff106d645d773e6dedb65ddf0dd76e15c6f86a
DIST jython-2.7-b1-sources.jar 10972175 SHA256 969fd3b26975a1bb9c16f36173bff61f40b7104378a5a12dea391ed3801e4ca7 SHA512 661732242a5195cbb4c9d4635d9a5dd7c09ba270b8c6b88200badb0b4987fefe1ce322ed23995e6723e571584e4e63c8d7f603fff450ed9cb5ad0b2cac73f5ad WHIRLPOOL 7dd78af2dd3e8958a23d07b6c96c1f240dcccd3fc04b4edb322108c7d12bdde95e96a6ec477f71c390179615df92209a2de5717aa3988722f537ec524c7571ed
DIST jython-installer-2.5.3.jar 18487200 SHA256 05405966cdfa57abc8e705dd6aab92b8240097ce709fb916c8a0dbcaa491f99e SHA512 92d00cc8d885806749c67d1dc820e7b402c807b9a40277073fc3ea1f3dd10e1e506dc241a342874db8109120e8f0031a8dc7a4db6a88dfdc6c89906eeb9d454d WHIRLPOOL e8e3adf741a35b5e4de6c67b8805582cabc8590afac28c2e4ae3b61c4bd38d41904d7d1e4a23de21e7870d628e33a52f540fc89780a4724403b0bd92e1159768
DIST jython_installer-2.2.1.jar 4663097 SHA256 586858aa16a8b269eaaec59f5b64031ec504d33da35cba98ebac811b0e838e68 SHA512 d33262dec95dbecfc007a738ed8d8cd4844c215e451b7ab126940f1157079aa846a104f3587ad84c4a009249632e3aaa3c83479ee8f47c30c4b4833bcdd582b3 WHIRLPOOL bae264f67547a975bf648b3de0cc2becb5d51e14b2ca1a977f7c3d45ec96bd3fd4fd99b0ff6912fb38d54d57656225c51c4b8a474c6ca8fe7fc16e12ab4bbec8
-DIST jython_installer-2.5.2.jar 18435770 SHA256 1b7168b961e31ddd89012a36cde611c340dadfd8b60b81c4248b026730ee2f29 SHA512 ea9d1573f1f86aba13554292418be65579e55d695c9ab625402cc9478a1fed56654eb7ef5e750c9ebdcfe388c7f007016d88dedd6e6652d2a61f7681963118c4 WHIRLPOOL 3621162d9cffa2d0312b775af6cd342fdb17a25b965b2b736b1d03fe70512f05a645eb336a5d01135555fb843f6d4498e43530675e306373f98c8184a375e96b
View
2  dev-java/jython/jython-2.2.1-r3.ebuild
@@ -19,7 +19,7 @@ mirror://sourceforge/${PN}/${PN}_${MY_PV}.jar"
LICENSE="PSF-2"
SLOT="2.2"
-KEYWORDS="~amd64 ~ppc ~x86"
+KEYWORDS="amd64 ppc x86"
IUSE=""
CDEPEND="
View
178 dev-java/jython/jython-2.5.1-r2.ebuild
@@ -1,178 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/jython/jython-2.5.1-r2.ebuild,v 1.3 2012/04/13 18:47:54 ulm Exp $
-
-EAPI="3"
-
-JAVA_PKG_IUSE="source doc examples oracle"
-#informix missing. This is a jdbc driver, similar to oracle use flag
-#functionality.
-
-inherit base java-pkg-2 java-ant-2 python
-
-DESCRIPTION="An implementation of Python written in Java"
-HOMEPAGE="http://www.jython.org"
-
-PYVER="2.5.5"
-
-SRC_URI="http://www.python.org/ftp/python/${PYVER%_*}/Python-${PYVER}.tgz
- mirror://gentoo/${P}.tar.bz2"
-
-LICENSE="PSF-2"
-SLOT="2.5"
-PYTHON_ABI="${SLOT}-jython"
-KEYWORDS="~amd64 ~x86"
-IUSE="+readline +ssl +threads +xml"
-
-#>=dev-java/jdbc-mysql-3.1
-#dev-java/jdbc-postgresql
-CDEPEND="=dev-java/jakarta-oro-2.0*
- >=dev-java/libreadline-java-0.8.0
- dev-java/asm:3
- oracle? ( dev-java/jdbc-oracle-bin:10.2 )
- java-virtuals/servlet-api:2.5
- !<=dev-java/freemarker-2.3.10
- dev-java/constantine:0
- dev-java/jline:0
- dev-java/jna-posix:0
- dev-java/jna:0
- dev-java/antlr:0
- dev-java/antlr:3
- dev-java/stringtemplate:0
- dev-java/xerces:2
- dev-java/jsr223:0
- >=dev-java/java-config-2.1.11-r3"
-RDEPEND=">=virtual/jre-1.5
- ${CDEPEND}"
-DEPEND=">=virtual/jdk-1.5
- dev-java/ant-core:0
- dev-java/junit:0
- ${CDEPEND}"
-
-pkg_setup() {
- java-pkg-2_pkg_setup
- python_pkg_setup
-}
-
-java_prepare() {
- epatch "${FILESDIR}/${P}-build.patch"
- epatch "${FILESDIR}/${P}-distutils_byte_compilation.patch"
- epatch "${FILESDIR}/${P}-distutils_scripts_location.patch"
- epatch "${FILESDIR}/${P}-respect_PYTHONPATH.patch"
-
- rm -Rfv org || die "Unable to remove class files."
- find extlibs -iname '*.jar' | xargs rm -fv || die "Unable to remove bundled jars"
- find "${WORKDIR}" -iname '*.pyc' | xargs rm -fv
- java-pkg_jar-from --into extlibs libreadline-java libreadline-java.jar \
- libreadline-java-0.8.jar
- java-pkg_jar-from --into extlibs antlr-3 antlr3.jar antlr-3.1.3.jar
- java-pkg_jar-from --into extlibs antlr antlr.jar antlr-2.7.7.jar
- java-pkg_jar-from --into extlibs stringtemplate stringtemplate.jar \
- stringtemplate-3.2.jar
- java-pkg_jar-from --into extlibs servlet-api-2.5 servlet-api.jar \
- servlet-api-2.5.jar
- java-pkg_jar-from --into extlibs asm-3 asm.jar asm-3.1.jar
- java-pkg_jar-from --into extlibs asm-3 asm-commons.jar \
- asm-commons-3.1.jar
- java-pkg_jar-from --into extlibs constantine constantine.jar \
- constantine-0.4.jar
- java-pkg_jar-from --into extlibs jline jline.jar \
- jline-0.9.95-SNAPSHOT.jar
- java-pkg_jar-from --into extlibs jna jna.jar
- java-pkg_jar-from --into extlibs jna-posix jna-posix.jar
- java-pkg_jar-from --build-only --into extlibs ant-core ant.jar
- java-pkg_jar-from --build-only --into extlibs junit junit.jar \
- junit-3.8.2.jar
- java-pkg_jar-from --into extlibs xerces-2 xercesImpl.jar
- java-pkg_jar-from --into extlibs jsr223 script-api.jar \
- livetribe-jsr223-2.0.5.jar
-
- echo "has.repositories.connection=false" > ant.properties
-
- if use oracle; then
- echo \
- "oracle.jar=$(java-pkg-getjar jdbc-oracle-bin-10.2 ojdbc14.jar)" \
- >> ant.properties
- fi
-
- pushd "${WORKDIR}/Python-${PYVER}" > /dev/null
- epatch "${FILESDIR}/python-${PYVER}-distutils_byte_compilation.patch"
- popd > /dev/null
-}
-
-src_compile() {
- local antflags=""
- local pylib="../Python-${PYVER}/Lib"
- antflags="${antflags} -Dpython.lib=${pylib}"
- eant ${antflags} developer-build $(use_doc javadoc)
-}
-
-# Restrict tests as some dont compile and others (a couple) are broken.
-RESTRICT="test"
-src_test() {
-#[exec] 311 tests OK.
-#[exec] 3 tests skipped:
-#[exec] test_subprocess test_urllib2net test_urllibnet
-#[exec] 2 tests failed:
-#[exec] test_pbcvm test_pkgimport
-#[exec] 2 fails unexpected:
-#[exec] test_pbcvm test_pkgimport
- local antflags=""
- antflags+=" -Dgentoo.library.path=$(java-config -di jna-posix)"
- antflags+=" -Dpython.home=dist"
- local pylib="../Python-${PYVER}/Lib"
- antflags+=" -Dpython.lib=${pylib}"
- ANT_TASKS="ant-junit" eant ${antflags} test
-}
-
-src_install() {
- dodoc README.txt NEWS ACKNOWLEDGMENTS README.txt
- cd dist || die
- java-pkg_newjar "${PN}-dev.jar"
-
- local java_args="-Dpython.home=/usr/share/${PN}-${SLOT}"
- java_args+=" -Dpython.cachedir=\$([[ -n \"\${JYTHON_SYSTEM_CACHEDIR}\" ]] && echo ${EPREFIX}/var/cache/${PN}/${SLOT}-\${EUID} || echo \${HOME}/.jythoncachedir)"
- java_args+=" -Dpython.executable=${EPREFIX}/usr/bin/jython${SLOT}"
-
- java-pkg_dolauncher jython${SLOT} \
- --main "org.python.util.jython" \
- --pkg_args "${java_args}"
-
- java-pkg_register-optional-dependency jdbc-mysql
- java-pkg_register-optional-dependency jdbc-postgresql
-
- insinto /usr/share/${PN}-${SLOT}
- doins -r Lib registry
- python_clean_installation_image -q
-
- use doc && java-pkg_dojavadoc Doc/javadoc
- use source && java-pkg_dosrc ../src
- cd "${S}"
- use examples && java-pkg_doexamples Demo/*
-
- if use readline; then
- sed \
- -e "s/#\(python.console=org.python.util.ReadlineConsole\)/\1/" \
- -e "/#python.console.readlinelib=JavaReadline/a python.console.readlinelib=GnuReadline" \
- -i "${ED}usr/share/${PN}-${SLOT}/registry" || die "sed failed"
- fi
-}
-
-pkg_postinst() {
- python_mod_optimize -f -x "/(site-packages|test|tests)/" $(python_get_libdir)
-
- elog
- elog "readline can be configured in the registry:"
- elog
- elog "python.console=org.python.util.ReadlineConsole"
- elog "python.console.readlinelib=GnuReadline"
- elog
- elog "Global registry: '${EROOT}usr/share/${PN}-${SLOT}/registry'"
- elog "User registry: '~/.jython'"
- elog "See http://www.jython.org/docs/registry.html for more information."
- elog
-}
-
-pkg_postrm() {
- python_mod_cleanup $(python_get_libdir)
-}
View
143 dev-java/jython/jython-2.5.2-r2.ebuild
@@ -1,143 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/jython/jython-2.5.2-r2.ebuild,v 1.1 2012/08/26 16:16:22 thev00d00 Exp $
-
-EAPI="4"
-
-JAVA_PKG_IUSE="doc examples source"
-
-inherit eutils java-pkg-2 java-ant-2 python
-
-PYTHON_ABI="${SLOT}-jython"
-
-DESCRIPTION="An implementation of Python written in Java"
-HOMEPAGE="http://www.jython.org"
-SRC_URI="mirror://sourceforge/${PN}/${PN}/${PV}/${PN}_installer-${PV}.jar"
-
-LICENSE="PSF-2"
-SLOT="2.5"
-KEYWORDS="~amd64 ~x86 ~x86-freebsd ~amd64-linux ~x86-linux ~x86-macos"
-IUSE="readline"
-
-# Missing in installer jar.
-RESTRICT="test"
-
-COMMON_DEP="
- !<=dev-java/freemarker-2.3.10
- dev-java/antlr:3
- dev-java/asm:3
- dev-java/guava:0
- >=dev-java/java-config-2.1.11-r3
- dev-java/jffi:1.0
- dev-java/jline:0
- dev-java/jnr-constants:0
- dev-java/jnr-posix:1.1
- java-virtuals/script-api:0
- java-virtuals/servlet-api:2.5
- readline? ( >=dev-java/libreadline-java-0.8.0:0 )"
-RDEPEND="${COMMON_DEP}
- >=virtual/jre-1.5"
-DEPEND="${COMMON_DEP}
- >=virtual/jdk-1.5
- app-arch/unzip"
-
-S="${WORKDIR}"
-
-pkg_setup() {
- java-pkg-2_pkg_setup
- python_pkg_setup
-}
-
-java_prepare() {
- # src/META-INF/services missing - taking from prebuilt jar
- pushd src > /dev/null || die
- jar -xf ../${PN}.jar META-INF/services || die
- popd > /dev/null
-
- find \( -name '*.jar' -o -name '*.class' -o -name '*.pyc' -o -name '*.exe' \) -exec rm -v {} + || die
-
- epatch "${FILESDIR}/${P}-build.xml.patch"
-
- epatch "${FILESDIR}/${P}-sax-parser-fix.patch"
-
- # 431754
- epatch "${FILESDIR}/${P}-sax-parser-class-not-found.patch"
-
- epatch "${FILESDIR}/${P}-distutils_byte_compilation.patch"
- epatch "${FILESDIR}/${P}-distutils_scripts_location.patch"
- epatch "${FILESDIR}/${P}-respect_PYTHONPATH.patch"
-
- use readline || rm -v src/org/python/util/ReadlineConsole.java || die
-}
-
-JAVA_ANT_REWRITE_CLASSPATH="yes"
-JAVA_ANT_CLASSPATH_TAGS+=" java"
-
-EANT_BUILD_TARGET="developer-build"
-EANT_GENTOO_CLASSPATH="asm-3,guava,jffi-1.0,jline,jnr-constants,script-api,servlet-api-2.5"
-
-# jdbc-informix and jdbc-oracle-bin (requires registration) aren't exposed.
-# Uncomment and add to COMMON_DEP if you want either of them
-#EANT_GENTOO_CLASSPATH+=",jdbc-informix" EANT_EXTRA_ARGS+=" -Dinformix.present"
-#EANT_GENTOO_CLASSPATH+=",jdbc-oracle-bin" EANT_EXTRA_ARGS+=" -Doracle.present"
-
-src_compile() {
- use readline && EANT_GENTOO_CLASSPATH+=",libreadline-java"
-
- EANT_GENTOO_CLASSPATH_EXTRA="$(java-pkg_getjars --with-dependencies antlr-3,jnr-posix-1.1)"
- EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjars --build-only ant-core)"
-
- sed -i -e "1 a\
- CLASSPATH=\"$(java-pkg_getjars "${EANT_GENTOO_CLASSPATH}"):${EANT_GENTOO_CLASSPATH_EXTRA}\"" \
- bin/jython || die
-
- java-pkg-2_src_compile
-}
-
-EANT_TEST_EXTRA_ARGS="-Dpython.home=dist"
-
-src_test() {
- java-pkg-2_src_test
-}
-
-src_install() {
- java-pkg_newjar dist/${PN}-dev.jar
-
- java-pkg_register-optional-dependency jdbc-mysql
- java-pkg_register-optional-dependency jdbc-postgresql
-
- insinto /usr/share/${PN}-${SLOT}
- doins -r dist/{Lib,registry}
- python_clean_installation_image -q
-
- dodoc ACKNOWLEDGMENTS NEWS README.txt
-
- use doc && java-pkg_dojavadoc dist/Doc/javadoc
- use source && java-pkg_dosrc src/*
- use examples && java-pkg_doexamples Demo/*
-
- local java_args=(
- -Dpython.home="${EPREFIX}"/usr/share/${PN}-${SLOT}
- -Dpython.executable="${EPREFIX}"/usr/bin/jython${SLOT}
- -Dpython.cachedir="\${HOME}/.jythoncachedir"
- )
- java-pkg_dolauncher jython${SLOT} \
- --main org.python.util.jython \
- --java_args "${java_args[*]}"
-
- if use readline; then
- sed -i -e "/#python.console.readlinelib=JavaReadline/a \
- python.console=org.python.util.ReadlineConsole\npython.console.readlinelib=GnuReadline" \
- "${ED}"/usr/share/${PN}-${SLOT}/registry || die
- fi
-
- # the jvm opens classfiles rw ...
- dodir /etc/sandbox.d
- echo "SANDBOX_PREDICT=/usr/share/${PN}-${SLOT}" > "${ED}/etc/sandbox.d/20${P}-${SLOT}"
-
- # compile aot
- java -cp "$(java-pkg_getjars "${EANT_GENTOO_CLASSPATH}"):${EANT_GENTOO_CLASSPATH_EXTRA}:dist/${PN}-dev.jar" \
- -Dpython.home="${ED}"/usr/share/${PN}-${SLOT} \
- -Dpython.cachedir="${T}/.jythoncachedir" \
- org.python.util.jython -m compileall -f -q -x "/test/" "${ED}" || die
-}
View
138 dev-java/jython/jython-2.5.3-r1.ebuild
@@ -1,138 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/jython/jython-2.5.3-r1.ebuild,v 1.1 2012/08/26 13:43:40 thev00d00 Exp $
-
-EAPI="4"
-
-JAVA_PKG_IUSE="doc examples source"
-
-inherit eutils java-pkg-2 java-ant-2 python
-
-PYTHON_ABI="${SLOT}-jython"
-
-DESCRIPTION="An implementation of Python written in Java"
-HOMEPAGE="http://www.jython.org"
-SRC_URI="http://central.maven.org/maven2/org/python/${PN}-installer/${PV}/${PN}-installer-${PV}.jar"
-
-LICENSE="PSF-2"
-SLOT="2.5"
-KEYWORDS="~amd64 ~x86 ~x86-freebsd ~amd64-linux ~x86-linux ~x86-macos"
-IUSE="readline"
-
-# Missing in installer jar.
-RESTRICT="test"
-
-COMMON_DEP="
- !<=dev-java/freemarker-2.3.10
- dev-java/antlr:3
- dev-java/asm:3
- dev-java/guava:0
- >=dev-java/java-config-2.1.11-r3
- dev-java/jffi:1.0
- dev-java/jline:0
- dev-java/jnr-constants:0
- dev-java/jnr-posix:1.1
- java-virtuals/script-api:0
- java-virtuals/servlet-api:2.5
- readline? ( >=dev-java/libreadline-java-0.8.0:0 )"
-RDEPEND="${COMMON_DEP}
- >=virtual/jre-1.5"
-DEPEND="${COMMON_DEP}
- >=virtual/jdk-1.5
- app-arch/unzip"
-
-S="${WORKDIR}"
-
-pkg_setup() {
- java-pkg-2_pkg_setup
- python_pkg_setup
-}
-
-java_prepare() {
- # src/META-INF/services missing - taking from prebuilt jar
- pushd src > /dev/null || die
- jar -xf ../${PN}.jar META-INF/services || die
- popd > /dev/null
-
- find \( -name '*.jar' -o -name '*.class' -o -name '*.pyc' -o -name '*.exe' \) -exec rm -v {} + || die
-
- epatch "${FILESDIR}/${PN}-2.5.2-build.xml.patch"
-
- epatch "${FILESDIR}/${PN}-2.5.2-distutils_byte_compilation.patch"
- epatch "${FILESDIR}/${PN}-2.5.2-distutils_scripts_location.patch"
- epatch "${FILESDIR}/${PN}-2.5.2-respect_PYTHONPATH.patch"
-
- use readline || rm -v src/org/python/util/ReadlineConsole.java || die
-}
-
-JAVA_ANT_REWRITE_CLASSPATH="yes"
-JAVA_ANT_CLASSPATH_TAGS+=" java"
-
-EANT_BUILD_TARGET="developer-build"
-EANT_GENTOO_CLASSPATH="asm-3,guava,jffi-1.0,jline,jnr-constants,script-api,servlet-api-2.5"
-
-# jdbc-informix and jdbc-oracle-bin (requires registration) aren't exposed.
-# Uncomment and add to COMMON_DEP if you want either of them
-#EANT_GENTOO_CLASSPATH+=",jdbc-informix" EANT_EXTRA_ARGS+=" -Dinformix.present"
-#EANT_GENTOO_CLASSPATH+=",jdbc-oracle-bin" EANT_EXTRA_ARGS+=" -Doracle.present"
-
-src_compile() {
- use readline && EANT_GENTOO_CLASSPATH+=",libreadline-java"
-
- EANT_GENTOO_CLASSPATH_EXTRA="$(java-pkg_getjars --with-dependencies antlr-3,jnr-posix-1.1)"
- EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjars --build-only ant-core)"
-
- sed -i -e "1 a\
- CLASSPATH=\"$(java-pkg_getjars "${EANT_GENTOO_CLASSPATH}"):${EANT_GENTOO_CLASSPATH_EXTRA}\"" \
- bin/jython || die
-
- java-pkg-2_src_compile
-}
-
-EANT_TEST_EXTRA_ARGS="-Dpython.home=dist"
-
-src_test() {
- java-pkg-2_src_test
-}
-
-src_install() {
- java-pkg_newjar dist/${PN}-dev.jar
-
- java-pkg_register-optional-dependency jdbc-mysql
- java-pkg_register-optional-dependency jdbc-postgresql
-
- insinto /usr/share/${PN}-${SLOT}
- doins -r dist/{Lib,registry}
- python_clean_installation_image -q
-
- dodoc ACKNOWLEDGMENTS NEWS README.txt
-
- use doc && java-pkg_dojavadoc dist/Doc/javadoc
- use source && java-pkg_dosrc src/*
- use examples && java-pkg_doexamples Demo/*
-
- local java_args=(
- -Dpython.home="${EPREFIX}"/usr/share/${PN}-${SLOT}
- -Dpython.executable="${EPREFIX}"/usr/bin/jython${SLOT}
- -Dpython.cachedir="\${HOME}/.jythoncachedir"
- )
- java-pkg_dolauncher jython${SLOT} \
- --main org.python.util.jython \
- --java_args "${java_args[*]}"
-
- if use readline; then
- sed -i -e "/#python.console.readlinelib=JavaReadline/a \
- python.console=org.python.util.ReadlineConsole\npython.console.readlinelib=GnuReadline" \
- "${ED}"/usr/share/${PN}-${SLOT}/registry || die
- fi
-
- # the jvm opens classfiles rw ...
- dodir /etc/sandbox.d
- echo "SANDBOX_PREDICT=/usr/share/${PN}-${SLOT}" > "${ED}/etc/sandbox.d/20${P}-${SLOT}"
-
- # compile aot
- java -cp "$(java-pkg_getjars "${EANT_GENTOO_CLASSPATH}"):${EANT_GENTOO_CLASSPATH_EXTRA}:dist/${PN}-dev.jar" \
- -Dpython.home="${ED}"/usr/share/${PN}-${SLOT} \
- -Dpython.cachedir="${T}/.jythoncachedir" \
- org.python.util.jython -m compileall -f -q -x "/test/" "${ED}" || die
-}
View
148 dev-java/jython/jython-2.5.3-r2.ebuild
@@ -1,148 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/jython/jython-2.5.3-r2.ebuild,v 1.3 2013/01/30 18:09:06 ago Exp $
-
-EAPI="4"
-
-JAVA_PKG_IUSE="doc examples source"
-
-inherit eutils java-pkg-2 java-ant-2 python-utils-r1
-
-DESCRIPTION="An implementation of Python written in Java"
-HOMEPAGE="http://www.jython.org"
-SRC_URI="http://central.maven.org/maven2/org/python/${PN}-installer/${PV}/${PN}-installer-${PV}.jar"
-
-LICENSE="PSF-2"
-SLOT="2.5"
-KEYWORDS="amd64 x86 ~x86-freebsd ~amd64-linux ~x86-linux ~x86-macos"
-IUSE="readline"
-
-# Missing in installer jar.
-RESTRICT="test"
-
-COMMON_DEP="
- !<=dev-java/freemarker-2.3.10
- dev-java/antlr:3
- dev-java/asm:3
- dev-java/guava:0
- >=dev-java/java-config-2.1.11-r3
- dev-java/jffi:1.0
- dev-java/jline:0
- dev-java/jnr-constants:0
- dev-java/jnr-posix:1.1
- java-virtuals/script-api:0
- java-virtuals/servlet-api:2.5
- readline? ( >=dev-java/libreadline-java-0.8.0:0 )"
-RDEPEND="${COMMON_DEP}
- >=virtual/jre-1.5"
-DEPEND="${COMMON_DEP}
- >=virtual/jdk-1.5
- app-arch/unzip"
-
-S="${WORKDIR}"
-
-java_prepare() {
- # src/META-INF/services missing - taking from prebuilt jar
- pushd src > /dev/null || die
- jar -xf ../${PN}.jar META-INF/services || die
- popd > /dev/null
-
- find \( -name '*.jar' -o -name '*.class' \
- -o -name '*.pyc' -o -name '*.exe' \) -delete
-
- epatch "${FILESDIR}/${PN}-2.5.2-build.xml.patch"
-
- epatch "${FILESDIR}/${PN}-2.5.2-distutils_byte_compilation.patch"
- epatch "${FILESDIR}/${PN}-2.5.2-distutils_scripts_location.patch"
- epatch "${FILESDIR}/${PN}-2.5.2-respect_PYTHONPATH.patch"
-
- if ! use readline; then
- rm -v src/org/python/util/ReadlineConsole.java || die
- fi
-}
-
-JAVA_ANT_REWRITE_CLASSPATH="yes"
-JAVA_ANT_CLASSPATH_TAGS+=" java"
-
-EANT_BUILD_TARGET="developer-build"
-EANT_GENTOO_CLASSPATH="asm-3,guava,jffi-1.0,jline,jnr-constants,script-api,servlet-api-2.5"
-
-# jdbc-informix and jdbc-oracle-bin (requires registration) aren't exposed.
-# Uncomment and add to COMMON_DEP if you want either of them
-#EANT_GENTOO_CLASSPATH+=",jdbc-informix" EANT_EXTRA_ARGS+=" -Dinformix.present"
-#EANT_GENTOO_CLASSPATH+=",jdbc-oracle-bin" EANT_EXTRA_ARGS+=" -Doracle.present"
-
-src_compile() {
- use readline && EANT_GENTOO_CLASSPATH+=",libreadline-java"
-
- EANT_GENTOO_CLASSPATH_EXTRA="$(java-pkg_getjars --with-dependencies antlr-3,jnr-posix-1.1)"
- EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjars --build-only ant-core)"
-
- sed -i -e "1 a\
- CLASSPATH=\"$(java-pkg_getjars "${EANT_GENTOO_CLASSPATH}"):${EANT_GENTOO_CLASSPATH_EXTRA}\"" \
- bin/jython || die
-
- java-pkg-2_src_compile
-}
-
-EANT_TEST_EXTRA_ARGS="-Dpython.home=dist"
-
-src_test() {
- java-pkg-2_src_test
-}
-
-src_install() {
- java-pkg_newjar dist/${PN}-dev.jar
-
- java-pkg_register-optional-dependency jdbc-mysql
- java-pkg_register-optional-dependency jdbc-postgresql
-
- insinto /usr/share/${PN}-${SLOT}
- doins -r dist/{Lib,registry}
-
- dodoc ACKNOWLEDGMENTS NEWS README.txt
-
- use doc && java-pkg_dojavadoc dist/Doc/javadoc
- use source && java-pkg_dosrc src/*
- use examples && java-pkg_doexamples Demo/*
-
- local java_args=(
- -Dpython.home="${EPREFIX}"/usr/share/${PN}-${SLOT}
- -Dpython.executable="${EPREFIX}"/usr/bin/jython${SLOT}
- -Dpython.cachedir="\${HOME}/.jythoncachedir"
- )
- java-pkg_dolauncher jython${SLOT} \
- --main org.python.util.jython \
- --java_args "${java_args[*]}"
-
- if use readline; then
- sed -i -e "/#python.console.readlinelib=JavaReadline/a \
- python.console=org.python.util.ReadlineConsole\npython.console.readlinelib=GnuReadline" \
- "${ED}"/usr/share/${PN}-${SLOT}/registry || die
- fi
-
- # the jvm opens classfiles rw ...
- dodir /etc/sandbox.d
- echo "SANDBOX_PREDICT=/usr/share/${PN}-${SLOT}" > "${ED}/etc/sandbox.d/20${P}-${SLOT}"
-
- # we need a wrapper to help python_optimize
- cat > "${T}"/jython <<_EOF_ || die
-exec java -cp "$(java-pkg_getjars "${EANT_GENTOO_CLASSPATH}"):${EANT_GENTOO_CLASSPATH_EXTRA}:dist/${PN}-dev.jar" \
- -Dpython.home="${ED}"/usr/share/${PN}-${SLOT} \
- -Dpython.cachedir="${T}/.jythoncachedir" \
- org.python.util.jython "\${@}"
-_EOF_
- chmod +x "${T}"/jython || die
-
- python_export jython${SLOT} EPYTHON PYTHON_SITEDIR
- local PYTHON="${T}"/jython
-
- # compile tests (everything else is compiled already)
- # we're keeping it quiet since jython reports errors verbosely
- # and some of the tests are supposed to trigger compile errors
- python_optimize "${ED}"/usr/share/jython-${SLOT}/Lib/test &>/dev/null
-
- # for python-exec
- echo "EPYTHON='${EPYTHON}'" > epython.py
- python_domodule epython.py
-}
View
169 dev-java/jython/jython-2.7_beta1.ebuild
@@ -1,169 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/jython/jython-2.7_beta1.ebuild,v 1.2 2013/03/26 03:51:47 radhermit Exp $
-
-EAPI=5
-JAVA_PKG_IUSE="doc examples source"
-
-inherit eutils java-pkg-2 java-ant-2 python-utils-r1
-
-MY_PV=${PV/_beta/-b}
-MY_P=${PN}-${MY_PV}
-
-DESCRIPTION="An implementation of Python written in Java"
-HOMEPAGE="http://www.jython.org"
-SRC_URI="http://search.maven.org/remotecontent?filepath=org/python/${PN}/${MY_PV}/${MY_P}-sources.jar"
-
-LICENSE="PSF-2"
-SLOT="2.7"
-KEYWORDS="~amd64 ~x86 ~x86-freebsd ~amd64-linux ~x86-linux ~x86-macos"
-IUSE="+readline test"
-REQUIRED_USE="test? ( readline )"
-
-COMMON_DEP="
- dev-java/antlr:3
- dev-java/asm:4
- dev-java/commons-compress:0
- dev-java/guava:13
- >=dev-java/java-config-2.1.11-r3
- dev-java/jffi:1.2
- dev-java/jline:0
- dev-java/jnr-constants:0
- dev-java/jnr-posix:2.1
- dev-java/stringtemplate:0
- dev-java/xerces:2
- java-virtuals/script-api:0
- java-virtuals/servlet-api:2.5
- readline? ( >=dev-java/libreadline-java-0.8.0:0 )"
-RDEPEND="${COMMON_DEP}
- >=virtual/jre-1.5"
-DEPEND="${COMMON_DEP}
- >=virtual/jdk-1.5
- app-arch/unzip
- test? (
- dev-java/junit:4
- dev-java/ant-junit:0
- )"
-
-S=${WORKDIR}
-
-RESTRICT="test"
-
-JAVA_ANT_REWRITE_CLASSPATH="yes"
-EANT_GENTOO_CLASSPATH="asm-4,commons-compress,guava-13,jffi-1.2,jline,jnr-constants,script-api,servlet-api-2.5,stringtemplate,xerces-2"
-JAVA_ANT_CLASSPATH_TAGS+=" java"
-
-EANT_BUILD_TARGET="developer-build"
-EANT_TEST_EXTRA_ARGS="-Dpython.home=dist"
-
-# jdbc-informix and jdbc-oracle-bin (requires registration) aren't exposed.
-# Uncomment and add to COMMON_DEP if you want either of them
-#EANT_GENTOO_CLASSPATH+=",jdbc-informix" EANT_EXTRA_ARGS+=" -Dinformix.present"
-#EANT_GENTOO_CLASSPATH+=",jdbc-oracle-bin" EANT_EXTRA_ARGS+=" -Doracle.present"
-
-java_prepare() {
- find \( -name '*.jar' -o -name '*.class' \
- -o -name '*.pyc' -o -name '*.exe' \) -delete
-
- epatch "${FILESDIR}"/${PN}-2.5.2-distutils_scripts_location.patch
- epatch "${FILESDIR}"/${PN}-2.5.2-respect_PYTHONPATH.patch
- epatch "${FILESDIR}"/${P}-ant.patch
- epatch "${FILESDIR}"/${P}-dont-always-recompile-classes.patch
-
- if ! use readline; then
- rm -v src/org/python/util/ReadlineConsole.java || die
- fi
-
- # needed for launchertest
- chmod +x tests/shell/test-jython.sh || die
-}
-
-src_compile() {
- use readline && EANT_GENTOO_CLASSPATH+=",libreadline-java"
-
- EANT_GENTOO_CLASSPATH_EXTRA="$(java-pkg_getjars --with-dependencies antlr-3,jnr-posix-2.1)"
- EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjars --build-only ant-core)"
-
- sed -i -e "1 a\
- CLASSPATH=\"$(java-pkg_getjars "${EANT_GENTOO_CLASSPATH}"):${EANT_GENTOO_CLASSPATH_EXTRA}\"" \
- src/shell/jython || die
-
- java-pkg-2_src_compile
-}
-
-src_test() {
- java-pkg-2_src_test
-}
-
-src_install() {
- java-pkg_newjar dist/${PN}-dev.jar
-
- java-pkg_register-optional-dependency jdbc-mysql
- java-pkg_register-optional-dependency jdbc-postgresql
-
- insinto /usr/share/${PN}-${SLOT}
- doins -r dist/{Lib,registry}
-
- dodoc ACKNOWLEDGMENTS NEWS README.txt
-
- use doc && java-pkg_dojavadoc dist/Doc/javadoc
- use source && java-pkg_dosrc src/*
- use examples && java-pkg_doexamples Demo/*
-
- local java_args=(
- -Dpython.home="${EPREFIX}"/usr/share/${PN}-${SLOT}
- -Dpython.executable="${EPREFIX}"/usr/bin/jython${SLOT}
- -Dpython.cachedir="\${HOME}/.jythoncachedir"
- )
-
- java-pkg_dolauncher jython${SLOT} \
- --main org.python.util.jython \
- --java_args "${java_args[*]}"
-
- if use readline; then
- sed \
- -e "s/#\(python.console=org.python.util.ReadlineConsole\)/\1/" \
- -e "/#python.console.readlinelib=JavaReadline/a python.console.readlinelib=GnuReadline" \
- -i "${ED}"/usr/share/${PN}-${SLOT}/registry || die
- fi
-
- # we need a wrapper to help python_optimize
- cat <<-EOF > "${T}"/jython
- exec java -cp "$(java-pkg_getjars "${EANT_GENTOO_CLASSPATH}"):${EANT_GENTOO_CLASSPATH_EXTRA}:dist/${PN}-dev.jar" \
- -Dpython.home="${ED}"/usr/share/${PN}-${SLOT} \
- -Dpython.cachedir="${T}/.jythoncachedir" \
- org.python.util.jython "\${@}"
- EOF
- chmod +x "${T}"/jython || die
-
- python_export jython${SLOT} EPYTHON PYTHON_SITEDIR
- local PYTHON="${T}"/jython
-
- # compile tests (everything else is compiled already)
- # we're keeping it quiet since jython reports errors verbosely
- # and some of the tests are supposed to trigger compile errors
- python_optimize "${ED}"/usr/share/jython-${SLOT}/Lib/test &>/dev/null
-
- # for python-exec
- echo "EPYTHON='${EPYTHON}'" > epython.py
- python_domodule epython.py
-
- # some of the class files end up with newer timestamps than the files they
- # were generated from, make sure this doesn't happen
- find "${ED}"/usr/share/jython-${SLOT}/Lib/ -name '*.class' | xargs touch
-}
-
-pkg_postinst() {
- if ! has_version dev-java/jython ; then
- elog
- elog "readline can be configured in the registry:"
- elog
- elog "python.console=org.python.util.ReadlineConsole"
- elog "python.console.readlinelib=GnuReadline"
- elog
- elog "Global registry: '${EROOT}usr/share/${PN}-${SLOT}/registry'"
- elog "User registry: '~/.jython'"
- elog "See http://www.jython.org/docs/registry.html for more information."
- elog
- fi
-}
Please sign in to comment.
Something went wrong with that request. Please try again.