Ticket #20656: Portfile-qtiplot.diff.2

File Portfile-qtiplot.diff.2, 6.4 KB (added by nicos_pavlov@…, 15 years ago)
Line 
1--- Portfile.orig       2009-04-25 09:11:56.000000000 +0200
2+++ Portfile    2009-08-15 18:46:34.000000000 +0200
3@@ -1,10 +1,9 @@
4-# -*- 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
5-# $Id: Portfile 50094 2009-04-25 07:11:56Z jonas@macports.org $
6+# $Id:$
7 
8 PortSystem  1.0
9 
10 name                qtiplot
11-version             0.9.7.6
12+version             0.9.7.8
13 categories          aqua science
14 maintainers         fs.ei.tum.de:jonas openmaintainer
15 
16@@ -25,40 +24,63 @@
17                     port:muparser \
18                     port:boost \
19                     port:gsl \
20-                    port:libpng \
21-                    port:qwt52 \
22-                    port:python25 \
23-                    port:py25-sip \
24-                    port:py25-pyqt4
25-                    # TODO variants to build without python or other python version
26-
27-checksums           md5     a9b9b2fbd3044022a7afa3a89ec5c47d \
28-                    sha1    eb29800b614e8552add1ca8c435d56acec712ee5 \
29-                    rmd160  1b5fd62872250169f80b6f135c7586b610c3be9a
30+                    port:libpng
31+
32+checksums           md5     15a62821f6f69086e685c271fb510bd4 \
33+                    sha1    842a901a84753cfc7980bd684cb258f68021df2d \
34+                    rmd160  ba28d95d815709b4891cbbfb135868ac90006165
35 
36 pre-configure {
37     # don't step into the manual dir, there is no "make all"
38     reinplace "/manual/d" ${worksrcpath}/qtiplot.pro
39+    # suppress Python
40+    reinplace "s|SCRIPTING_LANGS.*+=.*Python|#SCRIPTING_LANGS += Python|g" ${worksrcpath}/qtiplot/qtiplot.pro
41+   if {[variant_isset python]} {
42+       reinplace "s|#SCRIPTING_LANGS.*+=.*Python|SCRIPTING_LANGS += Python|g" ${worksrcpath}/qtiplot/qtiplot.pro       
43+    }
44     # fix include paths
45     reinplace "/INCLUDEPATH.*muparser/d" ${worksrcpath}/qtiplot/qtiplot.pro
46     reinplace "/INCLUDEPATH.*boost/d" ${worksrcpath}/qtiplot/qtiplot.pro
47     reinplace "/INCLUDEPATH.*png/d" ${worksrcpath}/qtiplot/qtiplot.pro
48-    reinplace "/INCLUDEPATH.*gsl/d" ${worksrcpath}/qtiplot/qtiplot.pro \
49+    reinplace "s|INCLUDEPATH.*gsl|INCLUDEPATH += /opt/local|g" ${worksrcpath}/qtiplot/qtiplot.pro \
50                                     ${worksrcpath}/fitPlugins/explin/explin.pro \
51                                     ${worksrcpath}/fitPlugins/exp_saturation/exp_saturation.pro \
52                                     ${worksrcpath}/fitPlugins/fitRational0/fitRational0.pro \
53-                                    ${worksrcpath}/fitPlugins/fitRational1/fitRational1.pro
54+                                    ${worksrcpath}/fitPlugins/fitRational1/fitRational1.pro \
55+                                   ${worksrcpath}/fitPlugins/planck_wavelength/planck_wavelength.pro
56     # fix lib paths
57-    reinplace "/LIBS.*3rdparty.*gsl/d" ${worksrcpath}/qtiplot/qtiplot.pro \
58-                                       ${worksrcpath}/fitPlugins/explin/explin.pro \
59+    reinplace "/LIBS.*3rdparty.*gsl*/d" ${worksrcpath}/qtiplot/qtiplot.pro \
60+                                      ${worksrcpath}/fitPlugins/explin/explin.pro \
61+                                       ${worksrcpath}/fitPlugins/exp_saturation/exp_saturation.pro \
62+                                       ${worksrcpath}/fitPlugins/fitRational0/fitRational0.pro \
63+                                       ${worksrcpath}/fitPlugins/fitRational1/fitRational1.pro \
64+                                      ${worksrcpath}/fitPlugins/planck_wavelength/planck_wavelength.pro
65+    reinplace "/LIBS.*lqwt*/d" ${worksrcpath}/qtiplot/qtiplot.pro
66+    reinplace "s|#unix|unix|g" ${worksrcpath}/fitPlugins/explin/explin.pro \
67+                                       ${worksrcpath}/fitPlugins/exp_saturation/exp_saturation.pro \
68+                                       ${worksrcpath}/fitPlugins/fitRational0/fitRational0.pro \
69+                                       ${worksrcpath}/fitPlugins/fitRational1/fitRational1.pro \
70+                                      ${worksrcpath}/fitPlugins/planck_wavelength/planck_wavelength.pro
71+    reinplace "s|-L.*suff.*cblas*|-lgsl -lgslcblas|g" ${worksrcpath}/fitPlugins/explin/explin.pro \
72                                        ${worksrcpath}/fitPlugins/exp_saturation/exp_saturation.pro \
73                                        ${worksrcpath}/fitPlugins/fitRational0/fitRational0.pro \
74-                                       ${worksrcpath}/fitPlugins/fitRational1/fitRational1.pro
75+                                       ${worksrcpath}/fitPlugins/fitRational1/fitRational1.pro   
76+    reinplace "s|-L.*suff.*cblas*|-L/opt/local/lib -lgsl -lgslcblas|g" \
77+                                      ${worksrcpath}/fitPlugins/planck_wavelength/planck_wavelength.pro
78+
79     reinplace "/LIBS.*3rdparty.*muparser/d" ${worksrcpath}/qtiplot/qtiplot.pro
80     reinplace "/LIBS.*3rdparty.*boost/d" ${worksrcpath}/qtiplot/qtiplot.pro
81     reinplace "/LIBS.*3rdparty.*png/d" ${worksrcpath}/qtiplot/qtiplot.pro
82-    reinplace "/LIBS.*3rdparty.*libqwt.a/d" ${worksrcpath}/qtiplot/qtiplot.pro \
83-                                            ${worksrcpath}/qtiplot/src/lib/qti.pro
84+    reinplace "s|#unix:LIBS|unix:LIBS|g" ${worksrcpath}/qtiplot/qtiplot.pro
85+    reinplace "s|-lgslcblas|-lgslcblas -lboost_date_time-mt -lboost_thread-mt|g" ${worksrcpath}/qtiplot/qtiplot.pro
86+
87+    # fix install path
88+    reinplace "s|/usr/lib|/opt/local/lib|g" ${worksrcpath}/fitPlugins/explin/explin.pro \
89+                                       ${worksrcpath}/fitPlugins/exp_saturation/exp_saturation.pro \
90+                                       ${worksrcpath}/fitPlugins/fitRational0/fitRational0.pro \
91+                                       ${worksrcpath}/fitPlugins/fitRational1/fitRational1.pro \
92+                                      ${worksrcpath}/fitPlugins/planck_wavelength/planck_wavelength.pro
93+    reinplace "s|usr/local/qwt-5.2.0|opt/local|g" ${worksrcpath}/3rdparty/qwt/qwtconfig.pri \
94 
95     # fix a bug in the python init script
96     # append the current path *before* import __main__, else __file__ points to math.so after the import if this module
97@@ -69,7 +91,6 @@
98 }
99 
100 configure.pre_args  "PREFIX=${prefix}"
101-configure.args  "'INCLUDEPATH += ${prefix}/include' 'LIBS += -L${prefix}/lib -lqwt -lpng -lgsl -lgslcblas -lmuparser -lboost_date_time-mt -lboost_thread-mt'"
102 configure.cmd   "LOCALSOFT=${prefix} ${prefix}/libexec/qt4-mac/bin/qmake"
103 destroot.destdir INSTALL_ROOT=${destroot}
104 
105@@ -88,3 +109,8 @@
106         ${destroot}${applications_dir}/qtiplot.app/Contents/MacOS/
107 }
108 
109+variant python description {Add Python support} {
110+       depends_lib-append \
111+               port:py25-sip \
112+               port:py25-pyqt4
113+}