From 6dcf3e31b6b85f42dd20aa65ed6bdb66faa6d15b Mon Sep 17 00:00:00 2001 From: Po-Chuan Hsieh Date: Sun, 29 Jun 2025 19:26:13 +0800 Subject: [PATCH] textproc/py-sphinx-last-updated-by-git: Add py-sphinx-last-updated-by-git 0.3.8 This is a little Sphinx extension that does exactly that. It also checks for included files and other dependencies and uses their "last updated" time if it's more recent. For each file, the "author date" of the Git commit where it was last changed is taken to be its "last updated" time. Uncommitted changes are ignored. If a page doesn't have a source file, its last_updated time is set to None. The default value for html_last_updated_fmt is changed from None to the empty string. --- textproc/Makefile | 1 + .../py-sphinx-last-updated-by-git/Makefile | 25 +++++++++++++++++++ .../py-sphinx-last-updated-by-git/distinfo | 3 +++ .../py-sphinx-last-updated-by-git/pkg-descr | 10 ++++++++ 4 files changed, 39 insertions(+) create mode 100644 textproc/py-sphinx-last-updated-by-git/Makefile create mode 100644 textproc/py-sphinx-last-updated-by-git/distinfo create mode 100644 textproc/py-sphinx-last-updated-by-git/pkg-descr diff --git a/textproc/Makefile b/textproc/Makefile index 21abfbea3743..6cff74d5d6ff 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -1606,6 +1606,7 @@ SUBDIR += py-sphinx-inline-tabs SUBDIR += py-sphinx-intl SUBDIR += py-sphinx-issues + SUBDIR += py-sphinx-last-updated-by-git SUBDIR += py-sphinx-markdown-tables SUBDIR += py-sphinx-material SUBDIR += py-sphinx-me diff --git a/textproc/py-sphinx-last-updated-by-git/Makefile b/textproc/py-sphinx-last-updated-by-git/Makefile new file mode 100644 index 000000000000..53c636331656 --- /dev/null +++ b/textproc/py-sphinx-last-updated-by-git/Makefile @@ -0,0 +1,25 @@ +PORTNAME= sphinx-last-updated-by-git +PORTVERSION= 0.3.8 +CATEGORIES= textproc python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +DISTNAME= sphinx_last_updated_by_git-${PORTVERSION} + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Get the "last updated" time for each Sphinx page from Git +WWW= https://github.com/mgeier/sphinx-last-updated-by-git + +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=40.8.0:devel/py-setuptools@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} +RUN_DEPENDS= git:devel/git \ + ${PYTHON_PKGNAMEPREFIX}sphinx>=1.8,1:textproc/py-sphinx@${PY_FLAVOR} + +USES= python +USE_PYTHON= autoplist concurrent pep517 + +NO_ARCH= yes + +.include diff --git a/textproc/py-sphinx-last-updated-by-git/distinfo b/textproc/py-sphinx-last-updated-by-git/distinfo new file mode 100644 index 000000000000..73ffc5421892 --- /dev/null +++ b/textproc/py-sphinx-last-updated-by-git/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1750954098 +SHA256 (sphinx_last_updated_by_git-0.3.8.tar.gz) = c145011f4609d841805b69a9300099fc02fed8f5bb9e5bcef77d97aea97b7761 +SIZE (sphinx_last_updated_by_git-0.3.8.tar.gz) = 10785 diff --git a/textproc/py-sphinx-last-updated-by-git/pkg-descr b/textproc/py-sphinx-last-updated-by-git/pkg-descr new file mode 100644 index 000000000000..f190d3842575 --- /dev/null +++ b/textproc/py-sphinx-last-updated-by-git/pkg-descr @@ -0,0 +1,10 @@ +This is a little Sphinx extension that does exactly that. It also checks for +included files and other dependencies and uses their "last updated" time if it's +more recent. For each file, the "author date" of the Git commit where it was +last changed is taken to be its "last updated" time. Uncommitted changes are +ignored. + +If a page doesn't have a source file, its last_updated time is set to None. + +The default value for html_last_updated_fmt is changed from None to the empty +string.