2013-08-17 19:10:59 +00:00
|
|
|
# Created by: jkh
|
1999-08-25 06:35:40 +00:00
|
|
|
# $FreeBSD$
|
1995-08-08 22:09:07 +00:00
|
|
|
|
2000-04-12 06:21:15 +00:00
|
|
|
PORTNAME= python
|
2013-11-03 15:24:26 +00:00
|
|
|
PORTVERSION= ${PYTHON_DEFAULT}
|
2014-08-04 05:49:35 +00:00
|
|
|
PORTREVISION= 2
|
2007-07-30 09:42:28 +00:00
|
|
|
PORTEPOCH= 2
|
2002-04-02 11:55:20 +00:00
|
|
|
CATEGORIES= lang python ipv6
|
2006-10-09 14:29:18 +00:00
|
|
|
MASTER_SITES= # empty
|
|
|
|
DISTFILES= # empty
|
|
|
|
EXTRACT_ONLY= # empty
|
1998-04-08 09:23:59 +00:00
|
|
|
|
2006-10-09 14:29:18 +00:00
|
|
|
MAINTAINER= python@FreeBSD.org
|
2007-07-30 09:42:28 +00:00
|
|
|
COMMENT= The "meta-port" for the default version of Python interpreter
|
1995-08-08 22:09:07 +00:00
|
|
|
|
2014-10-20 17:52:16 +00:00
|
|
|
USES= python:run
|
|
|
|
NO_BUILD= yes
|
1995-08-09 01:30:00 +00:00
|
|
|
|
2013-08-17 19:10:59 +00:00
|
|
|
PLIST_FILES= bin/2to3 \
|
|
|
|
bin/idle \
|
|
|
|
bin/pydoc \
|
|
|
|
bin/python \
|
2014-08-04 05:49:35 +00:00
|
|
|
bin/python-config
|
2013-08-17 19:10:59 +00:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
.if ${PYTHON_MAJOR_VER} == 2
|
2016-04-01 14:08:37 +00:00
|
|
|
RUN_DEPENDS+= python2:lang/python2
|
2013-08-17 19:10:59 +00:00
|
|
|
.elif ${PYTHON_MAJOR_VER} == 3
|
2016-04-01 14:08:37 +00:00
|
|
|
RUN_DEPENDS+= python3:lang/python3
|
2013-08-17 19:10:59 +00:00
|
|
|
.endif
|
|
|
|
|
2007-07-30 09:42:28 +00:00
|
|
|
do-install:
|
2014-08-04 05:49:35 +00:00
|
|
|
${LN} -sf python${PYTHON_MAJOR_VER} ${STAGEDIR}${PREFIX}/bin/python
|
2014-01-25 09:15:12 +00:00
|
|
|
${LN} -sf 2to3-${PYTHON_MAJOR_VER} ${STAGEDIR}${PREFIX}/bin/2to3
|
2013-08-17 19:10:59 +00:00
|
|
|
.if ${PYTHON_MAJOR_VER} == 2
|
|
|
|
.for file in idle pydoc
|
2014-01-25 09:15:12 +00:00
|
|
|
${LN} -sf ${file}${PYTHON_MAJOR_VER} ${STAGEDIR}${PREFIX}/bin/${file}
|
2013-08-17 19:10:59 +00:00
|
|
|
.endfor
|
|
|
|
.elif ${PYTHON_MAJOR_VER} == 3
|
|
|
|
.for file in idle pydoc
|
2014-01-25 09:15:12 +00:00
|
|
|
${LN} -sf ${file}${PYTHON_MAJOR_VER}-${PYTHON_VER} \
|
2014-01-25 08:46:11 +00:00
|
|
|
${STAGEDIR}${PREFIX}/bin/${file}
|
2013-08-17 19:10:59 +00:00
|
|
|
.endfor
|
|
|
|
.endif
|
2014-01-25 09:15:12 +00:00
|
|
|
${LN} -sf python${PYTHON_MAJOR_VER}-config \
|
2014-01-25 08:46:11 +00:00
|
|
|
${STAGEDIR}${PREFIX}/bin/python-config
|
2003-09-26 04:24:56 +00:00
|
|
|
|
2006-10-09 14:29:18 +00:00
|
|
|
# Major upgrade support
|
2009-06-11 13:29:23 +00:00
|
|
|
PORTUPGRADE_CMD= ${LOCALBASE}/sbin/portupgrade
|
|
|
|
|
|
|
|
.if defined(USE_PORTMASTER)
|
|
|
|
PORTUPGRADE_CMD= ${LOCALBASE}/sbin/portmaster
|
|
|
|
.endif
|
|
|
|
|
2012-10-03 09:18:51 +00:00
|
|
|
PKG_LIST= ${PKG_BIN} query -a '%n-%v'
|
|
|
|
PKG_LIST_FILES= ${PKG_INFO} -l
|
|
|
|
|
2004-12-06 05:28:34 +00:00
|
|
|
upgrade-site-packages:
|
2007-07-31 16:28:32 +00:00
|
|
|
@if [ ! -x ${PORTUPGRADE_CMD} ]; then \
|
2007-02-05 01:08:46 +00:00
|
|
|
${ECHO_MSG} "Please install ports-mgmt/portupgrade."; \
|
2004-12-06 05:28:34 +00:00
|
|
|
${FALSE}; \
|
|
|
|
fi
|
|
|
|
|
2012-09-27 13:52:53 +00:00
|
|
|
@GREP_ARGS="-q"; \
|
|
|
|
for ver in `echo ${_PYTHON_ALLBRANCHES:C/${PYTHON_VER}//}`; do \
|
|
|
|
GREP_ARGS="$${GREP_ARGS} -e lib/python$$ver"; \
|
|
|
|
done; \
|
|
|
|
UPD=""; \
|
2012-10-03 09:18:51 +00:00
|
|
|
for pkg in `${PKG_LIST}`; do \
|
|
|
|
${PKG_LIST_FILES} $${pkg} | ${GREP} $${GREP_ARGS} && \
|
2012-09-27 13:52:53 +00:00
|
|
|
UPD="$${UPD} $${pkg}"; \
|
|
|
|
done; \
|
|
|
|
if [ "$${UPD}" ]; then \
|
|
|
|
if [ -n ${PORTUPGRADE_ARGS} ]; then \
|
|
|
|
${PORTUPGRADE_CMD} ${PORTUPGRADE_ARGS} -f $${UPD}; \
|
|
|
|
else \
|
|
|
|
${PORTUPGRADE_CMD} -f $${UPD}; \
|
2007-07-30 09:42:28 +00:00
|
|
|
fi; \
|
2012-09-27 13:52:53 +00:00
|
|
|
fi; \
|
2007-07-30 09:42:28 +00:00
|
|
|
|
2013-08-17 19:10:59 +00:00
|
|
|
.include <bsd.port.post.mk>
|