From: "Andreas K. Huettel" <dilfridge@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/dilfridge:master commit in: sci-electronics/tnt/, sci-electronics/tnt/files/
Date: Thu, 24 Feb 2011 21:44:58 +0000 (UTC) [thread overview]
Message-ID: <d6512a020a4b26e0a22d40c00eb86288e6d09c86.dilfridge@gentoo> (raw)
commit: d6512a020a4b26e0a22d40c00eb86288e6d09c86
Author: Andreas K. Huettel (dilfridge) <mail <AT> akhuettel <DOT> de>
AuthorDate: Thu Feb 24 18:00:42 2011 +0000
Commit: Andreas K. Huettel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Thu Feb 24 18:00:42 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/dilfridge.git;a=commit;h=d6512a02
[sci-electronics/tnt] Added files from George Reitsma
---
sci-electronics/tnt/Manifest | 22 ++++
.../tnt/files/tnt-1.2.2-Makefile-am.patch | 27 +++++
.../tnt/files/tnt-1.2.2-bem-nmmtl.patch | 11 ++
.../tnt/files/tnt-1.2.2-calc-cap-calcCAP.patch | 20 ++++
.../tnt/files/tnt-1.2.2-calc-cap-cmplxmat.patch | 38 +++++++
.../tnt/files/tnt-1.2.2-calc-cap-cmplxvec.patch | 38 +++++++
| 40 +++++++
.../files/tnt-1.2.2-calc-cap-complex-source.patch | 57 ++++++++++
.../tnt/files/tnt-1.2.2-calc-cap-data.patch | 11 ++
.../tnt/files/tnt-1.2.2-calc-rl-calcRL.patch | 21 ++++
.../tnt/files/tnt-1.2.2-calc-rl-cmplxmat.patch | 38 +++++++
.../tnt/files/tnt-1.2.2-calc-rl-cmplxvec.patch | 38 +++++++
| 40 +++++++
.../tnt/files/tnt-1.2.2-calc-rl-complex.patch | 56 ++++++++++
.../tnt/files/tnt-1.2.2-calc-rl-data.patch | 11 ++
.../tnt/files/tnt-1.2.2-calc-rl-hankel.patch | 38 +++++++
.../tnt/files/tnt-1.2.2-calc-rl-kelvin.patch | 37 +++++++
.../tnt/files/tnt-1.2.2-doc-Makefile-am.patch | 37 +++++++
.../tnt/files/tnt-1.2.2-gui-splash.patch | 11 ++
sci-electronics/tnt/files/tnt-1.2.2-gui_help.patch | 11 ++
sci-electronics/tnt/files/tnt-1.2.2-tkcon.patch | 16 +++
sci-electronics/tnt/tnt-1.2.2.ebuild | 108 ++++++++++++++++++++
22 files changed, 726 insertions(+), 0 deletions(-)
diff --git a/sci-electronics/tnt/Manifest b/sci-electronics/tnt/Manifest
new file mode 100644
index 0000000..2391b0c
--- /dev/null
+++ b/sci-electronics/tnt/Manifest
@@ -0,0 +1,22 @@
+AUX tnt-1.2.2-Makefile-am.patch 758 RMD160 2524d177a9ea2f28889775ee8dad0663f55a586c SHA1 5dc022c9009ad5f425fed591c880e73047d2eeb1 SHA256 aea0daec458376e63315736a45bc307a4768443c2a3be85aeb29f6fd1caf1f34
+AUX tnt-1.2.2-bem-nmmtl.patch 456 RMD160 8463540d64226a8bf769a66d7fdd9fd5daf61cb6 SHA1 8b08be79fee98f1e06c5ded2e4fa24aacd8c6007 SHA256 f6f0bde8df73c524545e2290958a9612692f2a76114ed1ba7a6b984b81cb1dd1
+AUX tnt-1.2.2-calc-cap-calcCAP.patch 484 RMD160 5e78e1ae6b44c03335e0847f484b21532554e696 SHA1 c6885d59f601b8af04e3bed683fc8739c00a52fe SHA256 57312831069af91d0215b1be8cde0f9bbe540b51e65daa85427de024d103a68e
+AUX tnt-1.2.2-calc-cap-cmplxmat.patch 1135 RMD160 8233a0f92ef0a71de7e79d459ac3747c26bc40ca SHA1 e73882c19ec5a27eb0db862679d66cc53d1c4c1b SHA256 ca3ff5197aa4dc8402aa981003d137002160a98b5c571dba8ccab7ff0987498a
+AUX tnt-1.2.2-calc-cap-cmplxvec.patch 873 RMD160 ae8e8579ab450ce8b0c4a59eebcc1b403660f777 SHA1 dff16b36ef487614274fe8eefacd605df0fcd9a6 SHA256 a5c1a7dace24550aa6d60c094bf083e2ae45e8d543c9481314e0a2ac4943abbb
+AUX tnt-1.2.2-calc-cap-complex-header.patch 1204 RMD160 531131c3db6974bd3d57ccd5c551c489adbd153a SHA1 a83d68df2e36d29f62ee247c4fecf4a168ef8031 SHA256 aae30f19b33f5daa3ef039d05bdd920a69577e17b32544f7748529e1ff14965e
+AUX tnt-1.2.2-calc-cap-complex-source.patch 1010 RMD160 592d9869c27d02d9419e9cfc4b73cffc3b39b8b2 SHA1 2b38bb4dc963b37d39ec616f3052bec1a08af405 SHA256 cfe2934a2e69f721391f36ab4a272205a4184fd33f913b7ad3a04f12e9bf2654
+AUX tnt-1.2.2-calc-cap-data.patch 289 RMD160 f25915f15fb1989485dbdc6e454fd83a029bd5db SHA1 d81efcdde0b4518a8de34c0acb40f512174f8600 SHA256 6d9c6b256e9b6fe01cded01b2ebc342d16ae2e64a8d7ecce6b9d7165a1b9b59a
+AUX tnt-1.2.2-calc-rl-calcRL.patch 548 RMD160 371c4e8dc91f90f70fe081e9ea53f596fa72200f SHA1 a7782d82e5c71fdb06c4ab51de767fa5947c4a5d SHA256 b291ad1eb8507f6f4cce43dac89a0ace0b0da34bc5634b8293319747b838cd99
+AUX tnt-1.2.2-calc-rl-cmplxmat.patch 1133 RMD160 85f99f8a45cba635db451f4ad63be28f2fd10e3a SHA1 578909d004227e0e29eba526160c7ce4aca746df SHA256 7c50f0b5d6391f70da6ecedd46f8a5928d6ae3f6922630538a59d4b150fdd579
+AUX tnt-1.2.2-calc-rl-cmplxvec.patch 870 RMD160 ebd44088a8eacfe9dcdb31de0482d05e40c425bc SHA1 35f54c649cec1ce5452d17edd90a4fdad79b955a SHA256 0bc587393e5bbec3810600e3e5287253eb3908fdddb423ac5092b50737c702e6
+AUX tnt-1.2.2-calc-rl-complex-header.patch 1133 RMD160 887e68ec21b5f19f7796373f721b6e3d9bc6ff74 SHA1 0e422436a03db4cdf9f746b99204e7cace1fe342 SHA256 b0be0c3fb20dd9b004639050bf3728f7e230fc343d2828ce02b22ad3e2c1dbdf
+AUX tnt-1.2.2-calc-rl-complex.patch 1053 RMD160 e8f60fa8d4618924ca270bfbc2ab3bf2cea02bb2 SHA1 a2c7f008e0897492e6720719f3bae27eabd1bf49 SHA256 6e68cb9a3bf1827f369e50f0bbcd95d3e1e2e00a065c800f3dfbc09f57394695
+AUX tnt-1.2.2-calc-rl-data.patch 287 RMD160 66dbcda32dc943a1f4232777b68f382096787632 SHA1 5e987f85d4cae8c9ead6b803d3dfcb699ddb00b8 SHA256 62b18eaba9f74f7f22feb9057c6e38f1de03ae635c85b269b5c7e8dcbe59afc2
+AUX tnt-1.2.2-calc-rl-hankel.patch 899 RMD160 ad6f8bbbc84b052deea92ce7532d5b093bced253 SHA1 da1cc1a1d12cbf64d4678da71e69f3abf1b857aa SHA256 24271b20db123c428ed2fe26d71b4ae4f95bbb10c36e47333c35c1efdbfe53f6
+AUX tnt-1.2.2-calc-rl-kelvin.patch 1718 RMD160 3c7395aa8d822513f61bb4f0848d7e8712ff093f SHA1 cf219dab2e5061eeb6f7fafc33c134c00a8fc4a8 SHA256 f759d98f36c6a5a8ec0fd639698510d4d01c8ba77fd1b3446c45e24267636fc6
+AUX tnt-1.2.2-doc-Makefile-am.patch 1032 RMD160 f8175289f67577cadb61649c00f4a233ff2b16b6 SHA1 24c83817bd7afdcd59260f1f52d2757e98bdf947 SHA256 38862d969bcee3e35623317572d3b22122f16678b88a95e79f4727c7d6f9ffa0
+AUX tnt-1.2.2-gui-splash.patch 401 RMD160 7870cc511eea6d591ee8be96504c5d5a63e40375 SHA1 e5fe12e4e1af6bb0627440f3722894a5d9aaaa8f SHA256 aede7920d86ec402463a4ce3ea43f839b509dda6859a12ae01796eadf77bd2ef
+AUX tnt-1.2.2-gui_help.patch 315 RMD160 050721d4c09efe2a9706ab8fe21a1ae072fae50b SHA1 9722eeb18a7daa1026f5b1a730801da675c727d1 SHA256 bf0c7b39a2c4a8eb8e5195868ee1b9751ebc53ab531435cc7e970ad7a8199d7f
+AUX tnt-1.2.2-tkcon.patch 447 RMD160 d3b708d681a5a468c9f17b27dba6c273e3b472ad SHA1 55e8f6bb54d4e59ce73620d2909d6d8b23197770 SHA256 1302823cd11ad31dcca115abb93a6f1c07299872bf5d48d51815b5436bbee846
+DIST tnt-1.2.2.tar.gz 2020099 RMD160 1a2ba68a93ee21590bb25a3eacf85d3773c3e77d SHA1 bd089863ca2cd939009253e83f4ab75317191047 SHA256 cbb418d0de4f244d8174e8826e4d8272bce753f50431c9d87af08928f5817445
+EBUILD tnt-1.2.2.ebuild 3583 RMD160 6a82f137314f74b17fc0b0c1a7550c3d2f4a3fbe SHA1 4e55494cbfe84b915355038693c9f97559ca27fa SHA256 e9760aed64970a0177a6043aa1fe453fb597fabb5d690bef454976947f1ce64f
diff --git a/sci-electronics/tnt/files/tnt-1.2.2-Makefile-am.patch b/sci-electronics/tnt/files/tnt-1.2.2-Makefile-am.patch
new file mode 100644
index 0000000..aea1e2e
--- /dev/null
+++ b/sci-electronics/tnt/files/tnt-1.2.2-Makefile-am.patch
@@ -0,0 +1,27 @@
+--- Makefile.am.org 2011-02-19 00:22:25.000000000 -0800
++++ Makefile.am 2011-02-19 00:23:29.000000000 -0800
+@@ -51,14 +51,16 @@
+ # a prefix. If not, then I suppose README will go into
+ # /usr.
+ #---------------------------------------------------------------
+-appdocsdir = $(prefix)
+-appdocs_DATA = \
+- AUTHORS$(TXTEXT) \
+- COPYING$(TXTEXT) \
+- ChangeLog$(TXTEXT) \
+- NEWS$(TXTEXT) \
+- README$(TXTEXT) \
+- THANKS$(TXTEXT)
++#
++# Portage takes care for this
++#appdocsdir = $(prefix)
++#appdocs_DATA = \
++# AUTHORS$(TXTEXT) \
++# COPYING$(TXTEXT) \
++# ChangeLog$(TXTEXT) \
++# NEWS$(TXTEXT) \
++# README$(TXTEXT) \
++# THANKS$(TXTEXT)
+
+ #---------------------------------------------------------------
+ # Convert application documents to text files on Windows.
diff --git a/sci-electronics/tnt/files/tnt-1.2.2-bem-nmmtl.patch b/sci-electronics/tnt/files/tnt-1.2.2-bem-nmmtl.patch
new file mode 100644
index 0000000..c990c46
--- /dev/null
+++ b/sci-electronics/tnt/files/tnt-1.2.2-bem-nmmtl.patch
@@ -0,0 +1,11 @@
+--- bem/src/nmmtl.cpp.org 2011-02-19 16:12:58.000000000 -0800
++++ bem/src/nmmtl.cpp 2011-02-19 16:15:36.000000000 -0800
+@@ -352,7 +352,7 @@
+ sprintf (filespec, "%s.result", filename);
+ if( (output_file1 = fopen(filespec,"w")) == NULL )
+ {
+- printf ("*** Could not open %s for output ***\n");
++ printf ("*** Could not open %s for output ***\n", filespec);
+ return 0; /* Fatal error; could not open output file */
+ }
+
diff --git a/sci-electronics/tnt/files/tnt-1.2.2-calc-cap-calcCAP.patch b/sci-electronics/tnt/files/tnt-1.2.2-calc-cap-calcCAP.patch
new file mode 100644
index 0000000..efec2c4
--- /dev/null
+++ b/sci-electronics/tnt/files/tnt-1.2.2-calc-cap-calcCAP.patch
@@ -0,0 +1,20 @@
+--- calcCAP/src/calcCAP.cpp.org 2011-02-18 02:05:38.000000000 -0800
++++ calcCAP/src/calcCAP.cpp 2011-02-18 01:44:47.000000000 -0800
+@@ -14,6 +14,8 @@
+ #endif
+ #include <time.h>
+ #include <stdio.h>
++#include <string.h>
++using namespace std;
+
+ /********************** Global variables *******************/
+
+@@ -287,7 +289,7 @@
+
+ for ( i1 = 0; i1 < Nc; i1 ++ ) {
+
+- sumc[i1] = cmplx( 0.0, 0.0 );
++ sumc[i1] = Complex( 0.0, 0.0 );
+
+
+ for ( j1 = 0; j1 < Nw; j1 ++ ) {
diff --git a/sci-electronics/tnt/files/tnt-1.2.2-calc-cap-cmplxmat.patch b/sci-electronics/tnt/files/tnt-1.2.2-calc-cap-cmplxmat.patch
new file mode 100644
index 0000000..e3eda78
--- /dev/null
+++ b/sci-electronics/tnt/files/tnt-1.2.2-calc-cap-cmplxmat.patch
@@ -0,0 +1,38 @@
+--- calcCAP/src/cmplxmat.cpp.org 2011-02-18 02:07:06.000000000 -0800
++++ calcCAP/src/cmplxmat.cpp 2011-02-18 01:38:34.000000000 -0800
+@@ -378,7 +378,7 @@
+ Matrix result(d_i,d_j);
+ for(int i = 0; i < d_i; i++)
+ for(int j = 0; j < d_j; j++)
+- result(i,j)=::real(elem(i,j));
++ result(i,j)=elem(i,j).real(); // result(i,j)=::real(elem(i,j));
+ return (result);
+ }
+
+@@ -387,7 +387,7 @@
+ Matrix result(d_i,d_j);
+ for(int i = 0; i < d_i; i++)
+ for(int j = 0; j < d_j; j++)
+- result(i,j)=::imag(elem(i,j));
++ result(i,j)=elem(i,j).imag(); // result(i,j)=::imag(elem(i,j));
+ return (result);
+ }
+
+@@ -396,7 +396,7 @@
+ Matrix result(d_i,d_j);
+ for(int i = 0; i < d_i; i++)
+ for(int j = 0; j < d_j; j++)
+- result(i,j)=::cabs(elem(i,j));
++ result(i,j)=elem(i,j).cabs(); // result(i,j)=::cabs(elem(i,j));
+ return (result);
+ }
+
+@@ -405,7 +405,7 @@
+ CmplxMatrix result(d_i,d_j);
+ for(int i = 0; i < d_i; i++)
+ for(int j = 0; j < d_j; j++)
+- result(i,j)=::conjg(elem(i,j));
++ result(i,j)=elem(i,j).conjg(); // result(i,j)=::conjg(elem(i,j));
+ return (result);
+ }
+
diff --git a/sci-electronics/tnt/files/tnt-1.2.2-calc-cap-cmplxvec.patch b/sci-electronics/tnt/files/tnt-1.2.2-calc-cap-cmplxvec.patch
new file mode 100644
index 0000000..2ec0567
--- /dev/null
+++ b/sci-electronics/tnt/files/tnt-1.2.2-calc-cap-cmplxvec.patch
@@ -0,0 +1,38 @@
+--- calcCAP/src/cmplxvec.cpp.org 2011-02-18 02:06:39.000000000 -0800
++++ calcCAP/src/cmplxvec.cpp 2011-02-18 01:42:05.000000000 -0800
+@@ -287,7 +287,7 @@
+
+ int n = d;
+ CmplxVector tmp(n);
+- for(int i = 0; i < n; i++) tmp[i] = ::conjg(v[i]);
++ for(int i = 0; i < n; i++) tmp[i] = v[i].conjg(); // tmp[i] = ::conjg(v[i]);
+ return (tmp);
+ }
+
+@@ -295,7 +295,7 @@
+
+ Vector tmp(d);
+ int n = d;
+- while(n--) tmp[n] = ::real(v[n]);
++ while(n--) tmp[n] = v[n].real(); // tmp[n] = ::real(v[n]);
+ return (tmp);
+ }
+
+@@ -303,7 +303,7 @@
+
+ Vector tmp(d);
+ int n = d;
+- while(n--) tmp[n] = ::imag(v[n]);
++ while(n--) tmp[n] = v[n].imag(); // tmp[n] = ::imag(v[n]);
+ return (tmp);
+ }
+
+@@ -311,7 +311,7 @@
+
+ Vector result(d);
+ for(int i = 0; i < d; i++)
+- result[i]=::cabs(v[i]);
++ result[i]=v[i].cabs(); // result[i]=::cabs(v[i]);
+ return (result);
+ }
+
--git a/sci-electronics/tnt/files/tnt-1.2.2-calc-cap-complex-header.patch b/sci-electronics/tnt/files/tnt-1.2.2-calc-cap-complex-header.patch
new file mode 100644
index 0000000..482bd55
--- /dev/null
+++ b/sci-electronics/tnt/files/tnt-1.2.2-calc-cap-complex-header.patch
@@ -0,0 +1,40 @@
+--- calcCAP/src/complex.h.org 2011-02-18 02:07:37.000000000 -0800
++++ calcCAP/src/complex.h 2011-02-18 01:33:02.000000000 -0800
+@@ -1,10 +1,13 @@
+ #ifndef _complex__h_
+ #define _complex__h_
+
+-#include <iostream.h>
++#include <iostream>
++using namespace std;
+
+ class Complex
+ {
++ public:
++
+ friend Complex operator*(const double&, const Complex&);
+ friend Complex operator+(const double&, const Complex&);
+ friend Complex operator-(const double&, const Complex&);
+@@ -16,6 +19,14 @@
+ friend double cabs(const Complex&);
+ friend double cabsm(const Complex&);
+ friend Complex conjg(const Complex&);
++
++ double real(void);
++ double imag(void);
++ double arg(void);
++ double cabs(void);
++ double cabsm(void);
++ Complex conjg(void);
++
+ friend Complex cmplx(const double,const double);
+ friend Complex polar(const double&, const double&);
+ friend Complex cos(const Complex&);
+@@ -37,7 +48,6 @@
+ friend ostream& operator<<(ostream&, Complex&);
+ friend istream& operator>>(istream&, Complex&);
+
+- public:
+ Complex(){} // constructors
+ Complex(double r, double i = 0.0);
+ Complex(const Complex&);
diff --git a/sci-electronics/tnt/files/tnt-1.2.2-calc-cap-complex-source.patch b/sci-electronics/tnt/files/tnt-1.2.2-calc-cap-complex-source.patch
new file mode 100644
index 0000000..141add6
--- /dev/null
+++ b/sci-electronics/tnt/files/tnt-1.2.2-calc-cap-complex-source.patch
@@ -0,0 +1,57 @@
+--- calcCAP/src/complex.cpp.org 2011-02-18 02:07:29.000000000 -0800
++++ calcCAP/src/complex.cpp 2011-02-18 01:34:51.000000000 -0800
+@@ -203,6 +203,54 @@
+ return(result);
+ }
+
++double Complex::real(void) {
++
++ return(re);
++}
++
++double Complex::imag(void) {
++
++ return(im);
++}
++
++double Complex::arg(void) {
++
++ return((im == 0.0)&&(re == 0.0) ? 0 : atan2(im, re));
++}
++
++double Complex::cabs(void) {
++
++ double x, y, ans, temp;
++ x = fabs(re);
++ y = fabs(im);
++ if (x == 0.0)
++ ans = y;
++ else if (y == 0.0)
++ ans = x;
++ else if (x > y) {
++ temp = y/x;
++ ans = x*sqrt(1.0+temp*temp);
++ } else {
++ temp = x/y;
++ ans = y*sqrt(1.0+temp*temp);
++ }
++ return ans;
++}
++
++double Complex::cabsm(void) {
++
++ return(sqrt(re*re + im*im));
++}
++
++Complex Complex::conjg(void) {
++
++ Complex com;
++ com.re = re;
++ com.im = -im;
++ return(com);
++}
++
++
+ /********************* friends *****************************/
+
+ Complex operator*(const double& r, const Complex& c) {
diff --git a/sci-electronics/tnt/files/tnt-1.2.2-calc-cap-data.patch b/sci-electronics/tnt/files/tnt-1.2.2-calc-cap-data.patch
new file mode 100644
index 0000000..ad18429
--- /dev/null
+++ b/sci-electronics/tnt/files/tnt-1.2.2-calc-cap-data.patch
@@ -0,0 +1,11 @@
+--- calcCAP/src/data.cpp.org 2011-02-18 02:06:06.000000000 -0800
++++ calcCAP/src/data.cpp 2011-02-18 01:42:50.000000000 -0800
+@@ -260,7 +260,7 @@
+ }
+ }
+
+- Ic = cmplx( 0.0, 1.0 );
++ Ic = Complex( 0.0, 1.0 );
+
+ Nc4 = 11*Nh+1;
+ step_w = 1.0/power( 2.0, J );
diff --git a/sci-electronics/tnt/files/tnt-1.2.2-calc-rl-calcRL.patch b/sci-electronics/tnt/files/tnt-1.2.2-calc-rl-calcRL.patch
new file mode 100644
index 0000000..db1a39e
--- /dev/null
+++ b/sci-electronics/tnt/files/tnt-1.2.2-calc-rl-calcRL.patch
@@ -0,0 +1,21 @@
+--- calcRL/src/calcRL.cpp.org 2011-02-18 02:24:51.000000000 -0800
++++ calcRL/src/calcRL.cpp 2011-02-18 01:30:13.000000000 -0800
+@@ -43,7 +43,8 @@
+ #endif
+ #include <time.h>
+ #include <stdio.h>
+-
++#include <string.h>
++using namespace std;
+ /********************** Global variables *******************/
+
+ int Nc, Die, Rec, Cir, Tri, Ell, Pol, Gnd, Tra;
+@@ -564,7 +565,7 @@
+ tmp4 = Circum[i] / double(Nw);
+ tmpsum1 = 0.0;
+ tmpsum2 = 0.0;
+- sum2[i] = cmplx( 0.0, 0.0 );
++ sum2[i] = Complex( 0.0, 0.0 );
+
+ for (j = 0; j < Nw; j ++) {
+
diff --git a/sci-electronics/tnt/files/tnt-1.2.2-calc-rl-cmplxmat.patch b/sci-electronics/tnt/files/tnt-1.2.2-calc-rl-cmplxmat.patch
new file mode 100644
index 0000000..6df3fb9
--- /dev/null
+++ b/sci-electronics/tnt/files/tnt-1.2.2-calc-rl-cmplxmat.patch
@@ -0,0 +1,38 @@
+--- calcRL/src/cmplxmat.cpp.org 2011-02-18 02:26:04.000000000 -0800
++++ calcRL/src/cmplxmat.cpp 2011-02-18 01:13:48.000000000 -0800
+@@ -386,7 +386,7 @@
+ Matrix result(d_i,d_j);
+ for(int i = 0; i < d_i; i++)
+ for(int j = 0; j < d_j; j++)
+- result(i,j)=::real(elem(i,j));
++ result(i,j)=elem(i,j).real(); // result(i,j)=::real(elem(i,j));
+ return (result);
+ }
+
+@@ -395,7 +395,7 @@
+ Matrix result(d_i,d_j);
+ for(int i = 0; i < d_i; i++)
+ for(int j = 0; j < d_j; j++)
+- result(i,j)=::imag(elem(i,j));
++ result(i,j)=elem(i,j).imag(); // result(i,j)=::imag(elem(i,j));
+ return (result);
+ }
+
+@@ -404,7 +404,7 @@
+ Matrix result(d_i,d_j);
+ for(int i = 0; i < d_i; i++)
+ for(int j = 0; j < d_j; j++)
+- result(i,j)=::cabs(elem(i,j));
++ result(i,j)=elem(i,j).cabs(); // result(i,j)=::cabj(elem(i,j));
+ return (result);
+ }
+
+@@ -413,7 +413,7 @@
+ CmplxMatrix result(d_i,d_j);
+ for(int i = 0; i < d_i; i++)
+ for(int j = 0; j < d_j; j++)
+- result(i,j)=::conjg(elem(i,j));
++ result(i,j)=elem(i,j).conjg(); // result(i,j)=::conjg(elem(i,j));
+ return (result);
+ }
+
diff --git a/sci-electronics/tnt/files/tnt-1.2.2-calc-rl-cmplxvec.patch b/sci-electronics/tnt/files/tnt-1.2.2-calc-rl-cmplxvec.patch
new file mode 100644
index 0000000..767098c
--- /dev/null
+++ b/sci-electronics/tnt/files/tnt-1.2.2-calc-rl-cmplxvec.patch
@@ -0,0 +1,38 @@
+--- calcRL/src/cmplxvec.cpp.org 2011-02-18 02:25:44.000000000 -0800
++++ calcRL/src/cmplxvec.cpp 2011-02-18 01:24:09.000000000 -0800
+@@ -289,7 +289,7 @@
+
+ int n = d;
+ CmplxVector tmp(n);
+- for(int i = 0; i < n; i++) tmp[i] = ::conjg(v[i]);
++ for(int i = 0; i < n; i++) tmp[i] = v[i].conjg(); // tmp[i] = ::conjg(v[i]);
+ return (tmp);
+ }
+
+@@ -297,7 +297,7 @@
+
+ Vector tmp(d);
+ int n = d;
+- while(n--) tmp[n] = ::real(v[n]);
++ while(n--) tmp[n] = v[n].real(); // tmp[n] = ::real(v[n]);
+ return (tmp);
+ }
+
+@@ -305,7 +305,7 @@
+
+ Vector tmp(d);
+ int n = d;
+- while(n--) tmp[n] = ::imag(v[n]);
++ while(n--) tmp[n] = v[n].imag(); // tmp[n] = ::imag(v[n])
+ return (tmp);
+ }
+
+@@ -313,7 +313,7 @@
+
+ Vector result(d);
+ for(int i = 0; i < d; i++)
+- result[i]=::cabs(v[i]);
++ result[i]=v[i].cabs(); // result[i]=::cabs(v[i]);
+ return (result);
+ }
+
--git a/sci-electronics/tnt/files/tnt-1.2.2-calc-rl-complex-header.patch b/sci-electronics/tnt/files/tnt-1.2.2-calc-rl-complex-header.patch
new file mode 100644
index 0000000..d0d81d3
--- /dev/null
+++ b/sci-electronics/tnt/files/tnt-1.2.2-calc-rl-complex-header.patch
@@ -0,0 +1,40 @@
+--- calcRL/src/complex.h.org 2011-02-18 02:26:34.000000000 -0800
++++ calcRL/src/complex.h 2011-02-18 01:11:29.000000000 -0800
+@@ -3,10 +3,12 @@
+
+ #include <stdlib.h>
+ #include <math.h>
+-#include <iostream.h>
++#include <iostream>
++using namespace std;
+
+ class Complex
+ {
++ public:
+ friend Complex operator*(const double&, const Complex&);
+ friend Complex operator+(const double&, const Complex&);
+ friend Complex operator-(const double&, const Complex&);
+@@ -14,6 +16,14 @@
+
+ friend double real(const Complex&);
+ friend double imag(const Complex&);
++ double real(void);
++ double imag(void);
++ double arg(void);
++ double cabs(void);
++ double cabsm(void);
++ Complex conjg(void);
++
++
+ friend double arg(const Complex&);
+ friend double cabs(const Complex&);
+ friend double cabsm(const Complex&);
+@@ -39,7 +49,7 @@
+ friend ostream& operator<<(ostream&, Complex&);
+ friend istream& operator>>(istream&, Complex&);
+
+- public:
++
+ Complex(){} // constructors
+ Complex(double r, double i = 0.0);
+ Complex(const Complex&);
diff --git a/sci-electronics/tnt/files/tnt-1.2.2-calc-rl-complex.patch b/sci-electronics/tnt/files/tnt-1.2.2-calc-rl-complex.patch
new file mode 100644
index 0000000..81d94ff
--- /dev/null
+++ b/sci-electronics/tnt/files/tnt-1.2.2-calc-rl-complex.patch
@@ -0,0 +1,56 @@
+--- calcRL/src/complex.cpp.org 2011-02-18 02:26:46.000000000 -0800
++++ calcRL/src/complex.cpp 2011-02-18 01:11:15.000000000 -0800
+@@ -17,6 +17,53 @@
+
+ /*********************** members *********************************/
+
++double Complex::real(void) {
++
++ return(re);
++}
++
++double Complex::imag(void) {
++
++ return(im);
++}
++
++double Complex::arg(void) {
++
++ return((im == 0.0)&&(re == 0.0) ? 0 : atan2(im, re));
++}
++
++double Complex::cabs(void) {
++
++ double x, y, ans, temp;
++ x = fabs(re);
++ y = fabs(im);
++ if (x == 0.0)
++ ans = y;
++ else if (y == 0.0)
++ ans = x;
++ else if (x > y) {
++ temp = y/x;
++ ans = x*sqrt(1.0+temp*temp);
++ } else {
++ temp = x/y;
++ ans = y*sqrt(1.0+temp*temp);
++ }
++ return ans;
++}
++
++double Complex::cabsm(void) {
++
++ return(sqrt(re*re + im*im));
++}
++
++Complex Complex::conjg(void) {
++
++ Complex com;
++ com.re = re;
++ com.im = -im;
++ return(com);
++}
++
+ /********************* friends *****************************/
+
+ Complex operator*(const double& r, const Complex& c) {
diff --git a/sci-electronics/tnt/files/tnt-1.2.2-calc-rl-data.patch b/sci-electronics/tnt/files/tnt-1.2.2-calc-rl-data.patch
new file mode 100644
index 0000000..dedb221
--- /dev/null
+++ b/sci-electronics/tnt/files/tnt-1.2.2-calc-rl-data.patch
@@ -0,0 +1,11 @@
+--- calcRL/src/data.cpp.org 2011-02-18 02:25:27.000000000 -0800
++++ calcRL/src/data.cpp 2011-02-18 02:32:13.000000000 -0800
+@@ -251,7 +251,7 @@
+ }
+ }
+
+- Ic = cmplx( 0.0, 1.0 );
++ Ic = Complex( 0.0, 1.0 );
+
+ Nc4 = 11*Nh+1;
+ step_w = 1.0/power( 2.0, J );
diff --git a/sci-electronics/tnt/files/tnt-1.2.2-calc-rl-hankel.patch b/sci-electronics/tnt/files/tnt-1.2.2-calc-rl-hankel.patch
new file mode 100644
index 0000000..f0fc7f6
--- /dev/null
+++ b/sci-electronics/tnt/files/tnt-1.2.2-calc-rl-hankel.patch
@@ -0,0 +1,38 @@
+--- calcRL/src/hankel.cpp.org 2011-02-18 03:17:58.000000000 -0800
++++ calcRL/src/hankel.cpp 2011-02-18 03:18:42.000000000 -0800
+@@ -19,7 +19,7 @@
+
+ hank01( vj0, vy0, x, 1 );
+
+- return( cmplx( vj0, -vy0 ) );
++ return( Complex( vj0, -vy0 ) );
+ }
+
+ /***** Function Hank21 - to calculate H^(2)_1(x), x - double ****/
+@@ -30,7 +30,7 @@
+
+ hank11( vj1, vy1, x, 1 );
+
+- return( cmplx( vj1, -vy1 ) );
++ return( Complex( vj1, -vy1 ) );
+ }
+
+ /***** Function Hank10 - to calculate H^(1)_0(x), x - double ****/
+@@ -41,7 +41,7 @@
+
+ hank01( vj0, vy0, x, 1 );
+
+- return( cmplx( vj0, vy0 ) );
++ return( Complex( vj0, vy0 ) );
+ }
+
+ /***** Function Hank11 - to calculate H^(1)_1(x), x - double ****/
+@@ -52,7 +52,7 @@
+
+ hank11( vj1, vy1, x, 1 );
+
+- return( cmplx( vj1, vy1 ) );
++ return( Complex( vj1, vy1 ) );
+ }
+
+ int hank01( double& vj0, double& vy0, double xd, int n ) {
diff --git a/sci-electronics/tnt/files/tnt-1.2.2-calc-rl-kelvin.patch b/sci-electronics/tnt/files/tnt-1.2.2-calc-rl-kelvin.patch
new file mode 100644
index 0000000..9c3e521
--- /dev/null
+++ b/sci-electronics/tnt/files/tnt-1.2.2-calc-rl-kelvin.patch
@@ -0,0 +1,37 @@
+--- calcRL/src/kelvin.cpp.org 2011-02-18 02:25:08.000000000 -0800
++++ calcRL/src/kelvin.cpp 2011-02-18 01:26:26.000000000 -0800
+@@ -332,20 +332,20 @@
+ return(keip);
+ }
+
+-static Complex seta_p1 = cmplx(0.0,-0.3926991);
+-static Complex seta_p2 = cmplx(0.0110486,0.0);
+-static Complex seta_p3 = cmplx(0.0,-0.0009765);
+-static Complex seta_p4 = cmplx(-0.0000906,-0.0000901);
+-static Complex seta_p5 = cmplx(-0.0000252,0.0);
+-static Complex seta_p6 = cmplx(-0.0000034,0.0000051);
+-static Complex seta_p7 = cmplx(0.0000006,.0000019);
+-static Complex dphi_p1 = cmplx(0.7071068,0.7071068);
+-static Complex dphi_p2 = cmplx(-0.0625001,-0.0000001);
+-static Complex dphi_p3 = cmplx(-0.0013813,0.0013811);
+-static Complex dphi_p4 = cmplx(0.0000005,0.0002452);
+-static Complex dphi_p5 = cmplx(0.0000346,0.0000338);
+-static Complex dphi_p6 = cmplx(0.0000117,-0.0000024);
+-static Complex dphi_p7 = cmplx(0.0000016,-0.0000032);
++static Complex seta_p1 = Complex(0.0,-0.3926991);
++static Complex seta_p2 = Complex(0.0110486,0.0);
++static Complex seta_p3 = Complex(0.0,-0.0009765);
++static Complex seta_p4 = Complex(-0.0000906,-0.0000901);
++static Complex seta_p5 = Complex(-0.0000252,0.0);
++static Complex seta_p6 = Complex(-0.0000034,0.0000051);
++static Complex seta_p7 = Complex(0.0000006,.0000019);
++static Complex dphi_p1 = Complex(0.7071068,0.7071068);
++static Complex dphi_p2 = Complex(-0.0625001,-0.0000001);
++static Complex dphi_p3 = Complex(-0.0013813,0.0013811);
++static Complex dphi_p4 = Complex(0.0000005,0.0002452);
++static Complex dphi_p5 = Complex(0.0000346,0.0000338);
++static Complex dphi_p6 = Complex(0.0000117,-0.0000024);
++static Complex dphi_p7 = Complex(0.0000016,-0.0000032);
+
+
+
diff --git a/sci-electronics/tnt/files/tnt-1.2.2-doc-Makefile-am.patch b/sci-electronics/tnt/files/tnt-1.2.2-doc-Makefile-am.patch
new file mode 100644
index 0000000..092158b
--- /dev/null
+++ b/sci-electronics/tnt/files/tnt-1.2.2-doc-Makefile-am.patch
@@ -0,0 +1,37 @@
+--- doc/Makefile.am.org 2011-02-19 00:25:11.000000000 -0800
++++ doc/Makefile.am 2011-02-19 00:28:31.000000000 -0800
+@@ -43,7 +43,7 @@
+ #
+ #---------------------------------------------------------------
+
+-docdir = $(prefix)/doc
++#docdir = $(prefix)/doc
+ doc_DATA = \
+ user-guide.pdf
+
+@@ -73,15 +73,17 @@
+ pdflatex $*
+ latex2html -split 4 -show_section_numbers -local_icons $<
+
++# Removed, because portage takes care of it.
++#
+ # Custom installation rule
+-install-data-local:
+- for f in $(doc_DATA); do \
+- $(mkinstalldirs) $(docdir); \
+- $(INSTALL_DATA) $$f $(docdir)/$$f; \
+- d=`basename $$f .pdf`; \
+- $(mkinstalldirs) $(docdir)/$$d; \
+- $(INSTALL_DATA) $$d/* $(docdir)/$$d; \
+- done
++#install-data-local:
++# for f in $(doc_DATA); do \
++# $(mkinstalldirs) $(docdir); \
++# $(INSTALL_DATA) $$f $(docdir)/$$f; \
++# d=`basename $$f .pdf`; \
++# $(mkinstalldirs) $(docdir)/$$d; \
++# $(INSTALL_DATA) $$d/* $(docdir)/$$d; \
++# done
+
+ #---------------------------------------------------------------
+ # clean
diff --git a/sci-electronics/tnt/files/tnt-1.2.2-gui-splash.patch b/sci-electronics/tnt/files/tnt-1.2.2-gui-splash.patch
new file mode 100644
index 0000000..e0c381a
--- /dev/null
+++ b/sci-electronics/tnt/files/tnt-1.2.2-gui-splash.patch
@@ -0,0 +1,11 @@
+--- gui/splash.tcl.org 2011-02-19 18:30:20.000000000 -0800
++++ gui/splash.tcl 2011-02-19 18:40:53.000000000 -0800
+@@ -81,7 +81,7 @@
+ } else {
+ set filename COPYING
+ }
+- set licenseFile [file join $::scriptDir .. $filename]
++ set licenseFile [file join /usr share doc package_name html $filename]
+ if { [file exists $licenseFile] } {
+ ::gui::guiPopupFile $licenseFile
+ } else {
diff --git a/sci-electronics/tnt/files/tnt-1.2.2-gui_help.patch b/sci-electronics/tnt/files/tnt-1.2.2-gui_help.patch
new file mode 100644
index 0000000..ba5da09
--- /dev/null
+++ b/sci-electronics/tnt/files/tnt-1.2.2-gui_help.patch
@@ -0,0 +1,11 @@
+--- gui/gui_help.tcl.org 2011-02-19 18:52:20.000000000 -0800
++++ gui/gui_help.tcl 2011-02-19 18:59:17.000000000 -0800
+@@ -26,7 +26,7 @@
+ switch -exact $helpTopic {
+
+ userguide {
+- display_online_help user-guide/index.html
++ display_online_help /usr/share/doc/package_name/html/index.html
+ }
+
+ }
diff --git a/sci-electronics/tnt/files/tnt-1.2.2-tkcon.patch b/sci-electronics/tnt/files/tnt-1.2.2-tkcon.patch
new file mode 100644
index 0000000..4c603c7
--- /dev/null
+++ b/sci-electronics/tnt/files/tnt-1.2.2-tkcon.patch
@@ -0,0 +1,16 @@
+--- sppdgTcllib/console/tkcon.tcl.org 2011-02-19 01:46:57.000000000 -0800
++++ sppdgTcllib/console/tkcon.tcl 2011-02-19 01:47:36.000000000 -0800
+@@ -43,9 +43,10 @@
+
+ if {$tcl_version < 8.0} {
+ return -code error "tkcon requires at least Tcl/Tk8"
+-} else {
+- package require -exact Tk $tcl_version
+-}
++}
++#else {
++# package require -exact Tk $tcl_version
++#}
+
+ catch {package require bogus-package-name}
+ foreach pkg [info loaded {}] {
diff --git a/sci-electronics/tnt/tnt-1.2.2.ebuild b/sci-electronics/tnt/tnt-1.2.2.ebuild
new file mode 100644
index 0000000..53a1464
--- /dev/null
+++ b/sci-electronics/tnt/tnt-1.2.2.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header:Exp $
+
+EAPI=2
+inherit autotools eutils toolchain-funcs
+
+DESCRIPTION="MoM 2.5 D stripline simulator"
+SRC_URI="mirror://sourceforge/mmtl/${P}.tar.gz"
+HOMEPAGE="http://mmtl.sourceforge.net"
+LICENSE="BSD GPL-2"
+S="${WORKDIR}/${P}"
+
+SLOT="0"
+IUSE="doc"
+KEYWORDS="amd64 ~ppc x86"
+
+DEPEND="sys-devel/gcc[fortran]
+ dev-texlive/texlive-latex
+ dev-tex/latex2html
+ media-gfx/imagemagick
+ dev-lang/tcl
+ dev-tcltk/tcllib
+ dev-tcltk/itcl
+ dev-tcltk/bwidget"
+
+RDEPEND="dev-lang/tcl
+ dev-tcltk/tcllib
+ dev-tcltk/itcl
+ dev-tcltk/bwidget"
+
+src_prepare() {
+ # Adapt this old source to the new C++ standards
+ # These patches fix a c++ scope issue, gcc was for some reason
+ # not able to discover friend function of class Complex.
+ # This has been solved by making this functions a member instead of a friend.
+ epatch "${FILESDIR}/${P}"-calc-cap-calcCAP.patch
+ epatch "${FILESDIR}/${P}"-calc-cap-cmplxmat.patch
+ epatch "${FILESDIR}/${P}"-calc-cap-cmplxvec.patch
+ epatch "${FILESDIR}/${P}"-calc-cap-complex-header.patch
+ epatch "${FILESDIR}/${P}"-calc-cap-complex-source.patch
+ epatch "${FILESDIR}/${P}"-calc-cap-data.patch
+ epatch "${FILESDIR}/${P}"-calc-rl-calcRL.patch
+ epatch "${FILESDIR}/${P}"-calc-rl-cmplxmat.patch
+ epatch "${FILESDIR}/${P}"-calc-rl-cmplxvec.patch
+ epatch "${FILESDIR}/${P}"-calc-rl-complex-header.patch
+ epatch "${FILESDIR}/${P}"-calc-rl-complex.patch
+ epatch "${FILESDIR}/${P}"-calc-rl-data.patch
+ epatch "${FILESDIR}/${P}"-calc-rl-kelvin.patch
+ epatch "${FILESDIR}/${P}"-calc-rl-hankel.patch
+ #fix a minor code error
+ epatch "${FILESDIR}/${P}"-bem-nmmtl.patch
+ # Update headers in remaining files
+ # The source code is from the pre-namespace era.
+ sed -i 's/<iostream.h>/\<iostream\>\nusing\ namespace\ std\;/' `grep -r -l iostream.h *`
+ sed -i 's/<iomanip.h>/\<iomanip\>\nusing\ namespace\ std\;/' `grep -r -l iomanip.h *`
+ sed -i 's/<fstream.h>/\<fstream\>\nusing\ namespace\ std\;/' `grep -r -l fstream.h *`
+ # Update fortran compiler
+ sed -i 's/\"g77\"/\"$(tc-getF77)\"/' bem/configure.ac
+ sed -i 's/\"g77\"/\"$(tc-getF77)\"/' calcCAP/configure.ac
+ sed -i 's/\"g77\"/\"$(tc-getF77)\"/' calcRL/configure.ac
+ #block document installation
+ epatch "${FILESDIR}/${P}"-Makefile-am.patch
+ epatch "${FILESDIR}/${P}"-doc-Makefile-am.patch
+ epatch "${FILESDIR}/${P}"-tkcon.patch
+ #adjust new document location in gui
+ epatch "${FILESDIR}/${P}"-gui-splash.patch
+ sed -i "s/package_name/${PF}/" gui/splash.tcl
+ epatch "${FILESDIR}/${P}"-gui_help.patch
+ sed -i "s/package_name/${PF}/" gui/gui_help.tcl
+ # regenerate the configure and make files
+ rm aclocal.m4
+ eautoreconf --force
+}
+
+
+src_configure() {
+ econf || die "econf failed"
+}
+
+src_compile() {
+ emake || die "emake failed"
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "make install failed"
+ dodoc AUTHORS COPYING ChangeLog NEWS README THANKS || die "failed to install docs"
+ dohtml COPYING #tcl cannot handle the archives created by dodoc
+ if use doc; then
+ dodoc doc/*.pdf doc/*.png
+ dohtml doc/user-guide/*
+ fi
+ #Install icon
+ convert gui/logo.gif gui/tnt.png
+ docinto "examples"
+ dodoc examples/* || die "failed to install exampels"
+ newicon gui/tnt.png tnt.png
+ make_desktop_entry ${PN} "Mttl" ${PN}
+}
+
+
+
+pkg_postinst() {
+ einfo "Warning: the sources are not under development anymore."
+ einfo "We made it compile, but users should check if the results make sens."
+ einfo "The GUI was written in an old version of TCL/TK."
+ einfo "Examples are in the /usr/share/doc/tnt-1.2.2 folder."
+}
next reply other threads:[~2011-02-24 21:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-24 21:44 Andreas K. Huettel [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-02-24 21:44 [gentoo-commits] dev/dilfridge:master commit in: sci-electronics/tnt/, sci-electronics/tnt/files/ Andreas K. Huettel
2011-02-25 7:29 Andreas K. Huettel
2014-10-20 19:09 Andreas Hüttel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d6512a020a4b26e0a22d40c00eb86288e6d09c86.dilfridge@gentoo \
--to=dilfridge@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox