aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Delaney <della5@iinet.com.au>2012-06-06 16:49:04 +0800
committerIan Delaney <della5@iinet.com.au>2012-06-06 16:49:04 +0800
commitea588666822281724bd682b2cd163368a1a7ec31 (patch)
tree32c1c5682162bac9cd29a0592f6c23f83617df41
parent[dev-python/pil] Add new ebuild to support xhtml2pdf-0.0.4 (diff)
downloadimprovise-ea588666822281724bd682b2cd163368a1a7ec31.tar.gz
improvise-ea588666822281724bd682b2cd163368a1a7ec31.tar.bz2
improvise-ea588666822281724bd682b2cd163368a1a7ec31.zip
[app-admin/eselect-python] fix python.eselect, add wrapper.patch, 1 change to cookbook
-rw-r--r--app-admin/eselect-python/eselect-python-20111108-r1.ebuild6
-rw-r--r--app-admin/eselect-python/files/python-eselect.patch59
-rw-r--r--app-admin/eselect-python/files/wrapper.patch25
-rw-r--r--dev-python/cookbook/cookbook-2.2.9.ebuild3
4 files changed, 62 insertions, 31 deletions
diff --git a/app-admin/eselect-python/eselect-python-20111108-r1.ebuild b/app-admin/eselect-python/eselect-python-20111108-r1.ebuild
index 3e4f3cb..e07e59b 100644
--- a/app-admin/eselect-python/eselect-python-20111108-r1.ebuild
+++ b/app-admin/eselect-python/eselect-python-20111108-r1.ebuild
@@ -5,9 +5,10 @@
# Keep the EAPI low here because everything else depends on it.
# We want to make upgrading simpler.
+EAPI=2
ESVN_PROJECT="eselect-python"
ESVN_REPO_URI="https://overlays.gentoo.org/svn/proj/python/projects/eselect-python/trunk"
-EAPI=2
+
inherit eutils
if [[ ${PV} == "99999999" ]] ; then
inherit autotools subversion eutils
@@ -38,7 +39,8 @@ src_unpack() {
}
src_prepare() {
- epatch "${FILESDIR}"/python-eselect.patch || die
+ epatch "${FILESDIR}"/python-eselect.patch
+ epatch "${FILESDIR}"/wrapper.patch || die
}
src_install() {
diff --git a/app-admin/eselect-python/files/python-eselect.patch b/app-admin/eselect-python/files/python-eselect.patch
index 2ab8984..58e72d8 100644
--- a/app-admin/eselect-python/files/python-eselect.patch
+++ b/app-admin/eselect-python/files/python-eselect.patch
@@ -1,6 +1,12 @@
diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/python.eselect
---- eselect-python-20111108.orig/python.eselect 2011-11-09 07:15:22.000000000 +0800
-+++ eselect-python-20111108/python.eselect 2012-06-02 17:50:04.149917271 +0800
+--- python.eselect 2011-11-09 07:15:22.000000000 +0800
++++ python.eselect 2012-06-06 16:42:14.825413552 +0800
+@@ -1,4 +1,4 @@
+-# Copyright 1999-2010 Gentoo Foundation
++7# Copyright 1999-2010 Gentoo Foundation
+ # Distributed under the terms of the GNU General Public License v2
+ # $Id: $
+
@@ -15,9 +15,11 @@
# Find a list of Python versions
@@ -151,7 +157,7 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt
else
echo -n "${interpreter}"
fi
-@@ -229,14 +258,25 @@
+@@ -229,14 +258,23 @@
}
describe_list_options() {
@@ -165,8 +171,6 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt
+ local active i python_descriptive_name="Python" python_version_option= python2="0" python3="0"
+ local pypy1="0" targets=() active_version=$(do_show)
+
-+ [[ ${1:0:2} == '--' ]]
-+
while [[ $# > 0 ]]; do
case "$1" in
+ --pypy1)
@@ -178,7 +182,7 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt
--python2)
python2="1"
python_descriptive_name="Python 2"
-@@ -258,19 +298,65 @@
+@@ -258,19 +296,66 @@
if [[ "${python2}" == "1" && "${python3}" == "1" ]]; then
die -q "'--python2' and '--python3' options cannot be specified simultaneously"
@@ -191,7 +195,7 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt
- targets=($(find_targets))
+ combined_targets=($(find_targets))
+ # $(find_targets) captures pypy entries; need to filter them from the list
-+ if [[ $PYTHON_INTERPRETERS_GROUP != "1" ]]; then
++ if [[ $PYTHON_INTERPRETERS_GROUP > "1" ]]; then
+ for (( j=0 ; j < ${#combined_targets[@]} ; j++ ))
+ do
+ if [[ ${combined_targets[$j]:0:4} == "pypy" ]]; then
@@ -199,8 +203,18 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt
+ fi
+ targets[$j]="${combined_targets[$j]}"
+ done
-+
+
+- write_list_start "Available ${python_descriptive_name} interpreters:"
+
+- active="$(do_show ${python_version_option})"
+- for ((i = 0; i < ${#targets[@]}; i++)); do
+- if [[ ${targets[${i}]} == ${active} ]]; then
+- targets[${i}]="$(highlight_marker "${targets[${i}]}")"
+- fi
+- done
+- write_numbered_list -m "(none found)" "${targets[@]}"
+ write_list_start "Available ${python_descriptive_name} interpreters:"
++
+ active="$(do_show ${python_version_option})"
+ for ((i = 0; i < ${#targets[@]}; i++)); do
+ if [[ ${targets[${i}]} == ${active} ]]; then
@@ -219,8 +233,7 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt
+ targets[$j]="${combined_targets[$j]}"
+ done
+ write_list_start "Available ${python_descriptive_name} interpreters:"
-
-- write_list_start "Available ${python_descriptive_name} interpreters:"
++
+ if [[ "${active_version:0:4}" == "pypy" ]]; then
+ active="$(do_show ${python_version_option})"
+ for ((i = 0; i < ${#targets[@]}; i++)); do
@@ -230,19 +243,11 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt
+ done
+ fi
+ write_numbered_list -m "(none found)" "${targets[@]}"
-
-- active="$(do_show ${python_version_option})"
-- for ((i = 0; i < ${#targets[@]}; i++)); do
-- if [[ ${targets[${i}]} == ${active} ]]; then
-- targets[${i}]="$(highlight_marker "${targets[${i}]}")"
-- fi
-- done
-- write_numbered_list -m "(none found)" "${targets[@]}"
++
+ else
+ targets=($(find_targets))
-+ write_list_start "Available ${python_descriptive_name} interpreters:"
+ active="$(do_show ${python_version_option})"
-+
++ write_list_start "Available ${python_descriptive_name} interpreters:"
+ for ((i = 0; i < ${#targets[@]}; i++)); do
+ if [[ ${targets[${i}]} == ${active} ]]; then
+ targets[${i}]="$(highlight_marker "${targets[${i}]}")"
@@ -253,7 +258,7 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt
}
### set action ###
-@@ -280,6 +366,7 @@
+@@ -280,6 +365,7 @@
}
describe_set_options() {
@@ -261,7 +266,7 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt
echo "--python2 : Set active Python 2 interpreter without setting of main active Python interpreter if it is not set to Python 2"
echo "--python3 : Set active Python 3 interpreter without setting of main active Python interpreter if it is not set to Python 3"
}
-@@ -289,10 +376,14 @@
+@@ -289,10 +375,14 @@
}
do_set() {
@@ -277,7 +282,7 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt
--python2)
python2="1"
PYTHON_INTERPRETERS_GROUP="2"
-@@ -310,6 +401,10 @@
+@@ -310,6 +400,10 @@
if [[ "${python2}" == "1" && "${python3}" == "1" ]]; then
die -q "'--python2' and '--python3' options cannot be specified simultaneously"
@@ -288,7 +293,7 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt
fi
if [[ $# -lt 1 ]]; then
-@@ -319,9 +414,11 @@
+@@ -319,9 +413,11 @@
else
main_active_python_interpreter="$(do_show)"
if [[ "${python2}" == "1" && "${main_active_python_interpreter}" != "python2."* ]]; then
@@ -303,7 +308,7 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt
fi
if ! set_scripts_and_symlinks "${1}"; then
-@@ -343,12 +440,14 @@
+@@ -343,12 +439,14 @@
describe_update_options() {
echo "--if-unset : Do not override existing implementation"
echo "--ignore SLOT : Ignore SLOT when setting symlinks"
@@ -319,7 +324,7 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt
while [[ $# > 0 ]]; do
case "$1" in
--if-unset)
-@@ -357,6 +456,10 @@
+@@ -357,6 +455,10 @@
--ignore)
ignored_slots+=("${2}")
shift;;
@@ -330,7 +335,7 @@ diff -ur eselect-python-20111108.orig/python.eselect eselect-python-20111108/pyt
--python2)
python2="1"
python_version_option="--python2"
-@@ -374,19 +477,28 @@
+@@ -374,19 +476,28 @@
if [[ "${python2}" == "1" && "${python3}" == "1" ]]; then
die -q "'--python2' and '--python3' options cannot be specified simultaneously"
diff --git a/app-admin/eselect-python/files/wrapper.patch b/app-admin/eselect-python/files/wrapper.patch
new file mode 100644
index 0000000..f15ca2e
--- /dev/null
+++ b/app-admin/eselect-python/files/wrapper.patch
@@ -0,0 +1,25 @@
+diff -ur eselect-python-20111108.orig/python-wrapper.c eselect-python-20111108/python-wrapper.c
+--- python-wrapper.c 2011-11-09 07:15:22.000000000 +0800
++++ python-wrapper.c 2012-06-06 15:14:49.712818087 +0800
+@@ -82,7 +82,7 @@
+ /* True if a valid file name, and not "python" */
+ int valid_interpreter(const char* name)
+ {
+- if (! name || ! *name || (strcmp(name, "python") == 0))
++ if (! name || ! *name || (strcmp(name, "python") == 0) || (strncmp(name, "pypy-c", 6) == 0) )
+ {
+ return 0;
+ }
+@@ -91,10 +91,9 @@
+
+ int get_version(const char* name)
+ {
+- /* Only find files beginning with "python" - this is a fallback,
+- * so we only want CPython
++ /* Find files beginning with "python" && "pypy-c1"; so we want CPython && pypy.
+ */
+- if (! valid_interpreter(name) || strncmp(name, "python", 6) != 0)
++ if (! (valid_interpreter(name)) || strncmp(name, "python", 6) != 0 || (strncmp(name, "pypy-c", 6) != 0))
+ return -1;
+ int pos = 6;
+ int major = 0;
diff --git a/dev-python/cookbook/cookbook-2.2.9.ebuild b/dev-python/cookbook/cookbook-2.2.9.ebuild
index 1f7b6f9..58d8137 100644
--- a/dev-python/cookbook/cookbook-2.2.9.ebuild
+++ b/dev-python/cookbook/cookbook-2.2.9.ebuild
@@ -17,10 +17,9 @@ IUSE="doc"
LICENSE="BSD"
SLOT="0"
-RDEPEND=""
+RDEPEND="dev-python/bunch"
DEPEND="${RDEPEND}
dev-python/setuptools
- dev-python/bunch
doc? ( dev-python/jinja
dev-python/pytables
sci-libs/scipy )"