Skip to content

Commit

Permalink
calculix-ccx: update to 2.22
Browse files Browse the repository at this point in the history
Fixes #22625
  • Loading branch information
MehdiChinoune committed Nov 23, 2024
1 parent a01fb97 commit f9b8c00
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
1 change: 1 addition & 0 deletions mingw-w64-calculix-ccx/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gpl-2.0.txt
21 changes: 11 additions & 10 deletions mingw-w64-calculix-ccx/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,49 @@
_realname=calculix-ccx
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=2.21
pkgver=2.22
pkgrel=1
pkgdesc="CalculiX: 3D Structural Finite Element Program - Solver (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url="http://www.calculix.de/"
license=('spdx:GPL-2.0-or-later')
depends=("${MINGW_PACKAGE_PREFIX}-arpack"
"${MINGW_PACKAGE_PREFIX}-arpack64"
"${MINGW_PACKAGE_PREFIX}-libwinpthread-git"
"${MINGW_PACKAGE_PREFIX}-omp"
"${MINGW_PACKAGE_PREFIX}-openblas"
"${MINGW_PACKAGE_PREFIX}-openblas64"
"${MINGW_PACKAGE_PREFIX}-spooles"
$([[ ${MINGW_PACKAGE_PREFIX} == *-clang-* ]] || echo "${MINGW_PACKAGE_PREFIX}-gcc-libgfortran"))
makedepends=("${MINGW_PACKAGE_PREFIX}-fc")
makedepends=("${MINGW_PACKAGE_PREFIX}-fc"
"${MINGW_PACKAGE_PREFIX}-spooles")
source=("http://www.dhondt.de/ccx_${pkgver}.src.tar.bz2"
"http://www.dhondt.de/gpl-2.0.txt"
"ccx_mingw.patch"
"ccx_ooc.patch")
sha256sums=('52a20ef7216c6e2de75eae460539915640e3140ec4a2f631a9301e01eda605ad'
sha256sums=('3a94dcc775a31f570229734b341d6b06301ebdc759863df901c8b9bf1854c0bc'
'8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643'
'64a9b4aae8910f1acd1d28b65e188134775670f9ada5d15614df38c9cda16c53'
'b9273f018257aeb1e99b23d0776d8b385f168cb22a9626778691d3d1405109f2'
'dd81df3de137a05b45e39fe61830337e6405ec566148598dab2828a6d9780e8a')

prepare() {
cd "${srcdir}/CalculiX/ccx_${pkgver}/src"
patch -Np1 < ../../../ccx_mingw.patch
patch -Np1 < ../../../ccx_ooc.patch
patch -Np1 -i "${srcdir}"/ccx_mingw.patch
patch -Np1 -i "${srcdir}"/ccx_ooc.patch
}

build()
{
cd "${srcdir}/CalculiX/ccx_${pkgver}/src"
if [[ ${MINGW_PACKAGE_PREFIX} != *-clang-* ]]; then
CFLAGS+=" -fopenmp"
CFLAGS+=" -fopenmp -Wno-incompatible-pointer-types"
FC=gfortran
export FFLAGS="-fallow-argument-mismatch -fopenmp -O2"
export OMP_LIBS="-lgomp -lquadmath"
else
CFLAGS+=" -fopenmp -Wno-implicit-function-declaration"
FC=flang
export FFLAGS="-O2"
export FFLAGS="-fopenmp -O2 -I${MINGW_PREFIX}/include"
export OMP_LIBS="-lomp"
fi

Expand Down
16 changes: 7 additions & 9 deletions mingw-w64-calculix-ccx/ccx_mingw.patch
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
+ ./date.pl; $(CC) $(CFLAGS) -c $(SCCXMAIN);
+ $(FC) $(FFLAGS) \
+ -o $@ $(OCCXMAIN) $(OBJDIR)/ccx_$(CCX_VERSION).a \
+ -lpthread $(OMP_LIBS) -larpack_64 -lopenblas_64 $(LDFLAGS) -lstdc++
+ -lpthread $(OMP_LIBS) -larpack_64 -lopenblas_64 $(LDFLAGS)
+
+$(OBJDIR)/ccx_$(CCX_VERSION).a: $(OCCXF) $(OCCXC)
+ ar vr $@ $?
Expand Down Expand Up @@ -79,7 +79,7 @@
+ ./date.pl; $(CC) $(CFLAGS) -c $(SCCXMAIN);
+ $(FC) $(FFLAGS) \
+ -o $@ $(OCCXMAIN) $(OBJDIR)/ccx_$(CCX_VERSION).a \
+ -lpthread $(OMP_LIBS) -larpack -lopenblas $(LDFLAGS) -lstdc++
+ -lpthread $(OMP_LIBS) -larpack -lopenblas $(LDFLAGS)
+
+$(OBJDIR)/ccx_$(CCX_VERSION).a: $(OCCXF) $(OCCXC)
+ ar vr $@ $?
Expand All @@ -89,9 +89,8 @@
+
+clean:
+ rm -f $(OBJDIR)/*.o $(OBJDIR)/ccx_$(CCX_VERSION).a $(OBJDIR)/ccx_$(OBJDIR).exe
diff -urN src_orig/ccx_2.21.c src/ccx_2.21.c
--- src_orig/ccx_2.21.c 2023-07-29 10:52:01.000000000 +0200
+++ src/ccx_2.21.c 2023-07-29 16:47:06.838731000 +0200
--- a/ccx_2.22.c
+++ b/ccx_2.22.c
@@ -15,10 +15,6 @@
/* along with this program; if not, write to the Free Software */
/* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
Expand All @@ -114,9 +113,8 @@ diff -urN src_orig/ccx_2.21.c src/ccx_2.21.c

FILE *f1;

diff -urN src_orig/ccx_2.21step.c src/ccx_2.21step.c
--- src_orig/ccx_2.21step.c 2023-07-29 10:52:01.000000000 +0200
+++ src/ccx_2.21step.c 2023-07-29 17:05:22.548207900 +0200
--- a/ccx_2.22step.c
+++ b/ccx_2.22step.c
@@ -15,10 +15,6 @@
/* along with this program; if not, write to the Free Software */
/* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
Expand All @@ -141,7 +139,7 @@ diff -urN src_orig/ccx_2.21step.c src/ccx_2.21step.c

--- a/restartwrite.f
+++ b/restartwrite.f
@@ -113,7 +113,7 @@
@@ -114,7 +114,7 @@
!
! check whether the restart file exists and is opened
!
Expand Down

0 comments on commit f9b8c00

Please sign in to comment.