Ticket #56039: QtCurve.diff

File QtCurve.diff, 7.2 KB (added by RJVB (René Bertin), 6 years ago)
  • Portfile

    old new  
    55fetch.type          git
    66git.url             git://anongit.kde.org/qtcurve.git
    77
    8 name                qtcurve
    9 set qtc_version     1.8.18
    10 revision            2
     8name                QtCurve
     9set qtc_version     1.9.0
    1110if {${subport} eq "${name}-gtk2"} {
    12     # the GTk2 branch barely evolves at all so qtcurve-gtk2 doesn't need to
    13     # be updated every time the Qt version is updated.
    14     git.branch      438553dfa702c43240257fe61935c9ab10563cc2
    15     version         ${qtc_version}.263
     11    # the GTk2 branch barely evolves at all so QtCurve-gtk2 doesn't need to
     12    # be updated every time the Qt version evolves.
     13    git.branch      9cd0f0eb740f26b7e03244be64491da2c3f56569
     14    version         ${qtc_version}.8
    1615} else {
    17     git.branch      16eef6f91c3fe73ea7287e6dc66e87aaf91220d9
    18     version         ${qtc_version}.270
     16    git.branch      2bb3e383c12f46f0ad599386edc51972effc5930
     17    version         ${qtc_version}.27
    1918}
    2019epoch               2
    2120
     
    2322description         A set of widget styles for Qt4/KDE4, Qt5/KF5 and/or GTk2 based apps.
    2423
    2524categories          kde
    26 platforms           darwin
     25platforms           darwin linux
    2726license             LGPL-2+
    2827maintainers         gmail.com:rjvbertin
    2928
     
    3837
    3938test.run            yes
    4039
    41 # This is a guard against installing a port variant for the still uncommitted KF5
     40subport ${name}-qt5 {}
     41# Safeguard against installing a port variant for the still uncommitted KF5 ports
    4242if {${subport} eq "${name}-qt5"} {
    4343    if {![variant_isset qtonly]} {
    4444        default_variants +qtonly
    4545    }
    4646}
    4747
    48 subport ${name}-qt5 {
    49     if {![variant_isset qtonly]} {
    50         long_description        A highly configurable widget style for Qt5/KF5
    51     } else {
    52         long_description        A highly configurable widget style for Qt5
    53     }
    54 }
    55 
    56 if {${os.platform} eq "darwin" && ${os.major} <= 10} {
    57 #     variant libcxx description {build against libc++ (untested)} {
    58 #         PortGroup           cxx11 1.0
    59 #     }
    60     if {![variant_exists libcxx] || ![variant_isset libcxx]} {
    61         depends_build-delete    port:clang-3.4 port:clang-3.5
    62         pre-fetch {
    63             ui_msg "This port only builds with configure.compiler=macports-gcc-4.7 (from port:gcc47) or newer on OS X 10.6"
    64         }
    65     }
    66 }
    67 
    6848subport ${name}-gtk2 {
    6949    PortGroup               cmake 1.1
    7050    long_description        The GTk2 version of the highly configurable QtCurve widget style for Qt
    7151
    7252    post-patch {
    73         # qtcurve-gtk2 has pure and optional runtime dependencies on KDE4 (and KF5)
     53        # QtCurve-gtk2 has pure and optional runtime dependencies on KDE4 (and KF5)
    7454        reinplace "s|kde4-config|${prefix}/bin/kde4-config|g" \
    7555                            ${worksrcpath}/gtk2/style/qt_settings.cpp
    7656    }
     
    8161    default build.dir           {${workpath}/build}
    8262
    8363    variant LTO description {Build with Link-Time Optimisation (LTO)} {
    84         configure.cflags-append     -flto
    85         configure.cxxflags-append   -flto
    86         configure.objcflags-append  -flto
    87         configure.objcxxflags-append  -flto
    88         configure.ldflags-append    -flto
     64        configure.cflags-append             -flto
     65        configure.cxxflags-append           -flto
     66        configure.objcflags-append          -flto
     67        configure.objcxxflags-append        -flto
     68        configure.ldflags-append            -flto
    8969        # assume any compiler not clang will be gcc
    9070        if {![string match "*clang*" ${configure.compiler}]} {
    9171            configure.cflags-append         -fuse-linker-plugin -ffat-lto-objects
     
    11393    long_description        Installs the Mac-specific default configuration plus additional \
    11494                            configuration presets and colour palettes for QtCurve
    11595    version                 ${qtc_version}
    116     revision                2
    11796    use_configure           no
    11897    installs_libs           no
    11998    supported_archs         noarch
     
    134113        xinstall -m 644 ${filespath}/OxygenOSXGraphite.colors ${destroot}/${prefix}/share/apps/color-schemes/
    135114    }
    136115    pre-activate {
    137         # qtcurve-extra installs files that previously belonged to qtcurve
     116        # QtCurve-extra installs files that previously belonged to QtCurve
    138117        if {![catch {set installed [lindex [registry_active qtcurve] 0]}]} {
    139118            set _epoch [lindex $installed 5]
    140119            if {${_epoch} < 2} {
     
    147126
    148127if {${subport} ne "${name}-extra"} {
    149128    depends_run-append      port:${name}-extra
     129
    150130    patchfiles-append       patch-systemconfig-support.diff
    151131    # deactivate config page(s) that don't make sense on OS X and/or don't work properly anywhere
    152132    patchfiles-append       patch-deactivate-config-page.diff
     
    159139}
    160140
    161141if {(${subport} ne "${name}-gtk2") && (${subport} ne "${name}-extra")} {
    162     patchfiles-append       patch-qtc-no-qtc-activewin-events.diff \
    163                             patch-qt5-dbus-fixes-by-debian.diff
     142    patchfiles-append       patch-qtc-no-qtc-activewin-events.diff
     143    # https://bugs.kde.org/show_bug.cgi?id=374224
     144    patchfiles-append       patch-simpler-translucent-menus.diff
     145
    164146    if {${subport} eq "${name}-qt5"} {
    165147
    166148        categories              kde kf5 qt5
     
    172154                                    ${kf5::pythondep}
    173155            kf5.depends_frameworks  karchive kconfig kconfigwidgets \
    174156                                    ki18n kdelibs4support kguiaddons kio \
    175                                     kiconthemes kwidgetsaddons kxmlgui
     157                                    kiconthemes kwidgetsaddons kwindowsystem \
     158                                    kxmlgui frameworkintegration
    176159
    177160            configure.args-append   -DPYTHON_EXECUTABLE=${prefix}/bin/python${kf5::pyversion} \
    178161                                    -DQTC_QT5_ENABLE_KDE:BOOL=ON
     
    199182            cmake.install_rpath-prepend \
    200183                                    ${qt_libs_dir}
    201184            configure.args-append   -DQTC_QT5_ENABLE_KDE:BOOL=OFF
    202             qt5.depends_component   qtsvg
    203185        }
     186        qt5.depends_component   qtsvg
    204187
    205188        # CMake will look for automoc4, but will of course not use it.
    206189        configure.args-append   -DENABLE_QT4:BOOL=OFF -DENABLE_QT5:BOOL=ON \
     
    229212    }
    230213
    231214    configure.args-append       -DQTC_QT4_STYLE_SUPPORT:BOOL=OFF -DQTC_QT4_ENABLE_KWIN:BOOL=OFF \
    232                                 -DQTC_ENABLE_PO:BOOL=ON -DENABLE_GTK2:BOOL=OFF
     215                                -DQTC_INSTALL_PO:BOOL=ON -DENABLE_GTK2:BOOL=OFF
    233216    if {${os.platform} eq "darwin"} {
    234217        configure.args-append   -DQTC_ENABLE_X11:BOOL=OFF
    235218    }
     
    257240# never strip binaries for more useful backtraces
    258241configure.args-append           -DCMAKE_STRIP:FILEPATH=/bin/echo
    259242
    260 if {${os.platform} eq "darwin" && ${os.major} <= 10 && ${subport} ne "${name}-extra"} {
     243if {${os.platform} eq "darwin" && ${os.major} < 13 && ${subport} ne "${name}-extra"} {
    261244    long_description-append \n\
    262245        This port requires the libc++ conversion but should also build with GCC 4.7 or later (configure.compiler=macports-gcc-4.7).
    263246}