deskutils/todo: Fix config path (TODOTXT_GLOBAL_CFG_FILE)

- Bump PORTREVISION for package change

PR:		257647
Reported by:	Duane <parakleta@darkreality.org>
This commit is contained in:
Po-Chuan Hsieh 2021-08-09 05:42:16 +08:00
parent e52c0266c9
commit 0d3e9f1a62
No known key found for this signature in database
GPG Key ID: 9A4BD10F002DD04B
2 changed files with 14 additions and 0 deletions

View File

@ -27,6 +27,9 @@ CONFLICTS_INSTALL= deforaos-todo devtodo
SHEBANG_FILES= todo.sh todo_completion
post-patch:
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/todo.sh
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/todo.sh ${STAGEDIR}${PREFIX}/bin/todo
${INSTALL_DATA} ${WRKSRC}/todo.cfg ${STAGEDIR}${PREFIX}/etc/todo.cfg

View File

@ -0,0 +1,11 @@
--- todo.sh.orig 2020-08-12 04:44:46 UTC
+++ todo.sh
@@ -622,7 +622,7 @@ TODOTXT_DEFAULT_ACTION=${TODOTXT_DEFAULT_ACTION:-}
TODOTXT_SORT_COMMAND=${TODOTXT_SORT_COMMAND:-env LC_COLLATE=C sort -f -k2}
TODOTXT_DISABLE_FILTER=${TODOTXT_DISABLE_FILTER:-}
TODOTXT_FINAL_FILTER=${TODOTXT_FINAL_FILTER:-cat}
-TODOTXT_GLOBAL_CFG_FILE=${TODOTXT_GLOBAL_CFG_FILE:-/etc/todo/config}
+TODOTXT_GLOBAL_CFG_FILE=${TODOTXT_GLOBAL_CFG_FILE:-%%PREFIX%%/etc/todo.cfg}
TODOTXT_SIGIL_BEFORE_PATTERN=${TODOTXT_SIGIL_BEFORE_PATTERN:-} # Allow any other non-whitespace entity before +project and @context; should be an optional match; example: \(w:\)\{0,1\} to allow w:@context.
TODOTXT_SIGIL_VALID_PATTERN=${TODOTXT_SIGIL_VALID_PATTERN:-.*} # Limit the valid characters (from the default any non-whitespace sequence) for +project and @context; example: [a-zA-Z]\{3,\} to only allow alphabetic ones that are at least three characters long.
TODOTXT_SIGIL_AFTER_PATTERN=${TODOTXT_SIGIL_AFTER_PATTERN:-} # Allow any other non-whitespace entity after +project and @context; should be an optional match; example: )\{0,1\} to allow (with the corresponding TODOTXT_SIGIL_BEFORE_PATTERN) enclosing in parentheses.