openfoam: update to 21.12

Package needs to be rebuilt for new boost version, so take the
opportunity to update to latest release at the same time.
This commit is contained in:
Henrik Grimler 2022-02-08 18:28:59 +01:00
parent bbc7017ea7
commit 1ba4e7d5f1
6 changed files with 86 additions and 51 deletions

View File

@ -2,10 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://www.openfoam.com
TERMUX_PKG_DESCRIPTION="OpenFOAM is a CFD software written in C++"
TERMUX_PKG_MAINTAINER="Henrik Grimler @Grimler91"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_VERSION=2106
TERMUX_PKG_REVISION=1
TERMUX_PKG_VERSION=2112
TERMUX_PKG_SRCURL=https://develop.openfoam.com/Development/openfoam/-/archive/OpenFOAM-v${TERMUX_PKG_VERSION}/openfoam-OpenFOAM-v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=f8be6743ed4c534a54024a6837a22e3a7392a454e29e1a4655ae6a009064d64a
TERMUX_PKG_SHA256=ede3e2f6d7aed50969e5b9dbc06a0667f6d69b0d76adfc53f474d9ba5bf42272
TERMUX_PKG_DEPENDS="openmpi, flex, boost, cgal, fftw, readline, libc++"
TERMUX_PKG_GROUPS="science"
TERMUX_PKG_RM_AFTER_INSTALL="opt/OpenFOAM-v${TERMUX_PKG_VERSION}/build"

View File

@ -1,15 +1,15 @@
--- ./etc/bashrc.orig 2021-12-01 03:15:49.000000000 +0100
+++ ./etc/bashrc 2021-12-01 03:15:49.000000000 +0100
@@ -68,7 +68,7 @@
# [WM_COMPILER] - Compiler:
# = Gcc | Clang | Icc | Icx | Cray | Amd | Arm | Pgi | Fujitsu |
--- ./etc/bashrc.orig 2021-12-20 19:57:43.000000000 +0100
+++ ./etc/bashrc 2022-02-08 17:16:21.817030684 +0100
@@ -69,7 +69,7 @@
# = Gcc | Clang | Icc | Icx | Amd | Arm | Cray | Fujitsu |
# Gcc<digits> | Clang<digits>
# [Not well tested: Pgi | Nvidia]
-export WM_COMPILER=Gcc
+export WM_COMPILER=Clang
# [WM_PRECISION_OPTION] - Floating-point precision:
# = DP | SP | SPDP
@@ -112,8 +112,8 @@
@@ -114,8 +114,8 @@
# --
projectDir="${BASH_SOURCE:-${ZSH_NAME:+$0}}";
[ -n "$projectDir" ] && projectDir="$(\cd $(dirname $projectDir)/.. && \pwd -L)" ||\
@ -20,21 +20,21 @@
# projectDir="/usr/local/OpenFOAM/OpenFOAM-$WM_PROJECT_VERSION"
################################################################################
# Or optionally hard-coded (eg, with autoconfig)
@@ -162,7 +162,7 @@
@@ -164,7 +164,7 @@
# Capture values of old directories to be cleaned from PATH, LD_LIBRARY_PATH
foamOldDirs="$WM_PROJECT_DIR $WM_THIRD_PARTY_DIR \
- $HOME/$WM_PROJECT/$USER $FOAM_USER_APPBIN $FOAM_USER_LIBBIN \
+ $HOME/$WM_PROJECT/termux $FOAM_USER_APPBIN $FOAM_USER_LIBBIN \
- $HOME/$WM_PROJECT/${USER:-user} $FOAM_USER_APPBIN $FOAM_USER_LIBBIN \
+ $HOME/$WM_PROJECT/${USER:-termux} $FOAM_USER_APPBIN $FOAM_USER_LIBBIN \
$WM_PROJECT_SITE $FOAM_SITE_APPBIN $FOAM_SITE_LIBBIN \
$FOAM_MODULE_APPBIN $FOAM_MODULE_LIBBIN"
@@ -170,7 +170,7 @@
@@ -172,7 +172,7 @@
export WM_PROJECT_DIR="$projectDir"
# [WM_PROJECT_USER_DIR] - Location of user files
-export WM_PROJECT_USER_DIR="$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION"
+export WM_PROJECT_USER_DIR="$HOME/$WM_PROJECT/termux-$WM_PROJECT_VERSION"
-export WM_PROJECT_USER_DIR="$HOME/$WM_PROJECT/${USER:-user}-$WM_PROJECT_VERSION"
+export WM_PROJECT_USER_DIR="$HOME/$WM_PROJECT/${USER:-termux}-$WM_PROJECT_VERSION"
# [WM_PROJECT_SITE] - Location of site-specific (group) files
# Default (unset) implies WM_PROJECT_DIR/site

