[57915] trunk/dports/aqua/qtiplot

jonas at macports.org jonas at macports.org
Fri Sep 18 13:00:51 PDT 2009


Revision: 57915
          http://trac.macports.org/changeset/57915
Author:   jonas at macports.org
Date:     2009-09-18 13:00:49 -0700 (Fri, 18 Sep 2009)
Log Message:
-----------
version dump with lots of extras

 * use macports handle as maintainer
 * permit parallel builds
 * python25 as a variant (allows python26 too, not yet testet).
   The buildsystem currently uses `python` from `PATH`
 * much nicer configuration system, patch temporary and already integrated upstream

Modified Paths:
--------------
    trunk/dports/aqua/qtiplot/Portfile

Added Paths:
-----------
    trunk/dports/aqua/qtiplot/files/
    trunk/dports/aqua/qtiplot/files/patch-qtiplot-qtiplot.pro

Modified: trunk/dports/aqua/qtiplot/Portfile
===================================================================
--- trunk/dports/aqua/qtiplot/Portfile	2009-09-18 19:25:03 UTC (rev 57914)
+++ trunk/dports/aqua/qtiplot/Portfile	2009-09-18 20:00:49 UTC (rev 57915)
@@ -4,9 +4,9 @@
 PortSystem  1.0
 
 name                qtiplot
-version             0.9.7.6
+version             0.9.7.9
 categories          aqua science
-maintainers         fs.ei.tum.de:jonas openmaintainer
+maintainers         jonas openmaintainer
 
 description         Data Analysis and Scientific Plotting
 long_description    Similar to Origin or SigmaPlot, QtiPlot can be used to \
@@ -25,41 +25,43 @@
                     port:muparser \
                     port:boost \
                     port:gsl \
-                    port:libpng \
-                    port:qwt52 \
-                    port:python25 \
-                    port:py25-sip \
-                    port:py25-pyqt4
-                    # TODO variants to build without python or other python version
+                    port:libpng
 
-checksums           md5     a9b9b2fbd3044022a7afa3a89ec5c47d \
-                    sha1    eb29800b614e8552add1ca8c435d56acec712ee5 \
-                    rmd160  1b5fd62872250169f80b6f135c7586b610c3be9a
+checksums           md5     08e4943cadd5ee39e28e4ce0d61d475a \
+                    sha1    ad83187af31172794771012072b57a67f9288628 \
+                    rmd160  cd6cbef46b3474989bede96af04d1cef52dd6f48
 
+patchfiles          patch-qtiplot-qtiplot.pro
+
+use_parallel_build  yes
+
 pre-configure {
-    # don't step into the manual dir, there is no "make all"
+    # don't step into the manual dir, we don't have all the tools to build it
     reinplace "/manual/d" ${worksrcpath}/qtiplot.pro
-    # fix include paths
-    reinplace "/INCLUDEPATH.*muparser/d" ${worksrcpath}/qtiplot/qtiplot.pro
-    reinplace "/INCLUDEPATH.*boost/d" ${worksrcpath}/qtiplot/qtiplot.pro
-    reinplace "/INCLUDEPATH.*png/d" ${worksrcpath}/qtiplot/qtiplot.pro
-    reinplace "/INCLUDEPATH.*gsl/d" ${worksrcpath}/qtiplot/qtiplot.pro \
-                                    ${worksrcpath}/fitPlugins/explin/explin.pro \
-                                    ${worksrcpath}/fitPlugins/exp_saturation/exp_saturation.pro \
-                                    ${worksrcpath}/fitPlugins/fitRational0/fitRational0.pro \
-                                    ${worksrcpath}/fitPlugins/fitRational1/fitRational1.pro
-    # fix lib paths
-    reinplace "/LIBS.*3rdparty.*gsl/d" ${worksrcpath}/qtiplot/qtiplot.pro \
-                                       ${worksrcpath}/fitPlugins/explin/explin.pro \
-                                       ${worksrcpath}/fitPlugins/exp_saturation/exp_saturation.pro \
-                                       ${worksrcpath}/fitPlugins/fitRational0/fitRational0.pro \
-                                       ${worksrcpath}/fitPlugins/fitRational1/fitRational1.pro
-    reinplace "/LIBS.*3rdparty.*muparser/d" ${worksrcpath}/qtiplot/qtiplot.pro
-    reinplace "/LIBS.*3rdparty.*boost/d" ${worksrcpath}/qtiplot/qtiplot.pro
-    reinplace "/LIBS.*3rdparty.*png/d" ${worksrcpath}/qtiplot/qtiplot.pro
-    reinplace "/LIBS.*3rdparty.*libqwt.a/d" ${worksrcpath}/qtiplot/qtiplot.pro \
-                                            ${worksrcpath}/qtiplot/src/lib/qti.pro
 
+    # create the configuration, see build.conf.example which comes with the package
+    set confFD [open ${worksrcpath}/build.conf "w"]
+    puts $confFD "SYS_INCLUDEPATH = ${prefix}/include"
+    puts $confFD "SYS_LIBS = -L${prefix}/lib"
+    puts $confFD "MUPARSER_LIBS = -lmuparser"
+    puts $confFD "GSL_LIBS = -lgsl -lgslcblas"
+    puts $confFD "BOOST_LIBS = -lboost_date_time-mt -lboost_thread-mt"
+    # till upstream catches up, we use a local copy of qwt
+    puts $confFD "QWT_INCLUDEPATH = \$\$QTI_ROOT/3rdparty/qwt/src"
+    puts $confFD "QWT_LIBS = \$\$QTI_ROOT/3rdparty/qwt/lib/libqwt.a"
+    puts $confFD "LIBPNG_LIBS = -lpng"
+    # target specific configuration
+    puts $confFD "contains( TARGET, qtiplot ) \{"
+    puts $confFD "SCRIPTING_LANGS += muParser"; # currently you can't build without
+    if {[variant_isset python25]} {
+        puts $confFD "SCRIPTING_LANGS += Python"
+    }
+    puts $confFD "DEFINES += SCRIPTING_CONSOLE"
+    puts $confFD "DEFINES += SCRIPTING_DIALOG"
+    puts $confFD "CONFIG += release"
+    puts $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
     reinplace "/import __main__/ i\\
@@ -69,7 +71,6 @@
 }
 
 configure.pre_args  "PREFIX=${prefix}"
