summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2009-04-26 12:10:33 +0000
committerPatrick Lauer <patrick@gentoo.org>2009-04-26 12:10:33 +0000
commit116339483a8c8d06c121a3127b8a461721a137b7 (patch)
treeaa11037b56e7b8855578132ab24590788db22bea /app-office/qtstalker
parentBump to latest beta version. (diff)
downloadgentoo-2-116339483a8c8d06c121a3127b8a461721a137b7.tar.gz
gentoo-2-116339483a8c8d06c121a3127b8a461721a137b7.tar.bz2
gentoo-2-116339483a8c8d06c121a3127b8a461721a137b7.zip
Bump to 0.36, patches and ebuild mods by Anton Bolshakov. Fixes #218904
(Portage version: 2.2_rc31/cvs/Linux x86_64)
Diffstat (limited to 'app-office/qtstalker')
-rw-r--r--app-office/qtstalker/ChangeLog12
-rw-r--r--app-office/qtstalker/files/qtstalker-0.36-csv_quote.patch215
-rw-r--r--app-office/qtstalker/files/qtstalker-0.36-fibo.patch83
-rw-r--r--app-office/qtstalker/files/qtstalker-0.36-gcc43.patch29
-rw-r--r--app-office/qtstalker/files/qtstalker-0.36-nodocs.patch37
-rw-r--r--app-office/qtstalker/files/qtstalker-0.36-parallel-make.patch12
-rw-r--r--app-office/qtstalker/qtstalker-0.36.ebuild96
7 files changed, 482 insertions, 2 deletions
diff --git a/app-office/qtstalker/ChangeLog b/app-office/qtstalker/ChangeLog
index 77a4b0dfc4ee..f5dd22385f7d 100644
--- a/app-office/qtstalker/ChangeLog
+++ b/app-office/qtstalker/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for app-office/qtstalker
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-office/qtstalker/ChangeLog,v 1.10 2008/07/27 19:55:28 carlo Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-office/qtstalker/ChangeLog,v 1.11 2009/04/26 12:10:33 patrick Exp $
+
+*qtstalker-0.36 (26 Apr 2009)
+
+ 26 Apr 2009; Patrick Lauer <patrick@gentoo.org>
+ +files/qtstalker-0.36-csv_quote.patch, +files/qtstalker-0.36-fibo.patch,
+ +files/qtstalker-0.36-gcc43.patch, +files/qtstalker-0.36-nodocs.patch,
+ +files/qtstalker-0.36-parallel-make.patch, +qtstalker-0.36.ebuild:
+ Bump to 0.36, patches and ebuild mods by Anton Bolshakov. Fixes #218904
27 Jul 2008; Carsten Lohrke <carlo@gentoo.org> qtstalker-0.35.ebuild:
QA: Get rid of deprecated qt_min_version().
diff --git a/app-office/qtstalker/files/qtstalker-0.36-csv_quote.patch b/app-office/qtstalker/files/qtstalker-0.36-csv_quote.patch
new file mode 100644
index 000000000000..b66d0ebbb516
--- /dev/null
+++ b/app-office/qtstalker/files/qtstalker-0.36-csv_quote.patch
@@ -0,0 +1,215 @@
+diff -urN lib/QuotePlugin.cpp.orig lib/QuotePlugin.cpp
+--- lib/QuotePlugin.cpp.orig 2007-09-28 15:05:07.000000000 +0800
++++ lib/QuotePlugin.cpp 2008-07-04 14:57:58.000000000 +0800
+@@ -160,18 +160,26 @@
+ tabs->addTab(w, tr("Timeout"));
+ }
+
+-void QuotePlugin::stripJunk (QString &d, QString &s)
++QString QuotePlugin::substituteSep (const QString &str, const QChar &search_sep, const QChar &new_sep)
+ {
+- s = d.stripWhiteSpace();
++ QString string_copy = str.copy();
+
+- while (1)
++ bool isInBlock = false;
++
++ for (uint i = 0; i < string_copy.length(); i++)
+ {
+- int p = s.find('"', 0, TRUE);
+- if (p == -1)
+- break;
+- else
+- s.remove(p, 1);
+- }
++ if (string_copy[i] == '\"')
++ {
++ isInBlock = !isInBlock;
++ string_copy.remove(i, 1);
++ }
++
++ if ( (!isInBlock) && (string_copy[i] == search_sep) )
++ {
++ string_copy = string_copy.replace(i, 1, new_sep);
++ }
++ }
++ return string_copy;
+ }
+
+ bool QuotePlugin::setTFloat (QString &d, bool flag)
+diff -urN lib/QuotePlugin.h.orig lib/QuotePlugin.h
+--- lib/QuotePlugin.h.orig 2007-09-20 10:56:58.000000000 +0800
++++ lib/QuotePlugin.h 2008-07-04 14:58:04.000000000 +0800
+@@ -55,7 +55,7 @@
+ QuotePlugin ();
+ virtual ~QuotePlugin ();
+ bool setTFloat (QString &, bool);
+- void stripJunk (QString &, QString &);
++ QString substituteSep(const QString &, const QChar &, const QChar &);
+ void createDirectory (QString &, QString &);
+ void getPluginName (QString &);
+ void getHelpFile (QString &);
+diff -urN plugins/quote/CSV/CSV.cpp.orig plugins/quote/CSV/CSV.cpp
+--- plugins/quote/CSV/CSV.cpp.orig 2008-02-19 11:34:26.000000000 +0800
++++ plugins/quote/CSV/CSV.cpp 2008-07-04 14:57:36.000000000 +0800
+@@ -41,7 +41,7 @@
+ CSV::CSV ()
+ {
+ pluginName = "CSV";
+- delim = ",";
++ delim = ',';
+ helpFile = "csv.html";
+ cancelFlag = FALSE;
+
+@@ -259,10 +259,8 @@
+ while(stream.atEnd() == 0)
+ {
+ QString ts = stream.readLine();
+- QString s;
+- stripJunk(ts, s);
++ QStringList l = QStringList::split( '\n', substituteSep( ts, delim, '\n' ), FALSE);
+
+- QStringList l = QStringList::split(delim, s, FALSE);
+ lineCount++;
+ if (l.count() != fieldList.count())
+ {
+@@ -272,7 +270,7 @@
+ QString::number(lineCount).latin1(), l.count(), fieldList.count()
+ );
+ printStatusLogMessage(ss);
+- continue;
++ continue;
+ }
+
+ int fieldLoop;
+@@ -498,25 +496,25 @@
+ {
+ if (! d.compare("Comma"))
+ {
+- delim = ",";
++ delim = ',';
+ return;
+ }
+
+ if (! d.compare("Tab"))
+ {
+- delim = " ";
++ delim = '\t';
+ return;
+ }
+
+ if (! d.compare("Space"))
+ {
+- delim = " ";
++ delim = ' ';
+ return;
+ }
+
+ if (! d.compare("Semicolon"))
+ {
+- delim = ";";
++ delim = ';';
+ return;
+ }
+ }
+diff -urN plugins/quote/CSV/CSV.h.orig plugins/quote/CSV/CSV.h
+--- plugins/quote/CSV/CSV.h.orig 2007-10-25 16:42:01.000000000 +0800
++++ plugins/quote/CSV/CSV.h 2008-07-04 14:51:08.000000000 +0800
+@@ -66,7 +66,7 @@
+
+ private:
+ Config config;
+- QString delim;
++ QChar delim;
+ FuturesData fd;
+ DbPlugin db;
+ QString symbolOveride;
+diff -urN plugins/quote/NYBOT/NYBOT.cpp.orig plugins/quote/NYBOT/NYBOT.cpp
+--- plugins/quote/NYBOT/NYBOT.cpp.orig 2007-02-04 07:04:37.000000000 +0800
++++ plugins/quote/NYBOT/NYBOT.cpp 2008-07-04 14:56:35.000000000 +0800
+@@ -152,16 +152,12 @@
+ QTextStream stream(&f);
+
+ QString ts = stream.readLine();
+- QString s;
+- stripJunk(ts, s);
+- QStringList keys = QStringList::split(",", s, FALSE);
++ QStringList keys = QStringList::split( '\n', substituteSep( ts, ',', '\n' ), FALSE);
+
+ while(stream.atEnd() == 0)
+ {
+ ts = stream.readLine();
+- stripJunk(ts, s);
+-
+- QStringList l = QStringList::split(",", s, FALSE);
++ QStringList l = QStringList::split( '\n', substituteSep( ts, ',', '\n' ), FALSE);
+
+ if (l.count() != keys.count())
+ continue;
+@@ -202,6 +198,7 @@
+ }
+
+ ts = "dailyOpenPrice1";
++ QString s;
+ data.getData(ts, s);
+ if (s.toFloat() == 0)
+ {
+diff -urN plugins/quote/Yahoo/Yahoo.cpp.orig plugins/quote/Yahoo/Yahoo.cpp
+--- plugins/quote/Yahoo/Yahoo.cpp.orig 2008-04-03 13:54:09.000000000 +0800
++++ plugins/quote/Yahoo/Yahoo.cpp 2008-07-04 14:38:20.000000000 +0800
+@@ -294,7 +294,7 @@
+ return;
+
+ // strip off the header
+- QString s = "Date,Open,High,Low,Close";
++ QString s = "Date,Open,High,Low,Close,Volume,Adj Close\n";
+ int p = data.find(s, 0, TRUE);
+ if (p != -1)
+ data.remove(0, p + s.length());
+@@ -368,12 +368,15 @@
+ while(stream.atEnd() == 0)
+ {
+ ts = stream.readLine();
+- stripJunk(ts, s);
++ QStringList l = QStringList::split( '\n', substituteSep(ts, ',', '\n'), FALSE);
+
+- QStringList l = QStringList::split(",", s, FALSE);
+ if (l.count() < 5)
++ {
++ QString ss = tr("Parse: invalid number of parameters") + " " + ts2 + " " + tr("skipped");
++ printStatusLogMessage(ss);
++ errorList.append(ts2);
+ continue;
+-
++ }
+ // date
+ QString date = parseDate(l[0]);
+ Bar bar;
+@@ -523,11 +526,15 @@
+ while(stream.atEnd() == 0)
+ {
+ ts = stream.readLine();
+- stripJunk(ts, s);
++ QStringList l = QStringList::split( '\n', substituteSep( ts, ',', '\n' ), FALSE);
+
+- QStringList l = QStringList::split(",", s, FALSE);
+ if (l.count() < 9 || l.count() > 10)
++ {
++ QString ss = tr("Parse: invalid number of parameters ") + " " + ts2 + " " + tr("skipped");
++ printStatusLogMessage(ss);
++ errorList.append(ts2);
+ continue;
++ }
+
+ // get date
+ QStringList l2 = QStringList::split("/", l[3], FALSE);
+@@ -561,6 +568,9 @@
+ else
+ bar.setHigh(tfloat);
+
++ // make Low price equal to Open if Low is not available
++ if (! l[8].compare("N/A"))
++ l[8] = l[6];
+ if (setTFloat(l[8], FALSE))
+ continue;
+ else
diff --git a/app-office/qtstalker/files/qtstalker-0.36-fibo.patch b/app-office/qtstalker/files/qtstalker-0.36-fibo.patch
new file mode 100644
index 000000000000..c77fc32e284e
--- /dev/null
+++ b/app-office/qtstalker/files/qtstalker-0.36-fibo.patch
@@ -0,0 +1,83 @@
+--- lib/FiboLine.cpp.orig 2007-02-13 08:18:30.000000000 +0800
++++ lib/FiboLine.cpp 2008-05-22 21:45:10.000000000 +0800
+@@ -302,18 +302,8 @@
+ break;
+ if (y >= ty)
+ break;
+-
+- startDate = tx;
+- endDate = x;
+- high = ty;
+- low = y;
+-
+- setSaveFlag(TRUE);
+- setColor(defaultColor);
+- emit signalDraw();
+ status = None;
+ emit message("");
+- emit signalSave(name);
+ break;
+ default:
+ break;
+@@ -322,11 +312,20 @@
+ return status;
+ }
+
+-void FiboLine::pointerMoving (QPixmap &buffer, QPoint &point, QDateTime &x, double y)
++void FiboLine::pointerMoving (QPixmap &, QPoint &, QDateTime &x, double y)
+ {
+ if (status == ClickWait2)
+ {
+- drawMovingPointer(buffer, point);
++ startDate = tx;
++ endDate = x;
++ high = ty;
++ low = y;
++ setSaveFlag(TRUE);
++ setColor(defaultColor);
++ emit signalDraw();
++ QString s = x.toString("yyyy-MM-dd hh:mm:ss") + " " + QString::number(y);
++ emit message(s);
++ emit signalSave(name);
+ return;
+ }
+
+@@ -371,38 +370,6 @@
+ }
+ }
+
+-void FiboLine::drawMovingPointer (QPixmap &buffer, QPoint &point)
+-{
+- if (point.x() < mpx)
+- return;
+-
+- if (point.y() < mpy)
+- return;
+-
+- QPainter painter;
+- painter.begin(&buffer);
+- painter.setRasterOp(Qt::XorROP);
+- painter.setPen(defaultColor);
+-
+- // erase the previous line drawn
+- if (mpx2 != -1 && mpy2 != -1)
+- {
+- painter.drawLine (mpx, mpy, mpx2, mpy);
+- painter.drawLine (mpx, mpy2, mpx2, mpy2);
+- }
+-
+- // draw the new line
+- painter.drawLine (mpx, mpy, point.x(), mpy);
+- painter.drawLine (mpx, point.y(), point.x(), point.y());
+-
+- mpx2 = point.x();
+- mpy2 = point.y();
+-
+- painter.end();
+-
+- emit signalRefresh();
+-}
+-
+ void FiboLine::loadDefaults ()
+ {
+ QSettings settings;
diff --git a/app-office/qtstalker/files/qtstalker-0.36-gcc43.patch b/app-office/qtstalker/files/qtstalker-0.36-gcc43.patch
new file mode 100644
index 000000000000..c42b58578833
--- /dev/null
+++ b/app-office/qtstalker/files/qtstalker-0.36-gcc43.patch
@@ -0,0 +1,29 @@
+--- qtstalker/lib/UpgradeMessage.cpp.orig 2008-04-14 17:59:26.000000000 +0200
++++ qtstalker/lib/UpgradeMessage.cpp 2008-04-14 17:59:59.000000000 +0200
+@@ -32,10 +32,11 @@
+ #include <qfileinfo.h>
+ #include <qdir.h>
+ #include <qfile.h>
+ #include <qpushbutton.h>
+ #include <db.h>
++#include <stdlib.h>
+
+ UpgradeMessage::UpgradeMessage (int type) : QTabDialog (0, "UpgradeMessage", TRUE)
+ {
+ switch (type)
+ {
+--- qtstalker/src/IndicatorPage.cpp.orig 2008-04-14 18:06:35.000000000 +0200
++++ qtstalker/src/IndicatorPage.cpp 2008-04-14 18:07:01.000000000 +0200
+@@ -41,11 +41,11 @@
+ #include <qfile.h>
+ #include <qtextstream.h>
+ #include <qinputdialog.h>
+ #include <qmessagebox.h>
+ #include <qtooltip.h>
+-
++#include <stdlib.h>
+
+ IndicatorPage::IndicatorPage (QWidget *w, DBIndex *i) : QWidget (w)
+ {
+ chartIndex = i;
+ updateEnableFlag = FALSE;
diff --git a/app-office/qtstalker/files/qtstalker-0.36-nodocs.patch b/app-office/qtstalker/files/qtstalker-0.36-nodocs.patch
new file mode 100644
index 000000000000..71eb940ecb31
--- /dev/null
+++ b/app-office/qtstalker/files/qtstalker-0.36-nodocs.patch
@@ -0,0 +1,37 @@
+diff -Naur docs-orig/docs.pro docs/docs.pro
+--- docs-orig/docs.pro 2007-09-28 02:01:58.000000000 -0600
++++ docs/docs.pro 2008-01-20 00:41:16.000000000 -0600
+@@ -2,33 +2,6 @@
+
+ CONFIG += thread
+
+-# install the html files
+-docs.path = /usr/local/share/doc/qtstalker/html
+-docs.files = *.html
+-INSTALLS += docs
+-
+-# install the html pic files
+-pics.path = /usr/local/share/doc/qtstalker/html
+-pics.files = *.png
+-INSTALLS += pics
+-
+-# install the example indicator html files and pics
+-idocs.path = /usr/local/share/doc/qtstalker/html/indicator
+-idocs.files = indicator/*.html
+-idocs.files += indicator/*.png
+-INSTALLS += idocs
+-
+-# install the CHANGELOG files
+-cl.path = /usr/local/share/doc/qtstalker/html
+-cl.files = CHANGELOG*
+-INSTALLS += cl
+-
+-# install the past CHANGELOG files
+-pcl.path = /usr/local/share/doc/qtstalker/html/pastchanges
+-pcl.files = pastchanges/*.html
+-pcl.files += pastchanges/CHANGELOG*
+-INSTALLS += pcl
+-
+ # install the translation files
+ i18n.path = /usr/local/share/qtstalker/i18n
+ i18n.files = ../i18n/*.qm
diff --git a/app-office/qtstalker/files/qtstalker-0.36-parallel-make.patch b/app-office/qtstalker/files/qtstalker-0.36-parallel-make.patch
new file mode 100644
index 000000000000..6e297bfe919b
--- /dev/null
+++ b/app-office/qtstalker/files/qtstalker-0.36-parallel-make.patch
@@ -0,0 +1,12 @@
+diff -Naur qtstalker.pro.orig qtstalker.pro
+--- qtstalker.pro.orig 2007-02-03 15:10:53.000000000 -0600
++++ qtstalker.pro 2008-01-20 00:43:48.000000000 -0600
+@@ -3,6 +3,8 @@
+ # compile TALIB
+ #SUBDIRS += TALIB
+
++CONFIG += ordered
++
+ # compile qtstalker lib
+ SUBDIRS += lib
+
diff --git a/app-office/qtstalker/qtstalker-0.36.ebuild b/app-office/qtstalker/qtstalker-0.36.ebuild
new file mode 100644
index 000000000000..0334d0377d0d
--- /dev/null
+++ b/app-office/qtstalker/qtstalker-0.36.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-office/qtstalker/qtstalker-0.36.ebuild,v 1.1 2009/04/26 12:10:33 patrick Exp $
+
+EAPI=1
+
+inherit qt3 eutils multilib
+
+LANGS="pl"
+for i in ${LANGS}; do
+ IUSE="${IUSE} linguas_${i}"
+done
+
+DESCRIPTION="Commodity and stock market charting and technical analysis"
+HOMEPAGE="http://qtstalker.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="x11-libs/qt:3
+ >=sci-libs/ta-lib-0.4.0
+ >=sys-libs/db-4.3"
+
+IUSE=""
+
+S=${WORKDIR}/${P}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${P}-nodocs.patch
+ epatch "${FILESDIR}"/${P}-parallel-make.patch
+ epatch "${FILESDIR}"/${P}-gcc43.patch
+
+#blshkv
+ epatch "${FILESDIR}"/${P}-fibo.patch
+ epatch "${FILESDIR}"/${P}-csv_quote.patch
+
+ ebegin 'Fixing install paths'
+ grep -rl '/usr/local' * \
+ | xargs sed -i -e "s:/usr/local:/usr:g"
+ eend
+
+ ebegin 'Fixing multilib paths'
+ grep -rl '/usr/lib' * \
+ | xargs sed -i -e "s:/usr/lib:/usr/$(get_libdir):g"
+ eend
+
+ ebegin 'Fixing manual paths'
+ grep -rl '/usr/share/doc/qtstalker/' * \
+ | xargs sed -i -e "s:/usr/share/doc/qtstalker/:/usr/share/doc/${PF}/:g"
+ eend
+}
+
+src_compile() {
+ eqmake3 || die "eqmake3 failed."
+ emake || die "emake failed."
+
+ for i in ${LINGUAS}; do
+ if [[ -f ${PN}_${i}.ts ]]; then
+ ebegin "Building langpacks..."
+ lrelease ${PN}_${i}.ts
+ eend
+ fi
+ done
+}
+
+src_install() {
+ export INSTALL_ROOT="${D}"
+ sed -i -e 's:-strip ::g' "${S}"/plugins/quote/*/Makefile
+ emake install || die "emake install failed."
+
+ ebegin "Installing docs"
+ cd "${S}"/docs
+ dohtml *{html,png}
+ dodoc AUTHORS BUGS CHANGELOG-${PV} TODO "${S}"/README
+ eend
+
+ # install only needed langpacks
+ ebegin "Installing langpacks"
+ cd "${S}"/i18n
+ insinto /usr/share/${PN}/i18n
+ for i in ${LINGUAS}; do
+ if [[ -f ${PN}_${i}.qm ]]; then
+ doins ${PN}_${i}.qm
+ fi
+ done
+ eend
+
+ # menu and icon
+ domenu "${FILESDIR}"/${PN}.desktop
+ doicon "${FILESDIR}"/${PN}.png
+}