pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/time/todotxt todotxt: Update time/todotxt to 2.11.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/05bf14db69bc
branches:  trunk
changeset: 379183:05bf14db69bc
user:      leot <leot%pkgsrc.org@localhost>
date:      Wed Apr 25 15:23:55 2018 +0000

description:
todotxt: Update time/todotxt to 2.11.0

pkgsrc changes:
 - Add support for the test suite (this needs gmake as a test tool dependency)
 - Fix the shebang of test shell script with REPLACE_BASH and also add a
   SUBST to fix a shebang in the middle of scripts (needed in shell script part
   of the test suite).
   REPLACE_INTERPRETER only adjust the shebang in the first line of the file.
 - Add patches/patch-tests_test-lib.sh to just use `date -r' in non-GNU and
   non-macOS lands. By default the current date is used and then the test will
   definitely fails. While there are no guarantees that the date(1) available on
   the system supports `-r' option it is probably better to try using it (indeed
   this make all the date tests happy on NetBSD and probably also on FreeBSD and
   OpenBSD according a quick skim of their date(1) man pages).
 - Also install USAGE.md document (it is referenced by README.md).

Changes:
## [2.11.0] - 2018-03-26
### Added
- Added support for `$XDG_CONFIG_HOME` config file/actions location
- Created [CODE_OF_CONDUCT.md](/CODE_OF_CONDUCT.md) ([#217])
- Created [CHANGELOG.md](/CHANGELOG.md) ([#218])

### Changed
- Updated `add` command to accept lowercase priority ([#230])
- Clean tests and version file in Makefile. Don't ignore errors in tests.
- Updated [README.md](/README.md) ([#219])
- Update Downloads links to point at the Releases page ([#228])
- Set the executable bit when preparing releases ([#156])

### Fixes
- Update links to use https
- Suppress todo.sh error messages when invoked during completion ([#8])

diffstat:

 time/todotxt/Makefile                        |  22 +++++++++++++++++-----
 time/todotxt/PLIST                           |   5 +++--
 time/todotxt/distinfo                        |  11 ++++++-----
 time/todotxt/patches/patch-tests_test-lib.sh |  24 ++++++++++++++++++++++++
 4 files changed, 50 insertions(+), 12 deletions(-)

diffs (112 lines):

diff -r b0b6580e2706 -r 05bf14db69bc time/todotxt/Makefile
--- a/time/todotxt/Makefile     Wed Apr 25 12:57:43 2018 +0000
+++ b/time/todotxt/Makefile     Wed Apr 25 15:23:55 2018 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.1 2017/12/19 11:39:50 leot Exp $
+# $NetBSD: Makefile,v 1.2 2018/04/25 15:23:55 leot Exp $
 
-DISTNAME=      todotxt-2.10
+DISTNAME=      todotxt-2.11.0
 CATEGORIES=    time
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=todotxt/}
 GITHUB_PROJECT=        todo.txt-cli
@@ -11,7 +11,7 @@
 COMMENT=       Simple and extensible shell script for managing your todo.txt file
 LICENSE=       gnu-gpl-v3
 
-USE_TOOLS+=    bash:run gsed:run
+USE_TOOLS+=    bash:run gmake:test gsed:run
 
 SUBST_CLASSES+=                todosh
 SUBST_STAGE.todosh=    pre-configure
@@ -27,7 +27,16 @@
 SUBST_FILES.todocfg+=  todo.cfg
 SUBST_SED.todocfg+=    -e '/^export TODO_DIR/ s,=.*,=$$HOME/.todo,'
 
-REPLACE_BASH=  todo.sh
+# XXX: REPLACE_BASH only affect the `#!' on the first line, so we need to
+# XXX: manually adjust the other in the middle of the shell script.
+SUBST_CLASSES+=                shebang
+SUBST_STAGE.shebang=   pre-configure
+SUBST_MESSAGE.shebang= Replace hardcoded /bin/bash in the middle of scripts
+SUBST_FILES.shebang+=  tests/actions-test-lib.sh
+SUBST_SED.shebang+=    -e '2,$$s;!/bin/bash;!${BASH};'
+
+REPLACE_BASH+= todo.sh
+REPLACE_BASH+= tests/*.sh
 
 USE_LANGUAGES= # none
 
@@ -40,12 +49,15 @@
 CONF_FILES=            ${EGDIR}/todo.cfg \
                        ${PKG_SYSCONFDIR}/todo.cfg
 
+TEST_TARGET=   test
+
 INSTALLATION_DIRS=     bin ${DOCDIR} ${EGDIR}
 
 do-install:
        ${INSTALL_SCRIPT} ${WRKSRC}/todo.sh ${DESTDIR}${PREFIX}/bin
        ${INSTALL_DATA} ${WRKSRC}/todo.cfg ${DESTDIR}${EGDIR}
        ${INSTALL_DATA} ${WRKSRC}/todo_completion ${DESTDIR}${EGDIR}
-       ${INSTALL_DATA} ${WRKSRC}/README.textile ${DESTDIR}${DOCDIR}
+       ${INSTALL_DATA} ${WRKSRC}/README.md ${DESTDIR}${DOCDIR}
+       ${INSTALL_DATA} ${WRKSRC}/USAGE.md ${DESTDIR}${DOCDIR}
 
 .include "../../mk/bsd.pkg.mk"
diff -r b0b6580e2706 -r 05bf14db69bc time/todotxt/PLIST
--- a/time/todotxt/PLIST        Wed Apr 25 12:57:43 2018 +0000
+++ b/time/todotxt/PLIST        Wed Apr 25 15:23:55 2018 +0000
@@ -1,5 +1,6 @@
-@comment $NetBSD: PLIST,v 1.1 2017/12/19 11:39:50 leot Exp $
+@comment $NetBSD: PLIST,v 1.2 2018/04/25 15:23:55 leot Exp $
 bin/todo.sh
-share/doc/todotxt/README.textile
+share/doc/todotxt/README.md
+share/doc/todotxt/USAGE.md
 share/examples/todotxt/todo.cfg
 share/examples/todotxt/todo_completion
diff -r b0b6580e2706 -r 05bf14db69bc time/todotxt/distinfo
--- a/time/todotxt/distinfo     Wed Apr 25 12:57:43 2018 +0000
+++ b/time/todotxt/distinfo     Wed Apr 25 15:23:55 2018 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.1 2017/12/19 11:39:50 leot Exp $
+$NetBSD: distinfo,v 1.2 2018/04/25 15:23:55 leot Exp $
 
-SHA1 (todotxt-2.10.tar.gz) = 1cff257c4f45acb302246f51f1acaf00832e5e2e
-RMD160 (todotxt-2.10.tar.gz) = 9d3304d8d118f393b6c96c1411049b60ec2de34c
-SHA512 (todotxt-2.10.tar.gz) = b14d9d13948836d971f72b941770e8e2c59d171d35f074205900619c5c3efd7ca0a482887046c1865890afb6595fe27c69677c54ea5824163d291e16fa5329d3
-Size (todotxt-2.10.tar.gz) = 56509 bytes
+SHA1 (todotxt-2.11.0.tar.gz) = 07d177189de1009add10919939449dd7e4aa4adc
+RMD160 (todotxt-2.11.0.tar.gz) = a7903af5ce3c325a2d5a7fd74aa48f31ebabacd8
+SHA512 (todotxt-2.11.0.tar.gz) = 5500ed1aa10eceaaa3e5116605eed4f4228337fdc0f2ceaa5b889753a60576918c0953adbfbf80c40008d6dfdf854e8a538103bfed4d1015aa1c5a9876c2e47c
+Size (todotxt-2.11.0.tar.gz) = 712455 bytes
+SHA1 (patch-tests_test-lib.sh) = 8ebfce7cbe8c4a4f051a7f7bbbe9034e04264b5a
diff -r b0b6580e2706 -r 05bf14db69bc time/todotxt/patches/patch-tests_test-lib.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/time/todotxt/patches/patch-tests_test-lib.sh      Wed Apr 25 15:23:55 2018 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-tests_test-lib.sh,v 1.1 2018/04/25 15:23:55 leot Exp $
+
+Instead of unconditionally use today date try to use `date -r'. According a
+quick skim of NetBSD, FreeBSD and OpenBSD date(1) man pages, all of them should
+support that.
+
+--- tests/test-lib.sh.orig     2018-04-25 14:30:34.714587570 +0000
++++ tests/test-lib.sh
+@@ -535,7 +535,14 @@ test_init_todo () {
+               ;;
+               *)
+                       echo "WARNING: Current date executable not recognized"
+-                      echo "So today date will be used, expect false negative tests..."
++                      echo "'date -r' will be used, expect false negative tests"
++                      echo "if date(1) on your system does not support -r"
++                      echo "option!"
++                      cat > bin/date <<-EOF
++                      #!/bin/sh
++                      exec "$TODO_TEST_REAL_DATE" -r \$TODO_TEST_TIME \$@
++                      EOF
++                      chmod 755 bin/date
+               ;;
+       esac
+ 



Home | Main Index | Thread Index | Old Index