--- kde/qtcurve/Portfile	2018-03-13 01:37:05.000000000 +0100
+++ /Volumes/Debian/MP9/site-ports/kde/QtCurve/Portfile	2018-03-13 16:18:50.000000000 +0100
@@ -5,17 +5,16 @@
 fetch.type          git
 git.url             git://anongit.kde.org/qtcurve.git
 
-name                qtcurve
-set qtc_version     1.8.18
-revision            2
+name                QtCurve
+set qtc_version     1.9.0
 if {${subport} eq "${name}-gtk2"} {
-    # the GTk2 branch barely evolves at all so qtcurve-gtk2 doesn't need to
-    # be updated every time the Qt version is updated.
-    git.branch      438553dfa702c43240257fe61935c9ab10563cc2
-    version         ${qtc_version}.263
+    # the GTk2 branch barely evolves at all so QtCurve-gtk2 doesn't need to
+    # be updated every time the Qt version evolves.
+    git.branch      9cd0f0eb740f26b7e03244be64491da2c3f56569
+    version         ${qtc_version}.8
 } else {
-    git.branch      16eef6f91c3fe73ea7287e6dc66e87aaf91220d9
-    version         ${qtc_version}.270
+    git.branch      2bb3e383c12f46f0ad599386edc51972effc5930
+    version         ${qtc_version}.27
 }
 epoch               2
 
@@ -23,7 +22,7 @@
 description         A set of widget styles for Qt4/KDE4, Qt5/KF5 and/or GTk2 based apps.
 
 categories          kde
-platforms           darwin
+platforms           darwin linux
 license             LGPL-2+
 maintainers         gmail.com:rjvbertin
 
@@ -38,39 +37,20 @@
 
 test.run            yes
 
-# This is a guard against installing a port variant for the still uncommitted KF5
+subport ${name}-qt5 {}
+# Safeguard against installing a port variant for the still uncommitted KF5 ports
 if {${subport} eq "${name}-qt5"} {
     if {![variant_isset qtonly]} {
         default_variants +qtonly
     }
 }
 