-configure.args  "'INCLUDEPATH += ${prefix}/include' 'LIBS += -L${prefix}/lib -lqwt -lpng -lgsl -lgslcblas -lmuparser -lboost_date_time-mt -lboost_thread-mt'"
 configure.cmd   "LOCALSOFT=${prefix} ${prefix}/libexec/qt4-mac/bin/qmake"
 destroot.destdir INSTALL_ROOT=${destroot}
 
@@ -88,3 +89,9 @@
         ${destroot}${applications_dir}/qtiplot.app/Contents/MacOS/
 }
 
+variant python25 description "add support for python scripting" {
+    depends_lib-append port:python25 \
+                       port:py25-sip \
+                       port:py25-pyqt4
+}
+

Added: trunk/dports/aqua/qtiplot/files/patch-qtiplot-qtiplot.pro
===================================================================
--- trunk/dports/aqua/qtiplot/files/patch-qtiplot-qtiplot.pro	                        (rev 0)
+++ trunk/dports/aqua/qtiplot/files/patch-qtiplot-qtiplot.pro	2009-09-18 20:00:49 UTC (rev 57915)
@@ -0,0 +1,159 @@
+This patch is already included upstream, unfortunately *after* the 0.9.7.9 release
+
+--- qtiplot/qtiplot.pro.orig	2009-09-18 19:46:47.000000000 +0200
++++ qtiplot/qtiplot.pro	2009-09-18 19:47:42.000000000 +0200
+@@ -1,72 +1,30 @@
+-# building without muParser doesn't work yet
+-SCRIPTING_LANGS += muParser
+-SCRIPTING_LANGS += Python
+-
+-# a console displaying output of scripts; particularly useful on Windows
+-# where running QtiPlot from a terminal is inconvenient
+-DEFINES         += SCRIPTING_CONSOLE
+-
+-# a dialog for selecting the scripting language on a per-project basis
+-DEFINES         += SCRIPTING_DIALOG
+-
+-#DEFINES         += QTIPLOT_DEMO
+-
+-# Comment the following lines to disable donations start-up message.
+-#DEFINES         += QTIPLOT_SUPPORT
+-
+-# Comment the next line, if you don't have libpng on your system.
+-CONFIG          += HAVE_LIBPNG
+-
+-# Uncomment the next line in order to enable export of 2D plots to the EMF file format on Windows. You need EmfEngine on your system.
+-CONFIG          += HAVE_EMF
+-
+-# Uncomment the following line if you want to perform a custom installation using the *.path variables defined bellow.
+-#CONFIG          += CustomInstall
+-
+-CONFIG          += release
+-#CONFIG          += debug
+-#win32: CONFIG   += console
++TARGET   = qtiplot
++QTI_ROOT = ..
++!include( $$QTI_ROOT/build.conf ) {
++  message( "You need a build.conf file with local settings!" )
++}
+ 
+ ##################### 3rd PARTY HEADER FILES SECTION ########################
+-#!!! Warning: You must modify these paths according to your computer settings
++#!!! Warning: You must set this up in $$QTIROOT/build.conf
+ #############################################################################
+ 
+-INCLUDEPATH       += ../3rdparty/muparser/include
++# local copy included
+ INCLUDEPATH       += ../3rdparty/qwtplot3d/include
+-INCLUDEPATH       += ../3rdparty/qwt/src
+ INCLUDEPATH       += ../3rdparty/liborigin
+-INCLUDEPATH       += ../3rdparty/gsl/include
+ INCLUDEPATH       += ../3rdparty/zlib
+-INCLUDEPATH       += ../3rdparty/boost
+-
+-##################### 3rd PARTY LIBRARIES SECTION ###########################
+-#!!! Warning: You must modify these paths according to your computer settings
+-#############################################################################
+-
+-##################### Linux (Mac OS X) ######################################
++INCLUDEPATH 	  += ../3rdparty/QTeXEngine/src
+ 
+-# statically link against libraries in 3rdparty
+-unix:LIBS         += ../3rdparty/muparser/lib/libmuparser.a
+-unix:LIBS         += ../3rdparty/qwt/lib/libqwt.a
+-unix:LIBS         += ../3rdparty/gsl/lib/libgsl.a
+-unix:LIBS         += ../3rdparty/gsl/lib/libgslcblas.a
+-unix:LIBS         += ../3rdparty/boost/lib/libboost_date_time-gcc43-mt-1_38.a
+-unix:LIBS         += ../3rdparty/boost/lib/libboost_thread-gcc43-mt-1_38.a
+-
+-# dynamically link against dependencies if they are installed system-wide
+-#unix:LIBS         += -lmuparser
+-#unix:LIBS         += -lqwt
+-#unix:LIBS         += -lgsl -lgslcblas
+-
+-##################### Windows ###############################################
+-
+-win32:LIBS        += ../3rdparty/muparser/lib/libmuparser.a
+-win32:LIBS        += ../3rdparty/qwt/lib/libqwt.a
+-win32:LIBS        += ../3rdparty/gsl/lib/libgsl.a
+-win32:LIBS        += ../3rdparty/gsl/lib/libgslcblas.a
+-win32:LIBS        += ../3rdparty/zlib/libz.a
+-win32:LIBS        += ../3rdparty/boost/lib/libboost_date_time-mgw34-mt.lib
+-win32:LIBS        += ../3rdparty/boost/lib/libboost_thread-mgw34-mt.lib
++# configurable
++INCLUDEPATH       += $$MUPARSER_INCLUDEPATH
++INCLUDEPATH       += $$QWT_INCLUDEPATH
++INCLUDEPATH       += $$GSL_INCLUDEPATH
++INCLUDEPATH       += $$BOOST_INCLUDEPATH
++
++# configurable libs
++LIBS         += $$MUPARSER_LIBS
++LIBS         += $$QWT_LIBS
++LIBS         += $$GSL_LIBS
++LIBS         += $$BOOST_LIBS
+ 
+ #############################################################################
+ ###################### BASIC PROJECT PROPERTIES #############################
+@@ -74,7 +32,6 @@
+ 
+ QMAKE_PROJECT_DEPTH = 0
+ 
+-TARGET         = qtiplot
+ TEMPLATE       = app
+ CONFIG        += qt warn_on exceptions opengl thread
+ CONFIG        += assistant
+@@ -137,9 +94,6 @@
+                   translations/qtiplot_ja.ts \
+                   translations/qtiplot_sv.ts
+ 
+-system(lupdate -verbose qtiplot.pro)
+-system(lrelease -verbose qtiplot.pro)
+-
+ translations.files += translations/qtiplot_de.qm \
+                   translations/qtiplot_es.qm \
+                   translations/qtiplot_fr.qm \
+@@ -184,7 +138,7 @@
+ ###############################################################
+ 
+ INCLUDEPATH += ../3rdparty/QTeXEngine/src
+-HEADERS     += ../3rdparty/QTeXEngine/src/QTeXEngine.h
++HEADERS 	+= ../3rdparty/QTeXEngine/src/QTeXEngine.h
+ SOURCES     += ../3rdparty/QTeXEngine/src/QTeXPaintEngine.cpp
+ SOURCES     += ../3rdparty/QTeXEngine/src/QTeXPaintDevice.cpp
+ 
+@@ -222,20 +176,26 @@
+ 
+ ###############################################################
+ 
+-contains(CONFIG, HAVE_LIBPNG){
++# check if we have libpng
++!isEmpty(LIBPNG_LIBS) {
+ 	DEFINES += GL2PS_HAVE_LIBPNG
+-	INCLUDEPATH += ../3rdparty/libpng/
+-	LIBS        += ../3rdparty/libpng/libpng.a
++	INCLUDEPATH += $$LIBPNG_INCLUDEPATH
++	LIBS        += $$LIBPNG_LIBS
+ }
+ 
+ ###############################################################
+ 
+-contains(CONFIG, HAVE_EMF){
+-	win32 {
+-		DEFINES += EMF_OUTPUT
+-		INCLUDEPATH += ../3rdparty/EmfEngine/src
+-		LIBS        += ../3rdparty/EmfEngine/libEmfEngine.a -lgdiplus
+-	}
++# check if we have EmfEnginge
++!isEmpty(EMF_ENGINE_LIBS) {
++	DEFINES += EMF_OUTPUT
++	INCLUDEPATH += $$EMF_ENGINE_INCLUDEPATH
++	LIBS        += $$EMF_ENGINE_LIBS
++  win32:LIBS += -lgdiplus
++  unix:LIBS += -lEMF
+ }
+ 
+ ###############################################################
++
++# At the very end: add global include- and lib path
++unix:INCLUDEPATH += $$SYS_INCLUDEPATH
++unix:LIBS += $$SYS_LIBS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090918/d841847c/attachment.html>


More information about the macports-changes mailing list