--- trunk/include/python2.sminc 2017/10/11 09:28:11 29774 +++ trunk/include/python2.sminc 2017/10/11 10:56:52 29779 @@ -1,13 +1,13 @@ # $Id$ MAGE_PYTHON2_EXEC="/usr/bin/python2" -MAGE_PYTHON2_SRCSUBDIR="python2" -SRCSUBDIR="${MAGE_PYTHON2_SRCSUBDIR}" +MAGE_PYTHON2_SRCSUBDIR="${BUILDDIR}/python2" +#SRCSUBDIR="${MAGE_PYTHON2_SRCSUBDIR}" export MAGE_PYTHON_EXEC="${MAGE_PYTHON2_EXEC}" export PYTHON="${MAGE_PYTHON2_EXEC}" SDEPEND="${SDEPEND} - >= dev-lang/python2-2.7" + >= dev-lang/python-2.7" sminclude python @@ -24,7 +24,8 @@ python2_src_prepare() { python_src_prepare || die - install -d ${SRCDIR}/${MAGE_PYTHON2_SRCSUBDIR} + install -d ${MAGE_PYTHON2_SRCSUBDIR} + mv ${SRCDIR} ${MAGE_PYTHON2_SRCSUBDIR}/ || die } python2_multilib_src_prepare() @@ -32,14 +33,19 @@ munpack ${SRCFILE} || die for abi in ${MULTILIB_ABIS} do - install -d ${SRCDIR}-${abi}/${MAGE_PYTHON2_SRCSUBDIR} + install -d ${MAGE_PYTHON2_SRCSUBDIR} + mv ${SRCDIR}-${abi} ${MAGE_PYTHON2_SRCSUBDIR}/ || die done } python2_src_compile() { - cd ${SRCDIR}/${MAGE_PYTHON2_SRCSUBDIR} + local saved_SRCDIR="${SRCDIR}" + SRCDIR="${MAGE_PYTHON2_SRCSUBDIR}/$(basename ${saved_SRCDIR})" + + cd ${SRCDIR} python2_docompile || die + SRCDIR="${saved_SRCDIR}" } python2_multilib_src_compile() @@ -49,7 +55,7 @@ for abi in ${MULTILIB_ABIS} do - SRCDIR="${saved_SRCDIR}-${abi}/${MAGE_PYTHON2_SRCSUBDIR}" + SRCDIR="${MAGE_PYTHON2_SRCSUBDIR}/$(basename ${saved_SRCDIR}-${abi})" cd ${SRCDIR} abi-${abi} python2_docompile || die done @@ -63,7 +69,10 @@ python2_src_install() { - cd ${SRCDIR}/${MAGE_PYTHON2_SRCSUBDIR} + local saved_SRCDIR="${SRCDIR}" + SRCDIR="${MAGE_PYTHON2_SRCSUBDIR}/$(basename ${saved_SRCDIR})" + + cd ${SRCDIR} python2_doinstall || die local i @@ -75,6 +84,7 @@ minstalldocs ${i} || die fi done + SRCDIR="${saved_SRCDIR}" } python2_multilib_src_install() @@ -84,7 +94,7 @@ for abi in ${MULTILIB_ABIS} do - SRCDIR="${saved_SRCDIR}-${abi}/${MAGE_PYTHON2_SRCSUBDIR}" + SRCDIR="${MAGE_PYTHON2_SRCSUBDIR}/$(basename ${saved_SRCDIR}-${abi})" cd ${SRCDIR} abi-${abi} python2_doinstall || die