Skip to content

Commit

Permalink
calculix-ccx: 2.19 -> 2.22 (NixOS#366221)
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada authored Dec 19, 2024
2 parents a37e7ed + f5987ef commit 79ef99a
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 32 deletions.
21 changes: 21 additions & 0 deletions pkgs/by-name/ca/calculix-ccx/calculix-ccx.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--- old/ccx_2.22/src/Makefile 2024-08-06 01:13:21.031704000 +0800
+++ new/ccx_2.22/src/Makefile 2024-12-19 00:27:06.848862592 +0800
@@ -18,15 +18,10 @@
OCCXC = $(SCCXC:.c=.o)
OCCXMAIN = $(SCCXMAIN:.c=.o)

-DIR=../../../SPOOLES.2.2
+LIBS = -lpthread -lm -lc -lspooles -larpack -lblas -llapack

-LIBS = \
- $(DIR)/spooles.a \
- ../../../ARPACK/libarpack_INTEL.a \
- -lpthread -lm -lc
-
-ccx_2.22: $(OCCXMAIN) ccx_2.22.a $(LIBS)
- ./date.pl; $(CC) $(CFLAGS) -c ccx_2.22.c; $(FC) -Wall -O2 -o $@ $(OCCXMAIN) ccx_2.22.a $(LIBS) -fopenmp
+ccx_2.22: $(OCCXMAIN) ccx_2.22.a
+ $(CC) $(CFLAGS) -c ccx_2.22.c; $(FC) -Wall -O2 -o $@ $(OCCXMAIN) ccx_2.22.a $(LIBS) -fopenmp

ccx_2.22.a: $(OCCXF) $(OCCXC)
ar vr $@ $?
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
assert (blas.isILP64 == lapack.isILP64 && blas.isILP64 == arpack.isILP64 && !blas.isILP64);

stdenv.mkDerivation rec {
pname = "calculix";
version = "2.19";
pname = "calculix-ccx";
version = "2.22";

src = fetchurl {
url = "http://www.dhondt.de/ccx_${version}.src.tar.bz2";
sha256 = "01vdy9sns58hkm39z6d0r5y7gzqf5z493d18jin9krqib1l6jnn7";
hash = "sha256-OpTcx3WjH1cCKXNLNB1rBjAevcdZhj35Aci5vxhUwLw=";
};

nativeBuildInputs = [ gfortran ];
Expand All @@ -35,23 +35,27 @@ stdenv.mkDerivation rec {
];

patches = [
./calculix.patch
./calculix-ccx.patch
];

postPatch = ''
cd ccx*/src
'';

installPhase = ''
runHook preInstall
install -Dm0755 ccx_${version} $out/bin/ccx
runHook postInstall
'';

meta = with lib; {
homepage = "http://www.calculix.de/";
meta = {
homepage = "http://www.calculix.de";
description = "Three-dimensional structural finite element program";
mainProgram = "ccx";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ gebner ];
platforms = platforms.unix;
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ gebner ];
platforms = lib.platforms.unix;
};
}
23 changes: 0 additions & 23 deletions pkgs/by-name/ca/calculix/calculix.patch

This file was deleted.

1 change: 1 addition & 0 deletions pkgs/top-level/aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ mapAliases {
### C ###

caffeWithCuda = throw "caffeWithCuda has been removed, as it was broken and required CUDA 10"; # Added 2024-11-20
calculix = calculix-ccx; # Added 2024-12-18
calligra = kdePackages.calligra; # Added 2024-09-27
callPackage_i686 = pkgsi686Linux.callPackage;
cask = emacs.pkgs.cask; # Added 2022-11-12
Expand Down

0 comments on commit 79ef99a

Please sign in to comment.