aboutsummaryrefslogtreecommitdiff
path: root/astro/sunclock
diff options
context:
space:
mode:
authorPatrick Li <pat@FreeBSD.org>2001-12-09 03:14:17 +0000
committerPatrick Li <pat@FreeBSD.org>2001-12-09 03:14:17 +0000
commitae08c8950b3fcf7fca315bcb3bbbccfece0e2a09 (patch)
tree922f484196ac9d7f3f84468ac09c8ad3f0d4fee8 /astro/sunclock
parent73358a5ab027ea1b2796bce8b58ff4853d24bea2 (diff)
downloadports-ae08c8950b3fcf7fca315bcb3bbbccfece0e2a09.tar.gz
ports-ae08c8950b3fcf7fca315bcb3bbbccfece0e2a09.zip
Add patch to fix compile in -CURRENT
Notes
Notes: svn path=/head/; revision=51269
Diffstat (limited to 'astro/sunclock')
-rw-r--r--astro/sunclock/files/patch-aa7
-rw-r--r--astro/sunclock/files/patch-sunclock.c124
-rw-r--r--astro/sunclock/files/patch-sunclock.h11
3 files changed, 139 insertions, 3 deletions
diff --git a/astro/sunclock/files/patch-aa b/astro/sunclock/files/patch-aa
index 74bf07b4ff95..a4dc07c2fd1b 100644
--- a/astro/sunclock/files/patch-aa
+++ b/astro/sunclock/files/patch-aa
@@ -1,5 +1,5 @@
--- Imakefile.orig Tue Aug 14 09:30:24 2001
-+++ Imakefile Fri Aug 24 07:48:14 2001
++++ Imakefile Sat Dec 8 19:39:45 2001
@@ -1,15 +1,17 @@
XCOMM Should install to /usr or /usr/local ??
-DESTDIR=/usr
@@ -21,7 +21,7 @@
XCOMM
XCOMM Compile options:
XCOMM
-@@ -38,13 +40,12 @@
+@@ -38,13 +40,13 @@
#CCOPTIONS=-O -DZLIB -DNEW_CTIME -DSHAREDIR=\"$(DESTDIR)$(SHAREDIR)\"
# Solaris, Linux
@@ -38,10 +38,11 @@
+ZLIBDIR=-L${LOCALBASE}/lib
+JINC=-I${LOCALBASE}/include
+CCOPTIONS=-O -DZLIB -DSHAREDIR=\"$(DESTDIR)$(SHAREDIR)\" -DNEW_CTIME -I${LOCALBASE}/include
++INCLUDES+= -I${LOCALBASE}/include
#endif
SRCS=sunclock.c astro.c widgets.c tildepath.c dirlist.c \
-@@ -52,7 +53,7 @@
+@@ -52,7 +54,7 @@
OBJS=sunclock.o astro.o widgets.o tildepath.o dirlist.o \
readvmf.o readxpm.o readjpeg.o
LOCAL_LIBRARIES=$(XLIB) $(XPMLIBDIR) -lXpm $(ZLIBDIR) -lz \
diff --git a/astro/sunclock/files/patch-sunclock.c b/astro/sunclock/files/patch-sunclock.c
new file mode 100644
index 000000000000..29640034f8dd
--- /dev/null
+++ b/astro/sunclock/files/patch-sunclock.c
@@ -0,0 +1,124 @@
+--- sunclock.c.orig Wed Aug 8 07:53:14 2001
++++ sunclock.c Sat Dec 8 21:24:46 2001
+@@ -125,7 +125,6 @@
+ * external routines
+ */
+
+-extern long time();
+ #ifdef NEW_CTIME
+ extern char * timezone();
+ #endif
+@@ -2062,8 +2061,8 @@
+
+ if (!Context->mark1.city) return;
+
+- time(&Context->time);
+- gtime = Context->time + Context->jump;
++ time(&Context->footime);
++ gtime = Context->footime + Context->jump;
+
+ /* Get local time at given location */
+ setTZ(Context->mark1.city);
+@@ -2212,8 +2211,8 @@
+
+ if (!Context->flags.mapped) return;
+
+- time(&Context->time);
+- gtime = Context->time + Context->jump;
++ time(&Context->footime);
++ gtime = Context->footime + Context->jump;
+
+ if (!Context->wintype) {
+ char num[80];
+@@ -2542,7 +2541,7 @@
+
+ Context->bits = 0;
+ Context->flags.update = 4;
+- Context->time = 0L;
++ Context->footime = 0L;
+ Context->projtime = -1L;
+ Context->roottime = -1L;
+ Context->animtime = -1L;
+@@ -3708,7 +3707,7 @@
+
+ if (button_pressed) return;
+
+- time(&Context->time);
++ time(&Context->footime);
+
+ erase_obj = 1;
+ if (Context->flags.colorlevel == MONOCHROME ||
+@@ -3716,10 +3715,10 @@
+ drawSunAndMoon(Context);
+ erase_obj = 0;
+
+- (void) sunParams(Context->time + Context->jump,
++ (void) sunParams(Context->footime + Context->jump,
+ &Context->sunlon, &Context->sundec, NULL);
+
+- (void) phase(Context->time + Context->jump,
++ (void) phase(Context->footime + Context->jump,
+ &Context->moondec, &Context->moonlon,
+ &junk, &junk, &junk, &junk, &junk, &junk );
+ Context->moonlon = fixangle(Context->moonlon+180.0) - 180.0;
+@@ -3736,10 +3735,10 @@
+ update the illuminated area on the screen. */
+
+ if (Context->projtime < 0 ||
+- (Context->time - Context->projtime) > PROJINT ||
++ (Context->footime - Context->projtime) > PROJINT ||
+ Context->noon != noon || Context->flags.update>=4) {
+ Context->flags.update = 2;
+- Context->projtime = Context->time;
++ Context->projtime = Context->footime;
+ Context->noon = noon;
+ Context->fnoon = fnoon;
+ moveNightArea(Context);
+@@ -4341,8 +4340,8 @@
+ hw = Context->geom.height;
+ if (do_root == 2) hw += Context->hstrip;
+
+- if (abs(Context->time - Context->roottime) >= root_period)
+- Context->roottime = Context->time;
++ if (abs(Context->footime - Context->roottime) >= root_period)
++ Context->roottime = Context->footime;
+ else
+ if (do_root == 2 && mode==0 && rootpix) update = 0;
+
+@@ -4353,7 +4352,7 @@
+ XSetForeground(dpy, Context->gdata->wingc,
+ Context->gdata->pixel[ROOTCOLOR]);
+ XFillRectangle(dpy, rootpix, Context->gdata->wingc, 0, 0, wr, hr);
+- srandom(Context->time);
++ srandom(Context->footime);
+ if (random_rootpos) {
+ rootdx = (double)(random() % 10001)/10000.0;
+ rootdy = (double)(random() % 10001)/10000.0;
+@@ -5299,13 +5298,13 @@
+ Context->flags.update = 2;
+ break;
+ case XK_w:
+- if (Context->time<=last_time+2) return;
++ if (Context->footime<=last_time+2) return;
+ if (do_menu) do_menu = -1;
+ if (do_filesel) do_filesel = -1;
+ if (do_zoom) do_zoom = -1;
+ if (do_option) do_option = -1;
+ buildMap(Context, 1, 1);
+- last_time = Context->time;
++ last_time = Context->footime;
+ keysym = ' ';
+ break;
+ case XK_r:
+@@ -5616,9 +5615,9 @@
+ drawImageToRootWindow(Context, 0);
+ XFlush(dpy);
+ if (Context->flags.animate) {
+- if (abs(Context->time-Context->animtime) >=
++ if (abs(Context->footime-Context->animtime) >=
+ Context->flags.animperiod) {
+- Context->animtime = Context->time;
++ Context->animtime = Context->footime;
+ Context->jump += progress_value[Context->flags.progress];
+ Context->flags.update = 4;
+ }
diff --git a/astro/sunclock/files/patch-sunclock.h b/astro/sunclock/files/patch-sunclock.h
new file mode 100644
index 000000000000..5c74ebaf16ea
--- /dev/null
+++ b/astro/sunclock/files/patch-sunclock.h
@@ -0,0 +1,11 @@
+--- sunclock.h.orig Sat Jul 21 11:49:41 2001
++++ sunclock.h Sat Dec 8 21:28:41 2001
+@@ -224,7 +224,7 @@
+ unsigned char * daypixel; /* pointer to day pixels */
+ unsigned char * nightpixel; /* pointer to night pixels */
+ int ncolors; /* number of colors in day pixels */
+- long time; /* time - real or fake, see flags */
++ time_t footime; /* time - real or fake, see flags */
+ long projtime; /* last time projected illumination */
+ long roottime; /* last time written to root */
+ long animtime; /* last time of animation */