Ticket #50955: qwt61.diff

File qwt61.diff, 4.2 KB (added by RJVB (René Bertin), 8 years ago)
  • graphics/qwt/Portfile

    diff --git a/graphics/qwt/Portfile b/graphics/qwt/Portfile
    index 25dc7c9..9a485bc 100644
    a b subport qwt60 { 
    6464
    6565subport qwt61 {
    6666
    67     version         6.1.2
    68     revision        1
     67    version         6.1.3
    6968    distname        qwt-${version}
    7069    conflicts       qwt qwt52 qwt60
    71     checksums       sha1    6af82b6ee4132f779d1c8c2db872f01463b0d61c \
    72                     sha256  2b08f18d1d3970e7c3c6096d850f17aea6b54459389731d3ce715d193e243d0c
     70    checksums       sha1    90ec21bc42f7fae270482e1a0df3bc79cb10e5c7 \
     71                    sha256  f3ecd34e72a9a2b08422fb6c8e909ca76f4ce5fa77acad7a2883b701f4309733
     72    use_parallel_build  yes
    7373
    7474    patchfiles      patch-designer_designer.pro.61.diff \
    7575                    patch-qwtconfig.pri.61.diff \
    7676                    patch-qwtbuild.pri.61.diff
    7777    livecheck.url   http://sourceforge.net/api/file/index/project-id/13693/mtime/desc/rss
    7878    livecheck.regex \\/qwt\\/(6\\.1\\.\\d+)\\/
     79    post-patch {
     80        reinplace "s|@INSTALL_DOCS@@|${qt_docs_dir}/${subport}|" \
     81                    ${worksrcpath}/qwtconfig.pri
     82        reinplace "s|@INSTALL_HEADERS@@|${qt_includes_dir}|" \
     83                    ${worksrcpath}/qwtconfig.pri
     84    }
    7985
    8086}
    8187
    post-patch { 
    126132    # setup for examples, if selected
    127133
    128134    if {![variant_isset examples]} {
     135        # I presume this worked with qwt < 6.1
    129136        reinplace "s@QwtExamples@@" \
    130137            ${worksrcpath}/qwtconfig.pri
     138    } else {
     139        # qwt 6.1.2 disables the examples by default, so reenable them when requested
     140        reinplace "s@#QWT_CONFIG     += QwtExamples@QWT_CONFIG     += QwtExamples@" \
     141            ${worksrcpath}/qwtconfig.pri
    131142    }
    132143}
    133144
    if {${qwt_major} < 6} { 
    169180    # QWT 6+ uses Qt4+ only
    170181    if {![variant_isset qt5]} {
    171182        PortGroup qt4 1.0
     183        PortGroup qmake 1.0
    172184    } else {
    173185        PortGroup           qt5 1.0
     186        PortGroup           qmake5 1.0
    174187        set qt_arch_types   "x86_64"
    175188        post-patch {
    176189            reinplace "s|QT_STATIC_CONST|static const|" \
    177190                ${worksrcpath}/src/qwt_scale_map.cpp \
    178191                ${worksrcpath}/src/qwt_scale_map.h
     192            reinplace "s/QT_INSTALL_FRAMEWORKS/QT_INSTALL_LIBS/" \
     193                ${worksrcpath}/qwtconfig.pri
    179194        }
     195        configure.args-append \
     196                -config absolute_library_soname
    180197    }
    181198}
    182199
    183 configure.cmd       ${qt_qmake_cmd}
    184 configure.pre_args  INSTALLBASE="${prefix}"
     200# configure.cmd       ${qt_qmake_cmd}
     201# configure.pre_args-delete  --prefix=${prefix}
     202configure.pre_args-append  INSTALLBASE="${prefix}"
    185203
    186204# qmake does not handle these flags
    187205configure.universal_args-delete --disable-dependency-tracking
    post-destroot { 
    249267            }
    250268        }
    251269    }
     270    if {[variant_isset examples]} {
     271        set exdir ${destroot}${qt_examples_dir}/${subport}
     272        xinstall -d -m 755 ${exdir}
     273        foreach bin [glob -nocomplain ${build.dir}/examples/bin/*] {
     274            copy ${bin} ${exdir}
     275        }
     276    }
    252277}
    253278
    254279variant debug description "Build release and debug versions" {}
  • graphics/qwt/files/patch-qwtconfig.pri.61.diff

    diff --git a/graphics/qwt/files/patch-qwtconfig.pri.61.diff b/graphics/qwt/files/patch-qwtconfig.pri.61.diff
    index 9a40b12..23769f3 100644
    a b  
    33@@ -16,20 +16,10 @@
    44 # Install paths
    55 ######################################################################
    6  
     6
    77-QWT_INSTALL_PREFIX = $$[QT_INSTALL_PREFIX]
    88+QWT_INSTALL_PREFIX = $$INSTALLBASE
    9  
     9
    1010-unix {
    1111-    QWT_INSTALL_PREFIX    = /usr/local/qwt-$$QWT_VERSION
    1212-    # QWT_INSTALL_PREFIX = /usr/local/qwt-$$QWT_VERSION-qt-$$QT_VERSION
     
    1919-
    2020-QWT_INSTALL_DOCS      = $${QWT_INSTALL_PREFIX}/doc
    2121-QWT_INSTALL_HEADERS   = $${QWT_INSTALL_PREFIX}/include
    22 +QWT_INSTALL_DOCS      = $${QWT_INSTALL_PREFIX}/share/qwt/doc
    23 +QWT_INSTALL_HEADERS   = $${QWT_INSTALL_PREFIX}/include/qwt
     22+QWT_INSTALL_DOCS      = @INSTALL_DOCS@@
     23+QWT_INSTALL_HEADERS   = @INSTALL_HEADERS@@
    2424 QWT_INSTALL_LIBS      = $${QWT_INSTALL_PREFIX}/lib
    25  
     25
    2626 ######################################################################
    2727@@ -42,7 +32,7 @@
    2828 # runtime environment of designer/creator.