Annotation of /trunk/include/python2.sminc
Parent Directory | Revision Log
Revision 29774 -
(hide annotations)
(download)
Wed Oct 11 09:28:11 2017 UTC (6 years, 11 months ago) by niro
File size: 2017 byte(s)
Wed Oct 11 09:28:11 2017 UTC (6 years, 11 months ago) by niro
File size: 2017 byte(s)
-added python2 sminclude
1 | niro | 29774 | # $Id$ |
2 | |||
3 | MAGE_PYTHON2_EXEC="/usr/bin/python2" | ||
4 | MAGE_PYTHON2_SRCSUBDIR="python2" | ||
5 | SRCSUBDIR="${MAGE_PYTHON2_SRCSUBDIR}" | ||
6 | export MAGE_PYTHON_EXEC="${MAGE_PYTHON2_EXEC}" | ||
7 | export PYTHON="${MAGE_PYTHON2_EXEC}" | ||
8 | |||
9 | SDEPEND="${SDEPEND} | ||
10 | >= dev-lang/python2-2.7" | ||
11 | |||
12 | sminclude python | ||
13 | |||
14 | python2_docompile() | ||
15 | { | ||
16 | MAGE_PYTHON_EXEC="${MAGE_PYTHON2_EXEC}" python_docompile $@ | ||
17 | } | ||
18 | |||
19 | python2_doinstall() | ||
20 | { | ||
21 | MAGE_PYTHON_EXEC="${MAGE_PYTHON2_EXEC}" python_doinstall $@ | ||
22 | } | ||
23 | |||
24 | python2_src_prepare() | ||
25 | { | ||
26 | python_src_prepare || die | ||
27 | install -d ${SRCDIR}/${MAGE_PYTHON2_SRCSUBDIR} | ||
28 | } | ||
29 | |||
30 | python2_multilib_src_prepare() | ||
31 | { | ||
32 | munpack ${SRCFILE} || die | ||
33 | for abi in ${MULTILIB_ABIS} | ||
34 | do | ||
35 | install -d ${SRCDIR}-${abi}/${MAGE_PYTHON2_SRCSUBDIR} | ||
36 | done | ||
37 | } | ||
38 | |||
39 | python2_src_compile() | ||
40 | { | ||
41 | cd ${SRCDIR}/${MAGE_PYTHON2_SRCSUBDIR} | ||
42 | python2_docompile || die | ||
43 | } | ||
44 | |||
45 | python2_multilib_src_compile() | ||
46 | { | ||
47 | local abi | ||
48 | local saved_SRCDIR="${SRCDIR}" | ||
49 | |||
50 | for abi in ${MULTILIB_ABIS} | ||
51 | do | ||
52 | SRCDIR="${saved_SRCDIR}-${abi}/${MAGE_PYTHON2_SRCSUBDIR}" | ||
53 | cd ${SRCDIR} | ||
54 | abi-${abi} python2_docompile || die | ||
55 | done | ||
56 | SRCDIR="${saved_SRCDIR}" | ||
57 | } | ||
58 | |||
59 | python2_src_check() | ||
60 | { | ||
61 | return 0 | ||
62 | } | ||
63 | |||
64 | python2_src_install() | ||
65 | { | ||
66 | cd ${SRCDIR}/${MAGE_PYTHON2_SRCSUBDIR} | ||
67 | python2_doinstall || die | ||
68 | |||
69 | local i | ||
70 | for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \ | ||
71 | FAQ LICENSE NEWS README TODO | ||
72 | do | ||
73 | if [ -f ${SRCDIR}/${i} ] | ||
74 | then | ||
75 | minstalldocs ${i} || die | ||
76 | fi | ||
77 | done | ||
78 | } | ||
79 | |||
80 | python2_multilib_src_install() | ||
81 | { | ||
82 | local abi | ||
83 | local saved_SRCDIR="${SRCDIR}" | ||
84 | |||
85 | for abi in ${MULTILIB_ABIS} | ||
86 | do | ||
87 | SRCDIR="${saved_SRCDIR}-${abi}/${MAGE_PYTHON2_SRCSUBDIR}" | ||
88 | cd ${SRCDIR} | ||
89 | abi-${abi} python2_doinstall || die | ||
90 | |||
91 | local i | ||
92 | for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \ | ||
93 | FAQ LICENSE NEWS README TODO | ||
94 | do | ||
95 | if [ -f ${SRCDIR}/${i} ] | ||
96 | then | ||
97 | oldminstalldocs ${i} || die | ||
98 | fi | ||
99 | done | ||
100 | done | ||
101 | SRCDIR="${saved_SRCDIR}" | ||
102 | } | ||
103 | |||
104 | export_inherits python2 src_check | ||
105 | if [[ ${MULTILIB_BUILD} = true ]] | ||
106 | then | ||
107 | export_inherits python2_multilib src_prepare src_compile src_install | ||
108 | else | ||
109 | export_inherits python2 src_prepare src_compile src_install | ||
110 | fi |