Ticket #26960: patch2-Portfile.diff

File patch2-Portfile.diff, 4.6 KB (added by nicos_pavlov@…, 14 years ago)
  • Portfile

    old new  
    66
    77name                qtiplot
    88version             0.9.8.3
     9revision            1
    910categories          aqua science
    1011maintainers         jonas openmaintainer
    1112
     
    2021platforms           darwin
    2122homepage            http://soft.proindependent.com/qtiplot.html
    2223master_sites        http://download.berlios.de/qtiplot/
    23 use_bzip2           yes
    2424
    25 depends_lib-append  port:muparser \
     25distfiles           ${distname}.zip \
     26                    QTeXEngine-0.2-opensource.zip \
     27                    liborigin2-13092010.zip
     28
     29depends_lib-append  path:bin/qmake-mac:qt4-mac \
     30                    port:muparser \
    2631                    port:boost \
    2732                    port:gsl \
    2833                    port:libpng \
    2934                    port:zlib
    3035
    31 checksums           md5     317f45128eef208b2d6b9c28a2e3fa6e \
    32                     sha1    e5ffdd25f1f69611f3f39a0b22e8c23959ab51e1 \
    33                     rmd160  864e45bd9e74f3dd7526c84d387ab88438c1ee70
     36checksums           qtiplot-0.9.8.3.zip \
     37                    md5     c90e9dc08e03dc1cd0db19dfe8941f0c \
     38                    sha1    35dec539fb20b8c7ca121cca11f7b800b4ff0c6b \
     39                    rmd160  2b0fd5b710d2752a1a413f83cbee9daf1e88edbf \
     40                    QTeXEngine-0.2-opensource.zip \
     41                    md5     fc2fe7f3fdb9e06c00d1f5c3c3e68920 \
     42                    sha1    b484a4da7a0f3103e188539bfa6c1910dc9b55ca \
     43                    rmd160  76ff1f2f96cd6df0ea5e6965013e0db452c55f09 \
     44                    liborigin2-13092010.zip \
     45                    md5     e2b41c4d8a1e2d357dd2b5b331d31375 \
     46                    sha1    3f17d5a8c484ddb864a29a91a94d677b0b3b18d7 \
     47                    rmd160  df7f4bafc1b9815c5921c09b435f431d8a1947e6
     48
     49patchfiles          patch-ApplicationWindow.diff
    3450
    35 patchfiles          patch-qtiplot-qtiplot.pro \
    36                     patch-qtiplot-src-scripting-scripting.pri
     51use_zip             yes
     52
     53universal_variant   no
    3754
    3855use_parallel_build  yes
    3956
     
    5269    # till upstream catches up, we use a local copy of qwt
    5370    puts $confFD "QWT_INCLUDEPATH = \$\$QTI_ROOT/3rdparty/qwt/src"
    5471    puts $confFD "QWT_LIBS = \$\$QTI_ROOT/3rdparty/qwt/lib/libqwt.a"
     72    puts $confFD "QWT3D_INCLUDEPATH = \$\$QTI_ROOT/3rdparty/qwtplot3d/include"
     73    puts $confFD "unix:QWT3D_LIBS = \$\$QTI_ROOT/3rdparty/qwtplot3d/lib/libqwtplot3d.a"
    5574    puts $confFD "LIBPNG_LIBS = -lpng"
     75    puts $confFD "TEX_ENGINE_INCLUDEPATH = \$\$QTI_ROOT/3rdparty/QTeXEngine/src"
     76    puts $confFD "TEX_ENGINE_LIBS = \$\$QTI_ROOT/3rdparty/QTeXEngine/libQTeXEngine.a"
     77    if {[variant_isset origin]} {
     78      puts $confFD "LIBORIGIN_INCLUDEPATH = \$\$QTI_ROOT/3rdparty/liborigin2"
     79      puts $confFD "LIBORIGIN_LIBS = \$\$QTI_ROOT/3rdparty/liborigin2/liborigin2.a"
     80    }
     81
     82    # linking to deprecated library
     83    reinplace "s|<QAssistantClient>|\"qassistantclient.h\"|g" ${worksrcpath}/qtiplot/src/core/ApplicationWindow.cpp
     84
    5685    # target specific configuration
    5786    puts $confFD "contains( TARGET, qtiplot ) \{"
    5887    puts $confFD "SCRIPTING_LANGS += muParser"; # currently you can't build without
     
    71100    import sys, os.path\\
    72101    sys.path.append(os.path.dirname(__file__))
    73102    " ${worksrcpath}/qtiplot/qtiplotrc.py
     103
     104    if {[variant_isset origin]} {
     105      # prepare liborigin2
     106      copy ${workpath}/liborigin2 ${worksrcpath}/3rdparty/liborigin2
     107      reinplace "s|INCLUDEPATH += ../boost|INCLUDEPATH += ${prefix}/include|g" ${worksrcpath}/3rdparty/liborigin2/liborigin2.pro
     108      reinplace "s|lboost_thread|lboost_thread-mt|g" ${worksrcpath}/3rdparty/liborigin2/liborigin2.pro
     109      reinplace "s|liborigin|liborigin2|g" ${worksrcpath}/qtiplot/src/origin/origin.pri
     110    }
     111
     112    # prepare qtexengine
     113    copy ${workpath}/QTeXEngine ${worksrcpath}/3rdparty/QTexEngine
     114
     115    # add 3rdparty to compilation
     116    reinplace "s|3rdparty/qwtplot3d \|3rdparty/qwtplot3d 3rdparty/QTeXEngine \|g" \
     117    ${worksrcpath}/qtiplot.pro
     118    if {[variant_isset origin]} {
     119      reinplace "s|3rdparty/QTeXEngine \|3rdparty/QTeXEngine 3rdparty/liborigin2 \|g" \
     120      ${worksrcpath}/qtiplot.pro
     121    }
     122
     123    # use system-wide libraries
     124    reinplace "s|#unix|unix|g" ${worksrcpath}/qtiplot/qtiplot.pro
    74125}
    75126
    76127configure.pre_args  "PREFIX=${prefix}"
     
    102153        ${plugin_dir}
    103154}
    104155
     156variant origin description "add support for originlab files" {
     157    depends_lib-append port:treehh
     158    patchfiles-append patch-importOPJ.cpp.diff
     159}
     160
    105161variant python25 conflicts python26 description "add support for python26 scripting" {
    106162    depends_lib-append port:python25 \
    107163                       port:py25-sip \