mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-28 05:29:48 +00:00
923bd8b2f8
portupgrade env variable Pointed out by: Miroslav Lachman <000.fbsd@quip.cz>
50 lines
1.1 KiB
Makefile
50 lines
1.1 KiB
Makefile
# New ports collection makefile for: python
|
|
# Date created: 08 August 1995
|
|
# Whom: jkh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
PORTNAME= python
|
|
PORTVERSION= ${PYTHON_VER}
|
|
PORTEPOCH= 2
|
|
CATEGORIES= lang python ipv6
|
|
MASTER_SITES= # empty
|
|
DISTFILES= # empty
|
|
EXTRACT_ONLY= # empty
|
|
|
|
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
|
|
|
|
do-install:
|
|
@${DO_NADA}
|
|
|
|
# Major upgrade support
|
|
PORTUPGRADE_CMD?= ${LOCALBASE}/sbin/portupgrade
|
|
PKG_WHICH_CMD?= ${LOCALBASE}/sbin/pkg_which
|
|
upgrade-site-packages:
|
|
@if [ ! -x ${PORTUPGRADE_CMD} ]; then \
|
|
${ECHO_MSG} "Please install ports-mgmt/portupgrade."; \
|
|
${FALSE}; \
|
|
fi
|
|
|
|
@for ver in `echo ${_PYTHON_ALLBRANCHES}|${SED} 's/${PYTHON_VER}//'`; do \
|
|
if [ -d ${PREFIX}/lib/python$$ver ]; then \
|
|
UPD=`${FIND} ${PREFIX}/lib/python$$ver \
|
|
-type f -print0 | \
|
|
${XARGS} -0 ${PKG_WHICH_CMD} | \
|
|
${GREP} -Fv '?' | \
|
|
${EGREP} -v '^python2?[0-5]?-2' | \
|
|
${SORT} -u`; \
|
|
if [ "$$UPD" ]; then \
|
|
${PORTUPGRADE_CMD} -f $$UPD; \
|
|
fi; \
|
|
fi; \
|
|
done \
|
|
|
|
.include <bsd.port.mk>
|