Ticket #53935: Portfile

File Portfile, 5.6 KB (added by RJVB (René Bertin), 8 years ago)
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id$
3# Copyright (c) 2015, 2016 R.J.V. Bertin
4
5PortSystem          1.0
6
7variant qtonly conflicts replace_cocoa kdedialogs description {build only the Qt plugins} {}
8
9if {[variant_isset qtonly]} {
10    # even in this case we probably prefer to install qt5-kde
11    # if no Qt5 port is installed yet.
12    set qt5.prefer_kde  1
13    PortGroup           qt5 1.0
14    PortGroup           cmake 1.1
15
16    name                kf5-osx-integration
17    license             LGPL-3
18} else {
19    set kf5.project     osx-integration
20    set kf5.virtualPath scratch
21    set kf5.category    integration
22    PortGroup           kf5 1.1
23    license-append      LGPL-3
24}
25
26# in case of unexpected behaviour, set QT_DEBUG_PLUGINS=1
27# cf. http://doc.qt.io/qt-5/deployment-plugins.html#debugging-plugins
28
29description         OS X platform theme plugin
30long_description    This port contains an OS X adaptation of KDE's platform theme plugin \
31                    which brings the KDE theme extensions to Qt5/KF5 applications on Mac. \
32                    This allows them to customise their interface (widget \
33                    style, fonts, colours & icons) almost just like they can on Linux/KDE desktop. \
34                    The plugin also provides click-and-hold support (opens the contextmenu for \
35                    select Qt widgets) and optional emulation of a Menu key. \
36                    The port also provides modified versions of Qt's Cocoa platform plugin and \
37                    'native' Macintosh widget style, providing among others improved support for \
38                    less-common font-weights and named menu sections.
39maintainers         gmail.com:rjvbertin mk openmaintainer
40homepage            https://cgit.kde.org/scratch/rjvbb/osx-integration.git/
41
42# plugins are not libraries even if technically they're almost exactly the same thing
43installs_libs       no
44
45subport ${name}-devel {}
46
47if {[variant_isset replace_cocoa]} {
48    long_description-append \n \
49                    With the +replace_cocoa variant, the platform theme plugin will be called \"cocoa\" \
50                    and will thus load automatically instead of the regular native platform theme. This \
51                    has the effect of adding the KDE theme extensions to the native theme without having\
52                    to take any action to load it. The drawback is this can be undone only by uninstalling \
53                    or deactivating ${subport} (instead of setting KDE_SESSION_VERSION to a value < 4).
54}
55
56if {${subport} eq "${name}-devel"} {
57    conflicts       ${name}
58    fetch.type      git
59    git.url         git://anongit.kde.org/scratch/rjvbb/osx-integration
60    git.branch      dfc8a5f44dc9f6602706ecb40abb612d6cdd04c2
61    version         5.31.21
62    worksrcdir      ${name}-5
63    distname        ${name}-5
64} else {
65    version         0
66    conflicts       ${name}-devel
67    checksums       rmd160  0 \
68                    sha256  0
69    description     ${description} This port doesn't have a release version yet.
70    long_description \
71                    ${long_description} This port doesn't have a release version yet.
72    pre-fetch {
73        ui_error "This port doesn't have a release version (yet), use ${name}-devel instead."
74        return -code error "This port doesn't have a release version (yet)."
75    }
76}
77
78if {![variant_isset qtonly]} {
79    kf5.depends_frameworks \
80                    kconfig kconfigwidgets ki18n kiconthemes \
81                    kio knotifications kwidgetsaddons
82}
83
84if {[variant_isset qtonly]} {
85    configure.args-append \
86                    -DBUILD_KDE_THEME_PLUGIN=OFF
87}
88
89configure.args-append \
90                    -DDEFINE_ICONTHEME_SETTINGS=ON \
91                    -DPREFER_NATIVE_DIALOGS=ON \
92                    -DOVERRIDE_NATIVE_THEME=OFF \
93                    -DEMULATE_MENU_KEY=OFF
94
95variant kdedialogs conflicts qtonly description {prefer KDE over native dialogs} {
96    configure.args-replace \
97                    -DPREFER_NATIVE_DIALOGS=ON \
98                    -DPREFER_NATIVE_DIALOGS=OFF
99    configure.args-append \
100                    -DNEVER_NATIVE_DIALOGS=ON
101}
102
103variant replace_cocoa conflicts qtonly \
104    description "let the platform plugin replace the native platform theme (see `port info ${subport} +replace_cocoa`)" {
105    configure.args-replace \
106                    -DOVERRIDE_NATIVE_THEME=OFF \
107                    -DOVERRIDE_NATIVE_THEME=ON
108}
109
110variant menukey \
111    description "the platform plugin converts the right Command+Option key combination to a context Menu key" {
112    configure.args-replace \
113                    -DEMULATE_MENU_KEY=OFF \
114                    -DEMULATE_MENU_KEY=ON
115}
116
117if {![variant_isset qtonly]} {
118    default_variants +menukey
119
120    notes-append "Standard KDE fonts are Noto Sans (https://www.google.com/get/noto/) and \
121Oxygen Mono (http://download.kde.org/stable/plasma/5.4.0/oxygen-fonts-5.4.0.tar.xz)."
122    if {![variant_isset replace_cocoa]} {
123        notes-append \
124"Also, in order to use your selected \
125KDE theme automatically, you need to use port:qt5-kde and set KDE_SESSION_VERSION to a \
126value >=4 (launchctl setenv KDE_SESSION_VERSION 5 and equivalent in your login script).\n\
127What also should work (with any Qt5 version) is to set QT_QPA_PLATFORMTHEME=kde using the same techniques."
128    }
129    notes-append \
130"\nFinally, many KF5 ports install a wrapper script to invoke applications installed into ${kf5.applications_dir}
131easily from in a terminal session. Those scripts can load a file \"~/.kf5.env\" to set up the environment\;
132a sample is provided (${filespath}/.kf5.env)."
133}
134
135livecheck.type      none