View File

@ -1,13 +1,13 @@
--- ./etc/config.sh/CGAL.orig 2020-07-04 12:28:32.082903795 +0200
+++ ./etc/config.sh/CGAL 2020-07-04 12:30:22.704797834 +0200
--- ./etc/config.sh/CGAL.orig 2022-02-08 17:17:26.353636901 +0100
+++ ./etc/config.sh/CGAL 2022-02-08 17:18:02.813601658 +0100
@@ -43,8 +43,8 @@
#------------------------------------------------------------------------------
# USER EDITABLE PART: Changes made here may be lost with the next upgrade
-boost_version=boost_1_66_0
-cgal_version=CGAL-4.12.2
-boost_version=boost_1_74_0
-cgal_version=CGAL-4.14.3
+boost_version=boost-system
+cgal_version=cgal-system
+cgal_version=CGAL-system
export BOOST_ARCH_PATH="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version"
export CGAL_ARCH_PATH="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version"

View File

@ -1,11 +1,50 @@
--- ./etc/config.sh/mpi.orig 2021-09-11 07:17:25.881541148 +0000
+++ ./etc/config.sh/mpi 2021-09-11 07:18:36.067863881 +0000
@@ -77,7 +77,7 @@
_foamAddLibAuto "$MPI_ARCH_PATH"
else
# Slight hack: strip off 'lib' to get prefix directory
- libDir=$(mpicc --showme:link | sed -e 's/.*-L\([^ ]*\).*/\1/')
+ libDir="@TERMUX_PREFIX@/lib"
--- ./etc/config.sh/mpi.orig 2022-02-08 17:18:49.360222292 +0100
+++ ./etc/config.sh/mpi 2022-02-08 17:24:23.473198797 +0100
@@ -107,18 +107,18 @@
if [ -z "$MPI_ARCH_PATH" ] && _foamFoundCmd="$(command -v orte-info)"
then
# prefix
- _foamFoundDir="$("$_foamFoundCmd" --path prefix --parsable | sed -e 's#^path:[^:]*:##')"
+ _foamFoundDir=@TERMUX_PREFIX@
export MPI_ARCH_PATH="${libDir%/*}" # prefix from libdir
_foamAddLib "$libDir"
if [ -d "$_foamFoundDir" ]
then
MPI_ARCH_PATH="${_foamFoundDir}"
# libdir
- _foamFoundDir="$("$_foamFoundCmd" --path libdir --parsable | sed -e 's#^path:[^:]*:##')"
+ _foamFoundDir=@TERMUX_PREFIX@/lib
if [ -d "$_foamFoundDir" ]
then
_foamAddLib "$_foamFoundDir"
- elif [ "$MPI_ARCH_PATH" != /usr ]
+ elif [ "$MPI_ARCH_PATH" != @TERMUX_PREFIX@ ]
then
_foamAddLibAuto "$MPI_ARCH_PATH"
fi
@@ -127,9 +127,9 @@
# Use <mpicc> to get the link information and (slight hack)
# strip off 'lib' to get the prefix directory
- if [ -z "$MPI_ARCH_PATH" ] && _foamFoundCmd="$(command -v mpicc)"
+ if [ -z "$MPI_ARCH_PATH" ]
then
- _foamFoundDir="$("$_foamFoundCmd" --showme:link | sed -e 's#.*-L\([^ ]*\).*#\1#')"
+ _foamFoundDir=@TERMUX_PREFIX@/lib
MPI_ARCH_PATH="${_foamFoundDir%/*}" # Prefix from libdir
_foamAddLib "$_foamFoundDir"
@@ -137,10 +137,10 @@
# Last resort (worse hack):
# Use <orterun> to get ../path/bin/orterun and infer prefix, libdir
- if [ -z "$MPI_ARCH_PATH" ] && _foamFoundCmd="$(command -v orterun)"
+ if [ -z "$MPI_ARCH_PATH" ]
then
- _foamFoundDir="${_foamFoundCmd%/*}" # The bin dir
- MPI_ARCH_PATH="${_foamFoundDir%/*}" # The prefix dir
+ _foamFoundDir=@TERMUX_PREFIX@/bin # The bin dir
+ MPI_ARCH_PATH=@TERMUX_PREFIX@ # The prefix dir
_foamAddLibAuto "$MPI_ARCH_PATH"
fi

