Page MenuHomeFreeBSD

D24282.id.diff
No OneTemporary

D24282.id.diff

Index: Mk/bsd.sites.mk
===================================================================
--- Mk/bsd.sites.mk
+++ Mk/bsd.sites.mk
@@ -1046,6 +1046,49 @@
.endfor
.endif
+.if !defined(IGNORE_MASTER_SITE_SOURCEHUT)
+#
+# In order to use sourcehut your port must define either USE_SOURCEHUT or
+# USE_SOURCEHUT_HG for mercurial support and the following variables:
+#
+# SRHT_SITE - site URL hosting sourcehut and the project
+# default: https://git.sr.ht for USE_SOURCEHUT
+# https://hg.sr.ht for USE_SOURCEHUT_HG
+#
+# SRHT_ACCOUNT - account name of the sourcehut user hosting the project.
+# Use it without the leading '~'.
+# default: ${PORTNAME}
+#
+# SRHT_PROJECT - name of the project on sourcehut
+# default: ${PORTNAME}
+#
+# SRHT_TAGNAME - name of the tag to download (2.0.1, hash, ...)
+# Using the name of a branch here is incorrect.
+# default: ${DISTVERSIONFULL}
+#
+.if defined(USE_SOURCEHUT) && defined(USE_SOURCEHUT_HG)
+DEV_WARNING+= "Both USE_SOURCEHUT and USE_SOURCEHUT_HG are defined. Please only use USE_SOURCEHUT_HG for mercurial."
+.endif
+.if defined(USE_SOURCEHUT) || defined(USE_SOURCEHUT_HG)
+.if defined(USE_SOURCEHUT_HG)
+SRHT_SITE_DEFAULT= https://hg.sr.ht
+.else
+SRHT_SITE_DEFAULT= https://git.sr.ht
+.endif
+SRHT_SITE?= ${SRHT_SITE_DEFAULT}
+SRHT_ACCOUNT_DEFAULT= ${PORTNAME}
+SRHT_ACCOUNT?= ${SRHT_ACCOUNT_DEFAULT}
+SRHT_PROJECT_DEFAULT= ${PORTNAME}
+SRHT_PROJECT?= ${SRHT_PROJECT_DEFAULT}
+SRHT_TAGNAME?= ${PORTVERSION}
+
+DISTNAME:= ${SRHT_PROJECT}-${PORTVERSION}
+
+MASTER_SITES+= ${SRHT_SITE}/~${SRHT_ACCOUNT}/${SRHT_PROJECT}/archive/${SRHT_TAGNAME}.tar.gz?dummy=/
+
+.endif # defined(USE_SOURCEHUT)
+.endif # !defined(IGNORE_MASTER_SITE_SOURCEHUT)
+
.if !defined(IGNORE_MASTER_SITE_SOURCEWARE)
MASTER_SITE_SOURCEWARE+= \
https://mirrors.kernel.org/sourceware/%SUBDIR%/ \

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 31, 5:02 AM (5 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28108618
Default Alt Text
D24282.id.diff (1 KB)

Event Timeline