Building without BASH and ZSH options results in the following: $ sudo make install ===> Installing for restic-0.9.0 ===> Checking if restic already installed ===> Registering installation for restic-0.9.0 pkg-static: Unable to access file /usr/ports/sysutils/restic/work/stage/usr/local/etc/bash_completion.d/restic.sh:No such file or directory pkg-static: Unable to access file /usr/ports/sysutils/restic/work/stage/usr/local/share/zsh/site-functions/_restic:No such file or directory *** Error code 74 Stop. make[1]: stopped in /usr/ports/sysutils/restic *** Error code 1 Stop. make: stopped in /usr/ports/sysutils/restic
Created attachment 193781 [details] svn-diff-sysutils-restic
(In reply to w.schwarzenfeld from comment #1) +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MZSH} +PLIST_SUB+= ZSH="" +.else +PLIST_SUB+= ZSH="@comment " +.endif + +.if ${PORT_OPTIONS:MBASH} +PLIST_SUB+= BASH="" +.else +PLIST_SUB+= BASH="@comment " +.endif + This is basically what OPTIONS_SUB=yes already does just more verbose and it's not necessary. But what we IMHO really should do here is remove the BASH and ZSH options and always install the completion files like we recommend in the Porter's Handbook. https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/shell-completion.html
Created attachment 193784 [details] alternate-patch-without-options The intention of the reporter was to install it without bash and zsh. But I provide an alternate patch.
Another question is why OPTIONS_SUB=yes not work.
Found it, it was the missing %%ZSH%% %%BASH%% in pkg-plist.
Sorry for the delay guys, I was on vacation. This all looks acceptable to me, removing the options and installing the completions by default.
Comment on attachment 193784 [details] alternate-patch-without-options Approved by: Greg Fitzgerald <gregf hugops pw> (maintainer)
A commit references this bug: Author: tobik Date: Fri Jun 1 06:49:02 UTC 2018 New revision: 471250 URL: https://svnweb.freebsd.org/changeset/ports/471250 Log: sysutils/restic: Remove BASH and ZSH options During the last update we forgot to keep %%BASH%% and %%ZSH%% in pkg-plist and the build currently fails when disabling BASH and/or ZSH. [1] Remove the BASH and ZSH options instead of fixing them. Having options to skip installing tiny completion files does not make much sense. The current recommendation in the Porter's Handbook is to always install them unconditionally. PR: 228551 Reported by: rumble.rubble@gmail.com [1] Approved by: gregf@hugops.pw (maintainer) Submitted by: w.schwarzenfeld@utanet.at Changes: head/sysutils/restic/Makefile
Done. Thanks! No merge to 2018Q2 since it still has 0.8.3 and it's not affected.