Index: Mk/Uses/trigger.mk =================================================================== --- Mk/Uses/trigger.mk +++ Mk/Uses/trigger.mk @@ -10,20 +10,21 @@ .if !defined(_INCLUDE_USES_TRIGGER_MK) _INCLUDE_USES_TRIGGER_MK= yes -. if !empty(trigger_ARGS) -IGNORE= Incorrect 'USES+= trigger:${trigger_ARGS}' trigger takes no arguments +_flavored= # +. if !empty(trigger_ARGS:Mflavored) +_flavored= -${FLAVOR} . endif TRIGGERS?= ${PORTNAME} . for t in ${TRIGGERS} SUB_FILES+= ${t}.ucl -PLIST_FILES+= ${LOCALBASE}/share/pkg/triggers/$t.ucl +PLIST_FILES+= ${LOCALBASE}/share/pkg/triggers/$t${_flavored}.ucl . endfor _USES_install+= 601:trigger-post-install trigger-post-install: ${MKDIR} ${STAGEDIR}${LOCALBASE}/share/pkg/triggers . for t in ${TRIGGERS} - ${INSTALL_DATA} ${WRKDIR}/$t.ucl ${STAGEDIR}${LOCALBASE}/share/pkg/triggers/ + ${INSTALL_DATA} ${WRKDIR}/$t.ucl ${STAGEDIR}${LOCALBASE}/share/pkg/triggers/$t${_flavored}.ucl . endfor .endif Index: lang/Makefile =================================================================== --- lang/Makefile +++ lang/Makefile @@ -285,6 +285,7 @@ SUBDIR += python-doc-pdf-letter SUBDIR += python-doc-text SUBDIR += python-mode.el + SUBDIR += python-pycache SUBDIR += python-tools SUBDIR += python2 SUBDIR += python27 Index: lang/python-pycache/Makefile =================================================================== --- /dev/null +++ lang/python-pycache/Makefile @@ -0,0 +1,26 @@ +PORTNAME= python-pycache +PORTVERSION= 0.0.1 +PKGNAMESUFFIX= ${PYTHON_PKGNAMESUFFIX} + +CATEGORIES= lang + +MAINTAINER= portmgr@FreeBSD.org +COMMENT= Trigger to recreate python precompiled bytecode + +USES= metaport trigger:flavored python:env +USE_PYTHON= flavors +TRIGGERS= python-update-cache + + +SUB_LIST= PYTHON_CMD=${PYTHON_CMD} \ + NEW_CACHE_CMD=${_NEW_CACHE_CMD} + +.include + +.if ${PYTHON_VER:M3.7} || ${PYTHON_VER:M3.8} +_NEW_CACHE_CMD= false +.else +_NEW_CACHE_CMD= true +.endif + +.include Index: lang/python-pycache/files/python-update-cache.ucl.in =================================================================== --- /dev/null +++ lang/python-pycache/files/python-update-cache.ucl.in @@ -0,0 +1,93 @@ +path_glob: "%%PYTHON_SITELIBDIR%%/*" + +trigger: { + type: lua + sandbox: false + script: <=0:lang/python-pycache@${PY_FLAVOR} USES= compiler:c11 cpe ncurses pathfix pkgconfig \ python:${PYTHON_DISTVERSION:R},env readline shebangfix ssl tar:xz Index: lang/python311/Makefile =================================================================== --- lang/python311/Makefile +++ lang/python311/Makefile @@ -1,6 +1,6 @@ PORTNAME= python DISTVERSION= ${PYTHON_DISTVERSION} -PORTREVISION= 2 +PORTREVISION= 4 CATEGORIES= lang python MASTER_SITES= PYTHON/ftp/python/${DISTVERSION:C/[a-z].*//} PKGNAMESUFFIX= ${PYTHON_SUFFIX} @@ -14,6 +14,7 @@ LICENSE= PSFL LIB_DEPENDS= libffi.so:devel/libffi +RUN_DEPENDS= python-pycache${PYTHON_PKGNAMESUFFIX}>=0:lang/python-pycache@${PY_FLAVOR} USES= compiler:c11 cpe ncurses pathfix pkgconfig \ python:${PYTHON_DISTVERSION:R},env readline shebangfix ssl tar:xz Index: lang/python37/Makefile =================================================================== --- lang/python37/Makefile +++ lang/python37/Makefile @@ -1,6 +1,6 @@ PORTNAME= python DISTVERSION= ${PYTHON_DISTVERSION} -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= lang python MASTER_SITES= PYTHON/ftp/python/${DISTVERSION} PKGNAMESUFFIX= ${PYTHON_SUFFIX} @@ -18,6 +18,7 @@ LIB_DEPENDS= libffi.so:devel/libffi \ libmpdec.so:math/mpdecimal +RUN_DEPENDS= python-pycache${PYTHON_PKGNAMESUFFIX}>=0:lang/python-pycache@${PY_FLAVOR} USES= cpe ncurses pathfix pkgconfig python:${PYTHON_DISTVERSION:R},env readline \ shebangfix ssl tar:xz Index: lang/python38/Makefile =================================================================== --- lang/python38/Makefile +++ lang/python38/Makefile @@ -1,6 +1,6 @@ PORTNAME= python DISTVERSION= ${PYTHON_DISTVERSION} -PORTREVISION= 2 +PORTREVISION= 4 CATEGORIES= lang python MASTER_SITES= PYTHON/ftp/python/${DISTVERSION} PKGNAMESUFFIX= ${PYTHON_SUFFIX} @@ -14,6 +14,7 @@ LICENSE= PSFL LIB_DEPENDS= libffi.so:devel/libffi +RUN_DEPENDS= python-pycache${PYTHON_PKGNAMESUFFIX}>=0:lang/python-pycache@${PY_FLAVOR} USES= cpe ncurses pathfix pkgconfig python:${PYTHON_DISTVERSION:R},env readline \ shebangfix ssl tar:xz Index: lang/python39/Makefile =================================================================== --- lang/python39/Makefile +++ lang/python39/Makefile @@ -1,6 +1,6 @@ PORTNAME= python DISTVERSION= ${PYTHON_DISTVERSION} -PORTREVISION= 2 +PORTREVISION= 4 CATEGORIES= lang python MASTER_SITES= PYTHON/ftp/python/${DISTVERSION} PKGNAMESUFFIX= ${PYTHON_SUFFIX} @@ -14,6 +14,7 @@ LICENSE= PSFL LIB_DEPENDS= libffi.so:devel/libffi +RUN_DEPENDS= python-pycache${PYTHON_PKGNAMESUFFIX}>=0:lang/python-pycache@${PY_FLAVOR} USES= compiler:c11 cpe ncurses pathfix pkgconfig \ python:${PYTHON_DISTVERSION:R},env readline shebangfix ssl tar:xz