Changeset View
Changeset View
Standalone View
Standalone View
Mk/Uses/kde.mk
# $FreeBSD$ | # $FreeBSD$ | ||||
# | # | ||||
# Provides support for KDE-based ports. | # Provides support for KDE-based ports. | ||||
# | # | ||||
# Feature: kde | # Feature: kde | ||||
# Usage: USES=kde:ARGS | # Usage: USES=kde:ARGS | ||||
# Valid ARGS: 4 | # Valid ARGS: 4, [<KDE_DIST>] | ||||
# | # | ||||
# 4: Depend on KDE4 components and variables. | # 4: Depend on KDE4 components and variables. | ||||
# KDE_DIST: Optional: Used internally for the KDE and Calligra ports, | |||||
# as to not have to add the identical MASTER_SITES&Co into | |||||
# every port. | |||||
# - applications_legacy: is part of the last kde4 applications | |||||
# - kde4: is part of kde4 | |||||
# - kactivities: is part of kactivities | |||||
# - calligra, | |||||
# - calligra_l10n : is part of Calligra | |||||
# | # | ||||
# | |||||
# Variables that can be set by a port: | # Variables that can be set by a port: | ||||
# | # | ||||
# USE_KDE List of KDE4 components (other ports) that this | # USE_KDE List of KDE4 components (other ports) that this | ||||
# port depends on. | # port depends on. | ||||
# * foo_build Add a build-time dependency (BUILD_DEPENDS) | # * foo_build Add a build-time dependency (BUILD_DEPENDS) | ||||
# * foo_run Add a run-time dependency (RUN_DEPENDS) | # * foo_run Add a run-time dependency (RUN_DEPENDS) | ||||
# * foo (default) Add both dependencies on component <foo> | # * foo (default) Add both dependencies on component <foo> | ||||
# | # | ||||
# MAINTAINER: kde@FreeBSD.org | # MAINTAINER: kde@FreeBSD.org | ||||
.if !defined(_INCLUDE_USES_KDE_MK) | .if !defined(_INCLUDE_USES_KDE_MK) | ||||
_INCLUDE_USES_KDE_MK= yes | _INCLUDE_USES_KDE_MK= yes | ||||
_KDE_SUPPORTED= 4 | _KDE_SUPPORTED= 4 | ||||
_KDE_DIST_SUPPORTED= applications_legacy calligra calligra_l10n kactivities kde4 | |||||
. if empty(kde_ARGS) | . if empty(kde_ARGS) | ||||
IGNORE= kde needs a version (${_KDE_SUPPORTED}) | IGNORE= kde needs a version (${_KDE_SUPPORTED}) | ||||
. endif | . endif | ||||
# At the moment we support KDE versions 4. | # At the moment we support KDE versions 4. | ||||
. for ver in ${_KDE_SUPPORTED:O:u} | . for ver in ${_KDE_SUPPORTED:O:u} | ||||
. if ${kde_ARGS:M${ver}} | . if ${kde_ARGS:M${ver}} | ||||
. if !defined(_KDE_VERSION) | . if !defined(_KDE_VERSION) | ||||
_KDE_VERSION= ${ver} | _KDE_VERSION= ${ver} | ||||
. else | . else | ||||
IGNORE?= cannot be installed: different KDE versions specified via kde:[${_KDE_SUPPORTED:S/ //g}] #' | IGNORE?= cannot be installed: different KDE versions specified via kde:[${_KDE_SUPPORTED:S/ //g}] #' | ||||
. endif | . endif | ||||
. endif | . endif | ||||
. endfor | . endfor | ||||
. if empty(_KDE_VERSION) | . if empty(_KDE_VERSION) | ||||
IGNORE?= kde:[${_KDE_SUPPORTED:S/ //g}] needs an argument #' | IGNORE?= kde:[${_KDE_SUPPORTED:S/ //g}] needs an argument #' | ||||
. endif | . endif | ||||
# Look for a valid KDE_DIST value | |||||
. for dist in ${_KDE_DIST_SUPPORTED:O:u} | |||||
. if ${kde_ARGS:M${dist}} | |||||
. if !defined(_KDE_DIST) | |||||
_KDE_DIST= ${dist} | |||||
. else | |||||
IGNORE?= cannot be installed: multiple <DIST> arguments specified via kde:[${_KDE_DIST_SUPPORTED:S/ //g}] #' | |||||
. endif | |||||
. endif | |||||
. endfor | |||||
_KDE_RELNAME= KDE${_KDE_VERSION} | _KDE_RELNAME= KDE${_KDE_VERSION} | ||||
# === VERSIONS OF THE DIFFERENT COMPONENTS ===================================== | # === VERSIONS OF THE DIFFERENT COMPONENTS ===================================== | ||||
# Old KDE desktop. | # Old KDE desktop. | ||||
KDE4_VERSION?= 4.14.3 | KDE4_VERSION?= 4.14.3 | ||||
KDE4_KDELIBS_VERSION= 4.14.10 | KDE4_KDELIBS_VERSION= 4.14.10 | ||||
KDE4_ACTIVITIES_VERSION= 4.13.3 | KDE4_ACTIVITIES_VERSION= 4.13.3 | ||||
KDE4_WORKSPACE_VERSION= 4.11.21 | KDE4_WORKSPACE_VERSION= 4.11.21 | ||||
Show All 12 Lines | |||||
KTP_VERSION?= 0.9.0 | KTP_VERSION?= 0.9.0 | ||||
KTP_BRANCH?= stable | KTP_BRANCH?= stable | ||||
# ============================================================================== | # ============================================================================== | ||||
# === INSTALLATION PREFIX ====================================================== | # === INSTALLATION PREFIX ====================================================== | ||||
# Define installation prefix. | # Define installation prefix. | ||||
KDE_PREFIX= ${LOCALBASE} | KDE_PREFIX= ${LOCALBASE} | ||||
# ============================================================================== | |||||
# === _KDE_DIST HANDLING -- SETTING DEFAULT VALUES ============================= | |||||
. if defined(_KDE_DIST) | |||||
. if ${_KDE_DIST:Mapplications_legacy} | |||||
PORTVERSION?= ${KDE4_APPLICATIONS_VERSION} | |||||
MASTER_SITES?= KDE/${KDE4_APPLICATIONS_BRANCH}/applications/${KDE4_APPLICATIONS_VERSION}/src | |||||
mat: I don't think `:O:u` are needed here, the variable is literally defined on the previous line… | |||||
DIST_SUBDIR?= KDE/${PORTVERSION} | |||||
. elif ${_KDE_DIST:Mkde4} | |||||
PORTVERSION?= ${KDE4_VERSION} | |||||
MASTER_SITES?= KDE/${KDE4_BRANCH}/${KDE4_VERSION}/src | |||||
DIST_SUBDIR?= KDE/${KDE4_VERSION} | |||||
. elif ${_KDE_DIST:Mkactivities} | |||||
PORTVERSION?= ${KDE4_ACTIVITIES_VERSION} | |||||
MASTER_SITES?= KDE/Attic/${KDE4_ACTIVITIES_VERSION}/src | |||||
DIST_SUBDIR?= KDE/${KDE4_ACTIVITIES_VERSION} | |||||
. elif ${_KDE_DIST:Mcalligra} | |||||
PORTVERSION?= ${CALLIGRA_VERSION} | |||||
MASTER_SITES?= KDE/${CALLIGRA_BRANCH}/calligra-${PORTVERSION} | |||||
DIST_SUBDIR?= KDE/calligra/${PORTVERSION} | |||||
. elif ${_KDE_DIST:Mcalligra_l10n} | |||||
PORTVERSION?= ${CALLIGRA_VERSION} | |||||
Done Inline ActionsIs this comment still relevant? I don't see anything Calligra-specific below. rakuco: Is this comment still relevant? I don't see anything Calligra-specific below. | |||||
MASTER_SITES?= KDE/${CALLIGRA_BRANCH}/calligra-${PORTVERSION}/calligra-l10n | |||||
DIST_SUBDIR?= KDE/calligra/${PORTVERSION}/l10n | |||||
. else | |||||
IGNORE?= unknown _KDE_DIST_PART:_KDE_DIST_ARGS value '${_KDE_DIST_PART}':'${_KDE_DIST_ARGS}' from '${_KDE_DIST}' | |||||
. endif | |||||
. endif #defined(_KDE_DIST) | |||||
# ============================================================================== | # ============================================================================== | ||||
# ==== SETUP CMAKE ENVIRONMENT ================================================= | # ==== SETUP CMAKE ENVIRONMENT ================================================= | ||||
# Help cmake to find files when testing ports with non-default PREFIX. | # Help cmake to find files when testing ports with non-default PREFIX. | ||||
CMAKE_ARGS+= -DCMAKE_PREFIX_PATH="${LOCALBASE}" | CMAKE_ARGS+= -DCMAKE_PREFIX_PATH="${LOCALBASE}" | ||||
. if ${_KDE_VERSION:M*4*} | . if ${_KDE_VERSION:M*4*} | ||||
CMAKE_ARGS+= -DKDE4_BUILD_TESTS:BOOL=OFF | CMAKE_ARGS+= -DKDE4_BUILD_TESTS:BOOL=OFF | ||||
▲ Show 20 Lines • Show All 221 Lines • Show Last 20 Lines |
I don't think :O:u are needed here, the variable is literally defined on the previous line and can be kept clean. If it needs to be sorted, maybe just add a comment about it, as the unique thing, well, eyes should be enough to figure that out before committing a change 😄