git: 581e099a8d05 - main - science/{,py-}phonopy: update 3.4.0 → 3.5.1

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Fri, 24 Apr 2026 08:34:02 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=581e099a8d05ea8fa2bcd1cc11234b1f8d7b0272

commit 581e099a8d05ea8fa2bcd1cc11234b1f8d7b0272
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-04-24 07:53:41 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-04-24 08:33:35 +0000

    science/{,py-}phonopy: update 3.4.0 → 3.5.1
---
 science/phonopy/Makefile                        |  2 +-
 science/phonopy/distinfo                        |  6 +++---
 science/py-phonopy/Makefile                     | 21 +++++----------------
 science/py-phonopy/distinfo                     |  6 +++---
 science/py-phonopy/files/patch-test_conftest.py | 23 +++++++++++++++++++++++
 5 files changed, 35 insertions(+), 23 deletions(-)

diff --git a/science/phonopy/Makefile b/science/phonopy/Makefile
index be8c4ead95fd..dfe8e60a441f 100644
--- a/science/phonopy/Makefile
+++ b/science/phonopy/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	phonopy
 DISTVERSIONPREFIX=	v
-DISTVERSION=	3.4.0
+DISTVERSION=	3.5.1
 CATEGORIES=	science python
 
 MAINTAINER=	yuri@FreeBSD.org
diff --git a/science/phonopy/distinfo b/science/phonopy/distinfo
index 7a6c5a2b9ab1..c349b0fdb493 100644
--- a/science/phonopy/distinfo
+++ b/science/phonopy/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1774757814
-SHA256 (phonopy-phonopy-v3.4.0_GH0.tar.gz) = 021c8b4100540dbd3cb0fb4cef9e060a2339ab0c92b7033259de1cad9e42ae1d
-SIZE (phonopy-phonopy-v3.4.0_GH0.tar.gz) = 8136328
+TIMESTAMP = 1777008346
+SHA256 (phonopy-phonopy-v3.5.1_GH0.tar.gz) = 2aeaf0e363054c61e12b4948207cec5ddd70a50b68c9520fe813fe1e65439e2a
+SIZE (phonopy-phonopy-v3.5.1_GH0.tar.gz) = 8136506
diff --git a/science/py-phonopy/Makefile b/science/py-phonopy/Makefile
index 566821844f21..d680aff30ef0 100644
--- a/science/py-phonopy/Makefile
+++ b/science/py-phonopy/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	phonopy
-DISTVERSION=	3.4.0
-PORTREVISION=	1
+DISTVERSION=	3.5.1
 CATEGORIES=	science python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -35,19 +34,9 @@ TEST_WRKSRC=	${WRKSRC}/test
 post-install:
 	@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/phonopy/_phonopy${PYTHON_TAG}.so
 
-# tests as of 3.0.1: (see https://github.com/phonopy/phonopy/issues/739)
-# Results (47.21s):
-#         26 failed
-#        183 passed
-#          6 skipped
-#         53 warnings
-#        272 errors
-
-# tests as of 3.4.0:
-# Results (59.91s):
-#        380 failed
-#       1997 passed
-#         22 skipped
-#         52 warnings
+# tests as of 3.5.1:
+# Results (64.10s (0:01:04)):
+#      880 passed
+#       22 skipped
 
 .include <bsd.port.mk>
diff --git a/science/py-phonopy/distinfo b/science/py-phonopy/distinfo
index df4fa0631068..45a200b76146 100644
--- a/science/py-phonopy/distinfo
+++ b/science/py-phonopy/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1774759850
-SHA256 (phonopy-3.4.0.tar.gz) = a4adc0ad23758c2b2459cd2ecf3c37a91a70fc7276bf83d79a853d36a80a15e3
-SIZE (phonopy-3.4.0.tar.gz) = 5127145
+TIMESTAMP = 1777015315
+SHA256 (phonopy-3.5.1.tar.gz) = 37869c383d0b1fa1355f17a1bb3599479406530d730791d71dc16186848db196
+SIZE (phonopy-3.5.1.tar.gz) = 5128062
diff --git a/science/py-phonopy/files/patch-test_conftest.py b/science/py-phonopy/files/patch-test_conftest.py
new file mode 100644
index 000000000000..af2e20741878
--- /dev/null
+++ b/science/py-phonopy/files/patch-test_conftest.py
@@ -0,0 +1,23 @@
+-- Fix test crash by setting matplotlib to use non-interactive Agg backend.
+-- This prevents segmentation faults when matplotlib tries to use GTK4 backend
+-- in a headless FreeBSD environment during test execution.
+-- See: https://github.com/phonopy/phonopy/issues/???
+
+--- test/conftest.py.orig	2026-04-24 07:29:40 UTC
++++ test/conftest.py
+@@ -5,12 +5,15 @@ from collections.abc import Callable
+ import pathlib
+ from collections.abc import Callable
+ 
++import matplotlib
+ import numpy as np
+ import pytest
+ 
+ import phonopy
+ from phonopy import Phonopy
+ from phonopy.structure.atoms import PhonopyAtoms
++
++matplotlib.use("Agg")
+ 
+ cwd = pathlib.Path(__file__).parent
+