Ticket #50183: QtCurve.diff
File QtCurve.diff, 11.9 KB (added by RJVB (René Bertin), 9 years ago) |
---|
-
/opt/local/
old new 1 1 # -*- 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 141605 2015-10-22 20:56:07Z mk@macports.org $3 # kde/libkgapi/Portfile2 # kate: backspace-indents true; indent-pasted-text true; indent-width 4; keep-extra-spaces true; remove-trailing-spaces modified; replace-tabs true; replace-tabs-save true; syntax Tcl/Tk; tab-indents true; tab-width 4; 3 # $Id: Portfile Thu Jun 5 12:10:38 UTC 2014 rjvbertin@gmail.com $ 4 4 5 5 PortSystem 1.0 6 6 7 7 fetch.type git 8 git.url git://anongit.kde.org/qtcurve.git 9 git.branch e3e2325e 8 if {[file exists ${filespath}/QtCurve-git/.git]} { 9 git.url ${filespath}//QtCurve-git 10 } else { 11 git.url git://anongit.kde.org/qtcurve.git 12 } 10 13 11 14 name QtCurve 12 15 set qtc_version 1.8.18 13 version ${qtc_version}.20150127 16 if {${subport} ne "${name}-gtk2"} { 17 # git.branch a3fff13ed5a362064c7abee8485e224be945cdc6 18 # version ${qtc_version}.20150711 19 git.branch 330bfa56785d329aedfbb20a61e58705f725ded9 20 version ${qtc_version}.20151017 21 } else { 22 # newer GTk2 engine versions have issues with respecting the selected font and "icons in buttons" setting 23 git.branch e3e2325e 24 version ${qtc_version}.20150127 25 } 14 26 revision 1 15 27 16 28 description A set of widget styles for Qt4/KDE4, Qt5/KF5 and/or GTk2 based apps. … … 29 41 30 42 worksrcdir ${name}-${qtc_version} 31 43 32 subport qt5-${name} { 33 replaced_by ${name}-qt5 34 PortGroup obsolete 1.0 35 } 44 PortGroup muniversal 1.0 45 46 test.run yes 36 47 48 # this port should probably be replaced by kf5-${qtcurve} 37 49 subport ${name}-qt5 { 38 # replace this with the KF5 portgroup when it exists!! 39 PortGroup kde4 1.1 40 # remove dependencies pulled in by the kde4 portgroup: 41 depends_build-delete port:automoc 42 depends_lib-delete port:phonon port:doxygen port:qt4-mac 50 if {![variant_isset qtonly]} { 51 long_description A highly configurable widget style for Qt5/KF5 52 } else { 53 long_description A highly configurable widget style for Qt5 54 } 55 } 43 56 44 PortGroup qt5 1.0 57 if {${os.platform} eq "darwin" && ${os.major} <= 10} { 58 depends_build-delete port:clang-3.4 port:clang-3.5 59 ui_msg "This port only builds with configure.compiler=macports-gcc-4.7 (from port:gcc47) or newer on OS X 10.6" 45 60 } 46 61 47 62 subport ${name}-gtk2 { 48 63 PortGroup cmake 1.0 64 cmake.out_of_source yes 65 long_description The GTk2 version of the highly configurable QtCurve widget style for Qt 49 66 50 67 post-extract { file mkdir ${workpath}/build } 51 68 # standard post-arg, where to find the primary CMakeLists.txt file. … … 53 70 default configure.dir {${workpath}/build} 54 71 default build.dir {${workpath}/build} 55 72 56 depends_lib-append port:gtk2 57 configure.args-delete -DQTC_ENABLE_X11:BOOL=OFF 58 configure.args-append -DENABLE_GTK2:BOOL=ON -DQTC_ENABLE_X11:BOOL=ON \ 73 variant LTO description {Build with Link-Time Optimisation (LTO) (currently not 100% compatible with SSE4+ and 3DNow intrinsics)} { 74 configure.cflags-append -flto 75 configure.cxxflags-append -flto 76 configure.objcflags-append -flto 77 configure.objcxxflags-append -flto 78 configure.ldflags-append -flto 79 # assume any compiler not clang will be gcc 80 if {![string match "*clang*" ${configure.compiler}]} { 81 configure.cflags-append -fuse-linker-plugin -ffat-lto-objects 82 configure.cxxflags-append -fuse-linker-plugin -ffat-lto-objects 83 configure.objcflags-append -fuse-linker-plugin -ffat-lto-objects 84 configure.objcxxflags-append -fuse-linker-plugin -ffat-lto-objects 85 configure.ldflags-append -fuse-linker-plugin 86 } 87 } 88 depends_lib-append port:gtk2 89 depends_run-append port:perl5 90 configure.args-delete -DQTC_ENABLE_X11:BOOL=OFF 91 configure.args-append -DENABLE_GTK2:BOOL=ON -DQTC_ENABLE_X11:BOOL=ON \ 59 92 -DENABLE_QT4:BOOL=OFF -DENABLE_QT5:BOOL=OFF \ 60 93 -DQTC_QT4_ENABLE_KDE:BOOL=OFF -DQTC_QT5_ENABLE_KDE:BOOL=OFF \ 61 94 -DQTC_UTILSLIB_INFIX:STRING="-gtk2" 62 95 } 63 96 64 if {${subport} ne "${name}-gtk2"} { 97 subport ${name}-extra { 98 long_description Additional configuration presets and colour palettes for QtCurve 99 use_configure no 100 installs_libs no 101 supported_archs noarch 102 fetch {} 103 checksum {} 104 extract {} 105 build {} 106 destroot { 107 xinstall -m 755 -d ${destroot}/${prefix}/share/apps/kstyle/themes 108 xinstall -m 755 -d ${destroot}/${prefix}/share/apps/color-schemes 109 xinstall -m 644 ${filespath}/qtc_qtcurve-rjvb.themerc ${destroot}/${prefix}/share/apps/kstyle/themes/ 110 xinstall -m 644 ${filespath}/qtc_qtcurve-osx.themerc ${destroot}/${prefix}/share/apps/kstyle/themes/ 111 xinstall -m 644 ${filespath}/qtc_qtcurve-osxgraphite.themerc ${destroot}/${prefix}/share/apps/kstyle/themes/ 112 xinstall -m 644 ${filespath}/qtc_qtcurve-osxgraphite-qt5.themerc ${destroot}/${prefix}/share/apps/kstyle/themes/ 113 xinstall -m 644 ${filespath}/QtCurveOSX.colors ${destroot}/${prefix}/share/apps/color-schemes/ 114 xinstall -m 644 ${filespath}/OxygenOSXGraphite.colors ${destroot}/${prefix}/share/apps/color-schemes/ 115 } 116 } 117 118 if {${subport} ne "${name}-extra"} { 119 depends_run-append port:${name}-extra 120 } 121 122 if {(${subport} ne "${name}-gtk2") && (${subport} ne "${name}-extra")} { 65 123 if {${subport} eq "${name}-qt5"} { 66 124 67 125 categories kde kf5 qt5 68 126 127 if {![variant_isset qtonly]} { 128 PortGroup kf5 1.1 129 long_description A highly configurable widget style for Qt5/KF5 130 depends_build-append port:gettext \ 131 ${kf5.pythondep} 132 kf5.depends_frameworks karchive kconfig kconfigwidgets \ 133 ki18n kdelibs4support kguiaddons kio \ 134 kiconthemes kwidgetsaddons kxmlgui 135 # (to be) submitted upstream: 136 patchfiles-append patch-reenable-kf5-support.diff \ 137 patch-respect-buttonhaveicons.diff 138 # these address the rendering issue that has long altered the appearance of 139 # checks, radiobuttons and round sliders 140 patchfiles-append patch-qt5-always-antialias.diff \ 141 patch-qt5-fix-appearance.diff 142 configure.args-append -DPYTHON_EXECUTABLE=${prefix}/bin/python${kf5.pyversion} \ 143 -DQTC_QT5_ENABLE_KDE:BOOL=ON 144 unset kf5.allow_docs_generation 145 notes-append "Install port:kf5-frameworkintegration and set KDE_SESSION_VERSION to 5 \ 146 (launchctl setenv KDE_SESSION_VERSION 5 and the equivalent expr. in your login script) \ 147 in order to use this or any other KDE theme automatically in Qt5 and KF5 \ 148 applications." 149 } else { 150 PortGroup cmake 1.0 151 # Prefer port:qt5-kde if the user hasn't installed a Qt5 port yet. 152 # This *is* a KDE style after all. 153 set qt5.prefer_kde 1 154 PortGroup qt5 1.0 155 long_description A highly configurable widget style for Qt5 156 configure.args-append -DQTC_QT5_ENABLE_KDE:BOOL=OFF 157 } 158 cmake.out_of_source yes 159 160 # CMake will look for automoc4, but will of course not use it. 69 161 configure.args-append -DENABLE_QT4:BOOL=OFF -DENABLE_QT5:BOOL=ON \ 70 -DQTC_QT4_ENABLE_KDE:BOOL=OFF -DQTC_QT5_ENABLE_KDE:BOOL=ON\162 -DQTC_QT4_ENABLE_KDE:BOOL=OFF \ 71 163 -DQTC_UTILSLIB_INFIX:STRING="-qt5" 72 164 73 # not sure if this is going to be relevant:74 notes-append "To access QtCurve and other KDE styles from pure Qt5 applications, execute75 ln -s ${prefix}/lib/kf5/plugins/styles (???) ${prefix}/share/qt5/plugins76 with the appropriate privileges or install qt5-mac's +KDE variant"165 # looks like this is not going to be relevant, as KF5 plugins install into Qt5's plugin dir: 166 # notes-append "To access QtCurve and other KDE styles from pure Qt5 applications, execute 167 # ln -s ${prefix}/lib/kf5/plugins/styles (???) ${prefix}/share/qt5/plugins 168 # with the appropriate privileges or install port:qt5-mac+KDE or port:qt5-kde" 77 169 78 170 } else { 79 171 … … 81 173 82 174 if { [variant_isset qtonly] } { 83 175 PortGroup qt4 1.0 176 PortGroup cmake 1.0 177 cmake.out_of_source yes 178 long_description A highly configurable widget style for Qt4 84 179 } else { 85 180 PortGroup kde4 1.1 86 181 depends_lib-append port:kdelibs4 182 long_description A highly configurable widget style for Qt4/KDE4 87 183 } 88 184 89 185 configure.args-append -DENABLE_QT4:BOOL=ON -DENABLE_QT5:BOOL=OFF \ … … 91 187 92 188 notes-append "To access QtCurve and other KDE styles from pure Qt4 applications, execute 93 189 ln -s ${prefix}/lib/kde4/plugins/styles ${prefix}/share/qt4/plugins 94 with the appropriate privileges or install qt4-mac's +KDE variant"190 with the appropriate privileges or install port:qt4-mac+KDE" 95 191 } 96 192 97 193 configure.args-append -DQTC_QT4_STYLE_SUPPORT:BOOL=OFF -DQTC_QT4_ENABLE_KWIN:BOOL=OFF \ 98 -DQTC_ENABLE_PO:BOOL=ON -DENABLE_GTK2:BOOL=OFF -DQTC_ENABLE_X11:BOOL=OFF 194 -DQTC_ENABLE_PO:BOOL=ON -DENABLE_GTK2:BOOL=OFF 195 if {${os.platform} eq "darwin"} { 196 configure.args-append -DQTC_ENABLE_X11:BOOL=OFF 197 } 99 198 100 199 variant qtonly description {Build only Qt style support, for installations without KDE} {} 101 200 … … 105 204 } else { 106 205 107 206 post-destroot { 108 if {${subport} ne "${name}-qt5"} { 109 xinstall -m 644 ${filespath}/qtc_qtcurve-rjvb.themerc ${destroot}/${prefix}/share/apps/kstyle/themes/ 110 xinstall -m 644 ${filespath}/qtc_qtcurve-osx.themerc ${destroot}/${prefix}/share/apps/kstyle/themes/ 111 xinstall -m 644 ${filespath}/QtCurveOSX.colors ${destroot}/${prefix}/share/apps/color-schemes/ 207 if {${subport} eq "${name}-qt5"} { 208 } else { 112 209 xinstall -d -m 755 ${destroot}${prefix}/share/qt4/plugins 113 210 if {[file exists ${qt_plugins_dir}] && ![file exists ${qt_plugins_dir}/styles]} { 114 ln -s ${prefix}/lib/kde4/plugins/styles ${destroot}${qt_plugins_dir}/211 system "ln -s ${prefix}/lib/kde4/plugins/styles ${destroot}${qt_plugins_dir}/" 115 212 } 116 213 } 117 214 } 118 215 119 216 } 120 121 217 } 122 218 123 219 variant devel description {Prevent stripping of binaries} {} 124 220 if { [variant_isset devel] } { 125 configure.args-delete -DCMAKE_BUILD_TYPE=Release 126 configure.args-append -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DCMAKE_STRIP:FILEPATH=/bin/echo 221 if {${subport} eq "${name}"} { 222 ui_debug "Requested an obsolete variant that is now handled through the KDE4 PortGroup" 223 } else { 224 configure.args-delete -DCMAKE_BUILD_TYPE=Release 225 configure.args-append -DCMAKE_BUILD_TYPE:STRING=MacPorts -DCMAKE_STRIP:FILEPATH=/bin/echo 226 } 127 227 } 128 228