git: d02d0110f1d1 - main - science/multiwfn: Fix build failure due to missing makefile dependency

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Mon, 06 May 2024 19:28:20 UTC
The branch main has been updated by yuri:

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

commit d02d0110f1d133f703f8b5649b7a0d11d7eb24f8
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-05-06 14:44:28 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-05-06 19:28:15 +0000

    science/multiwfn: Fix build failure due to missing makefile dependency
    
    Reported by:    fallout
---
 science/multiwfn/Makefile             |  2 --
 science/multiwfn/files/patch-Makefile | 17 +++++++++++++----
 2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/science/multiwfn/Makefile b/science/multiwfn/Makefile
index c7e0470a16a4..35630a783446 100644
--- a/science/multiwfn/Makefile
+++ b/science/multiwfn/Makefile
@@ -39,8 +39,6 @@ ALL_TARGET=	default
 
 DISLIN_VERSION=	11.5
 
-MAKE_JOBS_UNSAFE=	yes # fix build on quarterly (not latest) when mod_2f2.mod isn't found due to commands mis-order
-
 BINARY_ALIAS=	ifort=gfortran${GCC_DEFAULT} \
 		gcc=${CC}
 
diff --git a/science/multiwfn/files/patch-Makefile b/science/multiwfn/files/patch-Makefile
index 00ff10bae181..9c38fc1f94f2 100644
--- a/science/multiwfn/files/patch-Makefile
+++ b/science/multiwfn/files/patch-Makefile
@@ -1,6 +1,6 @@
 --- Makefile.orig	2023-02-06 10:17:38 UTC
 +++ Makefile
-@@ -1,6 +1,6 @@
+@@ -1,6 +1,6 @@ SIMD = -msse3
  SIMD = -msse3
 -OPT = -O2 -qopenmp -qopenmp-link=static -threads -qopt-matmul $(SIMD) -diag-disable 8290,8291,6371,10316,6178 -fpp -mkl -static-intel -DINTEL_MKL
 -OPT1 = -O1 -qopenmp -qopenmp-link=static -threads $(SIMD) -diag-disable 8290,8291,6371,10316,6178 -fpp -mkl -static-intel -DINTEL_MKL
@@ -9,7 +9,7 @@
  #Options in the next line is for debugging purpose
  #OPTDBG = -O0 -qopenmp -diag-disable 8290,8291,6371 -threads -qopenmp-link=static -debug all -g -traceback -check all -fstack-protector -fpp -mkl -static-intel
  
-@@ -43,10 +43,10 @@ default : $(objects)
+@@ -43,10 +43,10 @@ GUI: $(objects)
  	@echo " ------------------------------------------------------ "
  
  GUI: $(objects)
@@ -22,7 +22,16 @@
  
  clean:
  	rm -f $(EXE) *.o *.mod
-@@ -230,7 +230,7 @@ cp2kmate.o : cp2kmate.f90 $(modules)
+@@ -80,7 +80,7 @@ util.o : util.f90 define.o
+ util.o : util.f90 define.o
+ 	$(FC) $(OPT) -c util.f90
+ 
+-function.o : function.f90 define.o util.o Bspline.o libreta.o
++function.o : function.f90 define.o util.o Bspline.o libreta.o 2F2.f90.o # add 2F2.f90.o to fix dependency problem when mod_2f2.mod isn't found
+ 	$(FC) $(OPT) -c function.f90
+ 
+ plot.o : plot.f90 define.o util.o
+@@ -230,7 +230,7 @@ noGUI/dislin_d_empty.o : noGUI/dislin_d_empty.f90
  
  
  noGUI/dislin_d_empty.o : noGUI/dislin_d_empty.f90
@@ -31,7 +40,7 @@
  
  
  # Interfaces of libreta-ESP to Multiwfn
-@@ -241,10 +241,10 @@ libreta.o: ${LIBRETAPATH}/libreta.f90 hrr_012345.o blo
+@@ -241,10 +241,10 @@ hrr_012345.o: ${LIBRETAPATH}/hrr_012345.f90
  # Pure libreta files for ESP
  
  hrr_012345.o: ${LIBRETAPATH}/hrr_012345.f90