From 027eebfddc31ca6bfbe8e6bfa13b5bed3f5c2ddd Mon Sep 17 00:00:00 2001 From: Fellype do Nascimento Date: Thu, 10 Aug 2017 18:55:10 +0100 Subject: academic/scidavis: Updated for version 1.21. Signed-off-by: David Spencer --- .../scidavis/Fix_FFT_generated_from_graphs.patch | 221 --------------------- academic/scidavis/README | 3 +- academic/scidavis/fix_translations.patch | 11 - academic/scidavis/scidavis.SlackBuild | 18 +- academic/scidavis/scidavis.info | 6 +- 5 files changed, 10 insertions(+), 249 deletions(-) delete mode 100644 academic/scidavis/Fix_FFT_generated_from_graphs.patch delete mode 100644 academic/scidavis/fix_translations.patch (limited to 'academic/scidavis') diff --git a/academic/scidavis/Fix_FFT_generated_from_graphs.patch b/academic/scidavis/Fix_FFT_generated_from_graphs.patch deleted file mode 100644 index ec83ce31eb..0000000000 --- a/academic/scidavis/Fix_FFT_generated_from_graphs.patch +++ /dev/null @@ -1,221 +0,0 @@ ---- libscidavis/src/FFT.cpp 2017-07-14 04:54:53.000000000 -0300 -+++ /home/fellype/compilando/scidavis-github/libscidavis/src/FFT.cpp 2017-07-19 09:36:40.000000000 -0300 -@@ -50,6 +50,12 @@ - { - init(); - setDataFromCurve(curveTitle); -+ // intersperse 0 imaginary components -+ double* tmp=new double[2*d_n]; -+ memset(tmp,0,2*d_n*sizeof(double)); -+ for (size_t i=0; i FFT::fftCurve() -+QList FFT::fftTable() - { -- int i2; -- int n2 = d_n/2; - double *amp = new double[d_n]; -- double *result = new double[2*d_n]; -- -- if(!amp || !result) -- { -- QMessageBox::critical((ApplicationWindow *)parent(), tr("SciDAVis") + " - " + tr("Error"), -- tr("Could not allocate memory, operation aborted!")); -- d_init_err = true; -- return QList(); -- } -- -- double df = 1.0/(double)(d_n*d_sampling);//frequency sampling -- double aMax = 0.0;//max amplitude -- QList columns; -- if(!d_inverse) -- { -- d_explanation = tr("Forward") + " " + tr("FFT") + " " + tr("of") + " " + d_curve->title().text(); -- columns << new Column(tr("Frequency"), SciDAVis::Numeric); -- -- gsl_fft_real_workspace *work=gsl_fft_real_workspace_alloc(d_n); -- gsl_fft_real_wavetable *real=gsl_fft_real_wavetable_alloc(d_n); -- -- if(!work || !real) -- { -- QMessageBox::critical((ApplicationWindow *)parent(), tr("SciDAVis") + " - " + tr("Error"), -- tr("Could not allocate memory, operation aborted!")); -- d_init_err = true; -- return QList(); -- } -- -- gsl_fft_real_transform(d_y, 1, d_n, real,work); -- gsl_fft_halfcomplex_unpack (d_y, result, 1, d_n); - -- gsl_fft_real_wavetable_free(real); -- gsl_fft_real_workspace_free(work); -- } -- else -- { -- d_explanation = tr("Inverse") + " " + tr("FFT") + " " + tr("of") + " " + d_curve->title().text(); -- columns << new Column(tr("Time"), SciDAVis::Numeric); -- -- gsl_fft_real_unpack (d_y, result, 1, d_n); - gsl_fft_complex_wavetable *wavetable = gsl_fft_complex_wavetable_alloc (d_n); - gsl_fft_complex_workspace *workspace = gsl_fft_complex_workspace_alloc (d_n); - -- if(!workspace || !wavetable) -- { -- QMessageBox::critical((ApplicationWindow *)parent(), tr("SciDAVis") + " - " + tr("Error"), -- tr("Could not allocate memory, operation aborted!")); -- d_init_err = true; -- return QList(); -- } -- -- gsl_fft_complex_inverse (result, 1, d_n, wavetable, workspace); -- gsl_fft_complex_wavetable_free (wavetable); -- gsl_fft_complex_workspace_free (workspace); -- } -- -- if (d_shift_order) -- { -- for(unsigned i=0; i aMax) -- aMax = a; -- } -- -- // ApplicationWindow *app = (ApplicationWindow *)parent(); -- -- columns << new Column(tr("Real"), SciDAVis::Numeric); -- columns << new Column(tr("Imaginary"), SciDAVis::Numeric); -- columns << new Column(tr("Amplitude"), SciDAVis::Numeric); -- columns << new Column(tr("Angle"), SciDAVis::Numeric); -- for (unsigned i=0;isetValueAt(i, d_x[i]); -- columns.at(1)->setValueAt(i, result[i2]); -- columns.at(2)->setValueAt(i, result[i2+1]); -- if (d_normalize) -- columns.at(3)->setValueAt(i, amp[i]/aMax); -- else -- columns.at(3)->setValueAt(i, amp[i]); -- columns.at(4)->setValueAt(i, atan(result[i2+1]/result[i2])); -- } -- delete[] amp; -- delete[] result; -- columns.at(0)->setPlotDesignation(SciDAVis::X); -- columns.at(1)->setPlotDesignation(SciDAVis::Y); -- columns.at(2)->setPlotDesignation(SciDAVis::Y); -- columns.at(3)->setPlotDesignation(SciDAVis::Y); -- columns.at(4)->setPlotDesignation(SciDAVis::Y); -- return columns; --} -- --QList FFT::fftTable() --{ -- int i; -- int rows = d_table->numRows(); -- double *amp = new double[rows]; -- -- gsl_fft_complex_wavetable *wavetable = gsl_fft_complex_wavetable_alloc (rows); -- gsl_fft_complex_workspace *workspace = gsl_fft_complex_workspace_alloc (rows); -- - if(!amp || !wavetable || !workspace) - { - QMessageBox::critical((ApplicationWindow *)parent(), tr("SciDAVis") + " - " + tr("Error"), -@@ -198,18 +84,18 @@ - return QList(); - } - -- double df = 1.0/(double)(rows*d_sampling);//frequency sampling -+ double df = 1.0/(double)(d_n*d_sampling);//frequency sampling - double aMax = 0.0;//max amplitude - QList columns; - if(!d_inverse) - { - columns << new Column(tr("Frequency"), SciDAVis::Numeric); -- gsl_fft_complex_forward (d_y, 1, rows, wavetable, workspace); -+ gsl_fft_complex_forward (d_y, 1, d_n, wavetable, workspace); - } - else - { - columns << new Column(tr("Time"), SciDAVis::Numeric); -- gsl_fft_complex_inverse (d_y, 1, rows, wavetable, workspace); -+ gsl_fft_complex_inverse (d_y, 1, d_n, wavetable, workspace); - } - - gsl_fft_complex_wavetable_free (wavetable); -@@ -217,11 +103,11 @@ - - if (d_shift_order) - { -- int n2 = rows/2; -- for(i=0; isetValueAt(i, d_x[i]); -@@ -270,9 +156,7 @@ - void FFT::output() - { - QList columns; -- if (d_graph && d_curve) -- columns = fftCurve(); -- else if (d_table) -+ if (d_y) - columns = fftTable(); - - if (!columns.isEmpty()) diff --git a/academic/scidavis/README b/academic/scidavis/README index 60a6565565..8f0e95561f 100644 --- a/academic/scidavis/README +++ b/academic/scidavis/README @@ -7,4 +7,5 @@ features such as scriptability and extensibility. SciDAVis started as a fork of QtiPlot. -Optional dependencies are numpy and scipy (to improve python scripting) +Optional dependencies, after installation, are scipy and pygsl (to +improve python scripting). diff --git a/academic/scidavis/fix_translations.patch b/academic/scidavis/fix_translations.patch deleted file mode 100644 index 7269e8ddc5..0000000000 --- a/academic/scidavis/fix_translations.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- scidavis/basic.pri 2017-07-14 04:54:53.000000000 -0300 -+++ /home/fellype/compilando/scidavis-github/scidavis/basic.pri 2017-07-19 09:36:40.000000000 -0300 -@@ -67,7 +67,7 @@ - # note the translation files are not writable during AEGIS - # integration, so we don't want to perform an update then - tstarget.commands = (! test -w translations/scidavis_de.ts || \ --$$LUPDATE_BIN src/*.cpp ../libscidavis/src/*.cpp -ts translations/*.ts) && $$LRELEASE_BIN translations/*.ts -+$$LUPDATE_BIN src ../libscidavis/src -ts translations/*.ts) && $$LRELEASE_BIN translations/*.ts - - QMAKE_EXTRA_TARGETS += tstarget - QMAKE_CLEAN += $$translationfiles.files diff --git a/academic/scidavis/scidavis.SlackBuild b/academic/scidavis/scidavis.SlackBuild index ae0ddc94c9..31454c03dd 100644 --- a/academic/scidavis/scidavis.SlackBuild +++ b/academic/scidavis/scidavis.SlackBuild @@ -24,7 +24,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=scidavis -VERSION=${VERSION:-1.19} +VERSION=${VERSION:-1.21} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -65,16 +65,11 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +sed -i -e 's#share/man/man1/scidavis.1#man/man1#' scidavis/scidavis.pro + # Correction needed in order to find qwtplot3d in its default path grep -rl "qwtplot3d/" libscidavis/src/ | xargs sed -i "s: