aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorarrowd <arrowd@FreeBSD.org>2019-07-22 02:37:26 +0800
committerarrowd <arrowd@FreeBSD.org>2019-07-22 02:37:26 +0800
commitfa95c2c76fcb983dea7cc780a57921ee031d7f94 (patch)
tree4051b6f699348affb30b568ba3568105e8b0d046 /Mk
parent664ff248c977667f4d1e08cc4d128c6d4bf17019 (diff)
downloadfreebsd-ports-gnome-fa95c2c76fcb983dea7cc780a57921ee031d7f94.tar.gz
freebsd-ports-gnome-fa95c2c76fcb983dea7cc780a57921ee031d7f94.tar.zst
freebsd-ports-gnome-fa95c2c76fcb983dea7cc780a57921ee031d7f94.zip
cabal.mk: Transforms check-revs aux target into make-use-cabal-revs, which works much better.
Submitted by: Evilham <contact@evilham.com>
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Uses/cabal.mk8
1 files changed, 4 insertions, 4 deletions
diff --git a/Mk/Uses/cabal.mk b/Mk/Uses/cabal.mk
index 80c9cfd83f7d..9dabb0157ed0 100644
--- a/Mk/Uses/cabal.mk
+++ b/Mk/Uses/cabal.mk
@@ -110,11 +110,11 @@ make-use-cabal:
@echo -n USE_CABAL=
@find ${CABAL_HOME} -name '*.conf' -exec basename {} + | sed -E 's|-[0-9a-z]{64}\.conf||' | sort | sed 's/$$/ \\/'
-# Checks USE_CABAL items that have revisions.
-check-revs:
+# Re-generates USE_CABAL items to have revision numbers.
+make-use-cabal-revs:
. for package in ${_use_cabal}
- @(fetch -o /dev/null http://hackage.haskell.org/package/${package:C/_[0-9]+//}/revision/1.cabal 2>/dev/null && echo "Package ${package} has revisions") || true
- @([ -d ${DISTDIR}/${DIST_SUBDIR}/${package:C/_[0-9]+//}/revision ] && echo " hint: " `find ${DISTDIR}/${DIST_SUBDIR}/${package:C/_[0-9]+//} -name *.cabal | xargs basename`) || true
+ @(${ENV} HTTP_ACCEPT="application/json" fetch -q -o - http://hackage.haskell.org/package/${package:C/_[0-9]+//}/revisions/ | sed -Ee 's/.*":([0-9]+)}\]/${package:C/_[0-9]+//}_\1 /' -e 's/_0//')
+ @echo '\'
. endfor
. if !defined(CABAL_BOOTSTRAP)