summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu-system.am5
-rw-r--r--gnu/packages/engineering.scm50
-rw-r--r--gnu/packages/patches/fasthenry-spAllocate.patch15
-rw-r--r--gnu/packages/patches/fasthenry-spBuild.patch13
-rw-r--r--gnu/packages/patches/fasthenry-spFactor.patch35
-rw-r--r--gnu/packages/patches/fasthenry-spSolve.patch12
-rw-r--r--gnu/packages/patches/fasthenry-spUtils.patch12
7 files changed, 142 insertions, 0 deletions
diff --git a/gnu-system.am b/gnu-system.am
index a6e0ba2a44..87924febd1 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -435,6 +435,11 @@ dist_patch_DATA = \
gnu/packages/patches/expat-CVE-2015-1283.patch \
gnu/packages/patches/fastcap-mulGlobal.patch \
gnu/packages/patches/fastcap-mulSetup.patch \
+ gnu/packages/patches/fasthenry-spAllocate.patch \
+ gnu/packages/patches/fasthenry-spBuild.patch \
+ gnu/packages/patches/fasthenry-spUtils.patch \
+ gnu/packages/patches/fasthenry-spSolve.patch \
+ gnu/packages/patches/fasthenry-spFactor.patch \
gnu/packages/patches/findutils-absolute-paths.patch \
gnu/packages/patches/findutils-localstatedir.patch \
gnu/packages/patches/flashrom-use-libftdi1.patch \
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 4887d907ab..7faf61e3c8 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -314,3 +314,53 @@ optimizer; and it can produce photorealistic and design review images.")
"Fastcap is a capacitance extraction program based on a
multipole-accelerated algorithm.")
(license (license:non-copyleft #f "See fastcap.c."))))
+
+(define-public fasthenry
+ (package
+ (name "fasthenry")
+ (version "3.0-12Nov96")
+ (source (origin
+ (method url-fetch)
+ (file-name (string-append name "-" version ".tar.gz"))
+ (uri (string-append
+ "http://www.rle.mit.edu/cpg/codes/" name
+ "-" version ".tar.z"))
+ (sha256
+ (base32 "1a06xyyd40zhknrkz17xppl2zd5ig4w9g1grc8qrs0zqqcl5hpzi"))
+ (patches (list (search-patch "fasthenry-spAllocate.patch")
+ (search-patch "fasthenry-spBuild.patch")
+ (search-patch "fasthenry-spUtils.patch")
+ (search-patch "fasthenry-spSolve.patch")
+ (search-patch "fasthenry-spFactor.patch")))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags '("CC=gcc" "RM=rm" "SHELL=sh" "all")
+ #:parallel-build? #f
+ #:tests? #f ;; no tests-suite
+ #:modules ((srfi srfi-1)
+ ,@%gnu-build-system-modules)
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (data (string-append out "/share"))
+ (bin (string-append out "/bin"))
+ (doc (string-append data "/doc/" ,name "-" ,version))
+ (examples (string-append doc "/examples")))
+ (with-directory-excursion "bin"
+ (mkdir-p bin)
+ (for-each
+ (lambda (f)
+ (copy-file f (string-append bin "/" (basename f))))
+ (find-files "." ".*")))
+ (copy-recursively "doc" doc)
+ (copy-recursively "examples" examples)
+ #t))))))
+ (home-page "http://www.rle.mit.edu/cpg/research_codes.htm")
+ (synopsis "Multipole-accelerated inductance analysis program")
+ (description
+ "Fasthenry is an inductance extraction program based on a
+multipole-accelerated algorithm.")
+ (license (license:non-copyleft #f "See induct.c."))))
diff --git a/gnu/packages/patches/fasthenry-spAllocate.patch b/gnu/packages/patches/fasthenry-spAllocate.patch
new file mode 100644
index 0000000000..cefd95f539
--- /dev/null
+++ b/gnu/packages/patches/fasthenry-spAllocate.patch
@@ -0,0 +1,15 @@
+Add forward declarations.
+
+--- fasthenry-3.0/src/fasthenry/sparse/spAllocate.c.orig 2015-07-22 09:45:28.864758891 +0200
++++ fasthenry-3.0/src/fasthenry/sparse/spAllocate.c 2015-07-22 13:04:17.579742206 +0200
+@@ -107,7 +107,9 @@
+ #include "spDefs.h"
+
+
+-
++static InitializeElementBlocks( MatrixPtr, int, int );
++static RecordAllocation( MatrixPtr, char* );
++static AllocateBlockOfAllocationList( MatrixPtr );
+
+
+
diff --git a/gnu/packages/patches/fasthenry-spBuild.patch b/gnu/packages/patches/fasthenry-spBuild.patch
new file mode 100644
index 0000000000..cf250fdc4d
--- /dev/null
+++ b/gnu/packages/patches/fasthenry-spBuild.patch
@@ -0,0 +1,13 @@
+Add forward declarations.
+
+--- fasthenry-3.0/src/fasthenry/sparse/spBuild.c.orig 2015-07-22 10:13:30.884638176 +0200
++++ fasthenry-3.0/src/fasthenry/sparse/spBuild.c 2015-07-22 13:08:48.862973419 +0200
+@@ -106,6 +106,8 @@
+ #include "spDefs.h"
+
+
++static void Translate( MatrixPtr, int*, int* );
++static ExpandTranslationArrays( MatrixPtr, register int );
+
+
+
diff --git a/gnu/packages/patches/fasthenry-spFactor.patch b/gnu/packages/patches/fasthenry-spFactor.patch
new file mode 100644
index 0000000000..52bab729af
--- /dev/null
+++ b/gnu/packages/patches/fasthenry-spFactor.patch
@@ -0,0 +1,35 @@
+Add forward declarations.
+
+--- fasthenry-3.0/src/fasthenry/sparse/spFactor.c.orig 2015-07-22 10:37:04.934043468 +0200
++++ fasthenry-3.0/src/fasthenry/sparse/spFactor.c 2015-07-22 12:52:55.515636802 +0200
+@@ -105,7 +105,29 @@
+ #include "spDefs.h"
+
+
+-
++static int FactorComplexMatrix( MatrixPtr );
++static CreateInternalVectors( MatrixPtr );
++static CountMarkowitz( MatrixPtr, register RealVector, int );
++static MarkowitzProducts( MatrixPtr, int );
++static ElementPtr SearchForPivot( MatrixPtr, int, int );
++static ElementPtr SearchForSingleton( MatrixPtr, int );
++static ElementPtr QuicklySearchDiagonal( MatrixPtr, int );
++static ElementPtr SearchDiagonal( MatrixPtr, register int );
++static ElementPtr SearchEntireMatrix( MatrixPtr, int );
++static RealNumber FindLargestInCol( register ElementPtr );
++static RealNumber FindBiggestInColExclude( MatrixPtr, register ElementPtr,
++ register int );
++static ExchangeRowsAndCols( MatrixPtr, ElementPtr, register int );
++static ExchangeColElements( MatrixPtr, int, register ElementPtr,
++ int, register ElementPtr, int );
++static ExchangeRowElements( MatrixPtr, int, register ElementPtr,
++ int, register ElementPtr, int );
++static RealRowColElimination( MatrixPtr, register ElementPtr );
++static ComplexRowColElimination( MatrixPtr, register ElementPtr );
++static UpdateMarkowitzNumbers( MatrixPtr, ElementPtr );
++static ElementPtr CreateFillin( MatrixPtr, register int, int );
++static int MatrixIsSingular( MatrixPtr, int );
++static int ZeroPivot( MatrixPtr, int );
+
+
+
diff --git a/gnu/packages/patches/fasthenry-spSolve.patch b/gnu/packages/patches/fasthenry-spSolve.patch
new file mode 100644
index 0000000000..bed36be0bd
--- /dev/null
+++ b/gnu/packages/patches/fasthenry-spSolve.patch
@@ -0,0 +1,12 @@
+Add forward declarations.
+
+--- fasthenry-3.0/src/fasthenry/sparse/spSolve.c.orig 2015-07-22 12:06:20.502771958 +0200
++++ fasthenry-3.0/src/fasthenry/sparse/spSolve.c 2015-07-22 12:12:03.822798513 +0200
+@@ -95,6 +95,7 @@
+ #include "spDefs.h"
+
+
++static void SolveComplexMatrix( MatrixPtr, RealVector, RealVector );
+
+
+
diff --git a/gnu/packages/patches/fasthenry-spUtils.patch b/gnu/packages/patches/fasthenry-spUtils.patch
new file mode 100644
index 0000000000..99f650d53d
--- /dev/null
+++ b/gnu/packages/patches/fasthenry-spUtils.patch
@@ -0,0 +1,12 @@
+Add forward declarations.
+
+--- fasthenry-3.0/src/fasthenry/sparse/spUtils.c.orig 2015-07-22 12:12:52.579370846 +0200
++++ fasthenry-3.0/src/fasthenry/sparse/spUtils.c 2015-07-22 12:14:09.636275633 +0200
+@@ -107,6 +107,7 @@
+ #include "spDefs.h"
+
+
++static RealNumber ComplexCondition( MatrixPtr, RealNumber, int* );
+
+
+