View File

@ -1,22 +1,20 @@
--- ./src/OpenFOAM/db/IOstreams/IOstreams/Istream.C.orig 2021-12-01 03:15:50.000000000 +0100
+++ ./src/OpenFOAM/db/IOstreams/IOstreams/Istream.C 2021-12-01 03:15:50.000000000 +0100
@@ -141,7 +141,8 @@
--- ./src/OpenFOAM/db/IOstreams/IOstreams/Istream.C.orig 2022-02-08 17:25:26.649794083 +0100
+++ ./src/OpenFOAM/db/IOstreams/IOstreams/Istream.C 2022-02-08 17:28:57.869549414 +0100
@@ -137,7 +137,7 @@
<< "Expected a '" << token::END_LIST
<< "' while reading " << funcName
<< ", found " << delimiter.info()
- << " at stream position " << tellg(this) << nl
+ << " at stream position "
+ << static_cast<uint64_t>(tellg(this)) << nl
- << " at stream position " << stream_tellg(this) << nl
+ << " at stream position " << static_cast<uint64_t>(stream_tellg(this)) << nl
<< exit(FatalIOError);
}
@@ -182,7 +183,8 @@
@@ -178,7 +178,7 @@
<< "' or a '" << token::END_BLOCK
<< "' while reading " << funcName
<< ", found " << delimiter.info()
- << " at stream position " << tellg(this) << nl
+ << " at stream position "
+ << static_cast<uint64_t>(tellg(this)) << nl
- << " at stream position " << stream_tellg(this) << nl
+ << " at stream position " << static_cast<uint64_t>(stream_tellg(this)) << nl
<< exit(FatalIOError);
return '\0';

View File

@ -89,25 +89,24 @@
+
+include $(DEFAULT_RULES)/c
+include $(DEFAULT_RULES)/c++
diff -u -r ../rules.orig/General/Clang/c ./wmake/rules/General/Clang/c
--- ../rules.orig/General/Clang/c 2020-07-04 14:14:17.914357166 +0200
+++ ./wmake/rules/General/Clang/c 2020-07-04 15:29:10.867438565 +0200
--- ./wmake/rules/General/Clang/c.orig 2022-02-08 17:30:19.869452605 +0100
+++ ./wmake/rules/General/Clang/c 2022-02-08 17:31:31.762700333 +0100
@@ -1,6 +1,6 @@
SUFFIXES += .c
-cc = clang
+cc = @TERMUX_COMPILER_PREFIX@-clang
-cc = clang$(COMPILER_VERSION)
+cc = @TERMUX_COMPILER_PREFIX@-clang$(COMPILER_VERSION)
cARCH =
cDBUG =
diff -u -r ../rules.orig/General/Clang/c++ ./wmake/rules/General/Clang/c++
--- ../rules.orig/General/Clang/c++ 2020-07-04 14:14:17.914357166 +0200
+++ ./wmake/rules/General/Clang/c++ 2020-07-04 15:29:10.870773563 +0200
@@ -1,6 +1,6 @@
--- ./wmake/rules/General/Clang/c++.orig 2022-02-08 17:30:19.869452605 +0100
+++ ./wmake/rules/General/Clang/c++ 2022-02-08 17:31:16.646051743 +0100
@@ -1,7 +1,7 @@
#------------------------------------------------------------------------------
SUFFIXES += .C .cc .cpp .cxx
-CC = clang++ -std=c++11
+CC = @TERMUX_COMPILER_PREFIX@-clang++
-CC = clang++$(COMPILER_VERSION) -std=c++14
+CC = @TERMUX_COMPILER_PREFIX@-clang++$(COMPILER_VERSION) -std=c++14
c++ARCH =
c++DBUG =