diff options
author | Ralph Sennhauser <sera@gentoo.org> | 2012-09-27 14:47:27 +0000 |
---|---|---|
committer | Ralph Sennhauser <sera@gentoo.org> | 2012-09-27 14:47:27 +0000 |
commit | 984e03613ecc85eef2d1e10f434e580d490df5b5 (patch) | |
tree | 468e048c2d67f055b95ccde8aefd464fc504e778 /dev-java/jython | |
parent | Fix typo in RDEPEND wrt #436394 by Andrew Savchenko <bircoph@gmail.com> (diff) | |
download | gentoo-2-984e03613ecc85eef2d1e10f434e580d490df5b5.tar.gz gentoo-2-984e03613ecc85eef2d1e10f434e580d490df5b5.tar.bz2 gentoo-2-984e03613ecc85eef2d1e10f434e580d490df5b5.zip |
Require >=jdk-1.5 for javacc-5.0. #315557
Don't build test classes in src_compile, tests are already restricted and now fail to build with -source 1.5.
(Portage version: 2.1.11.13/cvs/Linux x86_64)
Diffstat (limited to 'dev-java/jython')
-rw-r--r-- | dev-java/jython/ChangeLog | 10 | ||||
-rw-r--r-- | dev-java/jython/files/jython-2.2.1-build.xml.patch | 92 | ||||
-rw-r--r-- | dev-java/jython/jython-2.2.1-r2.ebuild | 135 |
3 files changed, 236 insertions, 1 deletions
diff --git a/dev-java/jython/ChangeLog b/dev-java/jython/ChangeLog index 2a68a28bf96a..b7195d9d41c5 100644 --- a/dev-java/jython/ChangeLog +++ b/dev-java/jython/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for dev-java/jython # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/jython/ChangeLog,v 1.80 2012/08/26 16:16:22 thev00d00 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-java/jython/ChangeLog,v 1.81 2012/09/27 14:47:27 sera Exp $ + +*jython-2.2.1-r2 (27 Sep 2012) + + 27 Sep 2012; Ralph Sennhauser <sera@gentoo.org> +jython-2.2.1-r2.ebuild, + +files/jython-2.2.1-build.xml.patch: + Require >=jdk-1.5 for javacc-5.0. #315557 + Don't build test classes in src_compile, tests are already restricted and now + fail to build with -source 1.5. *jython-2.5.2-r2 (26 Aug 2012) diff --git a/dev-java/jython/files/jython-2.2.1-build.xml.patch b/dev-java/jython/files/jython-2.2.1-build.xml.patch new file mode 100644 index 000000000000..8ea197476074 --- /dev/null +++ b/dev-java/jython/files/jython-2.2.1-build.xml.patch @@ -0,0 +1,92 @@ +--- build.xml.orig 2012-09-27 16:13:40.750930136 +0200 ++++ build.xml 2012-09-27 16:16:31.725093475 +0200 +@@ -373,21 +373,13 @@ + + <!-- create checkout directory if necessary --> + <target name="prepare-checkout" if="do.checkout"> +- <mkdir dir="${svn.checkout.dir}" /> ++ <echo message="Removed by patch." /> + </target> + + + <!-- checkout if so defined --> + <target name="checkout" depends="prepare" if="do.checkout"> +- <svn javahl="${javahl.dir}" > +- <checkout url="https://jython.svn.sourceforge.net/svnroot/jython/${svn.main.dir}/jython" revision="${svn.revision}" destPath="${svn.checkout.dir}/jython" /> +- <checkout url="https://jython.svn.sourceforge.net/svnroot/jython/${svn.main.dir}/installer" revision="${svn.revision}" destPath="${svn.checkout.dir}/installer" /> +- </svn> +- +- <!-- checkout cpython license from the correct python maintenance branch --> +- <svn javahl="${javahl.dir}" > +- <checkout url="http://svn.python.org/projects/python/branches/release22-maint/" destPath="${svn.checkout.dir}/python" recurse="false" /> +- </svn> ++ <echo message="removed by patch" /> + </target> + + +@@ -488,6 +480,7 @@ + /> + + <!-- java files used by tests --> ++<!-- + <javac srcdir="${jython.base.dir}/Lib/test/" + includes="javatests/**" + destdir="${output.dir}/" +@@ -498,6 +491,7 @@ + deprecation="${deprecation}" + nowarn="${nowarn}" + /> ++--> + + <copy file="${source.dir}/org/python/modules/ucnhash.dat" + todir="${output.dir}/org/python/modules" +@@ -551,28 +545,13 @@ + + + <!-- build the .html files using the ht2html tool --> +- <target name="doc" depends="compile" if="full-build"> +- <fail unless="ht2html.dir" message="ht2html.dir is not set" /> +- <copy todir="${dist.dir}/Doc" preservelastmodified="true"> +- <fileset dir="Doc" includes="*.ht, **/*.gif" /> +- </copy> +- <!-- Create .html files in Doc --> +- <apply executable="${python.exe}" dir="Doc"> +- <env key="PYTHONPATH" path="${jython.base.dir}/Misc/htgen" /> +- <arg line="${ht2html.dir}/ht2html.py" /> +- <arg line="-s JyLocalGenerator" /> +- <fileset dir="${dist.dir}/Doc"> +- <include name="*.ht" /> +- </fileset> +- </apply> +- <delete> +- <fileset dir="${dist.dir}/Doc" includes="*.ht" /> +- </delete> ++ <target name="doc" depends="compile"> ++ <echo message="Functionality removed by gentoo patch" /> + </target> + + + <!-- javadoc --> +- <target name="javadoc" depends="compile" if="full-build"> ++ <target name="javadoc" depends="compile"> + <javadoc sourcepath="${source.dir}" + destdir="${apidoc.dir}" + source="${jdk.source.version}" +@@ -588,7 +567,7 @@ + + + <!-- copy for full distribution --> +- <target name="copy-full" if="full-build"> ++ <target name="copy-full"> + <!-- Misc files --> + <echo>copy misc files from ${jython.base.dir}</echo> + <copy todir="${dist.dir}" preservelastmodified="true"> +@@ -599,7 +578,7 @@ + + <!-- copy the CPython license --> + <echo>copy CPython LICENSE from ${svn.checkout.dir}/python</echo> +- <copy file="${svn.checkout.dir}/python/LICENSE" tofile="${dist.dir}/LICENSE_CPython.txt" preservelastmodified="true" /> ++ <copy file="${python.lib}/../LICENSE" tofile="${dist.dir}/LICENSE_CPython.txt" preservelastmodified="true" /> + + <!-- sources: todir has to correspond with installer/**/JarInstaller.java --> + <echo>copy sources from ${jython.base.dir}</echo> diff --git a/dev-java/jython/jython-2.2.1-r2.ebuild b/dev-java/jython/jython-2.2.1-r2.ebuild new file mode 100644 index 000000000000..c8002d53fe33 --- /dev/null +++ b/dev-java/jython/jython-2.2.1-r2.ebuild @@ -0,0 +1,135 @@ +# 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.2.1-r2.ebuild,v 1.1 2012/09/27 14:47:27 sera Exp $ + +EAPI=4 + +JAVA_PKG_IUSE="readline source doc servletapi mysql postgres examples oracle" +#jdnc + +inherit base java-pkg-2 java-ant-2 + +MY_PV="installer-2.2.1" +PYVER="2.2.3" + +DESCRIPTION="An implementation of Python written in Java" +HOMEPAGE="http://www.jython.org" +SRC_URI="http://www.python.org/ftp/python/${PYVER%_*}/Python-${PYVER}.tgz +mirror://sourceforge/${PN}/${PN}_${MY_PV}.jar" + +LICENSE="PSF-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="" + +CDEPEND=" + dev-java/jakarta-oro:2.0 + readline? ( >=dev-java/libreadline-java-0.8.0:0 ) + mysql? ( >=dev-java/jdbc-mysql-3.1:0 ) + postgres? ( dev-java/jdbc-postgresql:0 ) + oracle? ( dev-java/jdbc-oracle-bin:10.2 ) + servletapi? ( java-virtuals/servlet-api:2.5 ) + !<=dev-java/freemarker-2.3.10" +RDEPEND="${CDEPEND} + >=virtual/jre-1.5" +DEPEND="${CDEPEND} + >=virtual/jdk-1.5 + dev-java/javacc" + +S="${WORKDIR}" + +#Tests currently very broken. Need to investigate whether that +#is jython's or gentoo's doing. +RESTRICT="test" + +java_prepare() { + epatch "${FILESDIR}/${P}-build.xml.patch" + + rm -Rfv org || die "Unable to remove class files." + find . -iname '*.jar' | xargs rm -fv || die "Unable to remove bundled jars" + + echo javacc.jar="$(java-pkg_getjars --build-only javacc)" > ant.properties + + if use readline; then + echo "readline.jar=$(java-pkg_getjars libreadline-java)" >> \ + ant.properties + fi + if use servletapi; then + echo "servlet.jar=$(java-pkg_getjar --virtual servlet-api-2.5 servlet-api.jar)" \ + >> ant.properties + fi + if use mysql; then + echo "mysql.jar=$(java-pkg_getjar jdbc-mysql jdbc-mysql.jar)" \ + >> ant.properties + fi + + if use postgres; then + echo \ + "postgresql.jar=$(java-pkg_getjar jdbc-postgresql jdbc-postgresql.jar)"\ + >> ant.properties + fi + + if use oracle; then + echo \ + "oracle.jar=$(java-pkg-getjar jdbc-oracle-bin-10.2 ojdbc14.jar)" \ + >> ant.properties + fi +} + +src_compile() { + local antflags="-Dbase.path=src/java -Dsource.dir=src/java/src" + local pylib="Python-${PYVER}/Lib" + antflags="${antflags} -Dpython.lib=${pylib} -Dsvn.checkout.dir=." + LC_ALL=C eant ${antflags} developer-build $(use_doc javadoc) +} + +src_test() { + local antflags="-Dbase.path=src/java -Dsource.dir=src/java/src" + antflags="${antflags} -Dpython.home=dist" + local pylib="Python-${PYVER}/Lib" + antflags="${antflags} -Dpython.lib=${pylib}" + eant ${antflags} bugtest +} + +src_install() { + java-pkg_dojar "dist/${PN}.jar" + + dodoc README.txt NEWS ACKNOWLEDGMENTS + use doc && dohtml -A .css .jpg .gif -r Doc/* + + local java_args="-Dpython.home=/usr/share/jython" + java_args="${java_args} -Dpython.cachedir=\${HOME}/.jythoncachedir" + + java-pkg_dolauncher jythonc \ + --main "org.python.util.jython" \ + --java_args "${java_args}" \ + --pkg_args "${java_args} /usr/share/jython/tools/jythonc/jythonc.py" + + java-pkg_dolauncher jython \ + --main "org.python.util.jython" \ + --pkg_args "${java_args}" + + insinto /usr/share/${PN} + doins -r dist/Lib registry + + insinto /usr/share/${PN}/tools + doins -r dist/Tools/* + + use doc && java-pkg_dojavadoc dist/Doc/javadoc + use source && java-pkg_dosrc src + use examples && java-pkg_doexamples dist/Demo/* +} + +pkg_postinst() { + if use readline; then + elog "To use readline you need to add the following to your registry" + elog + elog "python.console=org.python.util.ReadlineConsole" + elog "python.console.readlinelib=GnuReadline" + elog + elog "The global registry can be found in /usr/share/${PN}/registry" + elog "User registry in \$HOME/.jython" + elog "See http://www.jython.org/docs/registry.html for more information" + elog "" + fi +} |