--- Portfile.orig	2009-04-25 09:11:56.000000000 +0200
+++ Portfile	2009-08-12 23:48:41.000000000 +0200
@@ -1,10 +1,9 @@
-# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
-# $Id: Portfile 50094 2009-04-25 07:11:56Z jonas@macports.org $
+# $Id:$
 
 PortSystem  1.0
 
 name                qtiplot
-version             0.9.7.6
+version             0.9.7.8
 categories          aqua science
 maintainers         fs.ei.tum.de:jonas openmaintainer
 
@@ -25,40 +24,62 @@
                     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
-
-checksums           md5     a9b9b2fbd3044022a7afa3a89ec5c47d \
-                    sha1    eb29800b614e8552add1ca8c435d56acec712ee5 \
-                    rmd160  1b5fd62872250169f80b6f135c7586b610c3be9a
+                    port:libpng
+
+checksums           md5     15a62821f6f69086e685c271fb510bd4 \
+                    sha1    842a901a84753cfc7980bd684cb258f68021df2d
 
 pre-configure {
     # don't step into the manual dir, there is no "make all"
     reinplace "/manual/d" ${worksrcpath}/qtiplot.pro
+    # suppress Python
+    reinplace "s|SCRIPTING_LANGS.*+=.*Python|#SCRIPTING_LANGS += Python|g" ${worksrcpath}/qtiplot/qtiplot.pro
+   if {[variant_isset python]} {
+	reinplace "s|#SCRIPTING_LANGS.*+=.*Python|SCRIPTING_LANGS += Python|g" ${worksrcpath}/qtiplot/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 \
+    reinplace "s|INCLUDEPATH.*gsl|INCLUDEPATH += /opt/local|g" ${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
+                                    ${worksrcpath}/fitPlugins/fitRational1/fitRational1.pro \
+				    ${worksrcpath}/fitPlugins/planck_wavelength/planck_wavelength.pro
     # fix lib paths
-    reinplace "/LIBS.*3rdparty.*gsl/d" ${worksrcpath}/qtiplot/qtiplot.pro \
-                                       ${worksrcpath}/fitPlugins/explin/explin.pro \
+    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 \
+    				       ${worksrcpath}/fitPlugins/planck_wavelength/planck_wavelength.pro
+    reinplace "/LIBS.*lqwt*/d" ${worksrcpath}/qtiplot/qtiplot.pro
+    reinplace "s|#unix|unix|g" ${worksrcpath}/fitPlugins/explin/explin.pro \
                                        ${worksrcpath}/fitPlugins/exp_saturation/exp_saturation.pro \
                                        ${worksrcpath}/fitPlugins/fitRational0/fitRational0.pro \
-                                       ${worksrcpath}/fitPlugins/fitRational1/fitRational1.pro
+                                       ${worksrcpath}/fitPlugins/fitRational1/fitRational1.pro \
+    				       ${worksrcpath}/fitPlugins/planck_wavelength/planck_wavelength.pro
+    reinplace "s|-L.*suff.*cblas*|-lgsl -lgslcblas|g" ${worksrcpath}/fitPlugins/explin/explin.pro \
+                                       ${worksrcpath}/fitPlugins/exp_saturation/exp_saturation.pro \
+                                       ${worksrcpath}/fitPlugins/fitRational0/fitRational0.pro \
+                                       ${worksrcpath}/fitPlugins/fitRational1/fitRational1.pro    
+    reinplace "s|-L.*suff.*cblas*|-L/opt/local/lib -lgsl -lgslcblas|g" \
+				       ${worksrcpath}/fitPlugins/planck_wavelength/planck_wavelength.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
+    reinplace "s|#unix:LIBS|unix:LIBS|g" ${worksrcpath}/qtiplot/qtiplot.pro
+    reinplace "s|-lgslcblas|-lgslcblas -lboost_date_time-mt -lboost_thread-mt|g" ${worksrcpath}/qtiplot/qtiplot.pro
+
+    # fix install path
+    reinplace "s|/usr/lib|/opt/local/lib|g" ${worksrcpath}/fitPlugins/explin/explin.pro \
+                                       ${worksrcpath}/fitPlugins/exp_saturation/exp_saturation.pro \
+                                       ${worksrcpath}/fitPlugins/fitRational0/fitRational0.pro \
+                                       ${worksrcpath}/fitPlugins/fitRational1/fitRational1.pro \
+    				       ${worksrcpath}/fitPlugins/planck_wavelength/planck_wavelength.pro
+    reinplace "s|usr/local/qwt-5.2.0|opt/local|g" ${worksrcpath}/3rdparty/qwt/qwtconfig.pri \
 
     # 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
@@ -69,7 +90,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}
 
@@ -86,5 +106,4 @@
         qtiUtil.py \
         qtiplotrc.py \
         ${destroot}${applications_dir}/qtiplot.app/Contents/MacOS/
-}
-
+}
\ No newline at end of file
