Date: Thu, 4 Feb 2021 12:53:48 +0000 (UTC) From: Gleb Popov <arrowd@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r564023 - branches/2021Q1/Mk/Uses Message-ID: <202102041253.114Crm5N040516@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: arrowd Date: Thu Feb 4 12:53:47 2021 New Revision: 564023 URL: https://svnweb.freebsd.org/changeset/ports/564023 Log: MFH: r560282, r560704 Uses/cabal.mk: More correct fix for EXTRACT_ONLY problem from r559679. Uses/cabal.mk: Add "nodefault" argument. Modified: branches/2021Q1/Mk/Uses/cabal.mk Directory Properties: branches/2021Q1/ (props changed) Modified: branches/2021Q1/Mk/Uses/cabal.mk ============================================================================== --- branches/2021Q1/Mk/Uses/cabal.mk Thu Feb 4 12:29:40 2021 (r564022) +++ branches/2021Q1/Mk/Uses/cabal.mk Thu Feb 4 12:53:47 2021 (r564023) @@ -4,10 +4,13 @@ # # Feature: cabal # Usage: USES=cabal or USES=cabal:ARGS -# Valid ARGS: hpack +# Valid ARGS: hpack, nodefault # # hpack: The port doesn't have a .cabal file and needs devel/hs-hpack to # generate it from package.yaml file +# nodefault: Do not fetch the default distribution file from Hackage. If +# USE_GITHUB or USE_GITLAB is specified in the port, this argument +# is implied. # # Variables, which can be set by the port: # @@ -40,7 +43,7 @@ .if !defined(_INCLUDE_USES_CABAL_MK) _INCLUDE_USES_CABAL_MK= yes -_valid_ARGS= hpack +_valid_ARGS= hpack nodefault . for arg in ${cabal_ARGS} . if !${_valid_ARGS:M${arg}} @@ -74,10 +77,18 @@ 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}/ \ +. if !defined(USE_GITHUB) && !defined(USE_GITLAB) && !${cabal_ARGS:Mnodefault} +MASTER_SITES= https://hackage.haskell.org/package/${PORTNAME}-${PORTVERSION}/ \ http://hackage.haskell.org/package/${PORTNAME}-${PORTVERSION}/ -DISTFILES?= ${PORTNAME}-${PORTVERSION}${CABAL_EXTRACT_SUFX} +DISTFILES+= ${PORTNAME}-${PORTVERSION}${CABAL_EXTRACT_SUFX} +EXTRACT_ONLY+= ${PORTNAME}-${PORTVERSION}${CABAL_EXTRACT_SUFX} +. else +. if defined(USE_GITHUB) && !defined(DISTFILES) && !${USE_GITHUB:Mnodefault} +EXTRACT_ONLY+= ${DISTNAME_DEFAULT}${_GITHUB_EXTRACT_SUFX} +. endif +. if defined(USE_GITLAB) && !defined(DISTFILES) && !${USE_GITLAB:Mnodefault} +EXTRACT_ONLY+= ${DISTNAME}${_GITLAB_EXTRACT_SUFX} +. endif . endif _USES_extract= 701:cabal-post-extract @@ -101,15 +112,16 @@ MASTER_SITES+= https://hackage.haskell.org/package/:${ http://hackage.haskell.org/package/:${package:C/[\.-]//g} DISTFILES+= ${package:C/_[0-9]+//}/${package:C/_[0-9]+//}${CABAL_EXTRACT_SUFX}:${package:C/[\.-]//g} +. if !defined(CABAL_BOOTSTRAP) +EXTRACT_ONLY+= ${package:C/_[0-9]+//}/${package:C/_[0-9]+//}${CABAL_EXTRACT_SUFX} +. endif + . if ${package:C/[^_]*//:S/_//} != "" DISTFILES+= ${package:C/_[0-9]+//}/revision/${package:C/[^_]*//:S/_//}.cabal:${package:C/[\.-]//g} . endif . endfor -. if !defined(CABAL_BOOTSTRAP) -EXTRACT_ONLY= ${DISTFILES:C/:.*//:N*\.cabal} -. endif # Fetches and unpacks package source from Hackage using only PORTNAME and PORTVERSION. cabal-extract: ${WRKDIR}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202102041253.114Crm5N040516>