summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Aznarán2024-04-07 16:37:59 -0500
committerCarlos Aznarán2024-04-07 16:37:59 -0500
commit8cfeabaa8a6e181605f50598a6d9efd6d6cec496 (patch)
treedcad4bb11f70656db313a410a8dca58c7606ce8d
parent69d95c4e067c738811fe48dbed98d84932382b5f (diff)
downloadaur-8cfeabaa8a6e181605f50598a6d9efd6d6cec496.tar.gz
Bump version to v2312
-rw-r--r--.SRCINFO15
-rwxr-xr-xPKGBUILD91
2 files changed, 47 insertions, 59 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b4736f204d6b..3145984b3a39 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,22 +1,21 @@
pkgbase = openfoam-com
pkgdesc = The open source CFD toolbox (www.openfoam.com)
- pkgver = v2306
+ pkgver = v2312
pkgrel = 1
- url = http://www.openfoam.com
+ url = https://www.openfoam.com
install = openfoam-com.install
arch = i686
arch = x86_64
- license = GPL3
- depends = gcc
+ license = GPL-3.0-or-later
depends = cgal
depends = fftw
depends = boost
depends = openmpi
depends = paraview
- depends = utf8cpp
depends = scotch
- depends = parmetis
- source = https://dl.openfoam.com/source/v2306/OpenFOAM-v2306.tgz
- md5sums = 236c87f9ba7640a0b3fd78171f50158a
+ depends = parmetis-git
+ depends = kahip
+ source = https://dl.openfoam.com/source/v2312/OpenFOAM-v2312.tgz
+ md5sums = da71a03f29bf731152a071eaafc056d9
pkgname = openfoam-com
diff --git a/PKGBUILD b/PKGBUILD
index 69eb65b568dc..b83471f34661 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,33 +1,30 @@
# Maintainer: Norbert Weber <norbert.weber_at_hzdr.de>
+# Contributor: Carlos Aznarán <caznaranl@uni.pe>
# Contributor: Marc Olesen
# Contributor: Xwang <xwaang1976@gmail.com>
# Contributor: George Eleftheriou <eleftg>
# Contributor: Andrew Fischer <andrew_at_apastron.co>
# Contributor: <gucong43216@gmail.com>
-# Contributor: Carlos Aznarán <caznaranl@uni.pe>
# Installs as (for example)
-# /opt/OpenFOAM/OpenFOAM-v2306
+# /opt/OpenFOAM/OpenFOAM-v2312
-pkgname=openfoam-com
-pkgver=v2306
_distname=OpenFOAM
-_dist=$_distname-$pkgver
+pkgname=${_distname,,}-com
+pkgver=v2312
+_dist=${_distname}-${pkgver}
pkgrel=1
pkgdesc="The open source CFD toolbox (www.openfoam.com)"
-arch=('i686' 'x86_64')
-url="http://www.openfoam.com"
-license=('GPL3')
+arch=(i686 x86_64)
+url="https://www.${pkgname//-/.}"
+license=(GPL-3.0-or-later)
install="${pkgname}.install"
-depends=('gcc' 'cgal' 'fftw' 'boost' 'openmpi' 'paraview' 'utf8cpp' 'scotch' 'parmetis')
-
-source=('https://dl.openfoam.com/source/v2306/OpenFOAM-v2306.tgz')
-
-md5sums=('236c87f9ba7640a0b3fd78171f50158a')
+depends=(cgal fftw boost openmpi paraview scotch parmetis-git kahip) # petsc hypre
+source=(https://dl.${pkgname//-/.}/source/${pkgver}/${_dist}.tgz)
+md5sums=('da71a03f29bf731152a071eaafc056d9')
prepare() {
- if [ -n "$WM_PROJECT_DIR" ]
- then
+ if [ -n "$WM_PROJECT_DIR" ]; then
echo
echo -e "\e[1m\e[5m\e[31mPlease make sure that no OpenFOAM version is sourced in bashrc.\e[0m"
echo
@@ -41,25 +38,26 @@ prepare() {
export WM_COMPILER_TYPE=system
export WM_MPLIB=SYSTEMOPENMPI
# End" \
- > "${projectDir}"/etc/prefs.sh
-
+ >"${projectDir}"/etc/prefs.sh
# Configure components.
- # Use system values for boost/cgal, fftw, scotch, paraview
+ # Use system values for boost/cgal, fftw, kahip, metis, paraview, scotch
+ # -petsc petsc-system -hypre hypre-system -mpfr mpfr-system -gmp gmp-system
"${projectDir}"/bin/tools/foamConfigurePaths \
+ -adios adios-system \
-boost boost-system \
- -cgal cgal-system \
- -fftw fftw-system \
+ -cgal cgal-system \
+ -fftw fftw-system \
-kahip kahip-system \
- -scotch scotch-system \
+ -metis metis-system \
-paraview paraview-system \
+ -scotch scotch-system \
;
}
build() {
- if [ -n "$WM_PROJECT_DIR" ]
- then
+ if [ -n "$WM_PROJECT_DIR" ]; then
echo
echo -e "\e[1m\e[5m\e[31mPlease make sure that no OpenFOAM version is sourced in bashrc.\e[0m"
echo
@@ -68,28 +66,23 @@ build() {
projectDir="${srcdir}/${_dist}"
[ -f "$projectDir/etc/bashrc" ] || {
- echo "No $projectDir/etc/bashrc found"
- return 1
+ echo "No $projectDir/etc/bashrc found"
+ return 1
}
- # changes to avoid linking problems related to gcc 11
- # check this for the next upgrade!
- pwd
- sed -i 's/g++$(COMPILER_VERSION) -std=c++11/g++$(COMPILER_VERSION) -std=c++14 -D_GLIBCXX_USE_CXX14_ABI=0/g' $projectDir/wmake/rules/General/Gcc/c++
-
# Avoid external influence on the environment
export FOAM_CONFIG_MODE="o"
unset FOAM_SETTINGS
- set +e # Turn errexit off
+ set +e # Turn errexit off
- source "$projectDir"/etc/bashrc '' || \
+ source "$projectDir"/etc/bashrc '' ||
echo "Ignore spurious sourcing error"
# it seems, the bashrc file destroys 'projectDir'
projectDir="${srcdir}/${_dist}"
- set -e # Turn errexit back on
+ set -e # Turn errexit back on
cd "$projectDir" || exit
# Dummy application for testing
@@ -105,27 +98,25 @@ build() {
# lib = 139 entries
[ -f log.build ] || {
- echo "No log.build file - build failed entirely"
- exit 1
+ echo "No log.build file - build failed entirely"
+ exit 1
}
- bins="$( cat log.build | sed -ne 's/.*bin *= *\([0-9][0-9]*\).*/\1/p;' | sed -ne '$p' )"
- libs="$( cat log.build | sed -ne 's/.*lib *= *\([0-9][0-9]*\).*/\1/p;' | sed -ne '$p' )"
+ bins="$(cat log.build | sed -ne 's/.*bin *= *\([0-9][0-9]*\).*/\1/p;' | sed -ne '$p')"
+ libs="$(cat log.build | sed -ne 's/.*lib *= *\([0-9][0-9]*\).*/\1/p;' | sed -ne '$p')"
- if [ "${bins:=0}" = 0 ] || [ "${libs:=0}" = 0 ]
- then
- echo
- echo "Build failed with $bins executables and $libs libraries"
- echo "Check the log.build file"
- echo
- exit 1
+ if [ "${bins:=0}" = 0 ] || [ "${libs:=0}" = 0 ]; then
+ echo
+ echo "Build failed with $bins executables and $libs libraries"
+ echo "Check the log.build file"
+ echo
+ exit 1
fi
# Remove intermediate build artifacts
rm -rf "${projectDir}/build"
}
-
package() {
cd ${srcdir}
@@ -144,12 +135,10 @@ package() {
chmod -R 755 "${projectDir}"/bin
chmod -R 755 "${projectDir}"/etc
- [ -e "${projectDir}"/ThirdParty ] || \
- echo "system dependencies" >| "${projectDir}"/ThirdParty
+ [ -e "${projectDir}"/ThirdParty ] ||
+ echo "system dependencies" >|"${projectDir}"/ThirdParty
# create aliases
- echo "alias of='source /opt/${_distname}/${_dist}/etc/bashrc'" >> "${pkgdir}/etc/profile.d/openfoam-com.sh"
- echo "alias paraFoam='paraFoam -builtin'" >> "${pkgdir}/etc/profile.d/openfoam-com.sh"
+ echo "alias of='source /opt/${_distname}/${_dist}/etc/bashrc'" >>"${pkgdir}/etc/profile.d/${pkgname}.sh"
+ echo "alias paraFoam='paraFoam -builtin'" >>"${pkgdir}/etc/profile.d/${pkgname}.sh"
}
-
-# ---------------------------------------------------------------------------