1 |
lack 10/04/01 17:03:47 |
2 |
|
3 |
Modified: rox.eclass |
4 |
Log: |
5 |
Update to better deal with python3 and multiple python ABIs |
6 |
|
7 |
Basically we just outright assert that all rox-base/* and rox-extra/* |
8 |
python-based apps will only work with python2. We'll be back to address this |
9 |
again if any of them ever become python3-aware. |
10 |
|
11 |
Revision Changes Path |
12 |
1.33 eclass/rox.eclass |
13 |
|
14 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?rev=1.33&view=markup |
15 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?rev=1.33&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/rox.eclass?r1=1.32&r2=1.33 |
17 |
|
18 |
Index: rox.eclass |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v |
21 |
retrieving revision 1.32 |
22 |
retrieving revision 1.33 |
23 |
diff -u -r1.32 -r1.33 |
24 |
--- rox.eclass 23 Mar 2010 14:42:55 -0000 1.32 |
25 |
+++ rox.eclass 1 Apr 2010 17:03:47 -0000 1.33 |
26 |
@@ -1,6 +1,6 @@ |
27 |
# Copyright 1999-2004 Gentoo Foundation |
28 |
# Distributed under the terms of the GNU General Public License v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v 1.32 2010/03/23 14:42:55 lack Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/rox.eclass,v 1.33 2010/04/01 17:03:47 lack Exp $ |
31 |
|
32 |
# ROX eclass Version 3 |
33 |
|
34 |
@@ -49,6 +49,11 @@ |
35 |
|
36 |
# For examples refer to ebuilds in rox-extra/ or rox-base/ |
37 |
|
38 |
+if [[ ${ROX_LIB_VER} ]]; then |
39 |
+ # Presently all packages which require ROX_LIB also require python2 |
40 |
+ PYTHON_DEPEND="2" |
41 |
+fi |
42 |
+ |
43 |
# need python to byte compile modules, if any |
44 |
# need autotools to run autoreconf, if required |
45 |
inherit python autotools eutils multilib |
46 |
@@ -188,8 +193,19 @@ |
47 |
} |
48 |
|
49 |
# Exported functions |
50 |
+ |
51 |
+rox_pkg_setup() { |
52 |
+ if [[ ${PYTHON_DEPEND} ]]; then |
53 |
+ python_set_active_version 2 |
54 |
+ fi |
55 |
+} |
56 |
+ |
57 |
rox_src_compile() { |
58 |
cd "${APPNAME}" |
59 |
+ # Python packages need their shebangs fixed |
60 |
+ if [[ ${PYTHON_DEPEND} ]]; then |
61 |
+ python_convert_shebangs -r 2 . |
62 |
+ fi |
63 |
#Some packages need to be compiled. |
64 |
chmod 755 AppRun |
65 |
if [[ -d src/ ]]; then |
66 |
@@ -250,7 +266,9 @@ |
67 |
} |
68 |
|
69 |
rox_pkg_postinst() { |
70 |
- python_mod_optimize "${APPDIR}/${APPNAME}" >/dev/null 2>&1 |
71 |
+ if [[ ${PYTHON_DEPEND} ]]; then |
72 |
+ python_mod_optimize "${APPDIR}/${APPNAME}" >/dev/null 2>&1 |
73 |
+ fi |
74 |
|
75 |
einfo "${APPNAME} has been installed into ${APPDIR}" |
76 |
if [[ "${WRAPPERNAME}" != "skip" ]]; then |
77 |
@@ -264,8 +282,10 @@ |
78 |
} |
79 |
|
80 |
rox_pkg_postrm() { |
81 |
- python_mod_cleanup "${APPDIR}" |
82 |
+ if [[ ${PYTHON_DEPEND} ]]; then |
83 |
+ python_mod_cleanup "${APPDIR}" |
84 |
+ fi |
85 |
} |
86 |
|
87 |
|
88 |
-EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_postrm |
89 |
+EXPORT_FUNCTIONS pkg_setup src_compile src_install pkg_postinst pkg_postrm |