[Bug 244784] Mk/Uses/cabal.mk: GitHub-based Haskell ports list the main tarball twice in distinfo

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Mar 24 16:41:55 UTC 2020


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

--- Comment #2 from Gleb Popov <arrowd at 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.


More information about the freebsd-haskell mailing list