aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Brazhnikov <makc@FreeBSD.org>2026-08-13 10:20:39 +0000
committerMax Brazhnikov <makc@FreeBSD.org>2026-08-18 11:00:41 +0000
commit22b7228039f6a1bbeba1ca64e8446440809efc73 (patch)
treefe9278247dcf4715b2001485f969351ee3bb116c
parent5db01aa057d9fb7194ca23a9f342fae7c10463a1 (diff)
Uses/kde.mk: Use the latest KDE Frameworks if the version is omitted
Diffrential: D58578 Reviewed by: adridg, arrowd, jhale (cherry picked from commit ee319c49617da1da49e5695aac0133743b2d93bc)
-rw-r--r--Mk/Uses/kde.mk25
1 files changed, 17 insertions, 8 deletions
diff --git a/Mk/Uses/kde.mk b/Mk/Uses/kde.mk
index 6460017d5b67..ae47d1949b13 100644
--- a/Mk/Uses/kde.mk
+++ b/Mk/Uses/kde.mk
@@ -5,6 +5,8 @@
#
# 5: Depend on KDE Frameworks 5 components and variables.
# 6: Depend on KDE Frameworks 6 components and variables.
+# The version may be omitted when all required components are
+# indifferent to the Frameworks version, e.g. ecm or breeze-icons.
#
# Variables that can be set by a port:
#
@@ -52,25 +54,33 @@
.if !defined(_INCLUDE_USES_KDE_MK)
_INCLUDE_USES_KDE_MK= yes
-_KDE_SUPPORTED= 5 6
+# The first value must be the latest stable version of KDE Frameworks.
+_KDE_SUPPORTED= 6 5
-. if empty(kde_ARGS)
-IGNORE= kde needs a version (${_KDE_SUPPORTED})
-. endif
+# List of shared components. The latest stable version will be used
+# if KDE Frameworks version is not specified.
+_USE_KDE_LATEST= apidox breeze-icons ecm oxygen-sounds
. for ver in ${_KDE_SUPPORTED:O:u}
. if ${kde_ARGS:M${ver}}
. if !defined(_KDE_VERSION)
_KDE_VERSION= ${ver}
. else
-IGNORE?= cannot be installed: different KDE versions specified via kde:[${_KDE_SUPPORTED:S/ //g}] #'
+IGNORE?= cannot be installed: different KDE Frameworks versions specified via kde:[${_KDE_SUPPORTED:S/ //g}] #'
. endif
. endif
. endfor
+# Allow ports to not specify KDE Frameworks version only for shared components
+# listed in _USE_KDE_LATEST.
. if empty(_KDE_VERSION)
-IGNORE?= kde:[${_KDE_SUPPORTED:S/ //g}] needs an argument #'
-. else
+. for component in ${USE_KDE:O:u:C/:.+//}
+. if empty(_USE_KDE_LATEST:M${component})
+IGNORE?= cannot be installed: KDE Frameworks version must be specified via kde:[${_KDE_SUPPORTED:S/ //g}] for USE_KDE=${component}
+. endif
+. endfor
+_KDE_VERSION= ${_KDE_SUPPORTED:[1]}
+. endif
_KDE_RELNAME= KDE${_KDE_VERSION}
@@ -1055,5 +1065,4 @@ IGNORE= cannot be installed: unknown USE_KDE component '${component}'
. endif # ${_USE_KDE_ALL:M${component}} != ""
. endfor
-. endif
.endif