1 |
commit: 9fdf4a9619d85b4272cba0fa28f4bbcddf20ddd6 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Feb 28 16:46:38 2016 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 28 17:14:47 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9fdf4a96 |
7 |
|
8 |
app-eselect/eselect-python: Support pythonX.Y-config in the old version |
9 |
|
10 |
.../eselect-python-20140125-r1.ebuild | 47 ++++++++++++++++++++++ |
11 |
.../eselect-python-20140125-pythonX.Y-config.patch | 38 +++++++++++++++++ |
12 |
2 files changed, 85 insertions(+) |
13 |
|
14 |
diff --git a/app-eselect/eselect-python/eselect-python-20140125-r1.ebuild b/app-eselect/eselect-python/eselect-python-20140125-r1.ebuild |
15 |
new file mode 100644 |
16 |
index 0000000..7babd51 |
17 |
--- /dev/null |
18 |
+++ b/app-eselect/eselect-python/eselect-python-20140125-r1.ebuild |
19 |
@@ -0,0 +1,47 @@ |
20 |
+# Copyright 1999-2016 Gentoo Foundation |
21 |
+# Distributed under the terms of the GNU General Public License v2 |
22 |
+# $Id$ |
23 |
+ |
24 |
+EAPI=5 |
25 |
+ |
26 |
+inherit eutils |
27 |
+ |
28 |
+if [[ ${PV} == "99999999" ]] ; then |
29 |
+ inherit autotools git-r3 |
30 |
+ EGIT_REPO_URI="git://anongit.gentoo.org/proj/${PN}.git" |
31 |
+else |
32 |
+ SRC_URI="mirror://gentoo/${P}.tar.bz2 |
33 |
+ https://dev.gentoo.org/~floppym/dist/${P}.tar.bz2" |
34 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-aix ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
35 |
+fi |
36 |
+ |
37 |
+DESCRIPTION="Eselect module for management of multiple Python versions" |
38 |
+HOMEPAGE="https://www.gentoo.org/proj/en/Python/" |
39 |
+ |
40 |
+LICENSE="GPL-2" |
41 |
+SLOT="0" |
42 |
+IUSE="" |
43 |
+ |
44 |
+RDEPEND=">=app-admin/eselect-1.2.3" |
45 |
+ |
46 |
+src_prepare() { |
47 |
+ epatch "${FILESDIR}"/${P}-pythonX.Y-config.patch |
48 |
+ [[ ${PV} == "99999999" ]] && eautoreconf |
49 |
+} |
50 |
+ |
51 |
+src_install() { |
52 |
+ keepdir /etc/env.d/python |
53 |
+ emake DESTDIR="${D}" install |
54 |
+} |
55 |
+ |
56 |
+pkg_postinst() { |
57 |
+ if has_version 'dev-lang/python'; then |
58 |
+ eselect python update --if-unset |
59 |
+ fi |
60 |
+ if has_version '=dev-lang/python-2*'; then |
61 |
+ eselect python update --python2 --if-unset |
62 |
+ fi |
63 |
+ if has_version '=dev-lang/python-3*'; then |
64 |
+ eselect python update --python3 --if-unset |
65 |
+ fi |
66 |
+} |
67 |
|
68 |
diff --git a/app-eselect/eselect-python/files/eselect-python-20140125-pythonX.Y-config.patch b/app-eselect/eselect-python/files/eselect-python-20140125-pythonX.Y-config.patch |
69 |
new file mode 100644 |
70 |
index 0000000..f35cd2c |
71 |
--- /dev/null |
72 |
+++ b/app-eselect/eselect-python/files/eselect-python-20140125-pythonX.Y-config.patch |
73 |
@@ -0,0 +1,38 @@ |
74 |
+From 3a5909537315dbe624fbd242d8ab25f3926465fb Mon Sep 17 00:00:00 2001 |
75 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
76 |
+Date: Sun, 28 Feb 2016 17:04:40 +0100 |
77 |
+Subject: [PATCH] Use pythonX.Y-config instead of python-config-X.Y |
78 |
+ |
79 |
+--- |
80 |
+ python.eselect.in | 8 ++++---- |
81 |
+ 1 file changed, 4 insertions(+), 4 deletions(-) |
82 |
+ |
83 |
+diff --git a/python.eselect.in b/python.eselect.in |
84 |
+index 9a52791..c40483a 100644 |
85 |
+--- a/python.eselect.in |
86 |
++++ b/python.eselect.in |
87 |
+@@ -46,9 +46,9 @@ set_python_config() { |
88 |
+ #!/usr/bin/env bash |
89 |
+ # Gentoo python-config wrapper script |
90 |
+ |
91 |
+-[[ "\${EPYTHON}" =~ (/|^python\$) ]] && EPYTHON="${target/-config-/}" |
92 |
+-python_config="\${EPYTHON/python/python-config-}" |
93 |
+-"\${0%/*}/\${python_config:-${target}}" "\$@" |
94 |
++[[ "\${EPYTHON}" =~ (/|^python\$|^$) ]] && EPYTHON="${target%-config}" |
95 |
++python_config="\${EPYTHON}-config" |
96 |
++"\${0%/*}/\${python_config}" "\$@" |
97 |
+ EOF |
98 |
+ chmod a+rx "${script}" |
99 |
+ } |
100 |
+@@ -121,7 +121,7 @@ set_scripts_and_symlinks() { |
101 |
+ ln -nfs "${target}" "${target%.*}" |
102 |
+ if [[ "${SET_MAIN_ACTIVE_PYTHON_INTERPRETER}" == "1" ]]; then |
103 |
+ set_python "${target}" |
104 |
+- set_python_config "${target/python/python-config-}" |
105 |
++ set_python_config "${target}-config" |
106 |
+ ln -nfs "${target/python/pydoc}" pydoc |
107 |
+ # idle is optionally installed |
108 |
+ if [[ -f "${target/python/idle}" ]]; then |
109 |
+-- |
110 |
+2.7.2 |
111 |
+ |