tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Fix mk/fetch/github.mk
>> This is not x11/alacritty, it's wip/alacritty-dev.
>> The same happens on wip/elvish-dev.
>>
>> It breaks all my packages that I run from the dev branches.
>
> We still need a solution for these.
> It's not only wip/alacritty-dev and wip/elvish-dev, I run several other packages (not in wip) from the dev-branches, all of them fail to build.
>
> I've reverted your change locally in order to update my packages but, this is not a viable permanent solution.
>
> Regards,
> Pedro
Something like the following should fix the issue (other cleanups included).
I would rather use `-${MASTER_SITES:=${GITHUB_PROJECT}/tarball/${GITHUB_TAG}}` which is a documented API endpoint, but somehow that gives a different archive.
Kind regards,
Adam
===================================================================
RCS file: /cvsroot/pkgsrc/mk/fetch/github.mk,v
retrieving revision 1.18
diff -u -r1.18 github.mk
--- mk/fetch/github.mk 11 Feb 2024 15:26:38 -0000 1.18
+++ mk/fetch/github.mk 13 Feb 2024 12:01:22 -0000
@@ -40,7 +40,7 @@
"For more information: make help topic=github"
.endif
-.if defined(_USE_GITHUB) && !empty(_USE_GITHUB:M[yY][eE][sS])
+.if defined(_USE_GITHUB) && ${_USE_GITHUB:tl} == yes
GITHUB_PROJECT?= ${PKGBASE}
GITHUB_TAG?= ${PKGVERSION_NOREV}
@@ -65,12 +65,14 @@
_GITHUB_DEFAULT_DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
. endif
-. if !empty(GITHUB_TYPE:Mrelease)
+. if ${GITHUB_TYPE} == release
SITES.${_GITHUB_DEFAULT_DISTFILES}= ${MASTER_SITES:=${GITHUB_PROJECT}/releases/download/${GITHUB_RELEASE}/}
-. endif
-
-. if !empty(GITHUB_TYPE:Mtag)
+. elif ${GITHUB_TYPE} == tag
+. if !empty(GITHUB_TAG:M[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]*)
+SITES.${_GITHUB_DEFAULT_DISTFILES}= -${MASTER_SITES:=${GITHUB_PROJECT}/archive/${GITHUB_TAG}${EXTRACT_SUFX}}
+. else
SITES.${_GITHUB_DEFAULT_DISTFILES}= -${MASTER_SITES:=${GITHUB_PROJECT}/archive/refs/tags/${GITHUB_TAG}${EXTRACT_SUFX}}
+. endif
. endif
.endif
Home |
Main Index |
Thread Index |
Old Index