git: 22d118e2620c - main - Uses/cabal.mk: Simplify EXTRACT_ONLY setting.

From: Gleb Popov <arrowd_at_FreeBSD.org>
Date: Wed, 27 Jul 2022 14:56:48 UTC
The branch main has been updated by arrowd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=22d118e2620c44b6273ea00be51a5fcdfcf1c604

commit 22d118e2620c44b6273ea00be51a5fcdfcf1c604
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2022-07-21 07:24:02 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2022-07-27 14:55:50 +0000

    Uses/cabal.mk: Simplify EXTRACT_ONLY setting.
    
    Adapt ports that were using hacks to set EXTRACT_ONLY.
---
 Mk/Uses/cabal.mk                | 18 ++++++------------
 games/hedgewars-server/Makefile |  1 -
 lang/elm/Makefile               |  2 --
 3 files changed, 6 insertions(+), 15 deletions(-)

diff --git a/Mk/Uses/cabal.mk b/Mk/Uses/cabal.mk
index dd7f0d917dbe..2037696ab369 100644
--- a/Mk/Uses/cabal.mk
+++ b/Mk/Uses/cabal.mk
@@ -109,14 +109,6 @@ _hackage_is_default=	no
 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}
-.  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
@@ -141,16 +133,18 @@ MASTER_SITES+=	https://hackage.haskell.org/package/:${package:C/[\.-]//g} \
 		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
 
+_CABAL_EXTRACT_ONLY+=	${package:C/_[0-9]+//}/${package:C/_[0-9]+//}${CABAL_EXTRACT_SUFX}
 .  endfor
 
+.  if !defined(EXTRACT_ONLY)
+EXTRACT_ONLY=	${_DISTFILES:N*\.cabal}
+.  else
+EXTRACT_ONLY+= ${_CABAL_EXTRACT_ONLY}
+.  endif
 
 # Auxiliary targets used during port creation/updating.
 
diff --git a/games/hedgewars-server/Makefile b/games/hedgewars-server/Makefile
index 86a5a83dc99e..f9c5c608cc9b 100644
--- a/games/hedgewars-server/Makefile
+++ b/games/hedgewars-server/Makefile
@@ -7,7 +7,6 @@ MASTER_SITES=	http://www.hedgewars.org/download/releases/ \
 PKGNAMESUFFIX=	-server
 DISTNAME=	${PORTNAME}-src-${DISTVERSION}
 DISTFILES=	${DISTNAME}${EXTRACT_SUFX}
-EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
 
 MAINTAINER=	haskell@FreeBSD.org
 COMMENT=	Server part of free Worms-like turn based strategy game
diff --git a/lang/elm/Makefile b/lang/elm/Makefile
index f85550b0cf6f..3bc4abd39bac 100644
--- a/lang/elm/Makefile
+++ b/lang/elm/Makefile
@@ -4,8 +4,6 @@ PORTREVISION=	5
 CATEGORIES=	lang
 MASTER_SITES=	LOCAL/arrowd/:package_list
 DISTFILES=	elm-compiler-bootstrap-${PORTVERSION}${EXTRACT_SUFX}:package_list
-EXTRACT_ONLY=	${DISTNAME_DEFAULT}${EXTRACT_SUFX} \
-		elm-compiler-bootstrap-${PORTVERSION}${EXTRACT_SUFX}
 
 MAINTAINER=	haskell@FreeBSD.org
 COMMENT=	Delightful language for reliable webapps