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= yes +.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/python310/files/python3.10.ucl.in =================================================================== --- /dev/null +++ lang/python310/files/python3.10.ucl.in @@ -0,0 +1,62 @@ +path_glob: "%%PYTHON_SITELIBDIR%%/*" +cleanup: { + 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/files/python3.11.ucl.in =================================================================== --- /dev/null +++ lang/python311/files/python3.11.ucl.in @@ -0,0 +1,62 @@ +path_glob: "%%PYTHON_SITELIBDIR%%/*" +cleanup: { + type: lua + sandbox: false + script: <=0:lang/python-pycache@${PY_FLAVOR} USES= cpe ncurses pathfix pkgconfig python:${PYTHON_DISTVERSION:R},env readline \ shebangfix ssl tar:xz Index: lang/python37/files/python3.7.ucl.in =================================================================== --- /dev/null +++ lang/python37/files/python3.7.ucl.in @@ -0,0 +1,64 @@ +path_glob: "%%PYTHON_SITELIBDIR%%/*" +cleanup: { + type: lua + sandbox: false + script: <=0:lang/python-pycache@${PY_FLAVOR} USES= cpe ncurses pathfix pkgconfig python:${PYTHON_DISTVERSION:R},env readline \ shebangfix ssl tar:xz Index: lang/python38/files/python3.8.ucl.in =================================================================== --- /dev/null +++ lang/python38/files/python3.8.ucl.in @@ -0,0 +1,64 @@ +path_glob: "%%PYTHON_SITELIBDIR%%/*" +cleanup: { + 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