Mk: switch from PYTHON_PORTVERSION to PYTHON_DISTVERSION

This brings python framework in consistense with handbook recommendations
to prefer DISTVERSION and simplifies adding prerelease versions of
python

PR:		255013
Differential Revision:	https://reviews.freebsd.org/D29418
Exp-run by:	antoine
Approved by:	wen@, no objection from python@ or portmgr@
This commit is contained in:
Dmitry Marakasov
2021-04-09 16:28:59 +03:00
parent 40d7b48738
commit 5f69415313
19 changed files with 62 additions and 63 deletions

View File

@@ -1,11 +1,11 @@
# Created by: Kubilay Kocak <koobs@FreeBSD.org>
PORTNAME= python
PORTVERSION= ${PYTHON_PORTVERSION}
DISTVERSION= ${PYTHON_DISTVERSION}
CATEGORIES= lang python
MASTER_SITES= PYTHON/ftp/python/${PORTVERSION}
MASTER_SITES= PYTHON/ftp/python/${DISTVERSION}
PKGNAMESUFFIX= ${PYTHON_SUFFIX}
DISTNAME= Python-${PORTVERSION}
DISTNAME= Python-${DISTVERSION}
DIST_SUBDIR= python
MAINTAINER= python@FreeBSD.org
@@ -18,14 +18,14 @@ USES= compiler:c11 cpe ncurses pathfix pkgconfig readline \
PATHFIX_MAKEFILEIN= Makefile.pre.in
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
python_CMD= ${PREFIX}/bin/python${PYTHON_PORTVERSION:R}
python_CMD= ${PREFIX}/bin/python${PYTHON_DISTVERSION:R}
SHEBANG_FILES= Lib/*.py Lib/*/*.py Lib/*/*/*.py Lib/*/*/*/*.py
SHEBANG_FILES+= Lib/test/ziptestdata/exe_with_z64 \
Lib/test/ziptestdata/exe_with_zip \
Lib/test/ziptestdata/header.sh
# Duplicate python.mk variables. TODO: Let lang/python?? ports use python.mk bits.
PYTHON_VER= ${PYTHON_PORTVERSION:R}
PYTHON_VER= ${PYTHON_DISTVERSION:R}
PYTHON_VERSION= python${PYTHON_VER}
PYTHON_SUFFIX= ${PYTHON_VER:S/.//g}
@@ -46,7 +46,7 @@ SUB_LIST= PYTHON_SUFFIX=${PYTHON_SUFFIX}
PLIST_SUB= ABI=${ABIFLAGS} \
XY=${PYTHON_SUFFIX} \
XYDOT=${PYTHON_VER} \
XYZDOT=${PORTVERSION} \
XYZDOT=${DISTVERSION} \
OSMAJOR=${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} # For plat-freebsd* in pkg-plist. https://bugs.python.org/issue19554
OPTIONS_DEFINE= DEBUG IPV6 LIBFFI LIBMPDEC NLS PYMALLOC

View File

@@ -2,4 +2,4 @@
# Do not forget to update python documentation (lang/python-doc-*)
# Run "make -C lang/python-doc-html makesum"
PYTHON_PORTVERSION= 3.9.5
PYTHON_DISTVERSION= 3.9.5