Ticket #46507: qtcurve-diff-20150110.diff

File qtcurve-diff-20150110.diff, 7.0 KB (added by RJVB (René Bertin), 10 years ago)

the qt5-QtCurve subport was replaced with QtCurve-qt5

  • Portfile

    old new  
    11# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
    2 # $Id: Portfile 126006 2014-10-01 21:17:50Z mk@macports.org $
     2# $Id: Portfile Thu Jun  5 12:10:38 UTC 2014 rjvbertin@gmail.com $
    33# kde/libkgapi/Portfile
    44
    55PortSystem          1.0
    6 PortGroup           kde4 1.1
    76
    87fetch.type          git
    9 git.url             git://anongit.kde.org/qtcurve.git
    10 git.branch          660f859556471f13834ef4fb095816639aa85014
     8#git.url             git://anongit.kde.org/qtcurve.git
     9git.url             /Users/bertin/cworks/new/KDE/QtCurve/QtCurve-git
     10#git.branch          13e147fb
     11git.branch          3b0f6365
    1112
    1213name                QtCurve
    1314version             1.8.18
     15revision            20150110
    1416
    15 categories          kde kde4
    16 
    17 description         A set of widget styles for Qt4/KDE4 based apps.
     17description         A set of widget styles for Qt4/KDE4, Qt5/KF5 and/or GTk2 based apps.
    1818
    1919platforms           darwin
    2020license             LGPL-2+
     
    2929livecheck.url       http://quickgit.kde.org/?p=qtcurve.git
    3030livecheck.regex     (\\d+(\\.\\d+)+)
    3131
    32 depends_lib-append  port:gtk2 \
    33                     port:kdelibs4 \
    34                     port:qt4-mac
    35 
    36 configure.args-append   -DQTC_QT4_STYLE_SUPPORT:BOOL=OFF -DENABLE_QT5:BOOL=OFF \
    37                         -DQTC_QT4_ENABLE_KWIN:BOOL=OFF
    38 
    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
     32subport ${name}-qt5 {
     33    # replace this with the KF5 portgroup when it exists!!
     34    PortGroup               kde4 1.1
     35    # remove dependencies pulled in by the kde4 portgroup:
     36    depends_build-delete    port:automoc
     37    depends_lib-delete      port:phonon port:doxygen port:qt4-mac
     38
     39    PortGroup               qt5 1.0
    4540}
    4641
    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
     42subport ${name}-gtk2 {
     43    PortGroup               cmake 1.0
     44
     45    post-extract            { file mkdir ${workpath}/build }
     46    # standard post-arg, where to find the primary CMakeLists.txt file.
     47    default configure.post_args {../${worksrcdir}}
     48    default configure.dir       {${workpath}/build}
     49    default build.dir           {${workpath}/build}
     50
     51        depends_lib-append      port:gtk2
     52        configure.args-delete   -DQTC_ENABLE_X11:BOOL=OFF
     53        configure.args-append   -DENABLE_GTK2:BOOL=ON -DQTC_ENABLE_X11:BOOL=ON \
     54                            -DENABLE_QT4:BOOL=OFF -DENABLE_QT5:BOOL=OFF \
     55                            -DQTC_QT4_ENABLE_KDE:BOOL=OFF -DQTC_QT5_ENABLE_KDE:BOOL=OFF \
     56                            -DQTC_UTILSLIB_INFIX:STRING="-gtk2"
    5357}
    5458
    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
     59if {${subport} ne "${name}-gtk2"} {
     60    if {${subport} eq "${name}-qt5"} {
     61
     62        categories              kde kf5 qt5
     63
     64        configure.args-append   -DENABLE_QT4:BOOL=OFF -DENABLE_QT5:BOOL=ON \
     65                                -DQTC_QT4_ENABLE_KDE:BOOL=OFF -DQTC_QT5_ENABLE_KDE:BOOL=ON \
     66                                -DQTC_UTILSLIB_INFIX:STRING="-qt5"
     67
     68        # not sure if this is going to be relevant:
     69        notes-append "To access QtCurve and other KDE styles from pure Qt5 applications, execute
     70         ln -s ${prefix}/lib/kf5/plugins/styles (???) ${prefix}/share/qt5/plugins
     71         with the appropriate privileges or install qt5-mac's +KDE variant"
     72
     73    } else {
     74
     75        categories              kde kde4 qt4
     76
     77        if { [variant_isset qtonly] } {
     78            PortGroup           qt4 1.0
     79        } else {
     80            PortGroup           kde4 1.1
     81            depends_lib-append  port:kdelibs4
     82        }
     83
     84        configure.args-append   -DENABLE_QT4:BOOL=ON -DENABLE_QT5:BOOL=OFF \
     85                                -DQTC_QT5_ENABLE_KDE:BOOL=OFF -DQTC_UTILSLIB_INFIX:STRING="-qt4"
     86
     87        notes-append "To access QtCurve and other KDE styles from pure Qt4 applications, execute
     88         ln -s ${prefix}/lib/kde4/plugins/styles ${prefix}/share/qt4/plugins
     89         with the appropriate privileges or install qt4-mac's +KDE variant"
     90    }
     91
     92    configure.args-append       -DQTC_QT4_STYLE_SUPPORT:BOOL=OFF -DQTC_QT4_ENABLE_KWIN:BOOL=OFF \
     93                                -DQTC_ENABLE_PO:BOOL=ON -DENABLE_GTK2:BOOL=OFF -DQTC_ENABLE_X11:BOOL=OFF
     94
     95    variant qtonly description {Build only Qt style support, for installations without KDE} {}
     96
     97    if { [variant_isset qtonly] } {
     98        configure.args-append -DQTC_QT4_ENABLE_KDE:BOOL=OFF -DQTC_QT5_ENABLE_KDE:BOOL=OFF
     99        configure.args-delete -DQTC_QT4_ENABLE_KDE:BOOL=ON -DQTC_QT5_ENABLE_KDE:BOOL=ON
     100    } else {
     101
     102        post-destroot {
     103            if {${subport} eq "${name}-qt5"} {
     104            } else {
     105                xinstall -m 644 ${filespath}/qtc_qtcurve-rjvb.themerc ${destroot}/${prefix}/share/apps/kstyle/themes/
     106                xinstall -m 644 ${filespath}/qtc_qtcurve-osx.themerc ${destroot}/${prefix}/share/apps/kstyle/themes/
     107                xinstall -m 644 ${filespath}/QtCurveOSX.colors ${destroot}/${prefix}/share/apps/color-schemes/
     108                xinstall -d -m 755 ${destroot}${prefix}/share/qt4/plugins
     109                if {[file exists ${qt_plugins_dir}] && ![file exists ${qt_plugins_dir}/styles]} {
     110                    system "ln -s ${prefix}/lib/kde4/plugins/styles ${destroot}${qt_plugins_dir}/"
     111                }
     112            }
     113        }
     114
     115    }
     116
    60117}
    61118
    62119variant devel description {Prevent stripping of binaries} {}
     
    65122        configure.args-append -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DCMAKE_STRIP:FILEPATH=/bin/echo
    66123}
    67124
    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"