Magellan Linux

Contents of /smage/trunk/include/python3.sminc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11532 - (show annotations) (download)
Thu Dec 21 09:39:28 2017 UTC (6 years, 10 months ago) by niro
File size: 2608 byte(s)
-added python3 sminclude
1 # $Id$
2
3 MAGE_PYTHON3_EXEC="/usr/bin/python3"
4 MAGE_PYTHON3_SRCSUBDIR="${BUILDDIR}/python3"
5 #SRCSUBDIR="${MAGE_PYTHON2_SRCSUBDIR}"
6 export MAGE_PYTHON_EXEC="${MAGE_PYTHON3_EXEC}"
7 export PYTHON="${MAGE_PYTHON3_EXEC}"
8
9 SDEPEND="${SDEPEND}
10 >= dev-lang/python3-3.6"
11
12 sminclude python
13
14 mget-python3-version()
15 {
16 MAGE_PYTHON_EXEC="${MAGE_PYTHON3_EXEC}" mget-python-version
17 }
18
19 mget-python3-libdir()
20 {
21 MAGE_PYTHON_EXEC="${MAGE_PYTHON3_EXEC}" mget-python-libdir
22 }
23
24 mget-python3-includedir()
25 {
26 MAGE_PYTHON_EXEC="${MAGE_PYTHON3_EXEC}" mget-python-includedir
27 }
28
29 python3_docompile()
30 {
31 MAGE_PYTHON_EXEC="${MAGE_PYTHON3_EXEC}" python_docompile $@
32 }
33
34 python3_doinstall()
35 {
36 MAGE_PYTHON_EXEC="${MAGE_PYTHON3_EXEC}" python_doinstall $@
37 }
38
39 python3_src_prepare()
40 {
41 python_src_prepare || die
42 install -d ${MAGE_PYTHON3_SRCSUBDIR}
43 mv ${SRCDIR} ${MAGE_PYTHON3_SRCSUBDIR}/ || die
44 }
45
46 python3_multilib_src_prepare()
47 {
48 munpack ${SRCFILE} || die
49 for abi in ${MULTILIB_ABIS}
50 do
51 install -d ${MAGE_PYTHON3_SRCSUBDIR}
52 mv ${SRCDIR}-${abi} ${MAGE_PYTHON3_SRCSUBDIR}/ || die
53 done
54 }
55
56 python3_src_compile()
57 {
58 local saved_SRCDIR="${SRCDIR}"
59 SRCDIR="${MAGE_PYTHON3_SRCSUBDIR}/$(basename ${saved_SRCDIR})"
60
61 cd ${SRCDIR}
62 python3_docompile $@ || die
63 SRCDIR="${saved_SRCDIR}"
64 }
65
66 python3_multilib_src_compile()
67 {
68 local abi
69 local saved_SRCDIR="${SRCDIR}"
70
71 for abi in ${MULTILIB_ABIS}
72 do
73 SRCDIR="${MAGE_PYTHON3_SRCSUBDIR}/$(basename ${saved_SRCDIR}-${abi})"
74 cd ${SRCDIR}
75 abi-${abi} python3_docompile $@ || die
76 done
77 SRCDIR="${saved_SRCDIR}"
78 }
79
80 python3_src_check()
81 {
82 return 0
83 }
84
85 python3_src_install()
86 {
87 local saved_SRCDIR="${SRCDIR}"
88 SRCDIR="${MAGE_PYTHON3_SRCSUBDIR}/$(basename ${saved_SRCDIR})"
89
90 cd ${SRCDIR}
91 python3_doinstall $@ || die
92
93 local i
94 for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \
95 FAQ LICENSE NEWS README TODO
96 do
97 if [ -f ${SRCDIR}/${i} ]
98 then
99 minstalldocs ${i} || die
100 fi
101 done
102 SRCDIR="${saved_SRCDIR}"
103 }
104
105 python3_multilib_src_install()
106 {
107 local abi
108 local saved_SRCDIR="${SRCDIR}"
109
110 for abi in ${MULTILIB_ABIS}
111 do
112 SRCDIR="${MAGE_PYTHON3_SRCSUBDIR}/$(basename ${saved_SRCDIR}-${abi})"
113 cd ${SRCDIR}
114 abi-${abi} python3_doinstall $@ || die
115
116 local i
117 for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \
118 FAQ LICENSE NEWS README TODO
119 do
120 if [ -f ${SRCDIR}/${i} ]
121 then
122 oldminstalldocs ${i} || die
123 fi
124 done
125 done
126 SRCDIR="${saved_SRCDIR}"
127 }
128
129 export_inherits python3 src_check
130 if [[ ${MULTILIB_BUILD} = true ]]
131 then
132 export_inherits python3_multilib src_prepare src_compile src_install
133 else
134 export_inherits python3 src_prepare src_compile src_install
135 fi