FreeBSD Porter's Handbook
Prev | Chapter 6 Special Considerations | Next

# 6.10 Using KDE

## 6.10.1 Variable Definitions (KDE 3.x Only)

Table 6-12. Variables for Ports That Use KDE 3.x

`USE_KDELIBS_VER` | The port uses KDE libraries. It specifies the major version of KDE to use and implies `USE_QT_VER` of the appropriate version. The only possible value is `3`.
`USE_KDEBASE_VER` | The port uses KDE base. It specifies the major version of KDE to use and implies `USE_QT_VER` of the appropriate version. The only possible value is `3`.

## 6.10.2 KDE 4 Variable Definitions

If your application depends on KDE 4.x, set `USE_KDE4` to the list of required components. The most commonly used components are listed below (up-to-date components are listed in `_USE_KDE4_ALL` in `/usr/ports/Mk/bsd.kde4.mk`):

Table 6-13. Available KDE4 Components

Name | Description
--- | ---
`akonadi` | Personal information management (PIM) storage service
`automoc4` | Makes port use automoc4 build tool
`kdebase` | Basic KDE applications (Konqueror, Dolphin, Konsole)
`kdeexp` | Experimental KDE libraries (with non-stable API)
`kdehier` | Provides common KDE directories
`kdelibs` | The base set of KDE libraries
`kdeprefix` | If set, port will be installed into `${KDE4_PREFIX}` instead of `${LOCALBASE}`
`pimlibs` | PIM libraries
`workspace` | Applications and libraries which form desktop (Plasma, KWin)

KDE 4.x ports are installed into `${KDE4_PREFIX}`, which is `/usr/local/kde4` currently, to avoid conflicts with KDE 3.x ports. This is achieved by specifying the `kdeprefix` component, which overrides the default `PREFIX`. The ports however respect any `PREFIX` set via `MAKEFLAGS` environment variable and/or make arguments.

KDE 4.x ports may conflict with KDE 3.x ports, so when the `kdeprefix` component is enabled, they are installed in `${KDE4_PREFIX}`. The default value of `KDE4_PREFIX` is currently `/usr/local/kde4`. Installing the KDE 4.x ports into a custom `PREFIX` is also possible. When `PREFIX` is set via the `MAKEFLAGS` environment variable or via make options it overrides the value configured by `kdeprefix`.

Example 6-5. `USE_KDE4` Example

This is a simple example for KDE 4 port. `USE_CMAKE` instructs port to utilize CMake -- configuration tool widely spread among KDE 4 projects. `USE_KDE4` brings dependency on KDE libraries and makes port using automoc4 at build stage. Required KDE components and other dependencies can be determined through configure log. `USE_KDE4` does not imply `USE_QT_VER`. If a port requires some Qt4 components, `USE_QT_VER` should be set and then needed components can be specified.

    USE_CMAKE=	yes
    USE_KDE4=	automoc4 kdelibs kdeprefix
    USE_QT_VER=	4
    QT_COMPONENTS=	qmake_build moc_build rcc_build uic_build

Prev | Home | Next
Using Qt | Up | Using Java

For questions about the FreeBSD ports system, e-mail <ports@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.