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 |
| 36 | subport ${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 |
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 |
| 46 | subport ${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" |
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 |
| 63 | if {${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 | |
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" |