--- trunk/include/python.sminc 2017/10/11 09:27:47 29773 +++ trunk/include/python.sminc 2019/10/21 10:06:01 33241 @@ -8,10 +8,9 @@ SDEPEND="${SDEPEND} >= dev-lang/python-2.7" fi -if [[ -z ${MAGE_PYTHON_BUILD_VERSIONS} ]] -then - MAGE_PYTHON_BUILD_VERSIONS="single" -fi + +# call meson include in the smage2, to prevent unnecessary dependencies +#sminclude meson # get the major.minor current installed python version # -> ex 2.4 @@ -19,7 +18,7 @@ { local pyver # pyver="$(${MAGE_PYTHON_EXEC} -V 2>&1 | cut -d' ' -f2 | cut -d. -f1-2)" - pyver=$(${MAGE_PYTHON_EXEC} -c "import sys ; (print sys.version[:3])") + pyver=$(${MAGE_PYTHON_EXEC} -c "import sys ; print (sys.version[:3])") [[ -z ${pyver} ]] && return 1 echo "${pyver}" return 0 @@ -74,10 +73,20 @@ then ${MAGE_PYTHON_EXEC} waf configure --prefix=/usr --libdir=/usr/$(mlibdir) $@ || die ${MAGE_PYTHON_EXEC} waf build $@ || die + elif [[ -e meson.build ]] + then + meson_configure -D python=${MAGE_PYTHON_EXEC} || die + mninja || die elif [[ -e configure ]] then - mconfigure $@ || die - mmake || die + if [[ ${MULTILIB_BUILD} = true ]] && [[ ! -z $(typeset -f oldmconfigure) ]] && [[ ! -z $(typeset -f oldmmake) ]] + then + oldmconfigure $@ || die + oldmmake || die + else + mconfigure $@ || die + mmake || die + fi elif [[ -e install.py ]] then echo "install.py found - nothing to compile here." @@ -94,18 +103,26 @@ elif [[ -e waf ]] then ${MAGE_PYTHON_EXEC} waf install --destdir=${BINDIR} $@ || die + elif [[ -e meson.build ]] + then + DESTDIR=${BINDIR} mninja install || die elif [[ -e install.py ]] then ${MAGE_PYTHON_EXEC} install.py --prefix=/usr --files-only --destdir=${BINDIR} $@ || die else - mmake DESTDIR=${BINDIR} install || die + if [[ ${MULTILIB_BUILD} = true ]] && [[ ! -z $(typeset -f oldmconfigure) ]] && [[ ! -z $(typeset -f oldmmake) ]] + then + oldmmake DESTDIR=${BINDIR} install || die + else + mmake DESTDIR=${BINDIR} install || die + fi fi } python_src_compile() { cd ${SRCDIR} - python_docompile || die + python_docompile $@ || die } python_multilib_src_compile() @@ -117,7 +134,7 @@ do SRCDIR="${saved_SRCDIR}-${abi}/${SRCSUBDIR}" cd ${SRCDIR} - abi-${abi} python_docompile || die + abi-${abi} python_docompile $@ || die done SRCDIR="${saved_SRCDIR}" } @@ -130,7 +147,7 @@ python_src_install() { cd ${SRCDIR} - python_doinstall || die + python_doinstall $@ || die local i for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \ @@ -152,7 +169,7 @@ do SRCDIR="${saved_SRCDIR}-${abi}/${SRCSUBDIR}" cd ${SRCDIR} - abi-${abi} python_doinstall || die + abi-${abi} python_doinstall $@ || die local i for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \