[143477] trunk/dports/aqua/qtiplot
mcalhoun at macports.org
mcalhoun at macports.org
Sun Dec 13 05:32:52 PST 2015
Revision: 143477
https://trac.macports.org/changeset/143477
Author: mcalhoun at macports.org
Date: 2015-12-13 05:32:52 -0800 (Sun, 13 Dec 2015)
Log Message:
-----------
qtiplot:
* apply Debian patch to allow qtiplot to work with gsl version 2 (#50004)
* generate pyc files prior in destroot so they are part of the installation
* rename qtiplot.app to QtiPlot.app for consistency with other Apps
Modified Paths:
--------------
trunk/dports/aqua/qtiplot/Portfile
Added Paths:
-----------
trunk/dports/aqua/qtiplot/files/patch-gsl2.diff
Modified: trunk/dports/aqua/qtiplot/Portfile
===================================================================
--- trunk/dports/aqua/qtiplot/Portfile 2015-12-13 12:12:02 UTC (rev 143476)
+++ trunk/dports/aqua/qtiplot/Portfile 2015-12-13 13:32:52 UTC (rev 143477)
@@ -6,7 +6,7 @@
name qtiplot
version 0.9.8.9
-revision 11
+revision 12
categories aqua science
license GPL-2+
maintainers nicos openmaintainer
@@ -34,10 +34,12 @@
rmd160 d0ae793b4fbf6eab723f049493d6d954ee8b747e \
sha256 3d2cc2503c8f3d4e72af904fd6c8a528f3c38dcfe5eeca5dae64324db9f12d38
+# gsl patch from https://packages.debian.org/sid/math/qtiplot
patchfiles patch-ApplicationWindow.diff \
patch-qti.sip.diff \
patch-scripting.pri.diff \
patch-qwt3d_openglhelper.diff \
+ patch-gsl2.diff \
patch-sip-4.15.diff
pre-configure {
@@ -59,7 +61,7 @@
puts $confFD "QWT3D_LIBS = \$\$QTI_ROOT/3rdparty/qwtplot3d/lib/libqwtplot3d.a"
puts $confFD "LIBPNG_LIBS = -lpng"
# Forcing TamuAnova to nothing
- puts $confFD "TAMUANOVA_LIBS = "
+ puts $confFD "TAMUANOVA_LIBS = "
if {[variant_isset qtexengine]} {
puts $confFD "TEX_ENGINE_INCLUDEPATH = \$\$QTI_ROOT/3rdparty/QTeXEngine/src"
puts $confFD "TEX_ENGINE_LIBS = \$\$QTI_ROOT/3rdparty/QTeXEngine/libQTeXEngine.a"
@@ -79,7 +81,7 @@
puts $confFD "DEFINES += SCRIPTING_DIALOG"
puts $confFD "CONFIG += release"
puts $confFD "\}"
- close $confFD
+ close $confFD
# fix a bug in the python init script
# append the current path *before* import __main__, else __file__ points to math.so after the import if this module
@@ -114,18 +116,16 @@
destroot {
# install the application bundle and create a symlink for cli invocation
xinstall -d ${destroot}${applications_dir}
- copy "${worksrcpath}/qtiplot/qtiplot.app" ${destroot}${applications_dir}
- # in this dir python tries to store .pyc files, so it has to be writable
- file attributes ${destroot}${applications_dir}/qtiplot.app/Contents/MacOS -permissions ugo+w
- ln -s ${applications_dir}/qtiplot.app/Contents/MacOS/qtiplot ${destroot}${prefix}/bin/qtiplot
+ copy "${worksrcpath}/qtiplot/qtiplot.app" ${destroot}${applications_dir}/QtiPlot.app
+ ln -s ${applications_dir}/QtiPlot.app/Contents/MacOS/qtiplot ${destroot}${prefix}/bin/qtiplot
# install some resources
xinstall -W ${worksrcpath}/qtiplot/ \
qti_wordlist.txt \
qtiUtil.py \
qtiplotrc.py \
- ${destroot}${applications_dir}/qtiplot.app/Contents/MacOS/
+ ${destroot}${applications_dir}/QtiPlot.app/Contents/MacOS/
# install the fitting plugins
- set plugin_dir ${destroot}${applications_dir}/qtiplot.app/Contents/fitPlugins/
+ set plugin_dir ${destroot}${applications_dir}/QtiPlot.app/Contents/fitPlugins/
file mkdir ${plugin_dir}
xinstall -W ${worksrcpath}/fitPlugins/ \
libexp_saturation.dylib \
@@ -148,6 +148,17 @@
variant python26 description "Legacy compatibility variant" requires python27 {}
variant python27 description "add support for python27 scripting" {
+
+ post-destroot {
+ system "${prefix}/bin/python2.7 -m compileall ${destroot}${applications_dir}/QtiPlot.app/Contents/MacOS"
+ }
+ # prior to r143477 (2015-12-13), pyc files were generated after installation
+ pre-activate {
+ foreach pyc [glob -directory ${applications_dir}/QtiPlot.app/Contents/MacOS -nocomplain *.pyc] {
+ delete ${pyc}
+ }
+ }
+
# Can use either py*-pyqt4 or py*-pyqt4-devel.
depends_lib-append port:python27 \
port:py27-sip \
Added: trunk/dports/aqua/qtiplot/files/patch-gsl2.diff
===================================================================
--- trunk/dports/aqua/qtiplot/files/patch-gsl2.diff (rev 0)
+++ trunk/dports/aqua/qtiplot/files/patch-gsl2.diff 2015-12-13 13:32:52 UTC (rev 143477)
@@ -0,0 +1,58 @@
+Description: adoptation to gsl2.
+Author: Damir Islamov <damir at secretlaboratory.ru>, Anton Gladky <gladk at debian.org>
+Last-Update: 2015-12-04
+
+Index: qtiplot-0.9.8.9/qtiplot/src/analysis/Fit.cpp
+===================================================================
+--- qtiplot/src/analysis/Fit.cpp
++++ qtiplot/src/analysis/Fit.cpp
+@@ -39,6 +39,7 @@
+ #include <gsl/gsl_statistics.h>
+ #include <gsl/gsl_blas.h>
+ #include <gsl/gsl_cdf.h>
++#include <gsl/gsl_version.h>
+
+ #include <QApplication>
+ #include <QMessageBox>
+@@ -126,10 +127,19 @@ gsl_multifit_fdfsolver * Fit::fitGSL(gsl
+ break;
+ }
+ }
+-
+ if (status){
++ // allocate memory and calculate covariance matrix based on residuals
++#if GSL_MAJOR_VERSION == 2
++ gsl_matrix *J = gsl_matrix_alloc(d_n, d_p);
++ gsl_multifit_fdfsolver_jac(s, J);
++ gsl_multifit_covar (J, 0.0, covar);
++ iterations = 0;
++ // free previousely allocated memory
++ gsl_matrix_free (J);
++#else
+ gsl_multifit_covar (s->J, 0.0, covar);
+ iterations = 0;
++#endif
+ return s;
+ }
+
+@@ -154,10 +164,18 @@ gsl_multifit_fdfsolver * Fit::fitGSL(gsl
+
+ status = gsl_multifit_test_delta (s->dx, s->x, d_tolerance, d_tolerance);
+ } while (inRange && status == GSL_CONTINUE && (int)iter < d_max_iterations);
+-
++#if GSL_MAJOR_VERSION == 2
++ // allocate memory and calculate covariance matrix based on residuals
++ gsl_matrix *J = gsl_matrix_alloc(d_n, d_p);
++ gsl_multifit_fdfsolver_jac(s, J);
++ gsl_multifit_covar (J, 0.0, covar);
++ iterations = iter;
++ // free previousely allocated memory
++ gsl_matrix_free (J);
++#else
+ gsl_multifit_covar (s->J, 0.0, covar);
+-
+ iterations = iter;
++#endif
+ return s;
+ }
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151213/b23a2597/attachment.html>
More information about the macports-changes
mailing list