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/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D244784

--- 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+=3D       libgmp.so:math/gmp \

 DIST_SUBDIR?=3D  cabal

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

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

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



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