svn commit: r553607 - in head/deskutils/calendar: . files
Stefan Eßer
se at FreeBSD.org
Thu Oct 29 11:08:40 UTC 2020
Author: se
Date: Thu Oct 29 11:08:39 2020
New Revision: 553607
URL: https://svnweb.freebsd.org/changeset/ports/553607
Log:
Upgrade to FreeBSD base SVN version r367127.
This upgrade fixes the loading von included files from users' home
directories for calendar -a.
Added:
head/deskutils/calendar/files/patch-calendar.c (contents, props changed)
head/deskutils/calendar/files/patch-events.c (contents, props changed)
Modified:
head/deskutils/calendar/Makefile
head/deskutils/calendar/distinfo
head/deskutils/calendar/files/patch-io.c
Modified: head/deskutils/calendar/Makefile
==============================================================================
--- head/deskutils/calendar/Makefile Thu Oct 29 11:07:35 2020 (r553606)
+++ head/deskutils/calendar/Makefile Thu Oct 29 11:08:39 2020 (r553607)
@@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= calendar
-DISTVERSION= 0.2
+DISTVERSION= 0.3
CATEGORIES= deskutils
MAINTAINER= se at FreeBSD.org
Modified: head/deskutils/calendar/distinfo
==============================================================================
--- head/deskutils/calendar/distinfo Thu Oct 29 11:07:35 2020 (r553606)
+++ head/deskutils/calendar/distinfo Thu Oct 29 11:08:39 2020 (r553607)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1603625001
-SHA256 (bsdimp-calendar-0.1-fcc5d31_GH0.tar.gz) = ad7d0b51c4b834241aebbf6c50d187e5720f6c46c02615b27841a923e082aebc
-SIZE (bsdimp-calendar-0.1-fcc5d31_GH0.tar.gz) = 132824
+TIMESTAMP = 1603969583
+SHA256 (bsdimp-calendar-0.3-fcc5d31_GH0.tar.gz) = ad7d0b51c4b834241aebbf6c50d187e5720f6c46c02615b27841a923e082aebc
+SIZE (bsdimp-calendar-0.3-fcc5d31_GH0.tar.gz) = 132824
Added: head/deskutils/calendar/files/patch-calendar.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/deskutils/calendar/files/patch-calendar.c Thu Oct 29 11:08:39 2020 (r553607)
@@ -0,0 +1,10 @@
+--- calendar.c.orig 2020-10-18 03:01:26 UTC
++++ calendar.c
+@@ -228,6 +228,7 @@ main(int argc, char *argv[])
+ if (setusercontext(lc, pw, pw->pw_uid,
+ LOGIN_SETALL) != 0)
+ errx(1, "setusercontext");
++ setenv("HOME", pw->pw_dir, 1);
+ cal();
+ exit(0);
+ }
Added: head/deskutils/calendar/files/patch-events.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/deskutils/calendar/files/patch-events.c Thu Oct 29 11:08:39 2020 (r553607)
@@ -0,0 +1,14 @@
+--- events.c.orig 2020-10-18 03:01:26 UTC
++++ events.c
+@@ -207,8 +207,9 @@ event_print_all(FILE *fp)
+
+ while (walkthrough_dates(&e) != 0) {
+ #ifdef DEBUG
+- fprintf(stderr, "event_print_allmonth: %d, day: %d\n",
+- month, day);
++ if (e)
++ fprintf(stderr, "event_print_all month: %d, day: %d\n",
++ e->month, e->day);
+ #endif
+
+ /*
Modified: head/deskutils/calendar/files/patch-io.c
==============================================================================
--- head/deskutils/calendar/files/patch-io.c Thu Oct 29 11:07:35 2020 (r553606)
+++ head/deskutils/calendar/files/patch-io.c Thu Oct 29 11:08:39 2020 (r553607)
@@ -1,112 +1,32 @@
---- io.c.orig 2020-10-28 20:58:10 UTC
+--- io.c.orig 2020-10-29 11:04:06 UTC
+++ io.c
-@@ -134,18 +134,66 @@ cal_fopen(const char *file)
- }
-
- static int
--token(char *line, FILE *out, bool *skip)
-+token(char *line, FILE *out, int *skip)
- {
- char *walk, c, a;
-
- if (strncmp(line, "endif", 5) == 0) {
-- *skip = false;
-+ if (*skip > 0)
-+ --*skip;
- return (T_OK);
- }
-
-- if (*skip)
-+ if (strncmp(line, "ifdef", 5) == 0) {
-+ walk = line + 5;
-+ trimlr(&walk);
-+
-+ if (*walk == '\0') {
-+ warnx("Expecting arguments after #ifdef");
-+ return (T_ERR);
-+ }
-+
-+ if (*skip != 0 || definitions == NULL || sl_find(definitions, walk) == NULL)
-+ ++*skip;
-+
- return (T_OK);
-+ }
-
-+ if (strncmp(line, "ifndef", 6) == 0) {
-+ walk = line + 6;
-+ trimlr(&walk);
-+
-+ if (*walk == '\0') {
-+ warnx("Expecting arguments after #ifndef");
-+ return (T_ERR);
-+ }
-+
-+ if (*skip != 0 || (definitions != NULL && sl_find(definitions, walk) != NULL))
-+ ++*skip;
-+
-+ return (T_OK);
-+ }
-+
-+ if (strncmp(line, "else", 4) == 0) {
-+ walk = line + 4;
-+ trimlr(&walk);
-+
-+ if (*walk != '\0') {
-+ warnx("Expecting no arguments after #else");
-+ return (T_ERR);
-+ }
-+
-+ if (*skip == 0)
-+ *skip = 1;
-+ else if (*skip == 1)
-+ *skip = 0;
-+
-+ return (T_OK);
-+ }
-+
-+ if (*skip != 0)
-+ return (T_OK);
-+
- if (strncmp(line, "include", 7) == 0) {
- walk = line + 7;
-
-@@ -206,21 +254,6 @@ token(char *line, FILE *out, bool *skip)
- return (T_OK);
- }
-
-- if (strncmp(line, "ifndef", 6) == 0) {
-- walk = line + 6;
-- trimlr(&walk);
--
-- if (*walk == '\0') {
-- warnx("Expecting arguments after #ifndef");
-- return (T_ERR);
-- }
--
-- if (definitions != NULL && sl_find(definitions, walk) != NULL)
-- *skip = true;
--
-- return (T_OK);
-- }
--
- return (T_PROCESS);
-
- }
-@@ -248,7 +281,7 @@ cal_parse(FILE *in, FILE *out)
- int month[MAXCOUNT];
- int day[MAXCOUNT];
- int year[MAXCOUNT];
-- bool skip = false;
-+ int skip = 0;
- char dbuf[80];
- char *pp, p;
- struct tm tm;
-@@ -278,7 +311,7 @@ cal_parse(FILE *in, FILE *out)
- }
+@@ -209,26 +209,12 @@ token(char *line, FILE *out, int *skip)
+ return (T_ERR);
}
-- if (skip)
-+ if (skip != 0)
- continue;
+- a = *walk;
++ a = *walk == '<' ? '>' : '\"';
+ walk++;
+ c = walk[strlen(walk) - 1];
- buf = line;
+- switch(c) {
+- case '>':
+- if (a != '<') {
+- warnx("Unterminated include expecting '\"'");
+- return (T_ERR);
+- }
+- break;
+- case '\"':
+- if (a != '\"') {
+- warnx("Unterminated include expecting '>'");
+- return (T_ERR);
+- }
+- break;
+- default:
+- warnx("Unterminated include expecting '%c'",
+- a == '<' ? '>' : '\"' );
++ if (a != c) {
++ warnx("Unterminated include expecting '%c'", a);
+ return (T_ERR);
+ }
+ walk[strlen(walk) - 1] = '\0';
More information about the svn-ports-all
mailing list