From f9b8c007a11f50201af413bcad1e772f01ebbf21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D9=85=D9=87=D8=AF=D9=8A=20=D8=B4=D9=8A=D9=86=D9=88=D9=86?= =?UTF-8?q?=20=28Mehdi=20Chinoune=29?= Date: Sat, 23 Nov 2024 06:54:57 +0100 Subject: [PATCH] calculix-ccx: update to 2.22 Fixes #22625 --- mingw-w64-calculix-ccx/.gitignore | 1 + mingw-w64-calculix-ccx/PKGBUILD | 21 +++++++++++---------- mingw-w64-calculix-ccx/ccx_mingw.patch | 16 +++++++--------- 3 files changed, 19 insertions(+), 19 deletions(-) create mode 100644 mingw-w64-calculix-ccx/.gitignore diff --git a/mingw-w64-calculix-ccx/.gitignore b/mingw-w64-calculix-ccx/.gitignore new file mode 100644 index 0000000000000..4d1854e6dc0f8 --- /dev/null +++ b/mingw-w64-calculix-ccx/.gitignore @@ -0,0 +1 @@ +gpl-2.0.txt diff --git a/mingw-w64-calculix-ccx/PKGBUILD b/mingw-w64-calculix-ccx/PKGBUILD index 35294d8005555..eef3524badcbd 100644 --- a/mingw-w64-calculix-ccx/PKGBUILD +++ b/mingw-w64-calculix-ccx/PKGBUILD @@ -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 diff --git a/mingw-w64-calculix-ccx/ccx_mingw.patch b/mingw-w64-calculix-ccx/ccx_mingw.patch index 06af03149b7cc..4e6ec5792fdea 100644 --- a/mingw-w64-calculix-ccx/ccx_mingw.patch +++ b/mingw-w64-calculix-ccx/ccx_mingw.patch @@ -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 $@ $? @@ -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 $@ $? @@ -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. */ @@ -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. */ @@ -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 !