-subport ${name}-qt5 {
-    if {![variant_isset qtonly]} {
-        long_description        A highly configurable widget style for Qt5/KF5
-    } else {
-        long_description        A highly configurable widget style for Qt5
-    }
-}
-
-if {${os.platform} eq "darwin" && ${os.major} <= 10} {
-#     variant libcxx description {build against libc++ (untested)} {
-#         PortGroup           cxx11 1.0
-#     }
-    if {![variant_exists libcxx] || ![variant_isset libcxx]} {
-        depends_build-delete    port:clang-3.4 port:clang-3.5
-        pre-fetch {
-            ui_msg "This port only builds with configure.compiler=macports-gcc-4.7 (from port:gcc47) or newer on OS X 10.6"
-        }
-    }
-}
-
 subport ${name}-gtk2 {
     PortGroup               cmake 1.1
     long_description        The GTk2 version of the highly configurable QtCurve widget style for Qt
 
     post-patch {
-        # qtcurve-gtk2 has pure and optional runtime dependencies on KDE4 (and KF5)
+        # QtCurve-gtk2 has pure and optional runtime dependencies on KDE4 (and KF5)
         reinplace "s|kde4-config|${prefix}/bin/kde4-config|g" \
                             ${worksrcpath}/gtk2/style/qt_settings.cpp
     }
@@ -81,11 +61,11 @@
     default build.dir           {${workpath}/build}
 
     variant LTO description {Build with Link-Time Optimisation (LTO)} {
-        configure.cflags-append     -flto
-        configure.cxxflags-append   -flto
-        configure.objcflags-append  -flto
-        configure.objcxxflags-append  -flto
-        configure.ldflags-append    -flto
+        configure.cflags-append             -flto
+        configure.cxxflags-append           -flto
+        configure.objcflags-append          -flto
+        configure.objcxxflags-append        -flto
+        configure.ldflags-append            -flto
         # assume any compiler not clang will be gcc
         if {![string match "*clang*" ${configure.compiler}]} {
             configure.cflags-append         -fuse-linker-plugin -ffat-lto-objects
@@ -113,7 +93,6 @@
     long_description        Installs the Mac-specific default configuration plus additional \
                             configuration presets and colour palettes for QtCurve
     version                 ${qtc_version}
-    revision                2
     use_configure           no
     installs_libs           no
     supported_archs         noarch
@@ -134,7 +113,7 @@
         xinstall -m 644 ${filespath}/OxygenOSXGraphite.colors ${destroot}/${prefix}/share/apps/color-schemes/
     }
     pre-activate {
-        # qtcurve-extra installs files that previously belonged to qtcurve
+        # QtCurve-extra installs files that previously belonged to QtCurve
         if {![catch {set installed [lindex [registry_active qtcurve] 0]}]} {
             set _epoch [lindex $installed 5]
             if {${_epoch} < 2} {
@@ -147,6 +126,7 @@
 
 if {${subport} ne "${name}-extra"} {
     depends_run-append      port:${name}-extra
+
     patchfiles-append       patch-systemconfig-support.diff
     # deactivate config page(s) that don't make sense on OS X and/or don't work properly anywhere
     patchfiles-append       patch-deactivate-config-page.diff
@@ -159,8 +139,10 @@
 }
 
 if {(${subport} ne "${name}-gtk2") && (${subport} ne "${name}-extra")} {
-    patchfiles-append       patch-qtc-no-qtc-activewin-events.diff \
-                            patch-qt5-dbus-fixes-by-debian.diff
+    patchfiles-append       patch-qtc-no-qtc-activewin-events.diff
+    # https://bugs.kde.org/show_bug.cgi?id=374224
+    patchfiles-append       patch-simpler-translucent-menus.diff
+
     if {${subport} eq "${name}-qt5"} {
 
         categories              kde kf5 qt5
@@ -172,7 +154,8 @@
                                     ${kf5::pythondep}
             kf5.depends_frameworks  karchive kconfig kconfigwidgets \
                                     ki18n kdelibs4support kguiaddons kio \
-                                    kiconthemes kwidgetsaddons kxmlgui
+                                    kiconthemes kwidgetsaddons kwindowsystem \
+                                    kxmlgui frameworkintegration
 
             configure.args-append   -DPYTHON_EXECUTABLE=${prefix}/bin/python${kf5::pyversion} \
                                     -DQTC_QT5_ENABLE_KDE:BOOL=ON
@@ -199,8 +182,8 @@
             cmake.install_rpath-prepend \
                                     ${qt_libs_dir}
             configure.args-append   -DQTC_QT5_ENABLE_KDE:BOOL=OFF
-            qt5.depends_component   qtsvg
         }
+        qt5.depends_component   qtsvg
 
         # CMake will look for automoc4, but will of course not use it.
         configure.args-append   -DENABLE_QT4:BOOL=OFF -DENABLE_QT5:BOOL=ON \
@@ -229,7 +212,7 @@
     }
 
     configure.args-append       -DQTC_QT4_STYLE_SUPPORT:BOOL=OFF -DQTC_QT4_ENABLE_KWIN:BOOL=OFF \
-                                -DQTC_ENABLE_PO:BOOL=ON -DENABLE_GTK2:BOOL=OFF
+                                -DQTC_INSTALL_PO:BOOL=ON -DENABLE_GTK2:BOOL=OFF
     if {${os.platform} eq "darwin"} {
         configure.args-append   -DQTC_ENABLE_X11:BOOL=OFF
     }
@@ -257,7 +240,7 @@
 # never strip binaries for more useful backtraces
 configure.args-append           -DCMAKE_STRIP:FILEPATH=/bin/echo
 
-if {${os.platform} eq "darwin" && ${os.major} <= 10 && ${subport} ne "${name}-extra"} {
+if {${os.platform} eq "darwin" && ${os.major} < 13 && ${subport} ne "${name}-extra"} {
     long_description-append \n\
         This port requires the libc++ conversion but should also build with GCC 4.7 or later (configure.compiler=macports-gcc-4.7).
 }
