aboutsummaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorChris Rees <crees@FreeBSD.org>2013-06-29 11:43:01 +0000
committerChris Rees <crees@FreeBSD.org>2013-06-29 11:43:01 +0000
commit3d119ba51424ce93a2438f61ee1e1e8c26ba2e70 (patch)
tree39c7d98f28cfc84d097ffe5d01fc8a6f6d7dccf7 /Mk
parent1aa275054167fc6a86d2eeace0542f448a4c80f0 (diff)
downloadports-3d119ba51424ce93a2438f61ee1e1e8c26ba2e70.tar.gz
ports-3d119ba51424ce93a2438f61ee1e1e8c26ba2e70.zip
Notes
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.python.mk22
1 files changed, 10 insertions, 12 deletions
diff --git a/Mk/bsd.python.mk b/Mk/bsd.python.mk
index 2c9fbfa26792..3751d4404ffc 100644
--- a/Mk/bsd.python.mk
+++ b/Mk/bsd.python.mk
@@ -171,7 +171,7 @@ Python_Include_MAINTAINER= python@FreeBSD.org
#
# PYEASYINSTALL_OSARCH
# - Platform identifier for easy_install.
-# default: -${OPSYS:L}-${_OSRELEASE}-${ARCH}
+# default: -${OPSYS:L}-${OSVERSION:C/([0-9]*)[0-9]{5}/\1/}-${ARCH}
# if PYEASYINSTALL_ARCHDEP is defined.
#
# PYEASYINSTALL_CMD - Full file path to easy_install command.
@@ -476,10 +476,8 @@ MAKE_ENV+= PYTHONPATH=${PYEASYINSTALL_SITELIBDIR}
.endif
.if defined(PYEASYINSTALL_ARCHDEP)
-.if !defined(_OSRELEASE)
-_OSRELEASE!= ${UNAME} -r
-.endif
-PYEASYINSTALL_OSARCH?= -${OPSYS:L}-${_OSRELEASE}-${ARCH}
+PYEASYINSTALL_OSARCH?= -${OPSYS:L}-${OSVERSION:C/([0-9]*)[0-9]{5}/\1/}-${ARCH}
+MAKE_ENV+= _PYTHON_HOST_PLATFORM=${PYEASYINSTALL_OSARCH}
.endif
PYEASYINSTALL_EGG?= ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-py${PYTHON_VER}${PYEASYINSTALL_OSARCH}.egg
PYEASYINSTALL_CMD?= ${LOCALBASE}/bin/easy_install-${PYTHON_VER}
@@ -502,13 +500,13 @@ pre-install-easyinstall:
add-plist-post: add-plist-easyinstall
add-plist-easyinstall:
- @# @unexec line must be located before any other line while @exec must not.
- @${CAT} ${TMPPLIST} > ${TMPPLIST}.pei_tmp
- @${ECHO_CMD} "@unexec ${PYEASYINSTALL_CMD} ${PYEASYINSTALL_UNINSTALLARGS}" \
- > ${TMPPLIST}
- @${CAT} ${TMPPLIST}.pei_tmp >> ${TMPPLIST}
- @${ECHO_CMD} "@exec ${SETENV} PYTHONPATH=${PYEASYINSTALL_SITELIBDIR} \
- ${PYEASYINSTALL_CMD} ${PYEASYINSTALL_INSTALLARGS}" \
+ @# Easiest to fake pyeasyinstall, or it complains about paths
+ @${ECHO_CMD} "@unexec ${REINPLACE_CMD} -i '' \
+ -e '\,^\./${PYEASYINSTALL_EGG}$$,d' \
+ ${PYEASYINSTALL_SITELIBDIR}/easy-install.pth" \
+ >> ${TMPPLIST}
+ @${ECHO_CMD} "@exec ${PRINTF} '1a\n./${PYEASYINSTALL_EGG}\n.\nw\nq\n' | \
+ /bin/ed ${PYEASYINSTALL_SITELIBDIR}/easy-install.pth" \
>> ${TMPPLIST}
.endif # defined(USE_PYDISTUTILS) && ${USE_PYDISTUTILS} == "easy_install"