Skip to content

Commit

Permalink
science/cp2k: Update 9.1.0 -> 2022.1
Browse files Browse the repository at this point in the history
  • Loading branch information
yurivict committed Jul 12, 2022
1 parent c6e5679 commit 1ce0df7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 21 deletions.
11 changes: 7 additions & 4 deletions science/cp2k/Makefile
@@ -1,6 +1,6 @@
PORTNAME= cp2k
DISTVERSIONPREFIX= v
DISTVERSION= 9.1.0
DISTVERSION= 2022.1
CATEGORIES= science

MAINTAINER= yuri@FreeBSD.org
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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>
Expand All @@ -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>
10 changes: 5 additions & 5 deletions 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
24 changes: 12 additions & 12 deletions 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
Expand Down Expand Up @@ -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
Expand 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:
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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))\""\

0 comments on commit 1ce0df7

Please sign in to comment.