Ticket #46507: qtcurve-diff-20150127.diff

File qtcurve-diff-20150127.diff, 7.1 KB (added by RJVB (René Bertin), 10 years ago)
  • trunk/dports/kde/qtcurve/Portfile

    diff --git a/trunk/dports/kde/qtcurve/Portfile b/trunk/dports/kde/qtcurve/Portfile
    a b  
    33# kde/libkgapi/Portfile
    44
    55PortSystem          1.0
    6 PortGroup           kde4 1.1
    76
    87fetch.type          git
    98git.url             git://anongit.kde.org/qtcurve.git
    10 git.branch          660f859556471f13834ef4fb095816639aa85014
     9git.branch          e3e2325e
    1110
    1211name                QtCurve
    13 version             1.8.18
     12set qtc_version     1.8.18
     13version             ${qtc_version}.20150127
    1414
    15 categories          kde kde4
     15description         A set of widget styles for Qt4/KDE4, Qt5/KF5 and/or GTk2 based apps.
    1616
    17 description         A set of widget styles for Qt4/KDE4 based apps.
    18 
    1917platforms           darwin
    2018license             LGPL-2+
    2119maintainers         gmail.com:rjvbertin
     
    2321homepage            http://kde-look.org/content/show.php?content=40492
    2422master_sites        http://quickgit.kde.org/?p=qtcurve.git \
    2523                    http://craigd.wikispaces.com/file/view/
    26 #distname            ${name}-KDE4-${version}
    2724
    2825livecheck.type      regex
    2926livecheck.url       http://quickgit.kde.org/?p=qtcurve.git
    3027livecheck.regex     (\\d+(\\.\\d+)+)
    3128
    32 depends_lib-append  port:gtk2 \
    33                     port:kdelibs4 \
    34                     port:qt4-mac
     29worksrcdir          ${name}-${qtc_version}
    3530
    36 configure.args-append   -DQTC_QT4_STYLE_SUPPORT:BOOL=OFF -DENABLE_QT5:BOOL=OFF \
    37                         -DQTC_QT4_ENABLE_KWIN:BOOL=OFF
     31subport qt5-${name} {
     32    replaced_by     ${name}-qt5
     33    PortGroup       obsolete 1.0
     34}
    3835
    39 variant x11 description {build x11 support} {}
    40 if { [variant_isset x11] } {
    41         depends_lib-append port:xorg-libX11
    42         configure.args-append -DQTC_ENABLE_X11:BOOL=ON
    43 } else {
    44         configure.args-append -DQTC_ENABLE_X11:BOOL=OFF
     36subport ${name}-qt5 {
     37    # replace this with the KF5 portgroup when it exists!!
     38    PortGroup               kde4 1.1
     39    # remove dependencies pulled in by the kde4 portgroup:
     40    depends_build-delete    port:automoc
     41    depends_lib-delete      port:phonon port:doxygen port:qt4-mac
     42
     43    PortGroup               qt5 1.0
    4544}
    4645
    47 variant gtk2 description {build the gtk2 plugin} {}
    48 if { [variant_isset gtk2] } {
    49         depends_lib-append port:gtk2
    50         configure.args-append -DENABLE_GTK2:BOOL=ON
    51 } else {
    52         configure.args-append -DENABLE_GTK2:BOOL=OFF
     46subport ${name}-gtk2 {
     47    PortGroup               cmake 1.0
     48
     49    post-extract            { file mkdir ${workpath}/build }
     50    # standard post-arg, where to find the primary CMakeLists.txt file.
     51    default configure.post_args {../${worksrcdir}}
     52    default configure.dir       {${workpath}/build}
     53    default build.dir           {${workpath}/build}
     54
     55        depends_lib-append      port:gtk2
     56        configure.args-delete   -DQTC_ENABLE_X11:BOOL=OFF
     57        configure.args-append   -DENABLE_GTK2:BOOL=ON -DQTC_ENABLE_X11:BOOL=ON \
     58                            -DENABLE_QT4:BOOL=OFF -DENABLE_QT5:BOOL=OFF \
     59                            -DQTC_QT4_ENABLE_KDE:BOOL=OFF -DQTC_QT5_ENABLE_KDE:BOOL=OFF \
     60                            -DQTC_UTILSLIB_INFIX:STRING="-gtk2"
    5361}
    5462
    55 variant qt5 description {build for qt5 too} {}
    56 if { [variant_isset qt5] } {
    57         depends_lib-append port:qt5-mac
    58         # default for ENABLE_QT5=on:
    59         configure.args-delete -DENABLE_QT5:BOOL=OFF
     63if {${subport} ne "${name}-gtk2"} {
     64    if {${subport} eq "${name}-qt5"} {
     65
     66        categories              kde kf5 qt5
     67
     68        configure.args-append   -DENABLE_QT4:BOOL=OFF -DENABLE_QT5:BOOL=ON \
     69                                -DQTC_QT4_ENABLE_KDE:BOOL=OFF -DQTC_QT5_ENABLE_KDE:BOOL=ON \
     70                                -DQTC_UTILSLIB_INFIX:STRING="-qt5"
     71
     72        # not sure if this is going to be relevant:
     73        notes-append "To access QtCurve and other KDE styles from pure Qt5 applications, execute
     74         ln -s ${prefix}/lib/kf5/plugins/styles (???) ${prefix}/share/qt5/plugins
     75         with the appropriate privileges or install qt5-mac's +KDE variant"
     76
     77    } else {
     78
     79        categories              kde kde4 qt4
     80
     81        if { [variant_isset qtonly] } {
     82            PortGroup           qt4 1.0
     83        } else {
     84            PortGroup           kde4 1.1
     85            depends_lib-append  port:kdelibs4
     86        }
     87
     88        configure.args-append   -DENABLE_QT4:BOOL=ON -DENABLE_QT5:BOOL=OFF \
     89                                -DQTC_QT5_ENABLE_KDE:BOOL=OFF -DQTC_UTILSLIB_INFIX:STRING="-qt4"
     90
     91        notes-append "To access QtCurve and other KDE styles from pure Qt4 applications, execute
     92         ln -s ${prefix}/lib/kde4/plugins/styles ${prefix}/share/qt4/plugins
     93         with the appropriate privileges or install qt4-mac's +KDE variant"
     94    }
     95
     96    configure.args-append       -DQTC_QT4_STYLE_SUPPORT:BOOL=OFF -DQTC_QT4_ENABLE_KWIN:BOOL=OFF \
     97                                -DQTC_ENABLE_PO:BOOL=ON -DENABLE_GTK2:BOOL=OFF -DQTC_ENABLE_X11:BOOL=OFF
     98
     99    variant qtonly description {Build only Qt style support, for installations without KDE} {}
     100
     101    if { [variant_isset qtonly] } {
     102        configure.args-append -DQTC_QT4_ENABLE_KDE:BOOL=OFF -DQTC_QT5_ENABLE_KDE:BOOL=OFF
     103        configure.args-delete -DQTC_QT4_ENABLE_KDE:BOOL=ON -DQTC_QT5_ENABLE_KDE:BOOL=ON
     104    } else {
     105
     106        post-destroot {
     107            if {${subport} ne "${name}-qt5"} {
     108                xinstall -m 644 ${filespath}/qtc_qtcurve-rjvb.themerc ${destroot}/${prefix}/share/apps/kstyle/themes/
     109                xinstall -m 644 ${filespath}/qtc_qtcurve-osx.themerc ${destroot}/${prefix}/share/apps/kstyle/themes/
     110                xinstall -m 644 ${filespath}/QtCurveOSX.colors ${destroot}/${prefix}/share/apps/color-schemes/
     111                xinstall -d -m 755 ${destroot}${prefix}/share/qt4/plugins
     112                if {[file exists ${qt_plugins_dir}] && ![file exists ${qt_plugins_dir}/styles]} {
     113                    ln -s ${prefix}/lib/kde4/plugins/styles ${destroot}${qt_plugins_dir}/
     114                }
     115            }
     116        }
     117
     118    }
     119
    60120}
    61121
    62122variant devel description {Prevent stripping of binaries} {}
     
    65125        configure.args-append -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DCMAKE_STRIP:FILEPATH=/bin/echo
    66126}
    67127
    68 variant qtonly description {Build only Qt style support, for installations without KDE} {}
    69 if { [variant_isset qtonly] } {
    70         depends_lib-delete    port:kdelibs4
    71 #       configure.args-append -DQTC_QT_ONLY:BOOL=ON
    72         configure.args-append -DQTC_QT4_ENABLE_KDE:BOOL=OFF
    73 } else {
    74     post-destroot {
    75         xinstall -m 644 ${filespath}/qtc_qtcurve-rjvb.themerc ${destroot}/${prefix}/share/apps/kstyle/themes/
    76         xinstall -m 644 ${filespath}/qtc_qtcurve-osx.themerc ${destroot}/${prefix}/share/apps/kstyle/themes/
    77         xinstall -m 644 ${filespath}/QtCurveOSX.colors ${destroot}/${prefix}/share/apps/color-schemes/
    78         xinstall -d -m 755 ${destroot}${prefix}/share/qt4/plugins
    79         system "ln -s ${prefix}/lib/kde4/plugins/styles ${destroot}${prefix}/share/qt4/plugins"
    80     }
    81 }
    82 
    83 notes-append "To access QtCurve and other KDE styles from pure Qt4 applications, execute
    84  ln -s ${prefix}/lib/kde4/plugins/styles ${prefix}/share/qt4/plugins
    85  with the appropriate privileges"