9 |
>= dev-lang/python-2.7" |
>= dev-lang/python-2.7" |
10 |
fi |
fi |
11 |
|
|
12 |
|
# call meson include in the smage2, to prevent unnecessary dependencies |
13 |
|
#sminclude meson |
14 |
|
|
15 |
# get the major.minor current installed python version |
# get the major.minor current installed python version |
16 |
# -> ex 2.4 |
# -> ex 2.4 |
17 |
mget-python-version() |
mget-python-version() |
18 |
{ |
{ |
19 |
local pyver |
local pyver |
20 |
# pyver="$(${MAGE_PYTHON_EXEC} -V 2>&1 | cut -d' ' -f2 | cut -d. -f1-2)" |
# pyver="$(${MAGE_PYTHON_EXEC} -V 2>&1 | cut -d' ' -f2 | cut -d. -f1-2)" |
21 |
pyver=$(${MAGE_PYTHON_EXEC} -c "import sys ; (print sys.version[:3])") |
pyver=$(${MAGE_PYTHON_EXEC} -c "import sys ; print (sys.version[:3])") |
22 |
[[ -z ${pyver} ]] && return 1 |
[[ -z ${pyver} ]] && return 1 |
23 |
echo "${pyver}" |
echo "${pyver}" |
24 |
return 0 |
return 0 |
73 |
then |
then |
74 |
${MAGE_PYTHON_EXEC} waf configure --prefix=/usr --libdir=/usr/$(mlibdir) $@ || die |
${MAGE_PYTHON_EXEC} waf configure --prefix=/usr --libdir=/usr/$(mlibdir) $@ || die |
75 |
${MAGE_PYTHON_EXEC} waf build $@ || die |
${MAGE_PYTHON_EXEC} waf build $@ || die |
76 |
|
elif [[ -e meson.build ]] |
77 |
|
then |
78 |
|
meson_configure -D python=${MAGE_PYTHON_EXEC} || die |
79 |
|
mninja || die |
80 |
elif [[ -e configure ]] |
elif [[ -e configure ]] |
81 |
then |
then |
82 |
mconfigure $@ || die |
if [[ ${MULTILIB_BUILD} = true ]] && [[ ! -z $(typeset -f oldmconfigure) ]] && [[ ! -z $(typeset -f oldmmake) ]] |
83 |
mmake || die |
then |
84 |
|
oldmconfigure $@ || die |
85 |
|
oldmmake || die |
86 |
|
else |
87 |
|
mconfigure $@ || die |
88 |
|
mmake || die |
89 |
|
fi |
90 |
elif [[ -e install.py ]] |
elif [[ -e install.py ]] |
91 |
then |
then |
92 |
echo "install.py found - nothing to compile here." |
echo "install.py found - nothing to compile here." |
103 |
elif [[ -e waf ]] |
elif [[ -e waf ]] |
104 |
then |
then |
105 |
${MAGE_PYTHON_EXEC} waf install --destdir=${BINDIR} $@ || die |
${MAGE_PYTHON_EXEC} waf install --destdir=${BINDIR} $@ || die |
106 |
|
elif [[ -e meson.build ]] |
107 |
|
then |
108 |
|
DESTDIR=${BINDIR} mninja install || die |
109 |
elif [[ -e install.py ]] |
elif [[ -e install.py ]] |
110 |
then |
then |
111 |
${MAGE_PYTHON_EXEC} install.py --prefix=/usr --files-only --destdir=${BINDIR} $@ || die |
${MAGE_PYTHON_EXEC} install.py --prefix=/usr --files-only --destdir=${BINDIR} $@ || die |
112 |
else |
else |
113 |
mmake DESTDIR=${BINDIR} install || die |
if [[ ${MULTILIB_BUILD} = true ]] && [[ ! -z $(typeset -f oldmconfigure) ]] && [[ ! -z $(typeset -f oldmmake) ]] |
114 |
|
then |
115 |
|
oldmmake DESTDIR=${BINDIR} install || die |
116 |
|
else |
117 |
|
mmake DESTDIR=${BINDIR} install || die |
118 |
|
fi |
119 |
fi |
fi |
120 |
} |
} |
121 |
|
|