git: efcb7dd0a785 - main - science/q: Fix build with GCC 15 on 16

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Tue, 21 Jul 2026 05:45:27 UTC
The branch main has been updated by yuri:

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

commit efcb7dd0a785584171e782bac919563cb8e89952
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-07-21 05:38:43 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-07-21 05:38:43 +0000

    science/q: Fix build with GCC 15 on 16
    
    PR:             293339
    Reported by:    Lorenzo Salvadore <salvadore@freebsd.org>
---
 science/q/Makefile             |  2 +-
 science/q/files/patch-qdyn.f90 | 38 ++++++++++++++++++++++++++++++++++++++
 science/q/files/patch-qpi.f90  | 38 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 77 insertions(+), 1 deletion(-)

diff --git a/science/q/Makefile b/science/q/Makefile
index 19152626bfc1..0d071722ae4c 100644
--- a/science/q/Makefile
+++ b/science/q/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	q
 DISTVERSIONPREFIX=	v
 DISTVERSION=	6.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	science
 
 MAINTAINER=	yuri@FreeBSD.org
diff --git a/science/q/files/patch-qdyn.f90 b/science/q/files/patch-qdyn.f90
new file mode 100644
index 000000000000..ae4ad762277c
--- /dev/null
+++ b/science/q/files/patch-qdyn.f90
@@ -0,0 +1,38 @@
+--- qdyn.f90.orig	2026-07-21 05:13:28 UTC
++++ qdyn.f90
+@@ -218,29 +218,26 @@ end program Qdyn6
+ 
+ ! signal handlers
+ 
+-INTEGER(4) FUNCTION sigint_handler(sig_num)
++SUBROUTINE sigint_handler(sig_num)
+   use MD
+   implicit none
+   INTEGER(4)					:: sig_num
+ 
+   call die('user request (control-C)')
+-  sigint_handler = 1
+-END FUNCTION sigint_handler
++END SUBROUTINE sigint_handler
+ 
+-INTEGER(4) FUNCTION sigkill_handler(sig_num)
++SUBROUTINE sigkill_handler(sig_num)
+   use MD
+   implicit none
+   INTEGER(4)					:: sig_num
+ 
+   call die('kill signal')
+-  sigkill_handler = 1
+-END FUNCTION sigkill_handler
++END SUBROUTINE sigkill_handler
+ 
+-INTEGER(4) FUNCTION sigabrt_handler(sig_num)
++SUBROUTINE sigabrt_handler(sig_num)
+   use MD
+   implicit none
+   INTEGER(4)					:: sig_num
+ 
+   call die('kill signal')
+-  sigabrt_handler = 1
+-END FUNCTION sigabrt_handler
++END SUBROUTINE sigabrt_handler
diff --git a/science/q/files/patch-qpi.f90 b/science/q/files/patch-qpi.f90
new file mode 100644
index 000000000000..3eb6efb8c066
--- /dev/null
+++ b/science/q/files/patch-qpi.f90
@@ -0,0 +1,38 @@
+--- qpi.f90.orig	2017-11-19 12:13:54 UTC
++++ qpi.f90
+@@ -209,29 +209,26 @@ end program QPI6
+ 
+ ! signal handlers
+ 
+-INTEGER(4) FUNCTION sigint_handler(sig_num)
++SUBROUTINE sigint_handler(sig_num)
+   use QCP
+   implicit none
+   INTEGER(4)					:: sig_num
+ 
+   call die('user request (control-C)')
+-  sigint_handler = 1
+-END FUNCTION sigint_handler
++END SUBROUTINE sigint_handler
+ 
+-INTEGER(4) FUNCTION sigkill_handler(sig_num)
++SUBROUTINE sigkill_handler(sig_num)
+   use QCP
+   implicit none
+   INTEGER(4)					:: sig_num
+ 
+   call die('kill signal')
+-  sigkill_handler = 1
+-END FUNCTION sigkill_handler
++END SUBROUTINE sigkill_handler
+ 
+-INTEGER(4) FUNCTION sigabrt_handler(sig_num)
++SUBROUTINE sigabrt_handler(sig_num)
+   use QCP
+   implicit none
+   INTEGER(4)					:: sig_num
+ 
+   call die('kill signal')
+-  sigabrt_handler = 1
+-END FUNCTION sigabrt_handler
++END SUBROUTINE sigabrt_handler