Ticket #26960: patch-Portfile-qtiplot.diff

File patch-Portfile-qtiplot.diff, 4.3 KB (added by nicos_pavlov@…, 14 years ago)
  • Portfile

    old new  
    2020platforms           darwin
    2121homepage            http://soft.proindependent.com/qtiplot.html
    2222master_sites        http://download.berlios.de/qtiplot/
    23 use_bzip2           yes
    2423
    25 depends_lib-append  port:muparser \
     24distfiles           ${distname}.zip \
     25                    QTeXEngine-0.2-opensource.zip \
     26                    liborigin2-13092010.zip
     27
     28depends_lib-append  path:bin/qmake-mac:qt4-mac \
     29                    port:muparser \
    2630                    port:boost \
    2731                    port:gsl \
    2832                    port:libpng \
    2933                    port:zlib
    3034
    31 checksums           md5     317f45128eef208b2d6b9c28a2e3fa6e \
    32                     sha1    e5ffdd25f1f69611f3f39a0b22e8c23959ab51e1 \
    33                     rmd160  864e45bd9e74f3dd7526c84d387ab88438c1ee70
     35checksums           qtiplot-0.9.8.3.zip \
     36                    md5     c90e9dc08e03dc1cd0db19dfe8941f0c \
     37                    sha1    35dec539fb20b8c7ca121cca11f7b800b4ff0c6b \
     38                    rmd160  2b0fd5b710d2752a1a413f83cbee9daf1e88edbf \
     39                    QTeXEngine-0.2-opensource.zip \
     40                    md5     fc2fe7f3fdb9e06c00d1f5c3c3e68920 \
     41                    sha1    b484a4da7a0f3103e188539bfa6c1910dc9b55ca \
     42                    rmd160  76ff1f2f96cd6df0ea5e6965013e0db452c55f09 \
     43                    liborigin2-13092010.zip \
     44                    md5     e2b41c4d8a1e2d357dd2b5b331d31375 \
     45                    sha1    3f17d5a8c484ddb864a29a91a94d677b0b3b18d7 \
     46                    rmd160  df7f4bafc1b9815c5921c09b435f431d8a1947e6
     47
     48use_zip             yes
    3449
    35 patchfiles          patch-qtiplot-qtiplot.pro \
    36                     patch-qtiplot-src-scripting-scripting.pri
     50universal_variant   no
    3751
    3852use_parallel_build  yes
    3953
     
    5266    # till upstream catches up, we use a local copy of qwt
    5367    puts $confFD "QWT_INCLUDEPATH = \$\$QTI_ROOT/3rdparty/qwt/src"
    5468    puts $confFD "QWT_LIBS = \$\$QTI_ROOT/3rdparty/qwt/lib/libqwt.a"
     69    puts $confFD "QWT3D_INCLUDEPATH = \$\$QTI_ROOT/3rdparty/qwtplot3d/include"
     70    puts $confFD "unix:QWT3D_LIBS = \$\$QTI_ROOT/3rdparty/qwtplot3d/lib/libqwtplot3d.a"
    5571    puts $confFD "LIBPNG_LIBS = -lpng"
     72    puts $confFD "TEX_ENGINE_INCLUDEPATH = \$\$QTI_ROOT/3rdparty/QTeXEngine/src"
     73    puts $confFD "TEX_ENGINE_LIBS = \$\$QTI_ROOT/3rdparty/QTeXEngine/libQTeXEngine.a"
     74    if {[variant_isset origin]} {
     75      puts $confFD "LIBORIGIN_INCLUDEPATH = \$\$QTI_ROOT/3rdparty/liborigin2"
     76      puts $confFD "LIBORIGIN_LIBS = \$\$QTI_ROOT/3rdparty/liborigin2/liborigin2.a"
     77    }
     78
    5679    # target specific configuration
    5780    puts $confFD "contains( TARGET, qtiplot ) \{"
    5881    puts $confFD "SCRIPTING_LANGS += muParser"; # currently you can't build without
     
    7194    import sys, os.path\\
    7295    sys.path.append(os.path.dirname(__file__))
    7396    " ${worksrcpath}/qtiplot/qtiplotrc.py
     97
     98    if {[variant_isset origin]} {
     99      # prepare liborigin2
     100      copy ${workpath}/liborigin2 ${worksrcpath}/3rdparty/liborigin2
     101      reinplace "s|INCLUDEPATH += ../boost|INCLUDEPATH += ${prefix}/include|g" ${worksrcpath}/3rdparty/liborigin2/liborigin2.pro
     102      reinplace "s|lboost_thread|lboost_thread-mt|g" ${worksrcpath}/3rdparty/liborigin2/liborigin2.pro
     103      reinplace "s|liborigin|liborigin2|g" ${worksrcpath}/qtiplot/src/origin/origin.pri
     104    }
     105
     106    # prepare qtexengine
     107    copy ${workpath}/QTeXEngine ${worksrcpath}/3rdparty/QTexEngine
     108
     109    # add 3rdparty to compilation
     110    reinplace "s|3rdparty/qwtplot3d \|3rdparty/qwtplot3d 3rdparty/QTeXEngine \|g" \
     111    ${worksrcpath}/qtiplot.pro
     112    if {[variant_isset origin]} {
     113      reinplace "s|3rdparty/QTeXEngine \|3rdparty/QTeXEngine 3rdparty/liborigin2 \|g" \
     114      ${worksrcpath}/qtiplot.pro
     115    }
     116
     117    # use system-wide libraries
     118    reinplace "s|#unix|unix|g" ${worksrcpath}/qtiplot/qtiplot.pro
    74119}
    75120
    76121configure.pre_args  "PREFIX=${prefix}"
     
    102147        ${plugin_dir}
    103148}
    104149
     150variant origin description "add support for originlab files" {
     151    depends_lib-append port:treehh
     152    patchfiles-append patch-importOPJ.cpp.diff
     153}
     154
    105155variant python25 conflicts python26 description "add support for python26 scripting" {
    106156    depends_lib-append port:python25 \
    107157                       port:py25-sip \