Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Mar 2020 16:30:27 +0000
From:      bugzilla-noreply@freebsd.org
To:        haskell@FreeBSD.org
Subject:   [Bug 244784] Mk/Uses/cabal.mk: GitHub-based Haskell ports list the main tarball twice in distinfo
Message-ID:  <bug-244784-16154-NrjKJrT4ls@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-244784-16154@https.bugs.freebsd.org/bugzilla/>
References:  <bug-244784-16154@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244784

--- Comment #2 from Gleb Popov <arrowd@FreeBSD.org> ---
Here is my try, but it obviously handles only GitHub and Gitlab:

diff --git Mk/Uses/cabal.mk Mk/Uses/cabal.mk
index 85d2a6a38e66..4e2316b01326 100644
--- Mk/Uses/cabal.mk
+++ Mk/Uses/cabal.mk
@@ -74,10 +74,15 @@ LIB_DEPENDS+=       libgmp.so:math/gmp \

 DIST_SUBDIR?=  cabal

+.  if !defined(USE_GITHUB) && !defined(USE_GITLAB)
 MASTER_SITES?= https://hackage.haskell.org/package/${PORTNAME}-${PORTVERSION}/
\
                http://hackage.haskell.org/package/${PORTNAME}-${PORTVERSION}/
 DISTFILES?=    ${PORTNAME}-${PORTVERSION}${CABAL_EXTRACT_SUFX}
 EXTRACT_ONLY?= ${PORTNAME}-${PORTVERSION}${CABAL_EXTRACT_SUFX}
+.  endif
+.  elif defined(USE_GITLAB)
+EXTRACT_ONLY?= ${GL_ACCOUNT}-${GL_PROJECT}-${GL_COMMIT}_GL0${EXTRACT_SUFX}
+.  endif

 _USES_extract= 701:cabal-post-extract
 _USES_patch=   701:cabal-post-patch

-- 
You are receiving this mail because:
You are the assignee for the bug.

help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-244784-16154-NrjKJrT4ls>