Skip to content

Commit

Permalink
fix(deps): Check for required curl dependency on configure
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Mar 31, 2022
1 parent 593345e commit 0322e1e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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)" || \
Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down Expand Up @@ -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])
Expand Down
2 changes: 1 addition & 1 deletion hooks/build
Original file line number Diff line number Diff line change
Expand Up @@ -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'\
Expand Down
1 change: 1 addition & 0 deletions rules/casile.mk.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ SHELL := $(CASILEDIR)/make-shell.zsh
AWK ?= @AWK@
BC ?= @BC@
CMP ?= @CMP@
CURL ?= @CURL@
CUT ?= @CUT@
EGREP ?= @EGREP@
ENTR ?= @ENTR@
Expand Down
2 changes: 1 addition & 1 deletion rules/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 '^---$$' |
Expand Down

0 comments on commit 0322e1e

Please sign in to comment.