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

# 6.11 Using KDE

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

Table 6-13. 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.11.2 KDE 4 Variable Definitions

If your application depends on KDE 4.x, set `USE_KDE4` to the list of required components. `_build` and `_run` suffixes can be used to force components dependency type (e.g., `baseapps_run`). If no suffix is set, a default dependency type will be used. If you want to force both types, add the component twice with both suffixes (e.g., `automoc4_build automoc4_run`). The most commonly used components are listed below (up-to-date components are documented at the top of `/usr/ports/Mk/bsd.kde4.mk`):

Table 6-14. Available KDE 4 Components

Name | Description
--- | ---
`baseapps` | Basic applications for KDE Desktop
`kdehier` | Hierarchy of common KDE directories
`kdelibs` | KDE Developer Platform
`kdeprefix` | If set, port will be installed into `${KDE4_PREFIX}` instead of `${LOCALBASE}`
`pimlibs` | KDE-Pim libraries
`workspace` | KDE user environments
`akonadi` | Storage server for KDE-Pim
`automoc4` | Automatic moc for Qt 4 packages

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.

Example 6-5. `USE_KDE4` Example

This is a simple example for a KDE 4 port. `USE_CMAKE` instructs the 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 Qt 4 components, `USE_QT_VER` should be set and then needed components can be specified.

    USE_CMAKE=	yes
    USE_KDE4=	kdelibs kdeprefix automoc4
    USE_QT_VER=	4
    QT_COMPONENTS=	moc_build qmake_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>.