Thursday, February 28, 2019

UPDATE: productivity/calcurse 4.4.0

Hi,

Here is update of calcurse to 4.4.0 released 2019-02-21. Changes are
listed on https://calcurse.org/files/changes.html

I don't use it, just wanted to try it couple of weeks ago and decided to
work a bit with upstream to integrate patches which are in the ports
tree, so all except one can go away. Didn't look into the last patch
yet, so maybe that one can go too.

As I'm not a proper calcurse user, then I would be grateful if someone
could test it more thoroughly than I can at the moment.

Port changes as follows:

- update to 4.4.0
- move homepage to https
- regen wantlib
- use Gmake, otherwise text files for non-English languages are not
getting installed
- drop patches which I think are not needed any more
- regen one remaining patch

Comments are welcome.

In terms of patches which are dropped:

- KEY_ENTER patch, upstream commit 6cd67311e30c2dc3c138f339b536679ad1a8d5f4
- DAY_HEADING_DEFAULT patch, upstream commit 0bbe802002c660dd9d555d557ce8daa7c5d681b9
- calcurse-caldav already has `/usr/bin/env python3` shebang line
- notify.c patch, upstream commit 30f411257ad3bc233184c08b846a2980a9c5d1f0
- utils.c, upstream migrated functions from long to time_t


Index: Makefile
===================================================================
RCS file: /cvs/ports/productivity/calcurse/Makefile,v
retrieving revision 1.27
diff -u -p -u -r1.27 Makefile
--- Makefile 4 Feb 2019 17:44:43 -0000 1.27
+++ Makefile 28 Feb 2019 12:28:19 -0000
@@ -2,20 +2,19 @@

COMMENT= text-based calendar and scheduling application

-DISTNAME= calcurse-4.3.0
-REVISION= 2
+DISTNAME= calcurse-4.4.0
EPOCH= 0

CATEGORIES= productivity

MAINTAINER= Frederic Culot <frederic@culot.org>

-HOMEPAGE= http://calcurse.org/
+HOMEPAGE= https://calcurse.org/

# BSD
PERMIT_PACKAGE_CDROM= Yes

-WANTLIB += c iconv intl m ncursesw pthread
+WANTLIB += c curses iconv intl m pthread

MASTER_SITES= ${HOMEPAGE}files/

