fastcap: init at 2.0-18Sep92

+126
+13
pkgs/by-name/fa/fastcap/fastcap-mulglobal-drop-conflicting-lib.patch
···
··· 1 + Don't use timing as there is a type conflict. 2 + 3 + --- nix-build-fastcap-2.0-18Sep92.drv-1/src/mulGlobal.h.orig 2015-07-21 15:58:49.199101566 +0200 4 + +++ nix-build-fastcap-2.0-18Sep92.drv-1/src/mulGlobal.h 2015-07-21 16:18:39.456751313 +0200 5 + @@ -57,7 +57,7 @@ 6 + /* time variables/structs */ 7 + #ifndef _TIME_ /* if not on a Sun4 */ 8 + #ifndef NEWS /* if not on a NWS-38XX */ 9 + -#include <time.h> 10 + +//#include <time.h> 11 + #endif 12 + #endif 13 +
+19
pkgs/by-name/fa/fastcap/fastcap-mulsetup-add-forward-declarations.patch
···
··· 1 + Add forward declarations. 2 + 3 + --- fastcap/src/mulSetup.c.orig 2015-07-22 13:55:21.592119775 +0200 4 + +++ fastcap/src/mulSetup.c 2015-07-22 14:08:50.157688209 +0200 5 + @@ -35,6 +35,14 @@ 6 + 7 + #include "mulGlobal.h" 8 + 9 + +static getnbrs(ssystem*); 10 + +static linkcubes(ssystem*); 11 + +static setMaxq(ssystem*); 12 + +static getAllInter(ssystem*); 13 + +static set_vector_masks(ssystem*); 14 + +static indexkid(ssystem*, cube*, int*, int*); 15 + +static int placeq(int, ssystem*, charge*); 16 + + 17 + cube *cstack[1024]; /* Stack used in several routines. */ 18 + 19 + /*
+94
pkgs/by-name/fa/fastcap/package.nix
···
··· 1 + { stdenv 2 + , fetchzip 3 + , ghostscript 4 + , lib 5 + , texliveMedium 6 + }: 7 + 8 + stdenv.mkDerivation rec { 9 + pname = "fastcap"; 10 + version = "2.0-18Sep92"; 11 + 12 + src = fetchzip { 13 + url = "https://www.rle.mit.edu/cpg/codes/fastcap-${version}.tgz"; 14 + hash = "sha256-fnmC6WNd7xk8fphxkMZUq2+Qz+2mWIP2lvBUBAmUvHI"; 15 + stripRoot = false; 16 + }; 17 + 18 + patches = [ 19 + ./fastcap-mulglobal-drop-conflicting-lib.patch 20 + ./fastcap-mulsetup-add-forward-declarations.patch 21 + ]; 22 + 23 + nativeBuildInputs = [ 24 + ghostscript 25 + texliveMedium 26 + ]; 27 + 28 + postPatch = '' 29 + substituteInPlace ./doc/Makefile \ 30 + --replace '/bin/rm' 'rm' 31 + 32 + for f in "doc/*.tex" ; do 33 + sed -i -E $f \ 34 + -e 's/\\special\{psfile=([^,]*),.*scale=([#0-9.]*).*\}/\\includegraphics[scale=\2]{\1}/' \ 35 + -e 's/\\psfig\{figure=([^,]*),.*width=([#0-9.]*in).*\}/\\includegraphics[width=\2]{\1}/' \ 36 + -e 's/\\psfig\{figure=([^,]*),.*height=([#0-9.]*in).*\}/\\includegraphics[height=\2]{\1}/' \ 37 + -e 's/\\psfig\{figure=([^,]*)\}/\\includegraphics{\1}/' 38 + done 39 + 40 + for f in "doc/mtt.tex" "doc/tcad.tex" "doc/ug.tex"; do 41 + sed -i -E $f \ 42 + -e 's/^\\documentstyle\[(.*)\]\{(.*)\}/\\documentclass[\1]{\2}\n\\usepackage{graphicx}\n\\usepackage{robinspace}/' \ 43 + -e 's/\\setlength\{\\footheight\}\{.*\}/%/' \ 44 + -e 's/\\setstretch\{.*\}/%/' 45 + done 46 + ''; 47 + 48 + dontConfigure = true; 49 + 50 + makeFlags = [ 51 + "RM=rm" 52 + "SHELL=sh" 53 + "all" 54 + ]; 55 + 56 + outputs = [ "out" "doc" ]; 57 + 58 + postBuild = '' 59 + make manual 60 + pushd doc 61 + find -name '*.dvi' -exec dvipdf {} \; 62 + popd 63 + ''; 64 + 65 + installPhase = '' 66 + runHook preInstall 67 + 68 + mkdir -p $out/ 69 + mv bin $out/bin 70 + rm $out/bin/README 71 + 72 + mkdir -p $doc/share/doc/fastcap-${version} 73 + cp doc/*.pdf $doc/share/doc/fastcap-${version} 74 + 75 + mkdir -p $out/share/fastcap 76 + mv examples $out/share/fastcap 77 + 78 + runHook postInstall 79 + ''; 80 + 81 + meta = with lib; { 82 + description = "Multipole-accelerated capacitance extraction program"; 83 + longDescription = '' 84 + Fastcap is a three dimensional capacitance extraction program that 85 + compute self and mutual capacitances between conductors of arbitrary 86 + shapes, sizes and orientations. 87 + ''; 88 + homepage = "https://www.rle.mit.edu/cpg/research_codes.htm"; 89 + license = licenses.mit; 90 + maintainers = with maintainers; [ fbeffa ]; 91 + platforms = platforms.linux; 92 + mainProgram = "fastcap"; 93 + }; 94 + }