git: 1ce0df780cf2 - main - science/cp2k: Update 9.1.0 -> 2022.1

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Tue, 12 Jul 2022 04:10:12 UTC
The branch main has been updated by yuri:

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

commit 1ce0df780cf29c2473f038e587af3d647806f984
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-07-12 04:09:36 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-07-12 04:10:08 +0000

    science/cp2k: Update 9.1.0 -> 2022.1
---
 science/cp2k/Makefile             | 11 +++++++----
 science/cp2k/distinfo             | 10 +++++-----
 science/cp2k/files/patch-Makefile | 24 ++++++++++++------------
 3 files changed, 24 insertions(+), 21 deletions(-)

diff --git a/science/cp2k/Makefile b/science/cp2k/Makefile
index 2ab7472836f2..e3ae9b25e992 100644
--- a/science/cp2k/Makefile
+++ b/science/cp2k/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	cp2k
 DISTVERSIONPREFIX=	v
-DISTVERSION=	9.1.0
+DISTVERSION=	2022.1
 CATEGORIES=	science
 
 MAINTAINER=	yuri@FreeBSD.org
@@ -19,7 +19,7 @@ TEST_DEPENDS=	bash:shells/bash
 USES=		fortran gmake localbase:ldflags python:build shebangfix tar:bz2
 
 USE_GITHUB=	yes
-GH_TUPLE=	cp2k:dbcsr:f4df17b:cp2k_dbcsr/exts/dbcsr \
+GH_TUPLE=	cp2k:dbcsr:c134996:cp2k_dbcsr/exts/dbcsr \
 		pseewald:fprettify:71781aa:pseewald_fprettify/tools/prettify/fprettify
 
 SHEBANG_FILES=	tools/regtesting/do_regtest
@@ -88,7 +88,7 @@ pre-configure:
 post-patch:
 	@${REINPLACE_CMD} -i '' 's|LIBS.*=.*|& ${LDFLAGS}|; s|^FCFLAGS.*=.*|& -I${LOCALBASE}/include|; s| -march=native||' ${WRKSRC}/arch/FreeBSD-*
 
-pre-build:
+xpre-build:
 	@${ECHO} ${PORTVERSION} > ${WRKSRC}/REVISION
 
 do-install:
@@ -101,8 +101,9 @@ do-install-SERIAL-on:
 	cd ${STAGEDIR}${PREFIX}/bin && ${LN} -s ${e}.${EFFECTIVE_VERSION} ${e}.${VERSION}
 .endfor
 
-do-test: # fails to run: some Linux-only commands are present
+do-test: # fails to run: some Linux-only commands are present, also /usr/local/bin/ar: invalid option -- /
 	@cd ${WRKSRC} && \
+		${TOUCH} arch/local.${EFFECTIVE_VERSION} && \
 		${SETENV} ${MAKE_ENV} ./tools/regtesting/do_regtest -maxtasks 8
 
 .include <bsd.port.pre.mk>
@@ -111,4 +112,6 @@ do-test: # fails to run: some Linux-only commands are present
 FCFLAGS+=	-fallow-argument-mismatch
 .  endif
 
+# build instructions: https://github.com/cp2k/cp2k/blob/master/INSTALL.md
+
 .include <bsd.port.post.mk>
diff --git a/science/cp2k/distinfo b/science/cp2k/distinfo
index 7a156377fd8e..0f6ba7195369 100644
--- a/science/cp2k/distinfo
+++ b/science/cp2k/distinfo
@@ -1,7 +1,7 @@
-TIMESTAMP = 1653344192
-SHA256 (cp2k-cp2k-v9.1.0_GH0.tar.gz) = e0cd859e506435a38454eeaaa3bc2c1656ffd5d22698062957c84f8b4f426126
-SIZE (cp2k-cp2k-v9.1.0_GH0.tar.gz) = 76638939
-SHA256 (cp2k-dbcsr-f4df17b_GH0.tar.gz) = 997d143729028cb43c165c7bab85159a2ab485e9b9f2076129156c69eb67d82d
-SIZE (cp2k-dbcsr-f4df17b_GH0.tar.gz) = 2663121
+TIMESTAMP = 1657410607
+SHA256 (cp2k-cp2k-v2022.1_GH0.tar.gz) = 10c0e31bc67bd4871c61047c5f990eb6dac44c6237c3a0b75047a99207021986
+SIZE (cp2k-cp2k-v2022.1_GH0.tar.gz) = 76905358
+SHA256 (cp2k-dbcsr-c134996_GH0.tar.gz) = bfaed28798ce3d0312d857d09a79911fd3db0b5c8ae0a02d0f210de129d53686
+SIZE (cp2k-dbcsr-c134996_GH0.tar.gz) = 2681082
 SHA256 (pseewald-fprettify-71781aa_GH0.tar.gz) = 4115e800c24cc66da569245bee97ea4db18833c8a63d97769c866d2384cbbfb5
 SIZE (pseewald-fprettify-71781aa_GH0.tar.gz) = 155272
