From 0322e1e06e81c8d5440d431f74e379b13e80582c Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Thu, 31 Mar 2022 15:12:46 +0300 Subject: [PATCH] fix(deps): Check for required curl dependency on configure --- Makefile.am | 5 +++-- configure.ac | 3 +++ hooks/build | 2 +- rules/casile.mk.in | 1 + rules/rules.mk | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index edc7827b..f2bd4350 100644 --- a/Makefile.am +++ b/Makefile.am @@ -261,13 +261,14 @@ CLEANFILES += .docker_deps .docker_deps: hooks/build $(SHELL) -c 'source <($(SED) -nE "/^(RUN|'"'"')/{s/.*=/echo /;p}" $<)' | \ tr ' ' '\n' | \ - sort > $@ + $(SORT) > $@ CLEANFILES += .aur_deps .aur_deps: - curl -Ls 'https://aur.archlinux.org/cgit/aur.git/plain/.SRCINFO?h=casile-git' | \ + $(CURL) -Ls 'https://aur.archlinux.org/cgit/aur.git/plain/.SRCINFO?h=casile-git' | \ $(SED) -nE '/\bdepends =/{s/.*= //;p}' | \ $(GREP) -v 'so.$$' | \ + $(SORT) > $@ define docker_push = test -z "$(DOCKER_PAT)" || \ diff --git a/configure.ac b/configure.ac index f93121d7..87a3df6d 100644 --- a/configure.ac +++ b/configure.ac @@ -16,6 +16,8 @@ AC_PROG_GREP AC_PROG_SED AX_PROGVAR([cmp]) +AX_PROGVAR([curl]) +AX_PROGVAR([sort]) AX_PROGVAR([xargs]) AC_ARG_ENABLE([dependency-checks], @@ -91,6 +93,7 @@ AS_IF([test "x$enable_dependency_checks" != "xno"], [ AX_PROGVAR([bc]) AX_PROGVAR([cmp]) AX_PROGVAR([cut]) + AX_PROGVAR([curl]) AX_PROGVAR([entr]) AX_PROGVAR([epubcheck]) AX_PROGVAR([fcconflist], [fc-conflist]) diff --git a/hooks/build b/hooks/build index 2254cf46..81cd3d1a 100755 --- a/hooks/build +++ b/hooks/build @@ -5,7 +5,7 @@ set -e REVISION=$(git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g') -RUNTIME_DEPS='bc bcprov entr epubcheck fontconfig ghostscript git git-warp-time imagemagick inetutils'\ +RUNTIME_DEPS='bc bcprov curl entr epubcheck fontconfig ghostscript git git-warp-time imagemagick inetutils'\ ' inkscape java-commons-lang jq kindlegen libertinus-font libgit2 m4 make mdbook moreutils nodejs procps-ng'\ ' pandoc-sile-git pcre pdftk podofo poppler povray sile sqlite'\ ' tex-gyre-fonts texlive-core ttf-hack yq zint zola zsh'\ diff --git a/rules/casile.mk.in b/rules/casile.mk.in index df14cb97..275c2595 100644 --- a/rules/casile.mk.in +++ b/rules/casile.mk.in @@ -28,6 +28,7 @@ SHELL := $(CASILEDIR)/make-shell.zsh AWK ?= @AWK@ BC ?= @BC@ CMP ?= @CMP@ +CURL ?= @CURL@ CUT ?= @CUT@ EGREP ?= @EGREP@ ENTR ?= @ENTR@ diff --git a/rules/rules.mk b/rules/rules.mk index e440acda..b79a35c4 100644 --- a/rules/rules.mk +++ b/rules/rules.mk @@ -1403,7 +1403,7 @@ $(BUILDDIR)/%-$(_verses)-$(_sorted).json: $(BUILDDIR)/%-$(_verses).json $(BUILDDIR)/%-$(_verses)-$(_text).yml: $(BUILDDIR)/%-$(_verses)-$(_sorted).json $(JQ) -M -e -r 'map_values(.osis) | _nwise(100) | join(";")' $< | - $(XARGS) -n1 -iX curl -s -L "https://sahneleme.incil.info/api/X" | + $(XARGS) -n1 -iX $(CURL) -s -L "https://sahneleme.incil.info/api/X" | # Because yq doesn't --slurp JSON, see https://github.com/kislyuk/yq/issues/56 $(JQ) -s '[.]' | $(YQ) -M -e -y ".[0][] | map_values(.scripture)" | $(GREP) -v '^---$$' |