summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2010-03-20 13:17:21 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2010-03-20 13:17:21 +0000
commit903e66ad946b8e5ea4b9b603b824a2b165f879fa (patch)
treeae38058055517ce1c6762567cafe376f93344a73 /dev-java/jython
parentalpha/x86 stable wrt #309293 (diff)
downloadgentoo-2-903e66ad946b8e5ea4b9b603b824a2b165f879fa.tar.gz
gentoo-2-903e66ad946b8e5ea4b9b603b824a2b165f879fa.tar.bz2
gentoo-2-903e66ad946b8e5ea4b9b603b824a2b165f879fa.zip
Make Distutils install scripts into /usr/bin (bug #305103). Respect PYTHONPATH variable (bug #305103).
(Portage version: 15835-svn/cvs/Linux x86_64)
Diffstat (limited to 'dev-java/jython')
-rw-r--r--dev-java/jython/ChangeLog9
-rw-r--r--dev-java/jython/files/jython-2.5.1-distutils_scripts_location.patch11
-rw-r--r--dev-java/jython/files/jython-2.5.1-respect_PYTHONPATH.patch15
-rw-r--r--dev-java/jython/jython-2.5.1-r1.ebuild31
4 files changed, 49 insertions, 17 deletions
diff --git a/dev-java/jython/ChangeLog b/dev-java/jython/ChangeLog
index 782478e96604..453cd69146c0 100644
--- a/dev-java/jython/ChangeLog
+++ b/dev-java/jython/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-java/jython
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/jython/ChangeLog,v 1.68 2010/03/19 09:59:29 ali_bush Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jython/ChangeLog,v 1.69 2010/03/20 13:17:20 arfrever Exp $
+
+ 20 Mar 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
+ jython-2.5.1-r1.ebuild,
+ +files/jython-2.5.1-distutils_scripts_location.patch,
+ +files/jython-2.5.1-respect_PYTHONPATH.patch:
+ Make Distutils install scripts into /usr/bin (bug #305103). Respect
+ PYTHONPATH variable (bug #305103).
*jython-2.5.1-r1 (19 Mar 2010)
diff --git a/dev-java/jython/files/jython-2.5.1-distutils_scripts_location.patch b/dev-java/jython/files/jython-2.5.1-distutils_scripts_location.patch
new file mode 100644
index 000000000000..150d463f1db1
--- /dev/null
+++ b/dev-java/jython/files/jython-2.5.1-distutils_scripts_location.patch
@@ -0,0 +1,11 @@
+--- Lib/distutils/command/install.py
++++ Lib/distutils/command/install.py
+@@ -70,7 +70,7 @@
+ 'purelib': '$base/Lib/site-packages',
+ 'platlib': '$base/Lib/site-packages',
+ 'headers': '$base/Include/$dist_name',
+- 'scripts': '$base/bin',
++ 'scripts': '/usr/bin',
+ 'data' : '$base',
+ }
+ }
diff --git a/dev-java/jython/files/jython-2.5.1-respect_PYTHONPATH.patch b/dev-java/jython/files/jython-2.5.1-respect_PYTHONPATH.patch
new file mode 100644
index 000000000000..8d028d01b567
--- /dev/null
+++ b/dev-java/jython/files/jython-2.5.1-respect_PYTHONPATH.patch
@@ -0,0 +1,15 @@
+--- src/org/python/core/PySystemState.java
++++ src/org/python/core/PySystemState.java
+@@ -646,6 +646,12 @@
+ if (jythonpath != null) {
+ registry.setProperty("python.path", jythonpath);
+ }
++ else {
++ jythonpath = System.getenv("PYTHONPATH");
++ if (jythonpath != null) {
++ registry.setProperty("python.path", jythonpath);
++ }
++ }
+ } catch (SecurityException e) {
+ }
+ registry.putAll(postProperties);
diff --git a/dev-java/jython/jython-2.5.1-r1.ebuild b/dev-java/jython/jython-2.5.1-r1.ebuild
index f841be35d3d4..1fb9958fd24d 100644
--- a/dev-java/jython/jython-2.5.1-r1.ebuild
+++ b/dev-java/jython/jython-2.5.1-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 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-r1.ebuild,v 1.1 2010/03/19 09:59:29 ali_bush Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jython/jython-2.5.1-r1.ebuild,v 1.2 2010/03/20 13:17:20 arfrever Exp $
JAVA_PKG_IUSE="source doc examples oracle"
#informix missing. This is a jdbc driver, similar to oracle use flag
@@ -49,6 +49,8 @@ DEPEND=">=virtual/jdk-1.5
java_prepare() {
epatch "${FILESDIR}/${P}-build.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"
@@ -117,14 +119,13 @@ src_install() {
java-pkg_newjar "${PN}-dev.jar"
local java_args="-Dpython.home=/usr/share/${PN}-${SLOT}"
- java_args="${java_args} -Dpython.cachedir=\${JYTHON_CACHEDIR-\${HOME}/.jythoncachedir}"
+ java_args="${java_args} -Dpython.cachedir=\${JYTHON_CACHEDIR-\${HOME}/.jythoncachedir}"
java_args="${java_args} -Dpython.executable=${ROOT}/usr/bin/jython-${SLOT}"
java-pkg_dolauncher jython-${SLOT} \
--main "org.python.util.jython" \
--pkg_args "${java_args}"
- sed -i -e 's_#!/bin/bash_#!/bin/bash\nunset EPYTHON_g' \
- "${D}/usr/binjython-2.5"
+ sed -e "1a unset EPYTHON" -i "${D}usr/bin/${PN}-${SLOT}" || die "sed failed"
java-pkg_register-optional-dependency jdbc-mysql
java-pkg_register-optional-dependency jdbc-postgresql
@@ -142,16 +143,14 @@ pkg_postinst() {
einfo "Version of jython > 2.2* no longer has jythonc. Please see"
einfo "http://www.jython.org/Project/jythonc.html for details"
- if use readline; then
- elog
- 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
+ elog
+ 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
}