diff --git a/science/cp2k/files/patch-Makefile b/science/cp2k/files/patch-Makefile
index 056ff23a727e..ca2931463fe2 100644
--- a/science/cp2k/files/patch-Makefile
+++ b/science/cp2k/files/patch-Makefile
@@ -1,4 +1,4 @@
---- Makefile.orig	2021-12-31 09:29:59 UTC
+--- Makefile.orig	2022-07-08 20:23:24 UTC
 +++ Makefile
 @@ -11,7 +11,7 @@ CP2KHOME     := $(abspath $(shell pwd))
  export CP2KHOME
@@ -35,10 +35,10 @@
  OBJEXTSINCL := $(foreach dir,$(EXTSPACKAGES),-I'$(OBJEXTSDIR)/$(dir)')
 -TSTDIR     := $(MAINTSTDIR)/$(ARCH)/$(ONEVERSION)
 +TSTDIR     := $(MAINTSTDIR)/$(XARCH)/$(ONEVERSION)
- ifeq ($(OFFLOAD_CC),)
- EXE_NAMES := $(basename $(notdir $(filter-out %.cu, $(ALL_EXE_FILES))))
- endif
-@@ -159,7 +159,7 @@ all: makedep | dirs exts
+ ifneq ($(LD_SHARED),)
+ 	ARCHIVE_EXT := .so
+ else
+@@ -144,7 +144,7 @@ all: makedep | dirs exts
  
  # compilation for testing happens here
  test: dirs makedep all
@@ -47,7 +47,7 @@
  	@+$(MAKE) --no-print-directory -C $(TSTDIR) -f $(MAKEFILE) test INCLUDE_DEPS=true
  
  testbg: dirs makedep all
-@@ -263,11 +263,11 @@ $(EXEDIR)/cp2k_shell.$(ONEVERSION): $(EXEDIR)/cp2k.$(O
+@@ -250,11 +250,11 @@ $(EXEDIR)/cp2k_shell.$(ONEVERSION): $(EXEDIR)/cp2k.$(O
  	cd $(EXEDIR); ln -sf cp2k.$(ONEVERSION) cp2k_shell.$(ONEVERSION)
  
  test:
@@ -61,7 +61,7 @@
  	@grep -e "Summary:" -e "Status:" $(TSTDIR)/regtest.log
  
  endif
-@@ -320,9 +320,9 @@ define get_extensions
+@@ -307,9 +307,9 @@ define get_extensions
  	$(shell test -d $(1) && find $(1) -type f -name "*.*" ! -name "*.gcda" | sed 's|.*\.||' | sort -u)
  endef
  clean:
@@ -74,7 +74,7 @@
  OTHER_HELP += "clean : Remove intermediate object and mod files, but not the libraries and executables, for given ARCH and VERSION"
  
  # The Intel compiler creates a corresponding .dbg file for each executable when static linking of the Intel MPI library is requested (flag -static_mpi)
-@@ -336,16 +336,16 @@ OTHER_HELP += "execlean : Remove the executables, for 
+@@ -323,16 +323,16 @@ OTHER_HELP += "execlean : Remove the executables, for 
  # Use this if you want to fully rebuild an executable (for a given compiler and or VERSION)
  #
  realclean: extclean clean execlean
@@ -95,12 +95,12 @@
  OTHER_HELP += "testrealclean : Remove all LAST-* and TEST-* files for given ARCH and VERSION"
  
  #
-@@ -515,7 +515,7 @@ FORCE: ;
+@@ -499,7 +499,7 @@ FORCE: ;
  cp2k_info.o: $(GIT_REF)
  
  # Add some practical metadata about the build.
 -FCFLAGS += -D__COMPILE_ARCH="\"$(ARCH)\""\
 +FCFLAGS += -D__COMPILE_ARCH="\"$(XARCH)\""\
- 					 -D__COMPILE_DATE="\"$(shell date)\""\
- 					 -D__COMPILE_HOST="\"$(shell hostname 2>/dev/null || hostnamectl --transient)\""\
- 					 -D__COMPILE_REVISION="\"$(strip $(REVISION))\""\
+         -D__COMPILE_DATE="\"$(shell date)\""\
+         -D__COMPILE_HOST="\"$(shell hostname 2>/dev/null || hostnamectl --transient)\""\
+         -D__COMPILE_REVISION="\"$(strip $(REVISION))\""\