Ticket #50008: Portfile

File Portfile, 4.0 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
4PortSystem          1.0
5
6set kf5.project     kate
7set kf5.virtualPath applications
8set kf5.category    utilities
9PortGroup           kf5 1.1
10
11maintainers         gmail.com:rjvbertin mk openmaintainer
12
13# this port installs "kparts" which are intended to act as plugins for other apps
14installs_libs       yes
15
16description         Kate5 provides advanced editor components.
17long_description    The Kate project develops two main products: KatePart, the advanced \
18                    editor component which is used in numerous KF5 applications requiring \
19                    a text editing component, and Kate, a MDI text editor application. \
20                    In addition, we provide KWrite, a simple SDI editor shell which allows \
21                    the user to select his/her favourite editor component.
22
23checksums           rmd160  11461e0cde316af7c73dbfed520aaee503ec225c \
24                    sha256  ae979ac3b5c18ddb2a9701e59cf0e70b9e366c1fa08325bb771a95de3a12526f
25
26depends_build-append \
27                    port:libgit2
28kf5.depends_frameworks \
29                    kactivities kconfig kcrash kdoctools \
30                    kguiaddons kiconthemes ki18n kinit \
31                    kjobwidgets kio kparts ktexteditor \
32                    kwindowsystem kxmlgui
33# these are actually optional:
34kf5.depends_frameworks \
35                    kwallet
36kf5.depends_frameworks \
37                    plasma-framework kservice kitemmodels \
38                    knotifications threadweaver
39
40# submit upstream?
41patchfiles-append   patch-use-qsettings-iniformat.diff
42# no point submitting upstream
43patchfiles-append   patch-show-menubar-with-xcb.diff
44# probably submit upstream:
45patchfiles-append   patch-preserve-icon.diff
46# ditto: avoids crashing on exit
47patchfiles-append   patch-no-plugin-unload.diff
48
49# from upstream:
50patchfiles-append   patch-accept-docs-from-finder.diff
51
52post-patch {
53    reinplace -W ${worksrcpath} "s|/usr/local|${prefix}|g" \
54                    addons/katebuild-plugin/plugin_katebuild.cpp \
55                    addons/project/autotests/test1.cpp \
56                    addons/rustcompletion/kterustcompletionplugin.cpp
57}
58
59platform darwin {
60    variant kde4compat description {allow installation alongside KDE4's port:kate} {
61        # TODO: make the help/handbook menu item open the handbook with its new name ...
62        patchfiles-append \
63                    patch-kde4compat.diff
64        post-patch {
65            file rename -force ${worksrcpath}/addons/gdbplugin/22-actions-debug-kategdb.png \
66                    ${worksrcpath}/addons/gdbplugin/22-actions-debug-kate5gdb.png
67        }
68    }
69    if {![variant_isset kde4compat]} {
70        conflicts-append \
71                    kate
72    }
73    post-destroot {
74        file rename ${destroot}${prefix}/share/man/man1/kate.1 ${destroot}${prefix}/share/man/man1/kate5.1
75        if {[variant_isset kde4compat]} {
76            file rename ${destroot}${prefix}/share/doc/HTML/en/kate ${destroot}${prefix}/share/doc/HTML/en/kate5
77            file rename ${destroot}${prefix}/share/doc/HTML/en/katepart ${destroot}${prefix}/share/doc/HTML/en/kate5part
78            file rename ${destroot}${prefix}/share/doc/HTML/en/kwrite ${destroot}${prefix}/share/doc/HTML/en/kwrite5
79            kf5.rename_icons ${destroot}${prefix}/share/icons/hicolor apps kate kate5
80            kf5.rename_icons ${destroot}${prefix}/share/icons/hicolor actions debug-katedgb debug-kate5gdb
81        }
82        xinstall -m 755 ${filespath}/kate5.sh ${destroot}${prefix}/bin/kate5
83        reinplace "s|@KDEAPPDIR@|${kf5.applications_dir}|g" ${destroot}${prefix}/bin/kate5
84    }
85}
86platform linux {
87    post-destroot {
88        if {[file exists ${destroot}${prefix}/share/man/man1/kate.1]} {
89            file rename ${destroot}${prefix}/share/man/man1/kate.1 ${destroot}${prefix}/share/man/man1/kate5.1
90        }
91        ln -s kate ${destroot}${prefix}/bin/kate5
92    }
93}