diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
commit | 415856bdd4f48ab4f2732996f0bae58595092bbe (patch) | |
tree | ede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/qucs |
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/qucs')
-rw-r--r-- | community/qucs/ChangeLog | 3 | ||||
-rw-r--r-- | community/qucs/PKGBUILD | 31 | ||||
-rw-r--r-- | community/qucs/qucs-gcc-4.5.1.patch | 410 |
3 files changed, 444 insertions, 0 deletions
diff --git a/community/qucs/ChangeLog b/community/qucs/ChangeLog new file mode 100644 index 000000000..dba4cf7ec --- /dev/null +++ b/community/qucs/ChangeLog @@ -0,0 +1,3 @@ +2007-06-27 tardo <tardo@nagi-fanboi.net> +* Built for x86_64 + diff --git a/community/qucs/PKGBUILD b/community/qucs/PKGBUILD new file mode 100644 index 000000000..db22d851f --- /dev/null +++ b/community/qucs/PKGBUILD @@ -0,0 +1,31 @@ +# $Id: PKGBUILD 43749 2011-03-29 15:48:34Z spupykin $ +# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Contributor: Víctor Martínez Romanos <vmromanos@gmail.com> + +pkgname=qucs +pkgver=0.0.16 +pkgrel=1 +pkgdesc="An integrated circuit simulator with a graphical user interface" +arch=('i686' 'x86_64') +url="http://qucs.sourceforge.net" +license=('GPL') +depends=('qt3') +optdepends=('freehdl: to permit digital circuit simulation' + 'asco: to enable circuit optimization' + 'perl') +source=(http://downloads.sourceforge.net/sourceforge/qucs/$pkgname-$pkgver.tar.gz + qucs-gcc-4.5.1.patch) +md5sums=('c916502171d422ab168fe5fc681b29d8' + '6fd31dc632cdef53f8c2566ad782901a') + +build() { + cd $srcdir/$pkgname-$pkgver + + . /etc/profile.d/qt3.sh + export PATH=$QTDIR/bin:$PATH + + [ $NOEXTRACT -eq 1 ] || patch -p1 <$srcdir/qucs-gcc-4.5.1.patch + [ $NOEXTRACT -eq 1 ] || ./configure --prefix=/usr + make + make DESTDIR=$pkgdir install +} diff --git a/community/qucs/qucs-gcc-4.5.1.patch b/community/qucs/qucs-gcc-4.5.1.patch new file mode 100644 index 000000000..e29c11d39 --- /dev/null +++ b/community/qucs/qucs-gcc-4.5.1.patch @@ -0,0 +1,410 @@ +diff -wbBur qucs-0.0.16/qucs-core/src/components/spfile.cpp qucs-0.0.16.my/qucs-core/src/components/spfile.cpp +--- qucs-0.0.16/qucs-core/src/components/spfile.cpp 2011-03-17 17:02:08.000000000 +0000 ++++ qucs-0.0.16.my/qucs-core/src/components/spfile.cpp 2011-03-29 15:28:06.000000000 +0000 +@@ -409,8 +411,8 @@ + Kx * norm (1.0 - s.get (0, 0) * Sopt)); + c.set (1, 1, norm (s.get (1, 0)) * ((Fmin - 1) + Kx * norm (Sopt))); + c.set (0, 1, s.get (0, 0) / s.get (1, 0) * c.get (1, 1) - +- conj (s.get (1, 0)) * conj (Sopt) * Kx); +- c.set (1, 0, conj (c.get (0, 1))); ++ tr1::conj (s.get (1, 0)) * tr1::conj (Sopt) * Kx); ++ c.set (1, 0, tr1::conj (c.get (0, 1))); + return c; + } + +@@ -422,7 +424,7 @@ + s.getCols () == 2 && c.getCols () == 2); + nr_complex_t n1, n2; + n1 = c.get (0, 0) * norm (s.get (1, 0)) - +- 2 * real (c.get (0, 1) * s.get (1, 0) * conj (s.get (0, 0))) + ++ 2 * real (c.get (0, 1) * s.get (1, 0) * tr1::conj (s.get (0, 0))) + + c.get (1, 1) * norm (s.get (0, 0)); + n2 = 2.0 * (c.get (1, 1) * s.get (0, 0) - + c.get (0, 1) * s.get (1, 0)) / (c.get (1, 1) + n1); +@@ -440,7 +442,7 @@ + + // equivalent noise resistance + Rn = real ((c (0, 0) - 2.0 * +- real (c (0, 1) * conj ((1.0 + s (0, 0)) / s (1, 0))) + ++ real (c (0, 1) * tr1::conj ((1.0 + s (0, 0)) / s (1, 0))) + + c (1, 1) * norm ((1.0 + s (0, 0)) / s (1, 0))) / 4.0); + Rn = Rn * z0; + +diff -wbBur qucs-0.0.16/qucs-core/src/evaluate.cpp qucs-0.0.16.my/qucs-core/src/evaluate.cpp +--- qucs-0.0.16/qucs-core/src/evaluate.cpp 2011-03-11 20:42:20.000000000 +0000 ++++ qucs-0.0.16.my/qucs-core/src/evaluate.cpp 2011-03-29 15:36:29.000000000 +0000 +@@ -1143,7 +1143,7 @@ + constant * evaluate::conj_c (constant * args) { + _ARC0 (c1); + _DEFC (); +- _RETC (conj (*c1)); ++ _RETC (tr1::conj (*c1)); + } + + constant * evaluate::conj_v (constant * args) { +@@ -1443,7 +1443,7 @@ + constant * evaluate::arcsin_c (constant * args) { + _ARC0 (c1); + _DEFC (); +- _RETC (asin (*c1)); ++ _RETC (tr1::asin (*c1)); + } + + constant * evaluate::arcsin_v (constant * args) { +@@ -1462,7 +1462,7 @@ + constant * evaluate::arccos_c (constant * args) { + _ARC0 (c1); + _DEFC (); +- _RETC (acos (*c1)); ++ _RETC (tr1::acos (*c1)); + } + + constant * evaluate::arccos_v (constant * args) { +@@ -1481,7 +1481,7 @@ + constant * evaluate::arctan_c (constant * args) { + _ARC0 (c1); + _DEFC (); +- _RETC (atan (*c1)); ++ _RETC (tr1::atan (*c1)); + } + + constant * evaluate::arctan_v (constant * args) { +@@ -1557,7 +1557,7 @@ + constant * evaluate::arcsec_c (constant * args) { + _ARC0 (c1); + _DEFC (); +- _RETC (acos (1.0 / *c1)); ++ _RETC (tr1::acos (1.0 / *c1)); + } + + constant * evaluate::arcsec_v (constant * args) { +@@ -1595,7 +1595,7 @@ + constant * evaluate::arccosec_c (constant * args) { + _ARC0 (c1); + _DEFC (); +- _RETC (asin (1.0 / *c1)); ++ _RETC (tr1::asin (1.0 / *c1)); + } + + constant * evaluate::arccosec_v (constant * args) { +@@ -1614,7 +1614,7 @@ + constant * evaluate::arsinh_c (constant * args) { + _ARC0 (c1); + _DEFC (); +- _RETC (asinh (*c1)); ++ _RETC (tr1::asinh (*c1)); + } + + constant * evaluate::arsinh_v (constant * args) { +@@ -1634,7 +1634,7 @@ + constant * evaluate::arcosech_c (constant * args) { + _ARC0 (c1); + _DEFC (); +- _RETC (asinh (1.0 / *c1)); ++ _RETC (tr1::asinh (1.0 / *c1)); + } + + constant * evaluate::arcosech_v (constant * args) { +@@ -1647,13 +1647,13 @@ + constant * evaluate::arcosh_d (constant * args) { + _ARD0 (d1); + _DEFC (); +- _RETC (acosh (nr_complex_t (d1))); ++ _RETC (tr1::acosh (nr_complex_t (d1))); + } + + constant * evaluate::arcosh_c (constant * args) { + _ARC0 (c1); + _DEFC (); +- _RETC (acosh (*c1)); ++ _RETC (tr1::acosh (*c1)); + } + + constant * evaluate::arcosh_v (constant * args) { +@@ -1691,7 +1691,7 @@ + constant * evaluate::artanh_c (constant * args) { + _ARC0 (c1); + _DEFC (); +- _RETC (atanh (*c1)); ++ _RETC (tr1::atanh (*c1)); + } + + constant * evaluate::artanh_v (constant * args) { +@@ -2649,7 +2649,7 @@ + _DEFD (); + nr_double_t k; + k = (1 - norm (m->get (0, 0))) / +- (abs (m->get (1, 1) - conj (m->get (0, 0)) * det (*m)) + ++ (abs (m->get (1, 1) - tr1::conj (m->get (0, 0)) * det (*m)) + + abs (m->get (0, 1) * m->get (1, 0))); + _RETD (k); + } +@@ -2669,7 +2669,7 @@ + _DEFD (); + nr_double_t k; + k = (1 - norm (m->get (1, 1))) / +- (abs (m->get (0, 0) - conj (m->get (1, 1)) * det (*m)) + ++ (abs (m->get (0, 0) - tr1::conj (m->get (1, 1)) * det (*m)) + + abs (m->get (0, 1) * m->get (1, 0))); + _RETD (k); + } +@@ -3662,14 +3662,14 @@ + _ARD0 (d1); + _ARC1 (z); + _DEFC (); +- _RETC (10.0 * log10 (norm (d1) / conj (*z) / 0.001)); ++ _RETC (10.0 * log10 (norm (d1) / tr1::conj (*z) / 0.001)); + } + + constant * evaluate::dbm_c_c (constant * args) { + _ARC0 (c1); + _ARC1 (z); + _DEFC (); +- _RETC (10.0 * log10 (norm (*c1) / conj (*z) / 0.001)); ++ _RETC (10.0 * log10 (norm (*c1) / tr1::conj (*z) / 0.001)); + } + + constant * evaluate::dbm_v_c (constant * args) { +diff -wbBur qucs-0.0.16/qucs-core/src/math/complex.cpp qucs-0.0.16.my/qucs-core/src/math/complex.cpp +--- qucs-0.0.16/qucs-core/src/math/complex.cpp 2011-03-11 20:42:21.000000000 +0000 ++++ qucs-0.0.16.my/qucs-core/src/math/complex.cpp 2011-03-29 15:21:58.000000000 +0000 +@@ -366,7 +367,7 @@ + \return arc tangent of z + */ + nr_complex_t atan2 (const nr_complex_t y, const nr_complex_t x) { +- nr_complex_t a = atan (y / x); ++ nr_complex_t a = tr1::atan (y / x); + return real (x) > 0.0 ? a : -a; + } + #endif +diff -wbBur qucs-0.0.16/qucs-core/src/math/complex.h qucs-0.0.16.my/qucs-core/src/math/complex.h +--- qucs-0.0.16/qucs-core/src/math/complex.h 2011-03-17 17:01:42.000000000 +0000 ++++ qucs-0.0.16.my/qucs-core/src/math/complex.h 2011-03-29 15:29:01.000000000 +0000 +@@ -33,7 +33,6 @@ + #elif defined HAVE_TR1_COMPLEX + #include <tr1/complex> + using namespace std; +-using namespace std::tr1; + typedef std::complex<nr_double_t> nr_complex_t; + #else + #include <complex> +diff -wbBur qucs-0.0.16/qucs-core/src/matrix.cpp qucs-0.0.16.my/qucs-core/src/matrix.cpp +--- qucs-0.0.16/qucs-core/src/matrix.cpp 2011-03-11 20:42:20.000000000 +0000 ++++ qucs-0.0.16.my/qucs-core/src/matrix.cpp 2011-03-29 14:52:17.000000000 +0000 +@@ -504,7 +504,7 @@ + matrix res (a.getRows (), a.getCols ()); + for (int r = 0; r < a.getRows (); r++) + for (int c = 0; c < a.getCols (); c++) +- res.set (r, c, conj (a.get (r, c))); ++ res.set (r, c, tr1::conj (a.get (r, c))); + return res; + } + +@@ -1176,12 +1176,12 @@ + + assert (s.getRows () >= 2 && s.getCols () >= 2); + +- a.set (0, 0, (conj (z1) + z1 * s (0, 0) - +- conj (z1) * s (1, 1) - z1 * d) / n); +- a.set (0, 1, (conj (z1) * conj (z2) + z1 * conj (z2) * s (0, 0) + +- conj (z1) * z2 * s (1, 1) + z1 * z2 * d) / n); ++ a.set (0, 0, (tr1::conj (z1) + z1 * s (0, 0) - ++ tr1::conj (z1) * s (1, 1) - z1 * d) / n); ++ a.set (0, 1, (tr1::conj (z1) * tr1::conj (z2) + z1 * tr1::conj (z2) * s (0, 0) + ++ tr1::conj (z1) * z2 * s (1, 1) + z1 * z2 * d) / n); + a.set (1, 0, (1.0 - s (0, 0) - s (1, 1) + d) / n); +- a.set (1, 1, (conj (z2) - conj (z2) * s (0, 0) + ++ a.set (1, 1, (tr1::conj (z2) - tr1::conj (z2) * s (0, 0) + + z2 * s (1, 1) - z2 * d) / n); + return a; + } +@@ -1219,12 +1219,12 @@ + assert (a.getRows () >= 2 && a.getCols () >= 2); + + s.set (0, 0, (a (0, 0) * z2 + a (0, 1) +- - a (1, 0) * conj (z1) * z2 - a (1, 1) * conj (z1)) / n); ++ - a (1, 0) * tr1::conj (z1) * z2 - a (1, 1) * tr1::conj (z1)) / n); + s.set (0, 1, (a (0, 0) * a (1, 1) - + a (0, 1) * a (1, 0)) * d / n); + s.set (1, 0, d / n); +- s.set (1, 1, (a (1, 1) * z1 - a (0, 0) * conj (z2) + +- a (0, 1) - a (1, 0) * z1 * conj (z2)) / n); ++ s.set (1, 1, (a (1, 1) * z1 - a (0, 0) * tr1::conj (z2) + ++ a (0, 1) - a (1, 0) * z1 * tr1::conj (z2)) / n); + return s; + } + +diff -wbBur qucs-0.0.16/qucs-core/src/spsolver.cpp qucs-0.0.16.my/qucs-core/src/spsolver.cpp +--- qucs-0.0.16/qucs-core/src/spsolver.cpp 2011-03-11 20:42:20.000000000 +0000 ++++ qucs-0.0.16.my/qucs-core/src/spsolver.cpp 2011-03-29 14:54:27.000000000 +0000 +@@ -319,14 +319,14 @@ + + p = + c->getN (i1, j1) + c->getN (k, j1) * k1 + c->getN (l, j1) * k2 + +- conj (k3) * (c->getN (i1, k) + c->getN (k, k) * k1 + ++ tr1::conj (k3) * (c->getN (i1, k) + c->getN (k, k) * k1 + + c->getN (l, k) * k2) + +- conj (k4) * (c->getN (i1, l) + c->getN (k, l) * k1 + ++ tr1::conj (k4) * (c->getN (i1, l) + c->getN (k, l) * k1 + + c->getN (l, l) * k2); + result->setN (i2, j2, p); + + if (i2 >= j2) break; // the other half need not be computed +- result->setN (j2, i2, conj (p)); ++ result->setN (j2, i2, tr1::conj (p)); + i2++; + } + +@@ -378,13 +378,13 @@ + // compute C'ij + p = c->getN (i1, j1) + + c->getN (k, j1) * d->getS (l, l) * c->getS (i1, k) * tiny2 / t + +- c->getN (i1, k) * conj (d->getS (l, l) * c->getS (j1, k) * tiny2 / t) + ++ c->getN (i1, k) * tr1::conj (d->getS (l, l) * c->getS (j1, k) * tiny2 / t) + + (c->getN (k, k) * norm (d->getS (l, l)) + d->getN (l, l)) * +- c->getS (i1, k) * conj (c->getS (j1, k)) * tiny4 / norm (t); ++ c->getS (i1, k) * tr1::conj (c->getS (j1, k)) * tiny4 / norm (t); + + result->setN (i2, j2, p); + if (i2 >= j2) break; // the other half need not be computed +- result->setN (j2, i2, conj (p)); ++ result->setN (j2, i2, tr1::conj (p)); + i2++; + } + +@@ -410,12 +410,12 @@ + + // compute C'ij + p = (c->getN (k, k) * d->getS (l, l) + +- d->getN (l, l) * conj (c->getS (k, k))) * +- c->getS (i1, k) * conj (d->getS (j1, l)) * tiny3 / norm (t) + ++ d->getN (l, l) * tr1::conj (c->getS (k, k))) * ++ c->getS (i1, k) * tr1::conj (d->getS (j1, l)) * tiny3 / norm (t) + + d->getN (l, j1) * c->getS (i1, k) * tiny1 / t + +- c->getN (i1, k) * conj (d->getS (j1, l) * tiny1 / t); ++ c->getN (i1, k) * tr1::conj (d->getS (j1, l) * tiny1 / t); + result->setN (i2, j2, p); +- result->setN (j2, i2, conj (p)); ++ result->setN (j2, i2, tr1::conj (p)); + i2++; + } + +@@ -428,12 +428,12 @@ + // compute C'ij + p = d->getN (i1, j1) + + (d->getN (l, l) * norm (c->getS (k, k)) + c->getN (k, k)) * +- d->getS (i1, l) * conj (d->getS (j1, l)) * tiny4 / norm (t) + +- d->getN (i1, l) * conj (c->getS (k, k) * d->getS (j1, l) * tiny2 / t) + ++ d->getS (i1, l) * tr1::conj (d->getS (j1, l)) * tiny4 / norm (t) + ++ d->getN (i1, l) * tr1::conj (c->getS (k, k) * d->getS (j1, l) * tiny2 / t) + + d->getN (l, j1) * c->getS (k, k) * d->getS (i1, l) * tiny2 / t; + result->setN (i2, j2, p); + if (i2 >= j2) break; // the other half need not be computed +- result->setN (j2, i2, conj (p)); ++ result->setN (j2, i2, tr1::conj (p)); + i2++; + } + +@@ -1042,7 +1042,7 @@ + // linear noise figure + F = real (1.0 + c22 / norm (s21)); + n1 = +- c11 * norm (s21) - 2.0 * real (c12 * s21 * conj (s11)) + ++ c11 * norm (s21) - 2.0 * real (c12 * s21 * tr1::conj (s11)) + + c22 * norm (s11); + n2 = 2.0 * (c22 * s11 - c12 * s21) / (c22 + n1); + +@@ -1058,7 +1058,7 @@ + norm (s21) / (1.0 + norm (Sopt))); + + // equivalent noise resistance +- Rn = real ((c11 - 2.0 * real (c12 * conj ((1.0 + s11) / s21)) + ++ Rn = real ((c11 - 2.0 * real (c12 * tr1::conj ((1.0 + s11) / s21)) + + c22 * norm ((1.0 + s11) / s21)) / 4.0); + Rn = Rn * z0; + +diff -wbBur qucs-0.0.16/qucs-core/src/tvector.cpp qucs-0.0.16.my/qucs-core/src/tvector.cpp +--- qucs-0.0.16/qucs-core/src/tvector.cpp 2011-03-11 20:42:20.000000000 +0000 ++++ qucs-0.0.16.my/qucs-core/src/tvector.cpp 2011-03-29 15:10:09.000000000 +0000 +@@ -390,7 +390,7 @@ + tvector<nr_type_t> conj (tvector<nr_type_t> a) { + int n = a.getSize (); + tvector<nr_type_t> res (n); +- for (int i = 0; i < n; i++) res.set (i, conj (a.get (i))); ++ for (int i = 0; i < n; i++) res.set (i, tr1::conj (a.get (i))); + return res; + } + +diff -wbBur qucs-0.0.16/qucs-core/src/vector.cpp qucs-0.0.16.my/qucs-core/src/vector.cpp +--- qucs-0.0.16/qucs-core/src/vector.cpp 2011-03-17 17:01:25.000000000 +0000 ++++ qucs-0.0.16.my/qucs-core/src/vector.cpp 2011-03-29 15:33:57.000000000 +0000 +@@ -354,7 +354,7 @@ + + vector conj (vector v) { + vector result (v); +- for (int i = 0; i < v.getSize (); i++) result.set (conj (v.get (i)), i); ++ for (int i = 0; i < v.getSize (); i++) result.set (tr1::conj (v.get (i)), i); + return result; + } + +@@ -450,13 +450,13 @@ + + vector asin (vector v) { + vector result (v); +- for (int i = 0; i < v.getSize (); i++) result.set (asin (v.get (i)), i); ++ for (int i = 0; i < v.getSize (); i++) result.set (tr1::asin (v.get (i)), i); + return result; + } + + vector acos (vector v) { + vector result (v); +- for (int i = 0; i < v.getSize (); i++) result.set (acos (v.get (i)), i); ++ for (int i = 0; i < v.getSize (); i++) result.set (tr1::acos (v.get (i)), i); + return result; + } + +@@ -474,7 +474,7 @@ + + vector atan (vector v) { + vector result (v); +- for (int i = 0; i < v.getSize (); i++) result.set (atan (v.get (i)), i); ++ for (int i = 0; i < v.getSize (); i++) result.set (tr1::atan (v.get (i)), i); + return result; + } + +@@ -498,7 +498,7 @@ + + vector asinh (vector v) { + vector result (v); +- for (int i = 0; i < v.getSize (); i++) result.set (asinh (v.get (i)), i); ++ for (int i = 0; i < v.getSize (); i++) result.set (tr1::asinh (v.get (i)), i); + return result; + } + +@@ -510,7 +510,7 @@ + + vector acosh (vector v) { + vector result (v); +- for (int i = 0; i < v.getSize (); i++) result.set (acosh (v.get (i)), i); ++ for (int i = 0; i < v.getSize (); i++) result.set (tr1::acosh (v.get (i)), i); + return result; + } + +@@ -528,7 +528,7 @@ + + vector atanh (vector v) { + vector result (v); +- for (int i = 0; i < v.getSize (); i++) result.set (atanh (v.get (i)), i); ++ for (int i = 0; i < v.getSize (); i++) result.set (tr1::atanh (v.get (i)), i); + return result; + } + +@@ -1200,7 +1200,7 @@ + vector dbm (vector v, const nr_complex_t z) { + vector result (v); + for (int i = 0; i < v.getSize (); i++) +- result.set (10.0 * log10 (norm (v.get (i)) / conj (z) / 0.001), i); ++ result.set (10.0 * log10 (norm (v.get (i)) / tr1::conj (z) / 0.001), i); + return result; + } + |