svn commit: r565178 - head/Mk/Uses
Adriaan de Groot
adridg at FreeBSD.org
Sat Feb 13 21:12:23 UTC 2021
Author: adridg
Date: Sat Feb 13 21:12:23 2021
New Revision: 565178
URL: https://svnweb.freebsd.org/changeset/ports/565178
Log:
Add KDE_INVENT convenience for KDE ports
KDE has its own GitLab instance. This behaves slightly different
from other GitLab -- there's not really a "GL_ACCOUNT" involved,
although the repositories are filed under various categories
that behave like accounts do on GitLab.com.
Some -- not many -- ports of KDE software pick up unreleased
software, or software in-between releases. Those tend to use
the GitHub mirror. That mirror should not be considered a good
source for the software; it's better to stick close to the real source.
With KDE_INVENT it is immediately clear that a port comes from KDE
sources, but not released work. It is a shortcut for setting GL_
values for site, account (category) etc. While there's only a handful
of ports now that would need it (and we would prefer to **not**
package unreleased software) the "signal value" is a good one.
Reviewed by: tcberner
Modified:
head/Mk/Uses/kde.mk
Modified: head/Mk/Uses/kde.mk
==============================================================================
--- head/Mk/Uses/kde.mk Sat Feb 13 20:13:20 2021 (r565177)
+++ head/Mk/Uses/kde.mk Sat Feb 13 21:12:23 2021 (r565178)
@@ -25,6 +25,24 @@
# this will then set default values for MASTER_SITES and DIST_SUBDIR
# as well as CPE_VENDOR and LICENSE.
#
+# KDE_INVENT If the port does not have a regular release, and should
+# be fetched from KDE Invent (a GitLab instance) it can set
+# KDE_INVENT to 3 space-separated values:
+# * a full 40-character commit hash
+# * a category name inside KDE Invent
+# * a repository name inside KDE Invent
+# Default values for category and name are:
+# * the first item in CATEGORIES that is not "kde"; this
+# is useful when the FreeBSD ports category and the KDE
+# category are the same (which happens sometimes)
+# * PORTNAME, often the FreeBSD port name is the same
+# as the upstream name and it will not need to be specified.
+# Sometimes `KDE_INVENT=<hash>` will do and often
+# `KDE_INVENT=<hash> <category>` is enough.
+#
+# Setting KDE_INVENT is the equivalent of a handful of USE_GITLAB
+# and related settings.
+#
# MAINTAINER: kde at FreeBSD.org
.if !defined(_INCLUDE_USES_KDE_MK)
@@ -91,6 +109,32 @@ IGNORE?= cannot be installed: multiple kde-<...> categ
. endif
. endif
. endfor
+
+# Doing source-selection if the sources are on KDE invent
+. if defined(KDE_INVENT)
+_invent_hash= ${KDE_INVENT:[1]}
+_invent_category= ${KDE_INVENT:[2]}
+_invent_name= ${KDE_INVENT:[3]}
+
+# Fill in default values if bits are missing
+. if empty(_invent_category)
+_invent_category= ${CATEGORIES:Nkde:[1]}
+. endif
+. if empty(_invent_name)
+_invent_name= ${PORTNAME}
+. endif
+
+# If valid, use it for GitLab
+. if empty(_invent_hash) || empty(_invent_category) || empty(_invent_name)
+IGNORE?= invalid KDE_INVENT value '${KDE_INVENT}'
+. else
+USE_GITLAB= yes
+GL_SITE= https://invent.kde.org
+GL_ACCOUNT= ${_invent_category}
+GL_PROJECT= ${_invent_name}
+GL_COMMIT= ${_invent_hash}
+. endif
+. endif
. if defined(_KDE_CATEGORY)
# KDE is normally licensed under the LGPL 2.0.
More information about the svn-ports-all
mailing list