diff options
author | mva <mva@FreeBSD.org> | 2013-08-18 03:10:59 +0800 |
---|---|---|
committer | mva <mva@FreeBSD.org> | 2013-08-18 03:10:59 +0800 |
commit | 120b0d35293d8e00d39d7ad2ad7d574983111671 (patch) | |
tree | 5fb4dff170d638784a5c9228ee0855dbe6de4641 /lang/python | |
parent | e67297db9d1ad0fca3185a3d0c121af1e8ec2e24 (diff) | |
download | freebsd-ports-gnome-120b0d35293d8e00d39d7ad2ad7d574983111671.tar.gz freebsd-ports-gnome-120b0d35293d8e00d39d7ad2ad7d574983111671.tar.zst freebsd-ports-gnome-120b0d35293d8e00d39d7ad2ad7d574983111671.zip |
- Move the symlink magic for the default python version into lang/python
and lang/python2 and lang/python3. This change brings us closer to the goal
of making Python ports usable with different Python versions at the same
time.
- Add a new lang/python2 port to handle the symlinks for bin/python2,
bin/idle2, bin/pydoc2 and so on.
- Add a new lang/python3 port to handle the symlinks for bin/python3,
bin/idle3, bin/pydoc3 and so on.
- Bump the PORTREVISION on all lang/python* ports.
Diffstat (limited to 'lang/python')
-rw-r--r-- | lang/python/Makefile | 43 |
1 files changed, 35 insertions, 8 deletions
diff --git a/lang/python/Makefile b/lang/python/Makefile index b6f47d05dc20..bf77a20c7f21 100644 --- a/lang/python/Makefile +++ b/lang/python/Makefile @@ -1,9 +1,5 @@ -# New ports collection makefile for: python -# Date created: 08 August 1995 -# Whom: jkh -# +# Created by: jkh # $FreeBSD$ -# PORTNAME= python PORTVERSION= ${PYTHON_VER} @@ -17,11 +13,42 @@ MAINTAINER= python@FreeBSD.org COMMENT= The "meta-port" for the default version of Python interpreter USE_PYTHON_RUN= yes -PYTHON_VERSION= ${PYTHON_DEFAULT_VERSION} NO_BUILD= yes +PLIST_FILES= bin/2to3 \ + bin/idle \ + bin/pydoc \ + bin/python \ + bin/python-config \ + bin/python-shared \ + bin/python-shared-config + +.include <bsd.port.pre.mk> + +.if ${PYTHON_MAJOR_VER} == 2 +RUN_DEPENDS+= python2:${PORTSDIR}/lang/python2 +PLIST_FILES+= bin/smtpd.py +.elif ${PYTHON_MAJOR_VER} == 3 +RUN_DEPENDS+= python3:${PORTSDIR}/lang/python3 +.endif + do-install: - @${DO_NADA} +.for file in python python-shared + ${LN} -sf ${PREFIX}/bin/${file}${PYTHON_MAJOR_VER} ${PREFIX}/bin/${file} +.endfor + ${LN} -sf ${PREFIX}/bin/2to3-${PYTHON_MAJOR_VER} ${PREFIX}/bin/2to3 +.if ${PYTHON_MAJOR_VER} == 2 + ${LN} -sf ${PREFIX}/bin/smtpd${PYTHON_MAJOR_VER}.py ${PREFIX}/bin/smtpd.py +.for file in idle pydoc + ${LN} -sf ${PREFIX}/bin/${file}${PYTHON_MAJOR_VER} ${PREFIX}/bin/${file} +.endfor +.elif ${PYTHON_MAJOR_VER} == 3 +.for file in idle pydoc + ${LN} -sf ${PREFIX}/bin/${file}${PYTHON_MAJOR_VER}-${PYTHON_VER} ${PREFIX}/bin/${file} +.endfor +.endif + ${LN} -sf ${PREFIX}/bin/python${PYTHON_MAJOR_VER}-config ${PREFIX}/bin/python-config + ${LN} -sf ${PREFIX}/bin/python-shared${PYTHON_MAJOR_VER}-config ${PREFIX}/bin/python-shared-config # Major upgrade support PORTUPGRADE_CMD= ${LOCALBASE}/sbin/portupgrade @@ -61,4 +88,4 @@ upgrade-site-packages: fi; \ fi; \ -.include <bsd.port.mk> +.include <bsd.port.post.mk> |