@@ -29,5 +28,7 @@ MODPY_VERSION= ${MODPY_DEFAULT_VERSION_3

CONFIGURE_STYLE=gnu
CONFIGURE_ARGS= --without-asciidoc
+
+USE_GMAKE= Yes

.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/productivity/calcurse/distinfo,v
retrieving revision 1.18
diff -u -p -u -r1.18 distinfo
--- distinfo 12 Nov 2017 14:01:26 -0000 1.18
+++ distinfo 28 Feb 2019 12:28:19 -0000
@@ -1,2 +1,2 @@
-SHA256 (calcurse-4.3.0.tar.gz) = MezD3Anh5WFQK0yU+WXtaxZ8A+lBhDjEp61brSx4X5o=
-SIZE (calcurse-4.3.0.tar.gz) = 597490
+SHA256 (calcurse-4.4.0.tar.gz) = 7cvJ283+OrpDrHC41olfsP9KNk34l2LRyjBToUzsgm8=
+SIZE (calcurse-4.4.0.tar.gz) = 620263
Index: patches/patch-contrib_caldav_calcurse-caldav
===================================================================
RCS file: patches/patch-contrib_caldav_calcurse-caldav
diff -N patches/patch-contrib_caldav_calcurse-caldav
--- patches/patch-contrib_caldav_calcurse-caldav 12 Nov 2017 14:01:26 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-$OpenBSD: patch-contrib_caldav_calcurse-caldav,v 1.1 2017/11/12 14:01:26 fcambus Exp $
-
-Index: contrib/caldav/calcurse-caldav
---- contrib/caldav/calcurse-caldav.orig
-+++ contrib/caldav/calcurse-caldav
-@@ -1,4 +1,4 @@
--#!/usr/bin/python3
-+#!/usr/bin/env python3
-
- import argparse
- import base64
Index: patches/patch-src_args_c
===================================================================
RCS file: /cvs/ports/productivity/calcurse/patches/patch-src_args_c,v
retrieving revision 1.2
diff -u -p -u -r1.2 patch-src_args_c
--- patches/patch-src_args_c 28 Apr 2016 14:26:13 -0000 1.2
+++ patches/patch-src_args_c 28 Feb 2019 12:28:19 -0000
@@ -1,7 +1,16 @@
$OpenBSD: patch-src_args_c,v 1.2 2016/04/28 14:26:13 ajacoutot Exp $
---- src/args.c.orig Sun Mar 27 12:26:18 2016
-+++ src/args.c Thu Apr 28 16:23:45 2016
-@@ -225,10 +225,11 @@ static void next_arg(void)
+
+Author: sthen <sthen@openbsd.org>
+Date: Wed Oct 14 10:04:16 2015 +0000
+
+ Fix date output in calcurse 'one-shot' mode ('-d' or '-Q --filter-type cal
+ --days') on 32-bit arch following 64-bit time_t. Reported by Raf Czlonka,
+ ok ajacoutot@
+
+Index: src/args.c
+--- src/args.c.orig
++++ src/args.c
+@@ -248,10 +248,11 @@ static void next_arg(void)
/*
* Print the date on stdout.
*/
Index: patches/patch-src_calcurse_h
===================================================================
RCS file: patches/patch-src_calcurse_h
diff -N patches/patch-src_calcurse_h
--- patches/patch-src_calcurse_h 1 Feb 2019 22:56:46 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-$OpenBSD: patch-src_calcurse_h,v 1.2 2019/02/01 22:56:46 sthen Exp $
-
-Fix date display in calendar, the %-* format string is a GNU libc
-extension which is not supported by strftime(3) on OpenBSD.
-
-Index: src/calcurse.h
---- src/calcurse.h.orig
-+++ src/calcurse.h
-@@ -302,7 +302,7 @@ enum datefmt {
- (datefmt == DATEFMT_YYYYMMDD ? _("yyyy/mm/dd") : _("yyyy-mm-dd"))))
-
- /* Day heading default format. */
--#define DAY_HEADING_DEFAULT "%B %-d, %Y"
-+#define DAY_HEADING_DEFAULT "%B %d, %Y"
-
- struct date {
- unsigned dd;
Index: patches/patch-src_getstring_c
===================================================================
RCS file: patches/patch-src_getstring_c
diff -N patches/patch-src_getstring_c
--- patches/patch-src_getstring_c 19 Oct 2018 14:19:59 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
-$OpenBSD: patch-src_getstring_c,v 1.1 2018/10/19 14:19:59 naddy Exp $
-
-In some cases (e.g., TERM=pccon0) wgetch(3) can return KEY_ENTER
-instead of '\n' when the return key is pressed, causing getstring()
-to fail.
-
-Index: src/getstring.c
---- src/getstring.c.orig
-+++ src/getstring.c
-@@ -191,7 +191,8 @@ enum getstr getstring(WINDOW * win, char *str, int l,
- getstr_print(win, x, y, &st);
- wins_doupdate();
-
-- if ((ch = wgetch(win)) == '\n')
-+ ch = wgetch(win);
-+ if ((ch == '\n') || (ch == KEY_ENTER))
- break;
- switch (ch) {
- case KEY_BACKSPACE: /* delete one character */
Index: patches/patch-src_notify_c
===================================================================
RCS file: patches/patch-src_notify_c
diff -N patches/patch-src_notify_c
--- patches/patch-src_notify_c 4 Feb 2019 17:44:43 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,55 +0,0 @@
-$OpenBSD: patch-src_notify_c,v 1.1 2019/02/04 17:44:43 sthen Exp $
-
-From 30f411257ad3bc233184c08b846a2980a9c5d1f0 Mon Sep 17 00:00:00 2001
-From: Lukas Fleischer <lfleischer@calcurse.org>
-Date: Sun, 3 Jun 2018 10:26:24 +0200
-Subject: [PATCH] Do not stop already cancelled notification thread
-
-Add a static state variable to indicate whether the notification thread
-is already running or not. Only start the thread if the notification
-thread is paused. Only stop the thread if the notification thread is
-actually running.
-
-Index: src/notify.c
---- src/notify.c.orig
-+++ src/notify.c
-@@ -55,6 +55,7 @@ static struct notify_vars notify;
- static struct notify_app notify_app;
- static pthread_attr_t detached_thread_attr;
- static pthread_t notify_t_main;
-+static int notify_t_main_running;
-
- /*
- * Return the number of seconds before next appointment
-@@ -190,10 +191,12 @@ void notify_free_app(void)
- /* Stop the notify-bar main thread. */
- void notify_stop_main_thread(void)
- {
-- if (notify_t_main) {
-- pthread_cancel(notify_t_main);
-- pthread_join(notify_t_main, NULL);
-- }
-+ if (!notify_t_main_running)
-+ return;
-+
-+ pthread_cancel(notify_t_main);
-+ pthread_join(notify_t_main, NULL);
-+ notify_t_main_running = 0;
- }
-
- /*
-@@ -549,10 +552,12 @@ int notify_same_recur_item(struct recur_apoint *i)
- /* Launch the notify-bar main thread. */
- void notify_start_main_thread(void)
- {
-- /* Avoid starting the notification bar thread twice. */
-- notify_stop_main_thread();
-+ if (notify_t_main_running)
-+ return;
-
- pthread_create(&notify_t_main, NULL, notify_main_thread, NULL);
-+ notify_t_main_running = 1;
-+
- notify_check_next_app(0);
- }
-
Index: patches/patch-src_utils_c
===================================================================
RCS file: patches/patch-src_utils_c
diff -N patches/patch-src_utils_c
--- patches/patch-src_utils_c 12 Nov 2017 14:01:26 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,51 +0,0 @@
-$OpenBSD: patch-src_utils_c,v 1.4 2017/11/12 14:01:26 fcambus Exp $
-Index: src/utils.c
---- src/utils.c.orig
-+++ src/utils.c
-@@ -353,17 +353,19 @@ long get_item_time(long date)
- get_item_min(date) * MININSEC);
- }
-
--int get_item_hour(long date)
-+int get_item_hour(long date_l)
- {
- struct tm lt;
-+ time_t date = date_l;
-
- localtime_r((time_t *) & date, &lt);
- return lt.tm_hour;
- }
-
--int get_item_min(long date)
-+int get_item_min(long date_l)
- {
- struct tm lt;
-+ time_t date = date_l;
-
- localtime_r((time_t *) & date, &lt);
- return lt.tm_min;
-@@ -446,10 +448,11 @@ int date_cmp_day(time_t d1, time_t d2)
- }
-
- /* Return a string containing the date, given a date in seconds. */
--char *date_sec2date_str(long sec, const char *datefmt)
-+char *date_sec2date_str(long sec_l, const char *datefmt)
- {
- struct tm lt;
- char *datestr = (char *)mem_calloc(BUFSIZ, sizeof(char));
-+ time_t sec = sec_l;
-
- if (sec == 0) {
- strncpy(datestr, "0", BUFSIZ);
-@@ -462,8 +465,10 @@ char *date_sec2date_str(long sec, const char *datefmt)
- }
-
- /* Generic function to format date. */
--void date_sec2date_fmt(long sec, const char *fmt, char *datef)
-+void date_sec2date_fmt(long sec_l, const char *fmt, char *datef)
- {
-+ time_t sec = sec_l;
-+
- #if ENABLE_NLS
- /* TODO: Find a better way to deal with localization and strftime(). */
- char *locale_old = mem_strdup(setlocale(LC_ALL, NULL));
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/productivity/calcurse/pkg/PLIST,v
retrieving revision 1.10
diff -u -p -u -r1.10 PLIST
--- pkg/PLIST 28 Apr 2016 14:26:13 -0000 1.10
+++ pkg/PLIST 28 Feb 2019 12:28:19 -0000
@@ -8,23 +8,161 @@ share/doc/calcurse/add.txt
share/doc/calcurse/config.txt
share/doc/calcurse/copy-paste.txt
share/doc/calcurse/credits.txt
+share/doc/calcurse/de/
+share/doc/calcurse/de/add.txt
+share/doc/calcurse/de/config.txt
+share/doc/calcurse/de/copy-paste.txt
+share/doc/calcurse/de/credits.txt
+share/doc/calcurse/de/delete.txt
+share/doc/calcurse/de/displacement.txt
+share/doc/calcurse/de/edit.txt
+share/doc/calcurse/de/enote.txt
+share/doc/calcurse/de/export.txt
+share/doc/calcurse/de/flag.txt
+share/doc/calcurse/de/general.txt
+share/doc/calcurse/de/goto.txt
+share/doc/calcurse/de/import.txt
+share/doc/calcurse/de/intro.txt
+share/doc/calcurse/de/other.txt
+share/doc/calcurse/de/pipe.txt
+share/doc/calcurse/de/priority.txt
+share/doc/calcurse/de/repeat.txt
+share/doc/calcurse/de/save.txt
+share/doc/calcurse/de/tab.txt
+share/doc/calcurse/de/view.txt
+share/doc/calcurse/de/vnote.txt
share/doc/calcurse/delete.txt
share/doc/calcurse/displacement.txt
share/doc/calcurse/edit.txt
share/doc/calcurse/enote.txt
+share/doc/calcurse/es/
+share/doc/calcurse/es/add.txt
+share/doc/calcurse/es/config.txt
+share/doc/calcurse/es/copy-paste.txt
+share/doc/calcurse/es/credits.txt
+share/doc/calcurse/es/delete.txt
+share/doc/calcurse/es/displacement.txt
+share/doc/calcurse/es/edit.txt
+share/doc/calcurse/es/enote.txt
+share/doc/calcurse/es/export.txt
+share/doc/calcurse/es/flag.txt
+share/doc/calcurse/es/general.txt
+share/doc/calcurse/es/goto.txt
+share/doc/calcurse/es/import.txt
+share/doc/calcurse/es/intro.txt
+share/doc/calcurse/es/other.txt
+share/doc/calcurse/es/pipe.txt
+share/doc/calcurse/es/priority.txt
+share/doc/calcurse/es/repeat.txt
+share/doc/calcurse/es/save.txt
+share/doc/calcurse/es/tab.txt
+share/doc/calcurse/es/view.txt
+share/doc/calcurse/es/vnote.txt
share/doc/calcurse/export.txt
share/doc/calcurse/flag.txt
+share/doc/calcurse/fr/
+share/doc/calcurse/fr/add.txt
+share/doc/calcurse/fr/config.txt
+share/doc/calcurse/fr/copy-paste.txt
+share/doc/calcurse/fr/credits.txt
+share/doc/calcurse/fr/delete.txt
+share/doc/calcurse/fr/displacement.txt
+share/doc/calcurse/fr/edit.txt
+share/doc/calcurse/fr/enote.txt
+share/doc/calcurse/fr/export.txt
+share/doc/calcurse/fr/flag.txt
+share/doc/calcurse/fr/general.txt
+share/doc/calcurse/fr/goto.txt
+share/doc/calcurse/fr/import.txt
+share/doc/calcurse/fr/intro.txt
+share/doc/calcurse/fr/other.txt
+share/doc/calcurse/fr/pipe.txt
+share/doc/calcurse/fr/priority.txt
+share/doc/calcurse/fr/repeat.txt
+share/doc/calcurse/fr/save.txt
+share/doc/calcurse/fr/tab.txt
+share/doc/calcurse/fr/view.txt
+share/doc/calcurse/fr/vnote.txt
share/doc/calcurse/general.txt
share/doc/calcurse/goto.txt
share/doc/calcurse/import.txt
share/doc/calcurse/intro.txt
share/doc/calcurse/manual.html
share/doc/calcurse/manual.txt
+share/doc/calcurse/nl/
+share/doc/calcurse/nl/add.txt
+share/doc/calcurse/nl/config.txt
+share/doc/calcurse/nl/copy-paste.txt
+share/doc/calcurse/nl/credits.txt
+share/doc/calcurse/nl/delete.txt
+share/doc/calcurse/nl/displacement.txt
+share/doc/calcurse/nl/edit.txt
+share/doc/calcurse/nl/enote.txt
+share/doc/calcurse/nl/export.txt
+share/doc/calcurse/nl/flag.txt
+share/doc/calcurse/nl/general.txt
+share/doc/calcurse/nl/goto.txt
+share/doc/calcurse/nl/import.txt
+share/doc/calcurse/nl/intro.txt
+share/doc/calcurse/nl/other.txt
+share/doc/calcurse/nl/pipe.txt
+share/doc/calcurse/nl/priority.txt
+share/doc/calcurse/nl/repeat.txt
+share/doc/calcurse/nl/save.txt
+share/doc/calcurse/nl/tab.txt
+share/doc/calcurse/nl/view.txt
+share/doc/calcurse/nl/vnote.txt
share/doc/calcurse/other.txt
share/doc/calcurse/pipe.txt
share/doc/calcurse/priority.txt
+share/doc/calcurse/pt_BR/
+share/doc/calcurse/pt_BR/add.txt
+share/doc/calcurse/pt_BR/config.txt
+share/doc/calcurse/pt_BR/copy-paste.txt
+share/doc/calcurse/pt_BR/credits.txt
+share/doc/calcurse/pt_BR/delete.txt
+share/doc/calcurse/pt_BR/displacement.txt
+share/doc/calcurse/pt_BR/edit.txt
+share/doc/calcurse/pt_BR/enote.txt
+share/doc/calcurse/pt_BR/export.txt
+share/doc/calcurse/pt_BR/flag.txt
+share/doc/calcurse/pt_BR/general.txt
+share/doc/calcurse/pt_BR/goto.txt
+share/doc/calcurse/pt_BR/import.txt
+share/doc/calcurse/pt_BR/intro.txt
+share/doc/calcurse/pt_BR/other.txt
+share/doc/calcurse/pt_BR/pipe.txt
+share/doc/calcurse/pt_BR/priority.txt
+share/doc/calcurse/pt_BR/repeat.txt
+share/doc/calcurse/pt_BR/save.txt
+share/doc/calcurse/pt_BR/tab.txt
+share/doc/calcurse/pt_BR/view.txt
+share/doc/calcurse/pt_BR/vnote.txt
share/doc/calcurse/reload.txt
share/doc/calcurse/repeat.txt
+share/doc/calcurse/ru/
+share/doc/calcurse/ru/add.txt
+share/doc/calcurse/ru/config.txt
+share/doc/calcurse/ru/copy-paste.txt
+share/doc/calcurse/ru/credits.txt
+share/doc/calcurse/ru/delete.txt
+share/doc/calcurse/ru/displacement.txt
+share/doc/calcurse/ru/edit.txt
+share/doc/calcurse/ru/enote.txt
+share/doc/calcurse/ru/export.txt
+share/doc/calcurse/ru/flag.txt
+share/doc/calcurse/ru/general.txt
+share/doc/calcurse/ru/goto.txt
+share/doc/calcurse/ru/import.txt
+share/doc/calcurse/ru/intro.txt
+share/doc/calcurse/ru/other.txt
+share/doc/calcurse/ru/pipe.txt
+share/doc/calcurse/ru/priority.txt
+share/doc/calcurse/ru/repeat.txt
+share/doc/calcurse/ru/save.txt
+share/doc/calcurse/ru/tab.txt
+share/doc/calcurse/ru/view.txt
+share/doc/calcurse/ru/vnote.txt
share/doc/calcurse/save.txt
share/doc/calcurse/submitting-patches.html
share/doc/calcurse/tab.txt

--
Regards,
Mikolaj

No comments:

Post a Comment