From owner-svn-ports-branches@freebsd.org Thu Feb 4 12:53:48 2021 Return-Path: Delivered-To: svn-ports-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5990F542AC5; Thu, 4 Feb 2021 12:53:48 +0000 (UTC) (envelope-from arrowd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DWdlc25tNz3pdC; Thu, 4 Feb 2021 12:53:48 +0000 (UTC) (envelope-from arrowd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B1994254; Thu, 4 Feb 2021 12:53:48 +0000 (UTC) (envelope-from arrowd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 114CrmhU040517; Thu, 4 Feb 2021 12:53:48 GMT (envelope-from arrowd@FreeBSD.org) Received: (from arrowd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 114Crm5N040516; Thu, 4 Feb 2021 12:53:48 GMT (envelope-from arrowd@FreeBSD.org) Message-Id: <202102041253.114Crm5N040516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arrowd set sender to arrowd@FreeBSD.org using -f From: Gleb Popov Date: Thu, 4 Feb 2021 12:53:48 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r564023 - branches/2021Q1/Mk/Uses X-SVN-Group: ports-branches X-SVN-Commit-Author: arrowd X-SVN-Commit-Paths: branches/2021Q1/Mk/Uses X-SVN-Commit-Revision: 564023 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the branches of the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2021 12:53:48 -0000 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}