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 |
| 32 | subport ${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 |
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 |
| 42 | subport ${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" |
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 |
| 59 | if {${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 | |
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" |