[KDE/Mac] KF5 on OSX

Marko Käning mk-lists at mailbox.org
Wed Sep 16 00:54:49 UTC 2015

Hi René,

before heading to bed I didn’t want to not let you know that…

On 15 Sep 2015, at 23:36 , René J.V. Bertin <rjvbertin at gmail.com> wrote:
> Anyway, I think I'll start by "doing them" one by one... hopefully it's easy to find

> out in what order they must be built.

… you could just try to start with “frameworkintegration”:
  $ sudo port install kf5-frameworkintegration
  $ port installed kf5* | wc
       30      93    1072

which installs everything needed for KF5’s framework “frameworkintegration”, if the
dependencies are correctly defined - which I hope - i.e. (30-1=29) frameworks.

If you now proceed with "plasma-framework”:
  $ sudo port install kf5-plasma-framework
  $ port installed kf5* | wc
       44     135    1569
more frameworks are being build.

Well, all 62 frameworks are pre-defined and thus you shouldn’t run into trouble if
you try to build KF5 applications now, as long as you set the correct dependencies.


Alternatively you could make sure that *everything* is built (almost) in the right
order by using the tier-install.sh script like this:
  $ cd macports-kde/contrib/scripts/KF5
  $ ./tier-install.sh 1; ./tier-install.sh 2; ./tier-install.sh 3; ./tier-install.sh 4
  $ ./tier-install.sh 3; ./tier-install.sh 4
  $  port installed kf5* | wc
        63     192    2231
which will re-generate all the Portfiles though, but also initiate their installs. :)

>> - I don’t think kate failed. It simply did. ;-)
> Smartpants, you know what I meant!

No, honestly, I didn’t inspect the reason for this. =) Had no nerves for that!

If you want to create an application Portfile from scratch, i.e. a new one for kf5-kate,
do this:
  $ cd macports-kde/contrib/scripts/KF5
  $ ./install.sh kate

  $ vi ../../../dports/kde/kf5-kate/Portfile 

  $ # ^^^---[ set the correct virtual path for kate, i.e. kde/applications ] (Sorry, haven’t scripted that yet!)

  $ # ^^^---[ remove "kf5-kf5umbrella" from list of deps (for now) ]

  $ # ^^^---[ set "rmd160  624b16c4f2a005e4fde2e669e988433b3d0b70e8 for checksum” manually for now ]

  $ sudo port install kf5-kate
  $ port contents kf5-kate | grep MacOS

  $ open /Applications/MacPorts/KF5/kate.app/Contents/MacOS/kate
    ---->>>> CRASH! :-(

(See also below for the complete kf5-kate portfile.)

While writing this I noticed that I up to now missed to set ‘version’ correctly in case of
applications ( http://commits.kde.org/macports-kde/249baa4387bc9ac7f3007054e8497a3742635c0d ).

> The workspace stuff will probably pose problems, but I guess we'll have to live with
> not being able to have systemsettings5 for a while.

That would be sad. A systemsettings5 would be a nice thing to have, as it is essential
for KDE4 on MacPorts.

> Hmm, is that enforced in ways other than that there can only be 1 kate/kdevelop/kbamboolah
> in the same binder?

You ask me? ;)

> Under MacPorts most applications will end up in /Applications/MacPorts/KF5 (or maybe
> we'll call it KDE5 :)) so as long as shared libraries and plugins/kparts/etc are
> coinstallable the applications might be too.

Testing required, yes.

> I've been wondering about all those portfiles that have to be created,

:) Why wonder? ;) Sure, there are many frameworks now, but they are meant to be small and
thus easily usable by applications on a more granular level… Since their dependencies are
clearly defined, it shouldn’t be a problem to get them easily into Portfiles of dependent
ports. Matter of taste perhaps, but I always like it if only minimal dependencies are set.

Admittedly KDE’s build meta-data says this:
  # The generic dependency on all frameworks
  kde/*: frameworks/kf5umbrella
  extragear/*: frameworks/kf5umbrella
meaning that all applications depend on the whole set of frameworks… But I don’t think that
the build meta-data really invalidate my above argument, as these dependencies are really
meant to be used by CI and kde-srcbuild systems - thus not having a focus on a minimal set
of dependencies.

> it's quite annoying that KF5 apparently cannot be built like Qt5 (a single top-level cmake
> file that picks up which framework dirs are present and then generates a single Makefile
> to build the whole shebang …)

For “kf5umbrella” I haven’t yet created a meta-port “kf5-kf5umbrella” enclosing all KF5.
Got far too late tonight… :-(

Good luck with all this.


Kate’s portfile looks like this:

PortSystem          1.0

set kf5.project     kate
set kf5.virtualPath kde/applications
set kf5.release     15.04.2
PortGroup           kf5 1.0

checksums           rmd160  624b16c4f2a005e4fde2e669e988433b3d0b70e8

depends_lib-append \
                    port:kf5-kactivities \
                    port:kf5-ktexteditor \

NOTE: KDE’s build meta-data explicitly defines kactivities and ktexteditor as additional
      dependencies, although they’re already contained within plasma-framework. This is
      very likely obsolete and should be fixed!
As you can see such a Portfile is rather small, since all functionality is hidden in
the kf5 PortGroup, making use of these variables:



which control the setting of various internals needed for a correct Portfile definition.

More information about the kde-mac mailing list