git: 9d3d0ed99c6a - main - editors/pluma: avoid generating "*.cpython3*.opt-2.pyc" by -OO on byte compiling

Dima Panov <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.ports
Message-ID <[email protected]>
The branch main has been updated by fluffy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9d3d0ed99c6a0ca6494a00bb062516fdf41ea36b

commit 9d3d0ed99c6a0ca6494a00bb062516fdf41ea36b
Author:     Dima Panov <[email protected]>
AuthorDate: 2026-08-13 13:29:33 +0000
Commit:     Dima Panov <[email protected]>
CommitDate: 2026-08-13 13:30:57 +0000

    editors/pluma: avoid generating "*.cpython3*.opt-2.pyc" by -OO on byte compiling
    
    It unnecessary touch and rebuild setuptools component:
    =>> Error: Filesystem touched during stage (files must install to ${STAGEDIR}):
    extra: usr/local/lib/python3.12/site-packages/_distutils_hack/__pycache__/__init__.cpython-312.opt-2.pyc
    
    Reported by:    bulk -t
---
 editors/pluma/Makefile  | 5 +++++
 editors/pluma/pkg-plist | 8 --------
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/editors/pluma/Makefile b/editors/pluma/Makefile
index 62eb1f61872b..82ff1f0131cd 100644
--- a/editors/pluma/Makefile
+++ b/editors/pluma/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	pluma
 DISTVERSION=	1.28.1
+PORTREVISION=	1
 CATEGORIES=	editors mate
 MASTER_SITES=	https://github.com/mate-desktop/${PORTNAME}/releases/download/v${DISTVERSION}/
 DIST_SUBDIR=	mate
@@ -48,4 +49,8 @@ GLIB_SCHEMAS=	org.mate.pluma.gschema.xml \
 
 OPTIONS_DEFINE=	DOCS
 
+# avoid generating "*.cpython3*.opt-2.pyc" by -OO on byte compiling
+post-patch:
+	@${REINPLACE_CMD} -e '/PYTHON/ s|-OO|-O|' ${WRKSRC}/py-compile
+
 .include <bsd.port.mk>
diff --git a/editors/pluma/pkg-plist b/editors/pluma/pkg-plist
index c1598a0fb8c3..579133e40959 100644
--- a/editors/pluma/pkg-plist
+++ b/editors/pluma/pkg-plist
@@ -27,28 +27,20 @@ lib/pluma/plugins/docinfo.plugin
 lib/pluma/plugins/externaltools.plugin
 lib/pluma/plugins/externaltools/__init__.py
 lib/pluma/plugins/externaltools/__pycache__/__init__%%PYTHON_TAG%%.opt-1.pyc
-lib/pluma/plugins/externaltools/__pycache__/__init__%%PYTHON_TAG%%.opt-2.pyc
 lib/pluma/plugins/externaltools/__pycache__/__init__%%PYTHON_TAG%%.pyc
 lib/pluma/plugins/externaltools/__pycache__/capture%%PYTHON_TAG%%.opt-1.pyc
-lib/pluma/plugins/externaltools/__pycache__/capture%%PYTHON_TAG%%.opt-2.pyc
 lib/pluma/plugins/externaltools/__pycache__/capture%%PYTHON_TAG%%.pyc
 lib/pluma/plugins/externaltools/__pycache__/filelookup%%PYTHON_TAG%%.opt-1.pyc
-lib/pluma/plugins/externaltools/__pycache__/filelookup%%PYTHON_TAG%%.opt-2.pyc
 lib/pluma/plugins/externaltools/__pycache__/filelookup%%PYTHON_TAG%%.pyc
 lib/pluma/plugins/externaltools/__pycache__/functions%%PYTHON_TAG%%.opt-1.pyc
-lib/pluma/plugins/externaltools/__pycache__/functions%%PYTHON_TAG%%.opt-2.pyc
 lib/pluma/plugins/externaltools/__pycache__/functions%%PYTHON_TAG%%.pyc
 lib/pluma/plugins/externaltools/__pycache__/library%%PYTHON_TAG%%.opt-1.pyc
-lib/pluma/plugins/externaltools/__pycache__/library%%PYTHON_TAG%%.opt-2.pyc
 lib/pluma/plugins/externaltools/__pycache__/library%%PYTHON_TAG%%.pyc
 lib/pluma/plugins/externaltools/__pycache__/linkparsing%%PYTHON_TAG%%.opt-1.pyc
-lib/pluma/plugins/externaltools/__pycache__/linkparsing%%PYTHON_TAG%%.opt-2.pyc
 lib/pluma/plugins/externaltools/__pycache__/linkparsing%%PYTHON_TAG%%.pyc
 lib/pluma/plugins/externaltools/__pycache__/manager%%PYTHON_TAG%%.opt-1.pyc
-lib/pluma/plugins/externaltools/__pycache__/manager%%PYTHON_TAG%%.opt-2.pyc
 lib/pluma/plugins/externaltools/__pycache__/manager%%PYTHON_TAG%%.pyc
 lib/pluma/plugins/externaltools/__pycache__/outputpanel%%PYTHON_TAG%%.opt-1.pyc
-lib/pluma/plugins/externaltools/__pycache__/outputpanel%%PYTHON_TAG%%.opt-2.pyc
 lib/pluma/plugins/externaltools/__pycache__/outputpanel%%PYTHON_TAG%%.pyc
 lib/pluma/plugins/externaltools/capture.py
 lib/pluma/plugins/externaltools/filelookup.py
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.