Ticket #48400: Portfile-with-qt4.diff

File Portfile-with-qt4.diff, 3.1 KB (added by kencu (Ken), 7 years ago)
  • Portfile

    old new  
    11# -*- 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
    22
    33PortSystem      1.0
    4 PortGroup       qt4 1.0
    54
    65name            qjackctl
    7 version         0.3.8
     6version         0.4.5
    87license         GPL-2
    98categories      audio
    109maintainers     nomaintainer
    1110platforms       darwin
    1211homepage        http://qjackctl.sourceforge.net/
    13 master_sites    sourceforge:project/qjackctl/qjackctl%20%28stable%29/${version}
     12master_sites    http://downloads.sourceforge.net/qjackctl
     13# master_sites    sourceforge:projects/qjackctl/files/qjackctl/${version}
    1414
    1515description \
    1616    QjackCtl is a simple Qt application to control the JACK sound server daemon.
     
    2020
    2121universal_variant  no
    2222
    23 checksums       rmd160  22038acba5cc7c2d070b9e2ec437afd1f1fbbf61 \
    24                 sha256  870869836535476b7a2d77fa70c39f7d8facc4767c8fa1aac3c81d6ce7ba71e5
     23checksums       rmd160  d8746505931b81658b4a8ec05b28857634b7f8a9 \
     24                sha256  c50da569ec8466ac6cc72c65e2d8212eb9c40149daed0a10fb7795ff9ddc4ab7
    2525
    2626depends_lib-append port:jack
    2727
    28 patchfiles      patch-src_qjackctlSession.cpp.diff \
    29                 patch-configure-no-x11.diff
    30 
     28configure.cxxflags-append --std=c++11
    3129configure.args-append --with-jack=${prefix} \
    32                       --with-qt=${qt_dir} \
    3330                      --disable-alsa-seq
    3431configure.args-delete --disable-dependency-tracking
    3532
    36 post-destroot {
    37     # move the created .app to MacPorts' applications directory ...
    38     move ${destroot}${prefix}/bin/qjackctl.app ${destroot}${applications_dir}
    39     # ... and link the actual executable back to the bindir
    40     ln -s ${applications_dir}/qjackctl.app/Contents/MacOS/qjackctl ${destroot}${prefix}/bin/qjackctl
     33platform darwin {
     34    if {${os_major} < 11} {
     35        default_variants-append +qt4
     36    }
     37}
     38
     39variant qt4 description "Enable qt4 instead of qt5 interface" {}
     40
     41if {[variant_isset qt4]} {
     42    PortGroup             qt4 1.0
     43    depends_lib-append    port:qt4-mac
     44    configure.args-append --enable-qt4
     45    configure.args-append --with-qt4=${qt_dir} \
     46} else {
     47    PortGroup             qt5 1.0
     48    depends_lib-append    port:qt5
     49    configure.args-append --with-qt5=${qt_dir}
    4150}
    4251
    4352variant debug description "Enable debugging" {}
     
    4958}
    5059
    5160variant portaudio description "enable PortAudio interface" {}
    52 default_variants +portaudio
     61default_variants-append +portaudio
    5362
    5463if {[variant_isset portaudio]} {
    5564    configure.args-append --enable-portaudio
     
    7584    configure.args-append --disable-dbus
    7685}
    7786
     87post-destroot {
     88    # move the created .app to MacPorts' applications directory ...
     89    move ${destroot}${prefix}/bin/qjackctl.app ${destroot}${applications_dir}
     90    # ... and link the actual executable back to the bindir
     91    ln -s ${applications_dir}/qjackctl.app/Contents/MacOS/qjackctl ${destroot}${prefix}/bin/qjackctl
     92}
     93
    7894livecheck.url   http://sourceforge.net/projects/${name}/files/
    7995livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"